/* ==========================================================================
   Stacked.biz — design system
   Extracted from the Claude Design canvas (Stacked.biz SEO Agency).

   Token contrast (WCAG 2.2 AA, on --bg #F6F4EE):
     --ink       16.84:1    --body     14.40:1
     --muted      4.91:1    --faint     4.64:1   --accent-ink 4.95:1
   The canvas used #8F8A7C (3.13:1) and #2F6BE4 (4.40:1) for small text;
   both are darkened here for text roles only. The original --accent is
   kept verbatim for fills, rules, graphics and display type (needs 3:1).
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */

:root {
  /* Colour */
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #16130e;
  --body: #26221a;
  --muted: #6e6a5e;
  --faint: #726e60;
  --faint-deco: #8f8a7c;      /* decorative / non-text only */
  --accent: #2f6be4;          /* fills, rules, graphics, display type */
  --accent-ink: #2b63d6;      /* small accent text — AA on --bg */
  --accent-rgb: 47, 107, 228;

  --rule: rgba(22, 19, 14, 0.14);
  --rule-soft: rgba(22, 19, 14, 0.07);
  --hairline: rgba(22, 19, 14, 0.1);
  --wash: rgba(22, 19, 14, 0.03);

  /* Type */
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 40px);
  --nav-h: 68px;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

/* ---------- 2. Reset & base --------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Keep in-page anchors clear of the fixed nav. */
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote {
  margin: 0;
}

img,
svg {
  max-width: 100%;
}

a {
  color: var(--body);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-ink);
}

::selection {
  background: rgba(var(--accent-rgb), 0.9);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 12px;
  color: var(--bg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- 3. Layout primitives ---------------------------------------- */

.shell {
  position: relative;
  min-height: 100vh;
  overflow: clip;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 860px;
}

.container--tight {
  max-width: 680px;
}

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(72px, 10vw, 130px);
}

.section--ruled {
  border-top: 1px solid var(--rule);
}

.section--center {
  text-align: center;
}

/* ---------- 4. Type scale ----------------------------------------------- */

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.eyebrow--quiet {
  color: var(--faint);
  letter-spacing: 0.26em;
}

.display {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(48px, 7.2vw, 92px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
  text-wrap: balance;
}

.h2 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}

.h3 {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.lede--large {
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--body);
}

.prose {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

em.serif,
.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.mono-note {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--faint);
}

/* Masked line-lift headings: each line sits in its own overflow clip. */
.lift-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.lift-line > span {
  display: inline-block;
}

/* ---------- 5. Buttons & links ------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 54px;
  padding-inline: 30px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--sm {
  height: 40px;
  padding-inline: 22px;
  font-size: 15px;
}

.btn .arrow {
  font-family: var(--serif);
  font-style: normal;
}

.link-underline {
  font-size: 16px;
  font-weight: 500;
  color: var(--body);
  border-bottom: 1px solid rgba(22, 19, 14, 0.3);
  padding-bottom: 3px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.link-underline:hover,
.link-underline:focus-visible {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.link-more {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-ink);
}

/* ---------- 6. Ambient effects ------------------------------------------ */

#spotlight {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

#grain {
  position: fixed;
  inset: -40%;
  width: 180%;
  height: 180%;
  z-index: 3;
  opacity: 0.35;
  pointer-events: none;
  animation: grainShift 9s steps(4) infinite;
}

.cursor-ring {
  position: fixed;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border: 1.5px solid rgba(22, 19, 14, 0.32);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  transform: translate(-200px, -200px);
  transition: width 0.22s ease, height 0.22s ease, border-color 0.22s ease,
    opacity 0.3s ease;
}

.cursor-ring.is-hot {
  width: 54px;
  height: 54px;
  border-color: var(--accent);
}

.glow {
  position: absolute;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(var(--accent-rgb), 0.08),
    transparent 65%
  );
}

.ghost-word {
  position: absolute;
  z-index: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(140px, 18vw, 260px);
  line-height: 1;
  color: rgba(22, 19, 14, 0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.ghost-word--sans {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(120px, 17vw, 240px);
  letter-spacing: -0.05em;
  color: rgba(22, 19, 14, 0.03);
}

@keyframes grainShift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(-1.5%, 1%);
  }
  50% {
    transform: translate(1%, -1.5%);
  }
  75% {
    transform: translate(-1%, -1%);
  }
}

