/* ===== Korestack v2 — styles ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Avenir Next', 'Avenir', 'Segoe UI', sans-serif !important; }

:root {
  --purple-dark: #26215C;
  --purple-mid: #534AB7;
  --purple-light: #AFA9EC;
  --purple-pale: #EEEDFE;
  --teal-dark: #0F6E56;
  --teal-mid: #1D9E75;
  --teal-light: #5DCAA5;
  --teal-pale: #E1F5EE;
  --text-primary: #0f0f14;
  --text-secondary: #5a5a72;
  --text-muted: #9898b0;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --border: rgba(83,74,183,0.12);
  --nav-h: 72px;
  --accent-a: var(--purple-mid);
  --accent-b: var(--teal-mid);
  --transition-dur: 520ms;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(250,250,250,0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 0.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  transition: background 0.25s, border-color 0.25s;
}

nav.scrolled { background: rgba(250,250,250,0.92); }

.nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; cursor: pointer; }

.nav-pyramid { flex-shrink: 0; transition: transform 0.4s cubic-bezier(.4,1.4,.5,1); }
.nav-logo:hover .nav-pyramid { transform: rotate(-6deg) scale(1.08); }
.nav-pyramid rect { transform-origin: center; transition: transform 0.4s cubic-bezier(.4,1.4,.5,1); }
.nav-logo:hover .nav-pyramid rect:nth-child(1) { transform: translateY(2px); }
.nav-logo:hover .nav-pyramid rect:nth-child(3) { transform: translateY(-2px); }

.nav-divider {
  width: 1.5px; height: 36px;
  background: linear-gradient(to bottom, var(--purple-mid), var(--teal-mid));
  border-radius: 2px;
}

.nav-wordmark {
  font-family: 'Nunito', sans-serif;
  font-size: 20px; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1;
}

.nav-sub {
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--purple-dark);
  margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: 36px; }

.nav-links a {
  position: relative;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 6px 0;
}

.nav-links a:not(.nav-cta)::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--accent-a);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.35s cubic-bezier(.7,0,.3,1);
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a:not(.nav-cta).is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-links a:not(.nav-cta):hover { color: var(--text-primary); }
.nav-links a.is-active { color: var(--text-primary); }

.nav-cta {
  background: var(--purple-dark) !important;
  color: #fff !important;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 8px;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--purple-mid) !important; transform: translateY(-1px); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent;
  cursor: pointer; position: relative;
  padding: 0;
}
.nav-toggle span {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: var(--text-primary); border-radius: 2px;
  transition: transform 0.35s cubic-bezier(.7,0,.3,1), opacity 0.2s, top 0.35s;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ── PAGES + TRANSITIONS ── */
.page-stage {
  position: relative;
  padding-top: var(--nav-h);
  min-height: 100vh;
}

.page {
  display: none;
  min-height: calc(100vh - var(--nav-h));
}
.page.active { display: block; }

/* Transition style: SLIDE (default) */
body[data-transition="slide"] .page.is-exiting {
  display: block;
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  animation: pageExitSlide var(--transition-dur) cubic-bezier(.7,0,.3,1) forwards;
}
body[data-transition="slide"] .page.is-entering {
  animation: pageEnterSlide var(--transition-dur) cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes pageExitSlide {
  to { opacity: 0; transform: translateX(-7%) scale(0.985); filter: blur(4px); }
}
@keyframes pageEnterSlide {
  from { opacity: 0; transform: translateX(7%) scale(0.985); filter: blur(4px); }
  to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

/* Transition style: BLUR */
body[data-transition="blur"] .page.is-exiting {
  display: block;
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  animation: pageExitBlur var(--transition-dur) ease forwards;
}
body[data-transition="blur"] .page.is-entering {
  animation: pageEnterBlur var(--transition-dur) ease forwards;
}
@keyframes pageExitBlur {
  to { opacity: 0; transform: scale(1.04); filter: blur(20px); }
}
@keyframes pageEnterBlur {
  from { opacity: 0; transform: scale(0.96); filter: blur(20px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Transition style: CURTAIN (animated by JS via overlay element) */
.page-curtain {
  position: fixed; inset: 0; z-index: 200; pointer-events: none;
  transform: translateY(100%);
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 50%, var(--teal-mid) 100%);
}
.page-curtain.in {
  animation: curtainIn var(--transition-dur) cubic-bezier(.85,0,.15,1) forwards;
}
.page-curtain.out {
  animation: curtainOut var(--transition-dur) cubic-bezier(.85,0,.15,1) forwards;
}
@keyframes curtainIn {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
@keyframes curtainOut {
  from { transform: translateY(0); }
  to { transform: translateY(-100%); }
}
.curtain-mark {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 14px;
  opacity: 0; transition: opacity 0.2s 0.15s;
}
.page-curtain.in .curtain-mark { opacity: 1; }

/* Transition: instant */
body[data-transition="instant"] .page.is-exiting { display: none; }
body[data-transition="instant"] .page.is-entering { animation: none; }

/* ── HERO ── */
.hero {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  grid-template-rows: auto auto;
  gap: 48px 5px;
  align-items: center;
  padding: 10px 0 64px 48px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 600px 400px at 80% 50%, rgba(83,74,183,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 20% 80%, rgba(29,158,117,0.08) 0%, transparent 70%);
}

/* Animated mesh blobs */
.hero-mesh {
  position: absolute; inset: -10%; z-index: 0;
  pointer-events: none; opacity: 0.55;
}
.mesh-blob {
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: multiply;
  will-change: transform;
}
.mesh-blob.one {
  background: radial-gradient(circle at center, rgba(83,74,183,0.42), transparent 70%);
  top: -8%; left: -10%;
  animation: meshDrift1 22s ease-in-out infinite;
}
.mesh-blob.two {
  background: radial-gradient(circle at center, rgba(29,158,117,0.36), transparent 70%);
  bottom: -10%; right: -6%;
  animation: meshDrift2 28s ease-in-out infinite;
}
.mesh-blob.three {
  background: radial-gradient(circle at center, rgba(175,169,236,0.50), transparent 70%);
  top: 30%; right: 22%;
  animation: meshDrift3 18s ease-in-out infinite;
}
@keyframes meshDrift1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(80px, 60px) scale(1.15); }
}
@keyframes meshDrift2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(-60px, -90px) scale(0.9); }
}
@keyframes meshDrift3 {
  0%,100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.1); }
  66% { transform: translate(50px, -20px) scale(0.95); }
}

