/* ==========================================================================
   VyomX  -  Amazon Advertising
   Single stylesheet. Sections:
   1. Tokens   2. Base   3. Layout & type   4. Header & nav   5. Buttons
   6. Effects (cursor, reveal, grain, progress, preloader)   7. Components
   8. Page-specific   9. Footer   10. Responsive   11. Reduced motion
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  --black: #000;
  --ink: #0a0a0a;
  --panel: #0f0f0f;
  --white: #fff;
  --paper: #f4f4f2;
  --fg: var(--white);
  --bg: var(--black);
  --muted: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.4);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.32);

  --font-display: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3: clamp(1.9rem, 1.45rem + 2.1vw, 3.2rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.6rem);
  --step-5: clamp(2.7rem, 1.5rem + 5.4vw, 6.4rem);

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
  color-scheme: dark;
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--white); color: var(--black); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; border-radius: 4px; }
.section--light :focus-visible { outline-color: var(--black); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--white); color: var(--black); padding: 12px 18px; border-radius: 999px; font-weight: 600;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 3. Layout & type --------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 12vw, 168px); position: relative; }
.section--tight { padding-block: clamp(56px, 8vw, 104px); }
.section--light { background: var(--paper); color: var(--black); --muted: rgba(0,0,0,.64); --faint: rgba(0,0,0,.45); --line: rgba(0,0,0,.14); --line-strong: rgba(0,0,0,.32); color-scheme: light; }
.section--line { border-top: 1px solid var(--line); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.04; letter-spacing: -0.01em; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.045em; line-height: 1.02; text-wrap: balance; }
.dim { color: var(--faint); }
h1.display { font-size: var(--step-5); }
h2.display { font-size: var(--step-4); }
h3 { font-size: var(--step-1); font-weight: 500; letter-spacing: -0.005em; line-height: 1.25; }
p { margin: 0 0 1em; }
.lead { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 44ch; font-weight: 300; }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 400;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line-strong);
  border-radius: 999px; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.tag--solid { background: var(--white); color: var(--black); border-color: var(--white); }
.section--light .tag--solid { background: var(--black); color: var(--white); border-color: var(--black); }

.section-head { display: grid; gap: 24px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head--split { grid-template-columns: 1fr; align-items: end; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1.3fr 1fr; gap: 64px; } }

/* 4. Header & nav ---------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center;
  transition: transform 0.5s var(--ease), background-color 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled { background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; color: var(--white); }
.logo-lockup { height: 40px; width: auto; }
.logo-lockup path, .logo-lockup circle { vector-effect: non-scaling-stroke; }

.nav-list { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 40px); list-style: none; margin: 0; padding: 0; }
.nav-link { position: relative; font-size: 0.95rem; color: var(--muted); transition: color 0.3s; padding-block: 6px; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--white);
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--white); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none; position: relative; z-index: 120; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: transparent; cursor: pointer;
}
.nav-toggle span { position: absolute; left: 14px; right: 14px; height: 1.5px; background: var(--white); transition: transform 0.45s var(--ease), top 0.45s var(--ease); }
.nav-toggle span:nth-child(1) { top: 19px; }
.nav-toggle span:nth-child(2) { top: 27px; }
.nav-open .nav-toggle span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { top: 23px; transform: rotate(-45deg); }

/* 5. Buttons --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--white); --btn-fg: var(--black);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 28px; border-radius: 999px; border: 1px solid var(--btn-bg);
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 500; font-size: 0.98rem; letter-spacing: 0.01em;
  cursor: pointer; overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--btn-fg);
  border-radius: inherit; transform: translateY(101%); transition: transform 0.55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--btn-bg); border-color: var(--btn-bg); }
.btn .arrow { width: 16px; height: 16px; transition: transform 0.5s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--white); border-color: var(--line-strong); color: var(--white); }
.btn--ghost::before { background: var(--white); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: var(--black); border-color: var(--white); }
.section--light .btn { --btn-bg: var(--black); --btn-fg: var(--white); }
.section--light .btn--ghost { --btn-bg: transparent; --btn-fg: var(--black); color: var(--black); border-color: var(--line-strong); }
.section--light .btn--ghost::before { background: var(--black); }
.section--light .btn--ghost:hover { color: var(--white); border-color: var(--black); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.magnetic { will-change: transform; }

.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: gap 0.4s var(--ease), border-color 0.3s; }
.link-arrow:hover { gap: 16px; border-color: currentColor; }

/* 6. Effects --------------------------------------------------------------- */
/* Film grain overlay for depth */
.grain {
  pointer-events: none; position: fixed; inset: -50%; z-index: 90; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5%, 4%); } 40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 7%); } 80% { transform: translate(6%, -2%); }
}