@keyframes marqueeX {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes pulseSq {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.45);
  }
  60% {
    box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0);
  }
}

/* ---------- 7. Navigation ------------------------------------------------ */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(246, 244, 238, 0.78);
  border-bottom: 1px solid var(--rule);
}

@supports (backdrop-filter: blur(14px)) {
  .nav {
    background: rgba(246, 244, 238, 0.72);
    backdrop-filter: blur(14px);
  }
}

.nav__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--nav-h);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.wordmark span {
  color: var(--accent);
}

.nav__tagline {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--faint);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav__links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--body);
}

/* The Apply link is a filled button, so it must keep its own colours —
   only the plain text links take the current-page treatment. */
.nav__links a[aria-current="page"]:not(.btn) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--accent);
}

.nav__links .btn[aria-current="page"] {
  background: var(--accent);
  color: #fff;
}

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav__toggle svg {
  display: block;
  margin-inline: auto;
}

.nav__toggle .icon-close,
.nav__toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav__toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* ---------- 8. Footer ---------------------------------------------------- */

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--rule);
  padding-block: 34px;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  flex-wrap: wrap;
}

.footer .wordmark {
  font-size: 17px;
}

.footer__mail {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
}

.footer__social {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer__social a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
}

.footer__legal {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* ---------- 9. Hero (home) ----------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 96vh;
  padding-block: calc(var(--nav-h) + 70px) 80px;
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: clamp(48px, 6vw, 70px);
  align-items: center;
  width: 100%;
}

.hero__text {
  position: relative;
  z-index: 2;
  will-change: transform, opacity;
}

.hero h1 {
  margin-top: 30px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(56px, 7.6vw, 116px);
  line-height: 0.96;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.hero__lede {
  margin-top: 30px;
  max-width: 440px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 38px;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.badge-live::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  animation: pulseSq 2.4s ease-out infinite;
}

.hero__visual {
  position: relative;
  z-index: 1;
}

.hero__numeral {
  position: absolute;
  top: -130px;
  right: -40px;
  z-index: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(180px, 20vw, 300px);
  line-height: 1;
  color: rgba(22, 19, 14, 0.05);
  pointer-events: none;
  user-select: none;
}

/* Live ranking panel — the hero's dark centrepiece */
.rankpanel {
  position: relative;
  background: linear-gradient(165deg, #211c13, #16130e 58%);
  border: 1px solid rgba(246, 244, 238, 0.09);
  border-radius: 12px;
  padding: 26px 26px 22px;
  color: var(--bg);
  box-shadow: 0 40px 90px -40px rgba(22, 19, 14, 0.55),
    0 0 60px -30px rgba(var(--accent-rgb), 0.35);
  will-change: transform;
}

.rankpanel__head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #a5a092;
}

.rankpanel__head::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulseSq 2s ease-out infinite;
}

.rankpanel__kw {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  border: 1px solid rgba(246, 244, 238, 0.13);
  border-radius: 6px;
  padding: 12px 14px;
}

.rankpanel__query {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.3s ease;
}

.rankpanel__badge {
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
  padding: 5px 10px;
  border: 1px solid rgba(246, 244, 238, 0.22);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--bg);
  font-variant-numeric: tabular-nums;
  transition: background 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}

.rankpanel.is-top .rankpanel__badge {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rankpanel__chart {
  position: relative;
  margin-top: 20px;
}

.rankpanel__chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.rankpanel__chart [data-rank-dot] {
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb), 0.9));
}

@keyframes haloPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.rankpanel.is-top .rankpanel__chart [data-rank-halo] {
  animation: haloPulse 2s ease-in-out infinite;
}

.rankpanel__no {
  position: absolute;
  top: 4px;
  left: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(44px, 4.6vw, 60px);
  line-height: 1;
  color: rgba(246, 244, 238, 0.13);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.rankpanel__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(246, 244, 238, 0.1);
}

.rankpanel__stats > div {
  display: flex;
  flex-direction: column-reverse;
}