.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: 0.04;
  background-image: linear-gradient(var(--purple-mid) 1px, transparent 1px),
                    linear-gradient(90deg, var(--purple-mid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 75%);
}

body[data-bg="clean"] .hero-mesh { display: none; }
body[data-bg="clean"] .hero-grid { display: none; }
body[data-bg="grid"] .hero-mesh { display: none; }
body[data-bg="grid"] .hero-grid { opacity: 0.08; }
body[data-bg="mesh"] .hero-grid { display: none; }

.hero-content { position: relative; z-index: 1; max-width: 580px; padding-right: 0; grid-column: 1; grid-row: 1 / span 2; align-self: center; }

/* ── HERO VISUAL: agentic architecture + growth ── */
.hero-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  height: min(620px, 75vh);
  align-self: stretch;
  display: flex; align-items: center; justify-content: center;
  grid-column: 2; grid-row: 1;
}
.hero-visual::before {
  content: '';
  position: absolute; inset: -40px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(38,33,92,0.08), transparent 70%),
    radial-gradient(circle 200px at 70% 30%, rgba(83,74,183,0.10), transparent 70%);
  z-index: -1;
}

.hv-stage {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

/* hero wave — ties the whole hero together into the page */
.hero-wave {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: 170px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-wave svg { width: 100%; height: 100%; display: block; }
.hero-wave .wave-back  { animation: waveDrift 14s ease-in-out infinite; transform-origin: center; }
.hero-wave .wave-mid   { animation: waveDrift 10s ease-in-out infinite reverse; transform-origin: center; }
.hero-wave .wave-line  {
  stroke-dasharray: 6 10;
  animation: waveDash 3.5s linear infinite, waveDrift 12s ease-in-out infinite;
  transform-origin: center;
}
@keyframes waveDrift {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(-3%); }
}
@keyframes waveDash {
  to { stroke-dashoffset: -32; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-wave .wave-back, .hero-wave .wave-mid, .hero-wave .wave-line { animation: none; }
}

/* connection lines */
.hv-net {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hv-net line, .hv-net path { stroke: rgba(83,74,183,0.32); stroke-width: 1.2; stroke-linecap: round; fill: none; }

.hv-pulses { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* orchestrator core */
.hv-core {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hv-core-mark {
  position: relative;
  width: 118px; height: 118px;
  background: linear-gradient(155deg, var(--purple-mid) 0%, var(--purple-dark) 100%);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow:
    0 16px 40px -12px rgba(83,74,183,0.6),
    0 0 0 1px rgba(255,255,255,0.10) inset,
    0 1px 0 rgba(255,255,255,0.18) inset;
}
.hv-core-mark svg { width: 58px; height: 54px; }
.hv-core-pulse {
  position: absolute; left: 50%; top: 50%;
  width: 118px; height: 118px;
  border-radius: 18px;
  border: 1.5px solid rgba(83,74,183,0.55);
  transform: translate(-50%, -50%);
  animation: corePulse 3s ease-out infinite;
  pointer-events: none;
}
.hv-core-pulse.delay { animation-delay: 1.5s; border-color: rgba(29,158,117,0.45); }
@keyframes corePulse {
  0% { opacity: 0.7; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(2.6); }
}
.hv-core-label {
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--purple-dark);
  background: rgba(255,255,255,0.85);
  border: 0.5px solid rgba(83,74,183,0.18);
  padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px -8px rgba(38,33,92,0.25);
}

/* agent pills */
.hv-agent {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px;
  width: 170px;
  padding: 12px 20px 12px 15px;
  background: #fff;
  border: 0.5px solid rgba(83,74,183,0.20);
  border-radius: 999px;
  color: var(--purple-dark);
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 800; letter-spacing: 0.10em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 10px 24px -14px rgba(38,33,92,0.35), 0 0 0 1px rgba(255,255,255,0.6) inset;
}
.hv-agent svg { width: 16px; height: 16px; stroke-width: 1.8; }
.hv-agent .hv-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal-mid);
  box-shadow: 0 0 8px rgba(29,158,117,0.55);
  animation: pulse 2s infinite;
}
.hv-agent.purple .hv-dot { background: var(--purple-mid); box-shadow: 0 0 8px rgba(83,74,183,0.55); }
.hv-agent .hv-icon-wrap {
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--teal-pale);
  color: var(--teal-dark);
}
.hv-agent.purple .hv-icon-wrap { background: var(--purple-pale); color: var(--purple-mid); }

/* growth chart card */
.hv-chart {
  position: absolute;
  right: -24px; bottom: 8px;
  width: 300px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255,255,255,0.7);
  border-radius: 16px;
  padding: 20px 22px 18px;
  box-shadow:
    -24px 30px 60px -25px rgba(38,33,92,0.45),
    0 0 0 1px rgba(83,74,183,0.06);
  z-index: 6;
}
.hv-chart-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.hv-chart-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--text-muted);
}
.hv-chart-label .hv-chart-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-mid);
  animation: pulse 2s infinite;
}
.hv-chart-trend {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--teal-pale); color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
}
.hv-chart-trend svg { width: 12px; height: 12px; stroke-width: 2.2; }
.hv-chart-pct {
  font-family: 'DM Serif Display', serif;
  font-size: 46px; line-height: 1;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 50%, var(--teal-mid) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.025em;
  margin-bottom: 16px;
  font-feature-settings: 'tnum';
}
.hv-chart-bars {
  display: grid; grid-template-columns: repeat(9, 1fr);
  gap: 4px; height: 64px; align-items: end;
  margin-bottom: 10px;
}
.hv-bar {
  height: 0;
  background: linear-gradient(180deg, var(--purple-light), var(--purple-mid));
  border-radius: 3px 3px 0 0;
  transition: height 1.2s cubic-bezier(.7,0,.3,1);
  transition-delay: var(--d, 0s);
}
.hv-bar:nth-child(1) { --d: 0.05s; }
.hv-bar:nth-child(2) { --d: 0.10s; }
.hv-bar:nth-child(3) { --d: 0.15s; }
.hv-bar:nth-child(4) { --d: 0.20s; }
.hv-bar:nth-child(5) { --d: 0.25s; }
.hv-bar:nth-child(6) { --d: 0.30s; }
.hv-bar:nth-child(7) { --d: 0.35s; }
.hv-bar:nth-child(8) { --d: 0.40s; }
.hv-bar:nth-child(9) { --d: 0.45s; background: linear-gradient(180deg, var(--teal-light), var(--teal-mid)); }
.hv-chart.in .hv-bar { height: var(--h); }
.hv-chart-foot {
  display: flex; justify-content: space-between;
  font-size: 9px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 8px; border-top: 0.5px dashed rgba(83,74,183,0.18);
}