/* Scroll progress */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 110; background: var(--white); transform-origin: left; transform: scaleX(0); mix-blend-mode: difference; }

/* Custom cursor (enabled by JS only on fine pointers) */
.cursor, .cursor-dot { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; border-radius: 50%; mix-blend-mode: difference; opacity: 0; transition: opacity 0.3s; }
.cursor { width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 1px solid var(--white); transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background-color 0.4s, opacity 0.3s; }
.cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--white); }
.has-cursor .cursor, .has-cursor .cursor-dot { opacity: 1; }
.cursor.is-hover { width: 72px; height: 72px; margin: -36px 0 0 -36px; background: var(--white); }
.cursor.is-down { width: 28px; height: 28px; margin: -14px 0 0 -14px; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor summary, .has-cursor label, .has-cursor select { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }

/* Reveal on scroll (only hidden when JS is running) */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-line { display: block; overflow: hidden; }
.js .reveal-line > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: var(--d, 0s); }
.js .is-in .reveal-line > span, .js .reveal-line.is-in > span { transform: none; }

/* Split headline words */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--i) * 70ms + var(--base, 0ms)); }
.split.is-in .w > span { transform: none; }

@keyframes draw { to { stroke-dashoffset: 0; } }

/* Spotlight hover for cards */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity 0.5s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.10), transparent 60%);
}
.spot:hover::before { opacity: 1; }

/* 7. Components ------------------------------------------------------------ */
/* Hero */
.hero { min-height: 100svh; display: flex; align-items: center; padding-top: calc(var(--header-h) + 48px); padding-bottom: 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: center; }
@media (min-width: 1000px) { .hero-grid { grid-template-columns: 1.25fr 1fr; } }
.hero h1 { margin: 28px 0 32px; font-size: clamp(2.6rem, 1.3rem + 3.9vw, 5rem); }
.hero .lead { margin-bottom: 40px; }
.hero-bg-lines { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc((min(100vw, var(--maxw)) - 2 * var(--gutter)) / 6) 100%;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%);
}
.page-hero { padding-top: calc(var(--header-h) + clamp(64px, 12vw, 160px)); padding-bottom: clamp(56px, 8vw, 112px); position: relative; overflow: hidden; }
.page-hero h1 { margin: 24px 0 28px; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; margin-top: 56px; font-size: var(--step--1); color: var(--faint); letter-spacing: 0.14em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 40px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; background: var(--white); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }


/* Marquee (brand logos) */
.marquee-wrap { border-block: 1px solid var(--line); padding-block: 36px; overflow: hidden; }
.marquee-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.marquee { --gap: clamp(48px, 6vw, 96px); display: flex; overflow: hidden; user-select: none; gap: var(--gap);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { flex-shrink: 0; display: flex; align-items: center; gap: var(--gap); min-width: 100%; justify-content: space-around; list-style: none; margin: 0; padding: 0;
  animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track, .marquee.is-paused .marquee-track { animation-play-state: paused; }
.marquee-track img { height: 44px; width: auto; opacity: 0.55; filter: grayscale(1); transition: opacity 0.4s, transform 0.4s var(--ease); }
.marquee-track li:hover img { opacity: 1; transform: scale(1.06); }
@keyframes marquee { to { transform: translateX(calc(-100% - var(--gap))); } }
.marquee-toggle { background: none; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: 0.8rem; cursor: pointer; }
.marquee-toggle:hover { color: var(--white); border-color: var(--white); }

/* Scroll-highlighted statement */
.statement { font-family: var(--font-display); font-size: var(--step-3); font-weight: 500; line-height: 1.15; letter-spacing: -0.035em; max-width: 26ch; }
.statement .w { opacity: 0.18; transition: opacity 0.4s; }
.statement .w.lit { opacity: 1; }
.statement:not(.is-ready) .w { opacity: 1; }

/* Service cards */
.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1050px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg); padding: clamp(28px, 3vw, 44px); display: flex; flex-direction: column; gap: 18px; min-height: 340px; transition: background-color 0.5s; }
.card:hover { background: var(--ink); }
.card-num { font-family: var(--font-display); font-size: 1.1rem; color: var(--faint); }
.card h3 { font-size: var(--step-2); font-family: var(--font-display); font-weight: 400; line-height: 1.05; }
.card p { color: var(--muted); margin: 0; }
.card .link-arrow { margin-top: auto; align-self: flex-start; font-size: 0.92rem; }
.card-icon { width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; transition: transform 0.6s var(--ease), background-color 0.4s, color 0.4s; }
.card-icon svg { width: 20px; height: 20px; }
.card:hover .card-icon { transform: rotate(-45deg); background: var(--white); color: var(--black); }