.rankpanel__stats dd {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--bg);
}

.rankpanel__stats dt {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a5a092;
}

/* ---------- 10. Marquees -------------------------------------------------- */

.marquee {
  position: relative;
  overflow: hidden;
}

.marquee__track {
  display: flex;
  width: max-content;
  transform: translateX(var(--mx, 0px)) skewX(var(--sk, 0deg));
  will-change: transform;
}

.marquee__group {
  display: flex;
  align-items: baseline;
  flex-shrink: 0;
  min-width: max-content;
  animation: marqueeX var(--marquee-dur, 26s) linear infinite;
}

.marquee:hover .marquee__group {
  animation-play-state: paused;
}

.band {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--rule);
  padding-block: 22px;
  background: var(--bg);
}

.band .marquee__group {
  gap: 40px;
  padding-right: 40px;
}

.band__word {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(34px, 5vw, 52px);
  color: var(--ink);
  white-space: nowrap;
}

.band__arrow {
  font-size: clamp(24px, 3.4vw, 34px);
  color: var(--accent);
}

.roster {
  position: relative;
  z-index: 1;
  padding-block: 56px 60px;
  text-align: center;
}

.roster__seats {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.roster__seats span {
  width: 16px;
  height: 16px;
  background: var(--ink);
}

.roster__seats span.is-open {
  background: none;
  border: 1.5px solid var(--accent);
  animation: pulseSq 2.4s ease-out infinite;
}

.roster__seats span.is-open:last-child {
  animation-delay: 0.4s;
}

.roster .marquee {
  margin-top: 34px;
}

.roster .marquee__group {
  align-items: center;
  gap: 70px;
  padding-right: 70px;
}

.roster__logo {
  font-size: 16px;
  color: rgba(22, 19, 14, 0.45);
  white-space: nowrap;
}

.marquee__fade {
  position: absolute;
  inset: 0 auto 0 0;
  width: 120px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--bg), rgba(246, 244, 238, 0));
}

.marquee__fade--right {
  inset: 0 0 0 auto;
  background: linear-gradient(270deg, var(--bg), rgba(246, 244, 238, 0));
}

/* ---------- 11. Service / result rows ------------------------------------ */

.rows {
  margin-top: 60px;
  border-bottom: 1px solid var(--rule);
}

.row {
  display: grid;
  grid-template-columns: 70px 1.1fr 1.3fr 50px;
  gap: 30px;
  align-items: start;
  border-top: 1px solid var(--rule);
  padding: 40px 8px;
  transition: background 0.25s ease;
}

.row:hover {
  background: rgba(22, 19, 14, 0.04);
}

.row__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--accent);
}

.row h3 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.025em;
  color: var(--ink);
}

.row p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.row__arrow {
  font-size: 26px;
  color: var(--accent);
  text-align: right;
}

/* Stat band */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px 20px;
  margin-block: 56px;
  padding-block: 48px;
  border-block: 1px solid var(--rule);
}

.stat__value {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(48px, 5.6vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.stat__value--accent {
  color: var(--accent);
}

.stats > div {
  display: flex;
  flex-direction: column-reverse;
}

.stats dt,
.stats dd {
  margin: 0;
}

.stat__label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.result-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 30px;
  align-items: center;
  border-top: 1px solid var(--rule);
  padding: 36px 8px;
}

.result-row__brand {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}

.result-row__tag {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.result-row__figure {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(34px, 3.4vw, 46px);
  line-height: 1;
  color: var(--accent);
}

.result-row__note {
  margin-top: 6px;
  font-size: 14px;
  color: var(--muted);
}

.result-row svg {
  width: 100%;
  max-width: 220px;
  height: auto;
  justify-self: end;
}

/* ---------- 12. Quote ---------------------------------------------------- */

.quote {
  text-align: center;
}

.quote__mark {
  font-family: var(--serif);
  font-size: 60px;
  line-height: 0.5;
  color: var(--accent);
}

.quote blockquote {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 1.3;
  color: var(--ink);
  text-wrap: balance;
}

.quote figcaption {
  margin-top: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--faint);
}

/* Full-bleed dark band — the one deliberate break from the cream field.
   Declared after the quote rules so it wins the source-order tie. */
.section--dark {
  background: var(--ink);
  border-top: 1px solid var(--ink);
}

.section--dark blockquote {
  color: var(--bg);
}

.section--dark .quote__mark {
  color: var(--accent);
}

.section--dark figcaption {
  color: #a5a092;
}

/* ---------- 13. Card grids ----------------------------------------------- */

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 40px 28px;
  margin-top: 60px;
}