/* metric chip */
.hv-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: #fff;
  border: 0.5px solid rgba(83,74,183,0.18);
  border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--purple-dark);
  box-shadow: 0 8px 20px -12px rgba(38,33,92,0.3), 0 0 0 1px rgba(255,255,255,0.6) inset;
  z-index: 4;
}
.hv-chip .hv-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-mid);
  box-shadow: 0 0 8px rgba(29,158,117,0.6);
  animation: pulse 2s infinite;
}
.hv-chip.top { top: 4%; left: 50%; transform: translateX(-50%); }


.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--teal-pale);
  color: var(--teal-dark);
  font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 20px; border-radius: 22px;
  margin-bottom: 32px;
  border: 0.5px solid rgba(29,158,117,0.2);
}

.hero-badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-mid);
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(29,158,117,0.5);
}

@keyframes pulse {
  0% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(29,158,117,0.5); }
  70% { opacity: 0.6; transform: scale(0.85); box-shadow: 0 0 0 8px rgba(29,158,117,0); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(29,158,117,0); }
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: italic;
  color: var(--purple-dark);
  position: relative;
}
.hero h1 em::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 4px;
  height: 8px;
  background: var(--teal-pale);
  z-index: -1; opacity: 0.6;
  transform: skewY(-1deg);
}

/* Hero word stagger */
.h1-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  animation: wordIn 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}
.h1-word:nth-child(1) { animation-delay: 0.05s; }
.h1-word:nth-child(2) { animation-delay: 0.15s; }
.h1-word:nth-child(3) { animation-delay: 0.25s; }
.h1-word:nth-child(4) { animation-delay: 0.35s; }
.h1-word:nth-child(5) { animation-delay: 0.45s; }
.h1-word:nth-child(6) { animation-delay: 0.55s; }
@keyframes wordIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
  font-size: 18px; font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  position: relative; overflow: hidden;
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer;
  padding: 14px 32px;
  border-radius: 8px;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.18s, box-shadow 0.25s;
  will-change: transform;
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
}
.btn-primary {
  background: var(--purple-dark); color: #fff; border: 0.5px solid transparent;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 8px 24px -12px rgba(38,33,92,0.5);
}
.btn-primary:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 12px 30px -10px rgba(83,74,183,0.6);
}
/* navy Explore Services button — lift + lighten like the nav Contact Us CTA */
.hero-actions .btn-primary[style*="21305c"]:hover {
  background: #2e4480 !important;
}
.btn-primary .arrow {
  display: inline-block;
  transition: transform 0.25s;
}
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 0.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--purple-mid); color: var(--purple-mid); transform: translateY(-1px); }

.hero-stats {
  display: flex; gap: 40px; margin-top: 0;
  padding-top: 40px;
  border-top: 0.5px solid var(--border);
  position: relative;
  grid-column: 2; grid-row: 2;
  align-self: start;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.hero-stats::before {
  content: '';
  position: absolute; top: -0.5px; left: 0;
  height: 1.5px; width: 0;
  background: linear-gradient(90deg, var(--purple-mid), var(--teal-mid));
  animation: lineDraw 1.4s 0.6s cubic-bezier(.7,0,.3,1) forwards;
}
@keyframes lineDraw { to { width: 100%; } }

.stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 44px; color: var(--purple-mid);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-num em { font-style: italic; color: var(--teal-mid); font-size: 0.6em; vertical-align: 0.4em; margin-left: 2px; }

.stat-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-top: 6px;
}

/* ── SECTION COMMONS ── */
section { padding: 96px 48px; }

.section-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--teal-mid); margin-bottom: 16px;
}
.section-eyebrow::before {
  content: ''; width: 24px; height: 1.5px; background: var(--teal-mid);
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12; color: var(--text-primary);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.section-body {
  font-size: 17px; font-weight: 500;
  color: var(--text-secondary); line-height: 1.8;
  max-width: 560px;
}

/* Reveal on scroll */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(.2,.8,.2,1), transform 0.8s cubic-bezier(.2,.8,.2,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
.reveal[data-delay="5"] { transition-delay: 0.40s; }
.reveal[data-delay="6"] { transition-delay: 0.48s; }

/* ── WHY KORESTACK ── */
.why { background: var(--bg); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 64px;
  align-items: start;
}

.why-items { display: flex; flex-direction: column; gap: 16px; margin-top: 0; }

.why-item {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 24px;
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 14px;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative; overflow: hidden;
}
.why-item::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--accent-a);
  transform: scaleY(0); transform-origin: top;
  transition: transform 0.4s cubic-bezier(.7,0,.3,1);
}
.why-item:hover::before { transform: scaleY(1); }
.why-item:hover {
  border-color: var(--purple-light);
  transform: translateX(4px);
  box-shadow: 0 12px 40px -20px rgba(83,74,183,0.3);
}

.why-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(.4,1.4,.5,1);
}
.why-item:hover .why-icon { transform: rotate(-6deg) scale(1.06); }
.why-icon.purple { background: var(--purple-pale); color: var(--purple-mid); }
.why-icon.teal { background: var(--teal-pale); color: var(--teal-dark); }
.why-icon svg { width: 22px; height: 22px; stroke-width: 1.5; }

.why-item-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 4px;
}

.why-item-body {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary); line-height: 1.6;
}