/* Offer block */
.offer { position: relative; overflow: hidden; }
.offer-grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
@media (min-width: 960px) { .offer-grid { grid-template-columns: 1.1fr 1fr; } }
.offer-big { font-family: var(--font-display); font-size: clamp(7rem, 4rem + 18vw, 20rem); line-height: 0.8; letter-spacing: -0.04em; display: flex; align-items: flex-start; }
.offer-big sup { font-size: 0.35em; line-height: 1; margin-top: 0.12em; }
.offer-big-label { font-size: var(--step-1); margin-top: 12px; }
.offer-list { list-style: none; padding: 0; margin: 28px 0 40px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.offer-list li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.offer-list li svg { width: 22px; height: 22px; margin-top: 3px; }
.offer-list strong { display: block; font-weight: 600; }
.offer-list span { color: var(--muted); font-size: 0.95rem; }
.offer-fine { font-size: 0.8rem; color: var(--faint); margin-top: 20px; }
.offer-ring { position: absolute; right: -10%; bottom: -30%; width: 60vmax; height: 60vmax; border: 1px solid var(--line); border-radius: 50%; pointer-events: none; }
.offer-ring::after { content: ""; position: absolute; inset: 12%; border: 1px solid var(--line); border-radius: 50%; }

/* Offer banner (compact, used on inner pages) */
.offer-banner { border: 1px solid var(--line); border-radius: 28px; padding: clamp(28px, 5vw, 64px); display: grid; gap: 28px; align-items: center; position: relative; overflow: hidden; background: radial-gradient(800px circle at 0% 0%, rgba(255,255,255,0.07), transparent 60%); }
@media (min-width: 900px) { .offer-banner { grid-template-columns: auto 1fr auto; gap: 48px; } }
.offer-banner .offer-big { font-size: clamp(5rem, 3rem + 8vw, 9rem); }
.offer-banner h2 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.1; margin-bottom: 10px; }
.offer-banner p { color: var(--muted); margin: 0; max-width: 52ch; }

/* Stats / counters */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 32px 20px 32px 0; border-bottom: 1px solid var(--line); }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
@media (max-width: 899px) { .stat:nth-child(3) { padding-left: 0; border-left: 0; } }
.stat-value { font-family: var(--font-display); font-size: var(--step-4); line-height: 1; letter-spacing: -0.03em; }
.stat-label { color: var(--muted); font-size: 0.92rem; margin-top: 10px; max-width: 22ch; }

/* Process (sticky) */
.process { display: grid; gap: 48px; }
@media (min-width: 960px) { .process { grid-template-columns: 1fr 1.2fr; gap: 96px; } .process-sticky { position: sticky; top: calc(var(--header-h) + 48px); align-self: start; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { padding: 40px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 72px 1fr; gap: 16px; }
.step:last-child { border-bottom: 1px solid var(--line); }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--font-display); font-size: var(--step-2); line-height: 1; color: var(--faint); transition: color 0.5s; }
.step.is-in::before { color: var(--fg); }
.step h3 { font-family: var(--font-display); font-size: var(--step-2); margin-bottom: 12px; line-height: 1.05; }
.step p { color: var(--muted); margin: 0; }
.step .tag { margin-top: 16px; }