.step {
  border-top: 2px solid var(--ink);
  padding-top: 24px;
}

.step__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.step__num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--accent);
}

.step__when {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.step h3 {
  margin: 16px 0 10px;
}

.principle {
  border-top: 1px solid var(--rule);
  padding-top: 26px;
}

.principle__num {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent-ink);
}

.principle h3 {
  margin: 16px 0 10px;
}

.card {
  border: 1px solid var(--rule-soft);
  border-radius: 10px;
  padding: 34px 28px;
  background: linear-gradient(
    180deg,
    rgba(22, 19, 14, 0.03),
    rgba(22, 19, 14, 0.006)
  );
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.16s ease;
}

.card:hover {
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: 0 26px 60px -22px rgba(var(--accent-rgb), 0.2);
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  font-weight: 600;
  font-size: 18px;
  color: var(--accent-ink);
}

.card h3 {
  margin: 22px 0 4px;
}

.card__role {
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--accent-ink);
}

.card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- 14. Accordion ------------------------------------------------ */

.accordion {
  margin-top: 44px;
  border-top: 1px solid var(--rule);
}

.accordion__item {
  border-bottom: 1px solid var(--rule);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 25px 4px;
  border: 0;
  background: none;
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(17px, 1.8vw, 19px);
  letter-spacing: -0.01em;
  color: var(--ink);
  cursor: pointer;
}

.accordion__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(22, 19, 14, 0.2);
  border-radius: 4px;
  font-size: 17px;
  font-weight: 400;
  color: var(--accent-ink);
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(45deg);
}

/* Without JS every answer stays open and readable. The collapsed start state
   is applied only once the script has taken over. */
.accordion__panel {
  overflow: hidden;
  transition: height 0.4s ease, opacity 0.3s ease;
}

.js .accordion__panel {
  height: 0;
  opacity: 0;
}

.js .accordion__panel[data-open] {
  opacity: 1;
}