.why-visual {
  position: sticky; top: calc(var(--nav-h) + 24px);
  background: var(--purple-dark);
  border-radius: 16px;
  padding: 48px 40px;
  color: #fff;
  overflow: hidden;
  position: sticky;
}
.why-visual {
  background: linear-gradient(155deg, var(--purple-dark) 0%, #1a1645 100%);
}
.why-visual::before {
  content: '';
  position: absolute; top: -50%; right: -30%;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(93,202,165,0.18), transparent 70%);
}

.why-visual-quote {
  font-family: 'DM Serif Display', serif;
  font-size: 28px; line-height: 1.25;
  color: #fff; margin-bottom: 36px;
  position: relative;
  letter-spacing: -0.005em;
}
.why-visual-quote em { color: var(--teal-light); font-style: italic; }
.why-visual-quote::before {
  content: '“';
  position: absolute; top: -24px; left: -8px;
  font-size: 80px;
  color: rgba(93,202,165,0.18);
  font-family: 'DM Serif Display', serif;
}

.why-visual-bars { display: flex; flex-direction: column; gap: 14px; position: relative; }

.bar-row { display: flex; align-items: center; gap: 12px; }
.bar-label { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); width: 78px; flex-shrink: 0; }
.bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 3px;
  width: 0;
  transition: width 1.4s cubic-bezier(.7,0,.3,1);
}
.bar-fill.purple { background: linear-gradient(90deg, var(--purple-light), #fff); }
.bar-fill.teal { background: linear-gradient(90deg, var(--teal-light), #d4f5e7); }
.bar-pct { font-family: 'DM Serif Display', serif; font-size: 16px; color: rgba(255,255,255,0.9); width: 40px; text-align: right; flex-shrink: 0; font-feature-settings: 'tnum'; }

/* ── CTA Banner ── */
.cta-banner {
  background: var(--purple-dark);
  padding: 80px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before, .cta-banner::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.cta-banner::before {
  top: -120px; left: -80px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(175,169,236,0.22), transparent 70%);
}
.cta-banner::after {
  bottom: -150px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(93,202,165,0.18), transparent 70%);
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 18px; }
.cta-title { font-family: 'DM Serif Display', serif; font-size: clamp(32px, 4.5vw, 52px); color: #fff; margin-bottom: 28px; line-height: 1.1; letter-spacing: -0.01em; }
.cta-title em { font-style: italic; color: var(--purple-pale); }

/* ── SERVICES PAGE ── */
.services-hero {
  padding: 100px 48px 64px;
  background: linear-gradient(155deg, var(--purple-dark) 0%, #1a1645 100%);
  color: #fff;
  position: relative; overflow: hidden;
}
.services-hero::before {
  content: '';
  position: absolute; top: -40%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(29,158,117,0.18), transparent 70%);
  border-radius: 50%;
}
.services-hero::after {
  content: '';
  position: absolute; bottom: -50%; left: 10%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(83,74,183,0.30), transparent 70%);
  border-radius: 50%;
}
.services-hero > * { position: relative; z-index: 1; }
.services-hero .section-eyebrow { color: var(--teal-light); }
.services-hero .section-eyebrow::before { background: var(--teal-light); }
.services-hero .section-title { color: #fff; }
.services-hero .section-body { color: rgba(255,255,255,0.7); max-width: 580px; }

.services-grid {
  padding: 64px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px 36px;
  transition: border-color 0.3s, transform 0.4s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 800px;
}

.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
}

.service-card.purple::before { background: linear-gradient(90deg, var(--purple-mid), var(--purple-dark)); }
.service-card.teal::before { background: linear-gradient(90deg, var(--teal-mid), var(--teal-dark)); }

.service-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(83,74,183,0.06), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.service-card.teal::after {
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(29,158,117,0.06), transparent 50%);
}
.service-card:hover::after { opacity: 1; }

.service-card:hover {
  border-color: var(--purple-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -25px rgba(38,33,92,0.30);
}

.service-card.teal:hover { border-color: var(--teal-light); }

.service-number {
  font-family: 'DM Serif Display', serif;
  font-size: 56px; color: var(--purple-pale);
  line-height: 1; margin-bottom: 18px;
  font-style: italic;
  transition: color 0.3s;
}

.service-card.teal .service-number { color: var(--teal-pale); }
.service-card:hover .service-number { color: var(--purple-light); }
.service-card.teal:hover .service-number { color: var(--teal-light); }

.service-title {
  font-size: 21px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 12px;
  letter-spacing: -0.005em;
}

.service-desc {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 24px;
}

.service-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.service-list li {
  font-size: 16px; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: 10px;
}

.service-list li::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--purple-mid);
  flex-shrink: 0; margin-top: 8px;
  box-shadow: 0 0 0 3px rgba(83,74,183,0.12);
}

.service-card.teal .service-list li::before {
  background: var(--teal-mid);
  box-shadow: 0 0 0 3px rgba(29,158,117,0.12);
}

/* ── PROCESS ── */
.process { background: #f5f4fb; padding: 96px 48px; position: relative; }

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-top: 56px;
  background: var(--border);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.process-step {
  background: var(--bg-card);
  padding: 40px 28px 36px;
  position: relative;
  border: 0.5px solid var(--border);
  border-radius: 14px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.process-step:hover {
  background: #fdfcff;
  border-color: var(--purple-light);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px -25px rgba(38,33,92,0.30);
}
.process-step:hover .step-num { color: var(--purple-mid); }

.step-num {
  font-family: 'DM Serif Display', serif;
  font-size: 56px; color: var(--purple-mid);
  line-height: 1; margin-bottom: 16px;
  font-style: italic;
  display: flex; align-items: baseline; gap: 8px;
}
.step-num::after {
  content: '';
  width: 28px; height: 1.5px;
  background: var(--purple-light);
  display: inline-block; margin-bottom: 8px;
}

.step-title {
  font-size: 17px; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px;
}

.step-desc {
  font-size: 16px; font-weight: 500;
  color: var(--text-secondary); line-height: 1.6;
}

/* ── CONTACT PAGE ── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: calc(100vh - var(--nav-h));
}

.contact-left {
  background: linear-gradient(155deg, var(--purple-dark) 0%, #1a1645 100%);
  padding: 80px 56px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.contact-left::before {
  content: '';
  position: absolute; top: -120px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83,74,183,0.30), transparent 70%);
}

.contact-left::after {
  content: '';
  position: absolute; bottom: -100px; right: -100px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(29,158,117,0.18);
}

.contact-left > * { position: relative; z-index: 1; }

.contact-left .section-eyebrow { color: var(--teal-light); }
.contact-left .section-eyebrow::before { background: var(--teal-light); }
.contact-left .section-title { color: #fff; margin-bottom: 16px; }
.contact-left .section-body { color: rgba(255,255,255,0.7); margin-bottom: 48px; }

.contact-info { display: flex; flex-direction: column; gap: 22px; }

.contact-info-item {
  display: flex; align-items: flex-start; gap: 16px;
}

.contact-info-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--teal-light);
}
.contact-info-icon svg { width: 18px; height: 18px; stroke-width: 1.5; }

.contact-info-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); margin-bottom: 4px;
}

.contact-info-value {
  font-size: 16px; color: rgba(255,255,255,0.92); font-weight: 400;
}

.contact-right {
  background: var(--bg-card);
  padding: 80px 56px;
}

.form-title {
  font-family: 'DM Serif Display', serif;
  font-size: 30px; color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}
.form-sub { font-size: 16px; color: var(--text-secondary); margin-bottom: 32px; font-weight: 500; }

.form-group { margin-bottom: 20px; position: relative; }

.form-label {
  display: block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
  transition: color 0.2s;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 0.5px solid rgba(83,74,183,0.18);
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px; color: var(--text-primary);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple-mid);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(83,74,183,0.08);
}
.form-group:focus-within .form-label { color: var(--purple-mid); }

.form-textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-submit {
  width: 100%;
  background: var(--purple-dark);
  color: #fff;
  padding: 16px 32px;
  border-radius: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 24px -12px rgba(38,33,92,0.5);
}
.form-submit:hover { background: var(--purple-mid); transform: translateY(-1px); box-shadow: 0 12px 30px -10px rgba(83,74,183,0.6); }
.form-submit .arrow { transition: transform 0.25s; }
.form-submit:hover .arrow { transform: translateX(3px); }

/* ── FOOTER ── */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding: 56px 48px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 24px;
  position: relative; overflow: hidden;
}

.footer-left { display: flex; align-items: center; gap: 14px; }

.footer-copy { font-size: 16px; color: var(--text-secondary); }

.footer-links { display: flex; gap: 28px; }

.footer-links a {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-primary); text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal-dark); }