/* Split comparison (Seller vs Vendor) */
.compare { display: grid; gap: 20px; }
@media (min-width: 860px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare-col { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 3.5vw, 48px); transition: border-color 0.4s, transform 0.6s var(--ease); }
.compare-col:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.compare-col h3 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; margin: 18px 0 14px; }
.compare-col > p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--muted); }
.ticks li::before { content: ""; width: 14px; height: 8px; margin-top: 7px; border-left: 1.5px solid var(--fg); border-bottom: 1.5px solid var(--fg); transform: rotate(-45deg); }

/* Case study cards */
.notice { display: flex; gap: 14px; align-items: flex-start; border: 1px dashed var(--line-strong); border-radius: 14px; padding: 16px 20px; color: var(--muted); font-size: 0.92rem; }
.notice strong { color: var(--fg); }
.notice svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }
.cases { display: grid; gap: 20px; }
@media (min-width: 860px) { .cases { grid-template-columns: repeat(2, 1fr); } }
.case { border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 18px; transition: border-color 0.4s, transform 0.6s var(--ease), opacity 0.4s; background: var(--bg); }
.case:hover { border-color: var(--line-strong); transform: translateY(-6px); }
.case[hidden] { display: none; }
.case-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.case h3 { font-family: var(--font-display); font-size: var(--step-2); line-height: 1.05; }
.case dl { margin: 0; display: grid; gap: 14px; }
.case dt { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.case dd { margin: 4px 0 0; color: var(--muted); }
.case-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-top: auto; }
.case-results div { background: var(--bg); padding: 16px 12px; }
.case-results strong { display: block; font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1; font-weight: 400; }
.case-results span { font-size: 0.75rem; color: var(--muted); line-height: 1.3; display: block; margin-top: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter { border: 1px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 999px; padding: 10px 18px; cursor: pointer; font-size: 0.9rem; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.filter:hover { color: var(--white); border-color: var(--white); }
.filter[aria-pressed="true"] { background: var(--white); color: var(--black); border-color: var(--white); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0; cursor: pointer; font-size: var(--step-1); font-weight: 400; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: 0 0 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 50%; position: relative; transition: transform 0.5s var(--ease), background-color 0.3s; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.faq summary .plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq details[open] summary .plus { transform: rotate(45deg); background: var(--fg); color: var(--bg); }
.faq .faq-body { padding: 0 0 28px; color: var(--muted); max-width: 70ch; }

/* Final CTA */
.cta-final { text-align: center; }
.cta-final h2 { font-size: var(--step-4); margin: 24px auto 40px; max-width: 16ch; }
.cta-final .btn-row { justify-content: center; }
.mail-big { display: inline-block; font-family: var(--font-display); font-size: var(--step-3); font-weight: 400; letter-spacing: -0.03em; margin-top: 40px; position: relative; }
.mail-big::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.05em; height: 1px; background: currentColor; transform: scaleX(0.3); transform-origin: left; transition: transform 0.7s var(--ease); }
.mail-big:hover::after { transform: scaleX(1); }

/* 8. Page-specific --------------------------------------------------------- */
/* Services page sub-navigation */
.subnav { position: sticky; top: 0; z-index: 50; background: rgba(0,0,0,0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); transition: top 0.5s var(--ease); }
.header-visible .subnav { top: var(--header-h); }
.subnav ul { display: flex; gap: 8px; list-style: none; margin: 0; padding: 12px 0; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; white-space: nowrap; padding: 8px 16px; border-radius: 999px; font-size: 0.88rem; color: var(--muted); border: 1px solid transparent; transition: color 0.3s, border-color 0.3s, background-color 0.3s; }
.subnav a:hover { color: var(--white); border-color: var(--line-strong); }
.subnav a.is-active { background: var(--white); color: var(--black); }

.service { display: grid; gap: 32px; padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
@media (min-width: 960px) { .service { grid-template-columns: 0.9fr 1.1fr; gap: 80px; } }
.service-index { font-family: var(--font-display); font-size: var(--step-1); color: var(--faint); }
.service h2 { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; margin: 14px 0 20px; }
.service .lead { font-size: var(--step-0); max-width: 48ch; }
.service-cols { display: grid; gap: 28px; }
@media (min-width: 640px) { .service-cols { grid-template-columns: 1fr 1fr; } }
.service-cols h3 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 4px; }
.kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ACoS / TACoS calculator */
.calc { border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); display: grid; gap: 40px; }
@media (min-width: 960px) { .calc { grid-template-columns: 1fr 1fr; gap: 64px; } }
.field { display: grid; gap: 8px; }
.field label { font-size: 0.85rem; color: var(--muted); }
.input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); padding: 12px 0; font-size: var(--step-1);
  border-radius: 0; transition: border-color 0.3s; -webkit-appearance: none; appearance: none;
}
.input:focus { outline: none; border-color: var(--fg); }
.input:focus-visible { outline: none; box-shadow: 0 1px 0 0 var(--fg); }
select.input { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 8px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 32px; }
select.input option { background: var(--black); color: var(--white); }
textarea.input { resize: vertical; min-height: 140px; font-size: var(--step-0); line-height: 1.6; }
.calc-fields { display: grid; gap: 28px; }
.calc-out { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; align-content: start; }
.calc-out > div { background: var(--bg); padding: 24px; }
.calc-out small { font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.calc-out output { display: block; font-family: var(--font-display); font-size: var(--step-4); line-height: 1; margin: 8px 0; }
.calc-out p { color: var(--muted); font-size: 0.88rem; margin: 0; }
.formula { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; color: var(--muted); }

/* Contact page */
.contact-grid { display: grid; gap: clamp(48px, 7vw, 112px); }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }
.contact-email { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 16px 0 40px; }
.contact-email a { font-family: var(--font-display); font-size: var(--step-2); font-weight: 400; letter-spacing: -0.03em; line-height: 1.1; word-break: break-word; }
.copy-btn { border: 1px solid var(--line-strong); background: transparent; border-radius: 999px; padding: 8px 16px; font-size: 0.85rem; color: var(--muted); cursor: pointer; transition: color 0.3s, border-color 0.3s; }
.copy-btn:hover { color: var(--white); border-color: var(--white); }
.next-steps { list-style: none; margin: 0; padding: 0; counter-reset: ns; border-top: 1px solid var(--line); }
.next-steps li { counter-increment: ns; display: grid; grid-template-columns: 48px 1fr; padding: 20px 0; border-bottom: 1px solid var(--line); }
.next-steps li::before { content: "0" counter(ns); font-family: var(--font-display); font-size: 1.3rem; color: var(--faint); }
.next-steps strong { display: block; font-weight: 500; }
.next-steps span { color: var(--muted); font-size: 0.95rem; }
.form { display: grid; gap: 28px; border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 48px); }
.form-row { display: grid; gap: 28px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.form legend { font-size: 0.85rem; color: var(--muted); margin-bottom: 12px; padding: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { position: relative; }
.check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.check span { display: inline-block; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.88rem; color: var(--muted); transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.check input:checked + span { background: var(--white); color: var(--black); border-color: var(--white); }
.check input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 3px; }
.check:hover span { border-color: var(--white); color: var(--white); }
.check input:checked:hover + span { color: var(--black); }
.req { color: var(--fg); }
.form-note { font-size: 0.82rem; color: var(--faint); margin: 0; }
.form-status { min-height: 1.6em; font-size: 0.92rem; margin: 0; }
.field-error { font-size: 0.8rem; color: var(--white); text-decoration: underline; text-decoration-style: wavy; text-underline-offset: 3px; }
.input[aria-invalid="true"] { border-color: var(--white); border-bottom-width: 2px; }

/* 9. Footer ---------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(64px, 9vw, 120px) 0 32px; position: relative; overflow: hidden; }
.footer-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-logo { width: 120px; height: auto; margin-bottom: 24px; }
.footer-grid h2 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); transition: color 0.3s; }
.footer-grid a:hover { color: var(--white); }
.footer-word { margin-top: clamp(48px, 8vw, 96px); color: rgba(255,255,255,0.22); }
.footer-word svg { width: 100%; height: auto; }
.footer-word path, .footer-word circle { vector-effect: non-scaling-stroke; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 32px; color: var(--faint); font-size: 0.82rem; }
.footer-bottom p { margin: 0; }

/* Page transition veil */
.veil { position: fixed; inset: 0; z-index: 9000; background: var(--black); pointer-events: none; opacity: 0; transition: opacity 0.45s var(--ease); }
.is-leaving .veil { opacity: 1; }

/* 10. Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --header-h: 68px; }
  .logo-lockup { height: 34px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 0; z-index: 110; background: var(--black); display: flex; flex-direction: column; justify-content: center;
    padding: calc(var(--header-h) + 24px) var(--gutter) 40px; clip-path: circle(0% at calc(100% - 40px) 34px);
    transition: clip-path 0.8s var(--ease); visibility: hidden;
  }
  .nav-open .site-nav { clip-path: circle(150% at calc(100% - 40px) 34px); visibility: visible; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 8px; }
  .nav-link { font-family: var(--font-display); font-size: clamp(2.6rem, 11vw, 4rem); color: var(--white); line-height: 1.1; }
  .nav-link::after { display: none; }
  .nav-list .btn { margin-top: 28px; }
  .nav-open { overflow: hidden; }
  .nav-open .site-header { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .brand { position: relative; z-index: 120; }
}
@media (max-width: 560px) {
  .case-results { grid-template-columns: 1fr; }
  .case-results div { display: flex; align-items: baseline; gap: 12px; }
  .step { grid-template-columns: 1fr; }
  .btn-row .btn { width: 100%; }
  .marquee-track img { height: 36px; }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 12px; }
  .stat:nth-child(3) { padding-left: 0; }
  .scroll-cue { display: none; }
  .card { min-height: 0; }
}

/* 11. Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .grain { display: none; }
  .js .reveal, .js .reveal-line > span, .split .w > span { opacity: 1; transform: none; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 28px; min-width: 0; }
  .marquee { -webkit-mask-image: none; mask-image: none; justify-content: center; }
  .marquee-track[aria-hidden="true"], .marquee-toggle { display: none; }
  .statement .w { opacity: 1; }
}

/* 12. Typography weights for the sans display face -------------------------- */
.card h3, .step h3, .compare-col h3, .case h3, .service h2, .offer-banner h2, .calc-out output,
.stat-value, .case-results strong, .step::before, .next-steps li::before {
  font-weight: 500; letter-spacing: -0.035em;
}
.offer-big { font-weight: 300; letter-spacing: -0.06em; }
.card h3 { font-size: var(--step-1); line-height: 1.2; }
.step::before, .next-steps li::before, .service-index { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0; font-size: 0.85rem; }
.tag, .kpis .tag { font-family: var(--font-mono); letter-spacing: 0.04em; }
.stat-value, .calc-out output, .case-results strong { font-variant-numeric: tabular-nums; }

/* 13. Hero dashboard (glass) ----------------------------------------------- */
.hero-copy { min-width: 0; }
.dash-stage { position: relative; padding: 72px 0 56px; perspective: 1400px; min-width: 0; }
.blob { position: absolute; border-radius: 50%; filter: blur(48px); pointer-events: none; z-index: 0; }
.blob.b1 { width: 58%; aspect-ratio: 1; left: -8%; top: 2%; background: radial-gradient(circle, rgba(255,255,255,0.55), rgba(255,255,255,0) 68%); animation: drift 14s ease-in-out infinite alternate; }
.blob.b2 { width: 46%; aspect-ratio: 1; right: -6%; bottom: 0; background: radial-gradient(circle, rgba(255,255,255,0.4), rgba(255,255,255,0) 68%); animation: drift 18s ease-in-out -6s infinite alternate-reverse; }
.blob.b3 { width: 30%; aspect-ratio: 1; right: 22%; top: -6%; background: radial-gradient(circle, rgba(160,160,160,0.6), rgba(160,160,160,0) 70%); animation: drift 11s ease-in-out -3s infinite alternate; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 100% { transform: translate(8%, 10%) scale(1.12); } }

.glass {
  background: linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.04) 55%, rgba(255,255,255,0.07));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.28), inset 0 -1px 0 rgba(255,255,255,0.04), 0 30px 80px -20px rgba(0,0,0,0.9);
}
.dash { position: relative; z-index: 1; margin: 0; border-radius: 22px; padding: clamp(16px, 2vw, 24px); transform-style: preserve-3d; transition: transform 0.6s var(--ease); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-title { display: block; font-weight: 500; font-size: 0.98rem; letter-spacing: -0.01em; }
.dash-sub { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--faint); margin-top: 2px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.12); }
.seg button { border: 0; background: transparent; color: var(--muted); font-family: var(--font-mono); font-size: 0.72rem; padding: 6px 11px; border-radius: 999px; cursor: pointer; transition: background-color 0.3s, color 0.3s; }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--black); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--white); }
.kpis-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.kpi { border-radius: 14px; padding: 12px 12px 8px; background: rgba(0,0,0,0.32); border: 1px solid rgba(255,255,255,0.09); display: flex; flex-direction: column; min-width: 0; }
.kpi-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.35rem); font-weight: 500; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-delta { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); margin-top: 2px; min-height: 1.2em; white-space: nowrap; }
.kpi-delta.good::before { content: "\25B2  "; font-size: 0.8em; }
.kpi-delta.good.down::before { content: "\25BC  "; }
.kpi-spark { width: 100%; height: 24px; margin-top: 6px; overflow: visible; }
.kpi-spark path { fill: none; stroke: rgba(255,255,255,0.75); stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.dash-chart { position: relative; border-radius: 14px; padding: 14px 14px 8px; background: rgba(0,0,0,0.32); border: 1px solid rgba(255,255,255,0.09); }
.dash-chart-label { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; color: var(--muted); margin-bottom: 8px; }
.mono { font-family: var(--font-mono); }
.dash-chart-label .mono { font-size: 0.7rem; color: var(--faint); }
#dash-svg { width: 100%; height: auto; overflow: visible; cursor: crosshair; touch-action: pan-y; }
.dash-grid line { stroke: rgba(255,255,255,0.08); }
.dash-grid text { fill: rgba(255,255,255,0.4); font-family: var(--font-mono); font-size: 10px; }
.dash-line { fill: none; stroke: var(--white); stroke-width: 2; stroke-linejoin: round; }
.dash-area { fill: url(#dashFill); }
.dash-cross { stroke: rgba(255,255,255,0.35); stroke-dasharray: 3 4; opacity: 0; transition: opacity 0.2s; }
.dash-dot { fill: var(--black); stroke: var(--white); stroke-width: 2; opacity: 0; transition: opacity 0.2s; }
.dash.is-hover .dash-cross, .dash.is-hover .dash-dot { opacity: 1; }
.dash-tip { position: absolute; top: 34px; left: 0; z-index: 3; pointer-events: none; border-radius: 12px; padding: 10px 12px; font-size: 0.75rem; line-height: 1.5; white-space: nowrap; background: rgba(20,20,20,0.6); }
.dash-tip b { display: block; font-family: var(--font-mono); font-weight: 400; font-size: 0.68rem; color: var(--faint); }
.js .dash-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .is-in .dash-line { animation: draw 2s var(--ease) 0.5s forwards; }

.float-card { position: absolute; z-index: 2; border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 180px; animation: bob 7s ease-in-out infinite; }
.fc1 { right: -6%; bottom: 0; }
.fc2 { left: 4%; top: 0; animation-delay: -3s; }
.fc-term { font-size: 0.85rem; font-weight: 500; }
.fc-term small { font-family: var(--font-mono); font-weight: 400; font-size: 0.65rem; color: var(--faint); margin-left: 4px; }
.fc-move { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.fc-move svg { width: 14px; height: 14px; }
.fc-move span:last-child { color: var(--black); background: var(--white); border-radius: 999px; padding: 1px 8px; }
.fc-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,0.15); overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: var(--white); border-radius: inherit; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 1100px) { .fc1 { right: -2%; } }
@media (max-width: 560px) {
  .kpis-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .float-card { position: relative; inset: auto; animation: none; min-width: 0; margin-top: 12px; }
  .dash-stage { padding: 8px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .blob, .float-card { animation: none; }
  .js .dash-line { stroke-dashoffset: 0; }
}