.accordion__panel p {
  margin: 0;
  padding: 0 4px 26px;
  max-width: 660px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.accordion--round .accordion__icon {
  border-radius: 50%;
}

/* ---------- 15. Forms ---------------------------------------------------- */

.form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.form--boxed {
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: 38px 34px;
  background: linear-gradient(
    180deg,
    rgba(22, 19, 14, 0.03),
    rgba(22, 19, 14, 0.006)
  );
}

.form__title {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.form__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.field input,
.field textarea {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(22, 19, 14, 0.16);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form--boxed .field input,
.form--boxed .field textarea {
  background: rgba(22, 19, 14, 0.03);
  border-color: var(--hairline);
}

.field textarea {
  resize: vertical;
  min-height: 118px;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint-deco);
}

.field[data-invalid] input,
.field[data-invalid] textarea {
  border-color: #b4342f;
}

.field__error {
  display: none;
  margin-top: 6px;
  font-size: 13px;
  color: #a32b26;
}

.field[data-invalid] .field__error {
  display: block;
}

.form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__note {
  font-size: 12.5px;
  color: var(--faint);
  text-align: center;
}

.form__status {
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  border-radius: 8px;
  padding: 34px 28px;
  background: rgba(var(--accent-rgb), 0.05);
  text-align: left;
}

.form__status h2,
.form__status .form__status-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  color: var(--ink);
}

.form__status p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 16. Page-specific ------------------------------------------- */

.page-hero {
  position: relative;
  z-index: 1;
  padding-block: calc(var(--nav-h) + 90px) clamp(56px, 8vw, 100px);
}

.page-hero .glow {
  top: -200px;
  left: calc(50% - 480px);
  width: min(960px, 120vw);
  height: 560px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: var(--wash);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Case study cards */
.case {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 4vw, 44px);
  align-items: center;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  padding: clamp(28px, 4vw, 48px) clamp(24px, 3.5vw, 44px);
  background: linear-gradient(
    180deg,
    rgba(22, 19, 14, 0.03),
    rgba(22, 19, 14, 0.006)
  );
}

.case__head {
  display: flex;
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.case__brand {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.case__sector {
  padding: 5px 12px;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.case__figure {
  margin: 26px 0 12px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(44px, 4.6vw, 64px);
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--accent);
}

.case__subfigure {
  margin-bottom: 22px;
  font-size: 15px;
  color: #4a463c;
}

.case p {
  margin: 0 0 26px;
  max-width: 460px;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  text-wrap: pretty;
}

.case__metrics {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.case__metrics > div {
  display: flex;
  flex-direction: column-reverse;
}

.case__metrics dd {
  margin: 0;
  font-weight: 600;
  font-size: 22px;
  color: var(--ink);
}

.case__metrics dt {
  font-size: 12.5px;
  color: var(--faint);
}

.case__chart svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Apply page steps */
.apply-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

.apply-step {
  display: flex;
  gap: 24px;
  border-top: 1px solid rgba(22, 19, 14, 0.12);
  padding: 30px 0;
}

.apply-step:last-of-type {
  border-bottom: 1px solid rgba(22, 19, 14, 0.12);
}

.apply-step__num {
  flex-shrink: 0;
  padding-top: 4px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--accent-ink);
}

.apply-step h3 {
  margin-bottom: 8px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 56px 0 34px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.divider span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--faint);
}

/* ---------- 17. Reveal animation states ---------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(48px);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 1.05s var(--ease-out-expo),
    transform 1.05s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

.js .lift-line > span {
  transform: translateY(110%);
}

.js .is-in .lift-line > span,
.js .lift-line.is-in > span {
  transform: none;
  transition: transform 1.15s var(--ease-out-expo);
  transition-delay: var(--lift-delay, 0ms);
}

/* ---------- 18. Responsive ------------------------------------------------ */

@media (max-width: 1080px) {
  .nav__tagline {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --nav-h: 60px;
  }

  .nav__toggle {
    display: block;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__links a {
    padding: 16px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--rule-soft);
  }

  .nav__links .btn {
    margin-top: 18px;
    border-bottom: 0;
  }

  .hero {
    min-height: 0;
    padding-block: calc(var(--nav-h) + 48px) 56px;
  }

  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__numeral {
    top: -90px;
    right: -12px;
  }

  .row {
    grid-template-columns: 44px 1fr;
    gap: 8px 20px;
    padding: 30px 4px;
  }

  .row p {
    grid-column: 2;
  }

  .row__arrow {
    display: none;
  }

  .result-row svg {
    justify-self: start;
  }

  .form__pair {
    grid-template-columns: 1fr;
  }

  .ghost-word {
    display: none;
  }

  .rankpanel {
    padding: 20px 18px 16px;
  }

  .rankpanel__stats dt {
    font-size: 17px;
  }

  .footer__inner {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .stats {
    gap: 34px 20px;
  }

  .case__metrics {
    gap: 20px;
  }
}

/* Coarse pointers get no custom cursor and no hover-only affordances. */
@media (hover: none) {
  .cursor-ring {
    display: none;
  }
}

/* ---------- 19. Reduced motion ------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal],
  .js .lift-line > span {
    opacity: 1;
    transform: none;
  }

  #grain,
  #spotlight,
  .cursor-ring {
    display: none;
  }

  .marquee__group {
    animation: none;
  }

  .marquee__track {
    width: 100%;
    overflow: hidden;
  }

  .accordion__panel {
    transition: none;
  }
}

/* ---------- 20. Print ----------------------------------------------------- */

@media print {
  .nav,
  .footer__social,
  #grain,
  #spotlight,
  .cursor-ring,
  .marquee,
  .ghost-word,
  .glow,
  .rankpanel {
    display: none !important;
  }

  .section--dark {
    background: #fff !important;
  }

  .section--dark blockquote {
    color: #000 !important;
  }

  .section--dark figcaption {
    color: #444 !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .accordion__panel {
    height: auto !important;
    opacity: 1 !important;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 11px;
  }
}