/* ── SUCCESS MSG ── */
.success-msg {
  display: none;
  background: var(--teal-pale);
  border: 0.5px solid rgba(29,158,117,0.3);
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--teal-dark);
  font-size: 14px; font-weight: 600;
  margin-top: 16px;
  text-align: center;
  align-items: center; justify-content: center; gap: 10px;
}
.success-msg.show { display: flex; animation: slideUp 0.4s ease both; }
.success-msg.error {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.28);
  color: #b91c1c;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* form-submit disabled state (during send) */
.form-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  nav { padding: 0 32px; }
  section { padding: 80px 32px; }
  .hero { grid-template-columns: 1fr; gap: 48px; padding: 64px 32px; min-height: auto; }
  .hero-content { grid-column: 1; grid-row: 1; }
  .hero-visual { grid-column: 1; grid-row: 2; height: 480px; max-width: 600px; margin: 0 auto; }
  .hv-stage { margin-right: auto; }
  .hv-chart { right: 0; }
  .services-hero { padding: 80px 32px 56px; }
  .services-grid { padding: 56px 32px; gap: 20px; }
  .process { padding: 80px 32px; }
  .cta-banner { padding: 64px 32px; }
  .why-grid { gap: 32px; }
  .why-visual { padding: 36px 28px; }
  .why-visual-quote { font-size: 24px; }
  .contact-left, .contact-right { padding: 64px 40px; }
  footer { padding: 48px 32px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  nav { padding: 0 20px; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(250,250,250,0.98);
    backdrop-filter: blur(20px);
    padding: 16px 20px 24px;
    border-bottom: 0.5px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.4s cubic-bezier(.7,0,.3,1);
    align-items: stretch;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a {
    padding: 16px 4px;
    border-bottom: 0.5px solid var(--border);
    font-size: 14px;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a.nav-cta {
    margin-top: 12px; text-align: center;
    border-radius: 8px;
  }
  .nav-toggle { display: block; }
  .nav-wordmark { font-size: 17px; letter-spacing: 0.14em; }
  .nav-sub { font-size: 8px; letter-spacing: 0.24em; }
  .nav-divider { height: 30px; }

  section { padding: 64px 20px; }
  .hero { grid-template-columns: 1fr; padding: 48px 20px 64px; min-height: auto; gap: 32px; }
  .hero-visual { height: 420px; }
  .hv-core-mark { width: 64px; height: 64px; border-radius: 14px; }
  .hv-core-mark svg { width: 32px; height: 30px; }
  .hv-core-pulse { width: 64px; height: 64px; border-radius: 14px; }
  .hv-agent { font-size: 10px; width: 130px; padding: 6px 10px 6px 8px; gap: 6px; letter-spacing: 0.06em; }
  .hv-agent .hv-icon-wrap { width: 16px; height: 16px; }
  .hv-agent svg { width: 11px; height: 11px; }
  .hv-chart { width: 240px; right: -8px; bottom: 0; padding: 16px 18px 14px; }
  .hv-chart-pct { font-size: 36px; margin-bottom: 12px; }
  .hv-chart-bars { height: 48px; }
  .hv-chip.top { font-size: 9px; padding: 5px 10px; }
  .hero h1 { font-size: clamp(36px, 9vw, 54px); }
  .hero-sub { font-size: 16px; margin-bottom: 32px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { flex: 1; padding: 14px 20px; }
  .hero-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-top: 48px; padding-top: 32px;
  }
  .stat-num { font-size: 32px; }
  .stat-label { font-size: 10px; }

  .why-grid { grid-template-columns: 1fr; gap: 32px; }
  .why-visual { position: static; padding: 32px 24px; }
  .why-visual-quote { font-size: 22px; margin-bottom: 28px; }

  .services-hero { padding: 64px 20px 48px; }
  .services-grid { padding: 48px 20px; grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 32px 24px 28px; }
  .service-number { font-size: 48px; }
  .service-title { font-size: 19px; }

  .process { padding: 64px 20px; }
  .process-steps { grid-template-columns: 1fr; }

  .cta-banner { padding: 56px 20px; }
  .cta-title { font-size: clamp(28px, 7vw, 40px); }

  .contact-layout { grid-template-columns: 1fr; }
  .contact-left, .contact-right { padding: 56px 24px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }

  footer {
    padding: 36px 20px;
    flex-direction: column; align-items: flex-start; gap: 20px;
  }
}

@media (max-width: 480px) {
  .hero-stats { gap: 12px; }
  .stat-num { font-size: 28px; }
  .why-visual-quote { font-size: 20px; }
  .cta-title { font-size: 28px; }
  .form-title { font-size: 26px; }
}

/* ── TWEAKS PANEL ── */
.tweaks-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 320px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(18px);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 16px;
  z-index: 999;
  box-shadow: 0 24px 60px -20px rgba(38,33,92,0.25), 0 0 0 1px rgba(255,255,255,0.6) inset;
  font-family: 'Nunito', sans-serif;
  display: none;
  animation: tweakIn 0.35s cubic-bezier(.2,.8,.2,1);
}
.tweaks-panel.open { display: block; }
@keyframes tweakIn { from { opacity: 0; transform: translateY(20px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.tweaks-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.tweaks-title { font-size: 11px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-primary); }
.tweaks-close {
  width: 24px; height: 24px; border-radius: 6px; border: none;
  background: transparent; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.tweaks-close:hover { background: var(--purple-pale); color: var(--purple-mid); }

.tweak-section { margin-bottom: 14px; }
.tweak-section:last-child { margin-bottom: 0; }
.tweak-label {
  display: block;
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 8px;
}

.tweak-segs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--purple-pale);
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}
.tweak-seg {
  background: transparent; border: none; cursor: pointer;
  font-family: inherit;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 7px 6px; border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  text-transform: uppercase;
}
.tweak-seg:hover { color: var(--purple-mid); }
.tweak-seg.active { background: #fff; color: var(--purple-dark); box-shadow: 0 1px 3px rgba(38,33,92,0.1); }

.tweak-foot {
  margin-top: 14px; padding-top: 12px; border-top: 0.5px dashed var(--border);
  font-size: 10px; color: var(--text-muted); text-align: center; letter-spacing: 0.06em;
}

@media (max-width: 480px) {
  .tweaks-panel { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE OVERRIDES — beat residual inline styles on mobile
   ============================================================ */

/* Tablet & below: kill fixed widths/paddings on hero block */
@media (max-width: 1024px) {
  .hero { padding: 48px 32px 56px !important; }
  .hero-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 0 0 !important;
    height: auto !important;
  }
  .hero-visual {
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
  }
  .hv-stage {
    width: 100% !important;
    max-width: 600px !important;
    height: 480px !important;
    margin: 0 auto !important;
  }
  .services-hero {
    padding: 64px 32px 48px !important;
    border-radius: 14px;
  }
}

/* Phone: tighter padding, single-column stack, smaller hero visual */
@media (max-width: 768px) {
  .hero { padding: 32px 20px 56px !important; gap: 24px !important; }
  .hero-content { padding: 16px 0 0 !important; }
  .hero-visual {
    max-width: 100% !important;
    height: 380px !important;
  }
  .hv-stage {
    max-width: 100% !important;
    height: 380px !important;
    margin: 0 !important;
  }
  /* Nav contact CTA: stretch to full width inside mobile drawer */
  .nav-links a.nav-cta {
    width: 100% !important;
    padding: 12px 18px !important;
    font-size: 13px !important;
    text-align: center !important;
  }
  /* Hero text scale */
  .hero h1 { font-size: clamp(32px, 8vw, 48px) !important; }
  /* Why section overrides for inline padding */
  .why-left { padding: 0 !important; }
  .why-visual { padding: 28px 22px !important; }
  /* Services hero padding override */
  .services-hero { padding: 48px 22px 36px !important; }
  /* Process step nowrap titles */
  .process .section-title { white-space: normal !important; }
  /* Footer logo + text wrap nicely */
  footer .footer-links { flex-wrap: wrap; gap: 16px 22px; }
}

/* Small phones: pull in pill positions so they don't clip the stage */
@media (max-width: 560px) {
  .hv-agent {
    width: 110px !important;
    padding: 5px 8px 5px 6px !important;
    font-size: 9px !important;
    letter-spacing: 0.05em !important;
  }
  .hv-agent[style*="left:27.5%"] { left: 22% !important; }
  .hv-agent[style*="left:72.5%"] { left: 78% !important; }
  .hv-core-label { font-size: 10px !important; padding: 3px 8px !important; letter-spacing: 0.18em !important; }
  .hero-visual, .hv-stage { height: 320px !important; }
  /* Tighter hero badge */
  .hero-badge { font-size: 11px; padding: 6px 14px; letter-spacing: 0.1em; }
  /* CTA banner padding */
  .cta-banner { padding: 48px 20px !important; }
  /* Contact panels: minimum breathing room */
  .contact-left, .contact-right { padding: 40px 22px !important; }
  /* Service card padding */
  .service-card { padding: 28px 22px 24px !important; }
}

/* Extra small (≤400px): keep typography readable, drop hero visual height further */
@media (max-width: 400px) {
  .hero-visual, .hv-stage { height: 280px !important; }
  .hv-core-mark, .hv-core-pulse { width: 56px !important; height: 56px !important; border-radius: 12px !important; }
  .hv-core-mark svg { width: 28px !important; height: 26px !important; }
  .hv-agent { width: 96px !important; font-size: 8.5px !important; gap: 4px !important; }
  .hv-agent .hv-icon-wrap { width: 14px !important; height: 14px !important; }
  .hv-agent svg { width: 9px !important; height: 9px !important; }
  .hero-stats { grid-template-columns: 1fr !important; text-align: center; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn-primary, .hero-actions .btn-secondary { width: 100%; }
}

/* Prevent horizontal overflow at any width.
   NOTE: overflow-x:hidden only on body — putting it on html breaks
   position:fixed on iOS Safari, which makes the nav header disappear. */
body { overflow-x: hidden; }
img, svg { max-width: 100%; }

/* ── MOBILE NAV: bulletproof visibility ─────────────────────────
   Force the nav bar to render solid + on top at all viewport sizes
   so it never gets hidden by translucency/blur fallbacks or stacking
   issues on mobile browsers. */
nav {
  z-index: 1000 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

@media (max-width: 768px) {
  /* Fully opaque on mobile — blur fallbacks can leave the bar invisible */
  nav {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 1px 0 rgba(38, 33, 92, 0.04);
    padding: 0 14px !important;
    gap: 8px;
  }
  /* Drop the hamburger drawer — show all 3 links inline.
     With only Home / Services / Contact, they fit comfortably. */
  .nav-toggle { display: none !important; }
  .nav-links {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    transition: none !important;
  }
  .nav-links a {
    padding: 6px 2px !important;
    border-bottom: none !important;
    font-size: 11px !important;
    letter-spacing: 0.06em !important;
    white-space: nowrap;
  }
  .nav-links a.nav-cta {
    width: auto !important;
    margin-top: 0 !important;
    padding: 8px 14px !important;
    font-size: 11px !important;
    border-radius: 7px;
  }
  /* Shrink the logo block so the inline links fit on narrow screens */
  .nav-wordmark { font-size: 15px !important; letter-spacing: 0.12em !important; }
  .nav-sub { font-size: 7px !important; letter-spacing: 0.2em !important; }
  .nav-divider { height: 28px !important; }
}

@media (max-width: 420px) {
  /* Tiny phones: tighten everything in the nav so links never clip */
  nav { padding: 0 10px !important; gap: 6px !important; }
  .nav-logo { gap: 8px !important; }
  .nav-pyramid { width: 32px !important; height: 32px !important; }
  .nav-wordmark { font-size: 13px !important; letter-spacing: 0.08em !important; }
  .nav-sub { display: none !important; }
  .nav-divider { height: 24px !important; }
  .nav-links { gap: 8px !important; }
  .nav-links a { font-size: 10px !important; padding: 4px 1px !important; letter-spacing: 0.04em !important; }
  .nav-links a.nav-cta { padding: 6px 10px !important; font-size: 10px !important; }
}

/* ── WEBSITE REBUILD PAGE ── */
.service-learn {
  margin-top: 20px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--purple-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}
.service-learn .arrow { display: inline-block; transition: transform 0.25s; }
.service-card:hover .service-learn .arrow { transform: translateX(3px); }

.rebuild-stats { display: flex; flex-direction: column; gap: 14px; position: relative; }
.rebuild-stat {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
}
.rebuild-stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 32px; color: var(--teal-light);
  line-height: 1; flex-shrink: 0; min-width: 84px;
  font-feature-settings: 'tnum';
}
.rebuild-stat-label {
  font-size: 14px; font-weight: 600;
  color: rgba(255,255,255,0.75); line-height: 1.45;
}

/* ── Scorer ── */
.scorer { background: #f5f4fb; padding: 96px 48px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.scorer-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.scorer .section-body { max-width: 560px; margin: 0 auto 36px; }
.scorer-form { display: flex; gap: 12px; max-width: 560px; margin: 0 auto 14px; }
.scorer-input {
  flex: 1; min-width: 0;
  padding: 16px 20px;
  font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 600;
  border: 1.5px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.scorer-input:focus { border-color: var(--purple-mid); box-shadow: 0 0 0 4px rgba(83,74,183,0.12); }
.scorer-btn {
  padding: 16px 26px;
  background: var(--purple-dark); color: #fff;
  border: none; border-radius: 12px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 800;
  cursor: pointer; white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}
.scorer-btn:hover { background: var(--purple-mid); transform: translateY(-1px); }
.scorer-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.scorer-btn .arrow { display: inline-block; transition: transform 0.25s; }
.scorer-btn:hover .arrow { transform: translateX(3px); }
.scorer-status { min-height: 24px; font-size: 14px; font-weight: 700; color: var(--purple-mid); margin-bottom: 4px; }
.scorer-status.error { color: #C13515; }
.scorer-note { font-size: 12.5px; color: var(--text-secondary); opacity: 0.75; margin-top: 8px; }

.scorer-results {
  margin-top: 36px; text-align: left;
  background: #fff;
  border: 0.5px solid var(--border); border-radius: 18px;
  padding: 40px;
  box-shadow: 0 24px 60px -30px rgba(38,33,92,0.18);
}
.score-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.score-rings { display: flex; gap: 20px; flex-shrink: 0; }
.score-ring-block { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.score-ring-caption {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-secondary);
}
.score-ring {
  --p: 0; --ring: var(--teal-mid);
  width: 116px; height: 116px; border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--p) * 1%), #ECEBF6 0);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.9s cubic-bezier(.4,0,.2,1);
}
.score-ring.is-loading {
  animation: ringPulse 1.2s ease-in-out infinite;
  background: conic-gradient(#C9C6E0 25%, #ECEBF6 0);
}
@keyframes ringPulse { 0%,100% { opacity: 0.5; } 50% { opacity: 1; } }
.score-ring-inner {
  width: 92px; height: 92px; border-radius: 50%;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-num { font-family: 'DM Serif Display', serif; font-size: 36px; line-height: 1; color: var(--text-primary); }
.score-denom { font-size: 9px; font-weight: 800; color: var(--text-secondary); letter-spacing: 0.1em; margin-top: 4px; }
.score-meta { flex: 1; min-width: 220px; }
.score-grade { font-family: 'DM Serif Display', serif; font-size: 26px; margin-bottom: 6px; }
.score-url { font-size: 13px; font-weight: 700; color: var(--text-secondary); word-break: break-all; margin-bottom: 10px; }
.score-blurb { font-size: 15px; font-weight: 500; color: var(--text-secondary); line-height: 1.6; }
.score-shot {
  width: 96px; border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px -10px rgba(0,0,0,0.25);
}
.score-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 32px; }
.score-col-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 14px;
}
.score-col-title.bad { color: #C13515; }
.score-col-title.good { color: var(--teal-dark); }
.score-item {
  display: flex; gap: 10px;
  font-size: 14.5px; font-weight: 500;
  color: var(--text-secondary); line-height: 1.55;
  margin-bottom: 12px;
}
.score-item .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.score-item .dot.bad { background: #D64545; }
.score-item .dot.warn { background: #E09F3E; }
.score-item .dot.good { background: var(--teal-mid); }
.score-cta {
  margin-top: 30px; padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.score-cta-text { font-size: 15px; font-weight: 600; color: var(--text-primary); max-width: 440px; }

/* AI design-review block */
.design-box {
  margin-top: 32px; padding-top: 28px;
  border-top: 1px solid var(--border);
}
.design-loading {
  font-size: 14px; font-weight: 700; color: var(--purple-mid);
  display: flex; align-items: center; gap: 8px;
}
.design-loading::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--purple-pale); border-top-color: var(--purple-mid);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.design-box .score-col-title { margin-bottom: 16px; }
.design-era-chip {
  display: inline-block;
  font-size: 13px; font-weight: 600;
  color: var(--purple-dark);
  background: var(--purple-pale);
  padding: 6px 14px; border-radius: 20px;
  margin-bottom: 16px;
}
.design-era-chip strong { font-weight: 800; }

/* Local-presence checker dimensions */
.dim-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-top: 32px;
}
.dim-card {
  background: #f8f7fc;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 16px 18px;
}
.dim-name {
  font-size: 10.5px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px; min-height: 26px;
}
.dim-score { font-family: 'DM Serif Display', serif; font-size: 28px; line-height: 1; margin-bottom: 10px; }
.dim-bar { height: 6px; background: #ECEBF6; border-radius: 3px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 3px; transition: width 0.9s cubic-bezier(.7,0,.3,1); }
.lc-tip {
  margin-top: 28px;
  padding: 14px 18px;
  background: var(--purple-pale);
  border-radius: 12px;
  font-size: 13.5px; font-weight: 600;
  color: var(--purple-dark); line-height: 1.55;
}

/* ── Pricing plans (Managed Hosting page) ── */
.plans { padding: 96px 48px; }
.plan-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; max-width: 1000px; margin: 48px auto 0;
  align-items: stretch;
}
.plan-card {
  background: var(--bg-card);
  border: 0.5px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 28px;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform 0.3s cubic-bezier(.2,.8,.2,1), box-shadow 0.3s, border-color 0.3s;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -25px rgba(38,33,92,0.28); }
.plan-card.featured {
  border: 1.5px solid var(--purple-mid);
  box-shadow: 0 24px 60px -30px rgba(83,74,183,0.4);
}
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--purple-mid); color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 14px; border-radius: 20px; white-space: nowrap;
}
.plan-name { font-size: 15px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); margin-bottom: 12px; }
.plan-price { font-family: 'DM Serif Display', serif; font-size: 44px; color: var(--text-primary); line-height: 1; }
.plan-price span { font-family: 'Nunito', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-secondary); }
.plan-setup { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 8px 0 22px; }
.plan-list { list-style: none; margin: 0 0 26px; padding: 0; flex: 1; }
.plan-list li {
  font-size: 14.5px; font-weight: 500; color: var(--text-secondary);
  padding: 8px 0 8px 26px; position: relative; line-height: 1.45;
  border-bottom: 0.5px solid var(--border);
}
.plan-list li:last-child { border-bottom: none; }
.plan-list li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 14px; height: 8px; border-left: 2px solid var(--teal-mid); border-bottom: 2px solid var(--teal-mid);
  transform: rotate(-45deg);
}
.plan-list li strong { color: var(--text-primary); font-weight: 800; }
.plan-btn {
  width: 100%; padding: 13px; border-radius: 10px;
  font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 800;
  cursor: pointer; transition: background 0.2s, transform 0.2s, border-color 0.2s;
  background: transparent; color: var(--purple-dark); border: 1.5px solid var(--border);
}
.plan-btn:hover { border-color: var(--purple-mid); color: var(--purple-mid); transform: translateY(-1px); }
.plan-btn.featured { background: var(--purple-dark); color: #fff; border-color: var(--purple-dark); }
.plan-btn.featured:hover { background: var(--purple-mid); border-color: var(--purple-mid); }
.plans-note { text-align: center; font-size: 13.5px; color: var(--text-secondary); margin-top: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ── Host detector result ── */
.hd-head { margin-bottom: 8px; }
.hd-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.hd-badge {
  display: flex; flex-direction: column; gap: 3px;
  background: #f8f7fc; border: 0.5px solid var(--border);
  border-radius: 10px; padding: 10px 14px; min-width: 120px;
}
.hd-badge-label { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-secondary); }
.hd-badge-value { font-size: 15px; font-weight: 800; color: var(--text-primary); }
.hd-verdict { font-family: 'DM Serif Display', serif; font-size: 24px; color: var(--text-primary); line-height: 1.25; }
.hd-verdict strong { color: var(--purple-mid); font-weight: 400; }
.hd-sub { font-size: 15px; font-weight: 500; color: var(--text-secondary); line-height: 1.6; margin-top: 8px; }

@media (max-width: 900px) {
  .scorer { padding: 72px 24px; }
  .score-cols { grid-template-columns: 1fr; gap: 20px; }
  .dim-grid { grid-template-columns: repeat(2, 1fr); }
  .plans { padding: 72px 24px; }
  .plan-grid { grid-template-columns: 1fr; max-width: 420px; gap: 32px; }
}
@media (max-width: 560px) {
  .scorer { padding: 56px 20px; }
  .scorer-form { flex-direction: column; }
  .scorer-results { padding: 28px 22px; }
  .score-head { gap: 20px; }
  .score-rings { gap: 14px; }
  .score-ring { width: 104px; height: 104px; }
  .score-ring-inner { width: 82px; height: 82px; }
  .score-num { font-size: 30px; }
}
