/* ============================================================
   Haxfer content pages — layout & components
   Depends on tokens.css
   ============================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01" 1, "cv05" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.12; font-weight: 600; }
p { margin: 0; }

main :is(h1, h2, h3, h4) { text-wrap: balance; }
main :is(p, li, dd, td) { text-wrap: pretty; }

/* CJK at 14-15px needs a hair of tracking, otherwise the paragraphs read as a
   packed gray block. Matches the landing page's 0.01em so both share a voice. */
.card p, .prose p, .prose li, .faq details p, .section-lede,
.step p, .callout p, .row dd, .table-note { letter-spacing: 0.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent-soft); color: var(--ink); }

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: var(--fs-base);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}
.skip:focus-visible { transform: translateY(0); }

/* ------------------------------------------------------------
   Backdrop — brand light blooms at the edges of the viewport.
   Generated by tools/make_page_bg.py: blue top-right, cyan lower
   left, violet bottom-right, plus grain. Kept under ~8% contrast so
   body text never fights it. The landing page keeps its WebGL field.
   ------------------------------------------------------------ */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(to bottom, rgba(10, 11, 13, 0.045) 0, rgba(10, 11, 13, 0) 560px),
    url("/assets/img/page-bg.webp");
  background-size: auto, cover;
  background-position: center top, center top;
  background-repeat: no-repeat, no-repeat;
}
@media (width <= 900px) {
  /* A landscape cover crop on a tall phone throws the blooms away, so the
     portrait crop gets its own artwork. */
  .page-bg {
    background-image:
      linear-gradient(to bottom, rgba(10, 11, 13, 0.045) 0, rgba(10, 11, 13, 0) 420px),
      url("/assets/img/page-bg-mobile.webp");
    background-size: auto, cover;
    background-position: center top, center top;
  }
}

/* ------------------------------------------------------------
   Layout primitives
   The shell mirrors the landing page grid (1440 cap, 80px inset,
   scaling above 1440) so the logo, page title and footer all start
   on the same vertical line on every page.
   ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--shell-max, 90rem);
  margin-inline: auto;
  padding-inline: var(--shell-pad, 80px);
}

.section { padding-block: var(--section-gap) 0; }
.section:last-of-type { padding-bottom: var(--section-gap); }

/* Inset hairline between sections, like the landing page's dividers. */
.section + .section { position: relative; }
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--shell-pad, 80px);
  right: var(--shell-pad, 80px);
  height: 1px;
  background: var(--line-soft);
}

/* Section head — same shape as the landing page: kicker + title, then the
   supporting line underneath it, left-aligned. It used to sit in a right-hand
   column, which left a dead gap under the title and set 44 characters at 440px.
   Stacked, the line reads as a subtitle and gets the landing page's measure
   (640px) instead of being squeezed into the corner. */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  max-width: none;
  margin-bottom: clamp(32px, 4vw, 56px);
}
.sh-main { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 760px; max-width: 100%; }
.sh-aside { width: 640px; max-width: 100%; margin-bottom: 0; }
/* 640px of 14px Chinese is ~45 characters; the same box in English runs ~90,
   well past a comfortable measure. Latin gets a tighter column. */
html[lang="en"] .sh-aside { max-width: min(560px, 100%); }
@media (width <= 1200px) {
  .section-head { gap: 18px; }
  .sh-aside { width: 100%; }
}

/* Section label — same pill + dot as the landing page badges. */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.kicker::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: 0;
  border-radius: 50%;
  background: var(--accent);
  opacity: 1;
}

.h2 {
  font-size: clamp(24px, 3.056vw, 60px);
  line-height: 1.38;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-weight: 600;
}
.h2 em { font-style: normal; font-weight: inherit; letter-spacing: inherit; color: var(--accent); }
html[lang="en"] main h2 { font-weight: 750; }
.section-lede { font-size: var(--fs-base); line-height: 1.6; color: var(--ink-soft); }

/* ------------------------------------------------------------
   Nav
   Header chrome lives in assets/css/nav.css so the landing page
   and every content page share one implementation.
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-base);
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg { flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-cta); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.btn-link {
  height: auto;
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: var(--fs-base);
}
.btn-link:hover { color: var(--accent-deep); }
.btn-link::after { content: "→"; transition: transform var(--dur) var(--ease); display: inline-block; }
.btn-link:hover::after { transform: translateX(3px); }
.btn-sm { height: 32px; padding: 0 16px; font-size: 13px; }

/* ------------------------------------------------------------
   Page hero
   ------------------------------------------------------------ */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 28px;
  font-family: var(--mono);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.crumbs a:hover { color: var(--accent); }
.crumbs span.sep { opacity: 0.5; }

.page-hero {
  position: relative;
  padding-top: clamp(32px, 4vw, 64px);
  padding-bottom: clamp(48px, 5.4vw, 88px);
}

/* Three soft color fields drift behind the hero content. */
.hero-glow {
  position: absolute;
  inset-block: -48px -40px;
  inset-inline: calc(-1 * var(--shell-pad, 80px));
  z-index: 0;
  pointer-events: none;
  overflow: clip;
  mask-image: linear-gradient(to right, transparent 45%, #000 68% 96%, transparent),
    linear-gradient(to bottom, transparent, #000 20% 68%, transparent);
  mask-composite: intersect;
}
.hero-glow i {
  position: absolute;
  width: clamp(360px, 52vw, 940px);
  aspect-ratio: 1.25;
  opacity: 0.84;
  background: radial-gradient(ellipse closest-side, var(--glow-color), transparent);
  animation: glowDrift var(--glow-duration) ease-in-out var(--glow-delay) infinite alternate;
}
.hero-glow i:nth-child(1) {
  top: -23%;
  right: -8%;
  --glow-color: rgba(76, 141, 255, 0.25);
  --glow-duration: 22s;
  --glow-delay: -4s;
}
.hero-glow i:nth-child(2) {
  top: 4%;
  right: 18%;
  --glow-color: rgba(34, 211, 238, 0.24);
  --glow-duration: 27s;
  --glow-delay: -14s;
}
.hero-glow i:nth-child(3) {
  top: 31%;
  right: -7%;
  --glow-color: rgba(139, 92, 246, 0.19);
  --glow-duration: 31s;
  --glow-delay: -21s;
}
@keyframes glowDrift {
  from { transform: translate3d(-9%, 7%, 0) scale(0.94); opacity: 0.68; }
  to { transform: translate3d(10%, -6%, 0) scale(1.09); opacity: 1; }
}
.page-hero > *:not(.hero-glow) { position: relative; z-index: 1; }
@media (width <= 900px) {
  /* Narrow viewports have no empty right column to fill. */
  .hero-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-glow i { animation: none; }
}
.page-hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 5px 12px 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: var(--fs-sm);
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.page-hero .eyebrow i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Same display scale as the landing hero: black weight + blue bold accent.
   4.861vw = 70px at 1440, 93px at 1920 — the landing page's own curve. */
.p-title {
  font-size: clamp(25px, 4.861vw, 96px);
  line-height: 1.17;
  letter-spacing: -0.028em;
  text-wrap: balance;
  line-break: strict;
  max-width: 20ch;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--ink);
}
html[lang="en"] .p-title { font-weight: 800; }
.p-title em {
  font-style: normal;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--accent);
}
.p-lede {
  margin-top: 26px;
  max-width: 52ch;
  font-size: var(--fs-md);
  line-height: 1.7;
  color: var(--ink-soft);
}
/* Content pages fade in like the landing page, without the poster preloader. */
@media (prefers-reduced-motion: no-preference) {
  .page-hero > :not(.hero-glow) { animation: heroIn 620ms cubic-bezier(0.22, 0.61, 0.36, 1) both; }
  .page-hero > *:nth-child(2) { animation-delay: 110ms; }
  .page-hero > *:nth-child(3) { animation-delay: 180ms; }
  .page-hero > *:nth-child(4) { animation-delay: 250ms; }
  .page-hero > *:nth-child(5) { animation-delay: 310ms; }
}
@keyframes heroIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: none; }
}
.p-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.p-note {
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}
.p-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-base);
  color: var(--ink-soft);
}
.p-meta b { display: block; font-family: var(--mono); font-size: var(--fs-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); font-weight: 400; margin-bottom: 3px; }

/* ------------------------------------------------------------
   Hero step rail
   Data-driven: only pages whose JSON carries `hero_rail` switch to a
   two-column hero, so nothing changes on pages that do not need it.

   Rows are pinned to `--row`. The blue dot is one absolutely positioned
   element animated with `steps(6, jump-none)`, and that animation has to
   know the row pitch exactly — `--row` and the `li` height are the same
   number on purpose. Let rows grow with content and the dot walks off the
   markers halfway down.
   ------------------------------------------------------------ */
@media (min-width: 1100px) {
  .page-hero.has-rail {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 0.78fr);
    column-gap: clamp(40px, 4.4vw, 84px);
    align-content: start;
  }
  .page-hero.has-rail > .hero-main { min-width: 0; }
  .page-hero.has-rail > .hero-main .p-title { max-width: 17ch; }
  .page-hero.has-rail > .hero-rail { grid-column: 2; grid-row: 1; align-self: center; }
  .page-hero.has-rail > .p-meta { grid-column: 1 / -1; }
}

/* Below the split the chain is redundant — the page lists it a section down. */
@media (max-width: 1099px) {
  .hero-rail { display: none; }
}

.hero-rail {
  --row: 49px;
  padding: 22px 24px 20px;
  border: 1px solid rgba(10, 11, 13, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #fafbfd);
  box-shadow: 0 0.5rem 1.5rem -0.35rem rgba(16, 24, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.hero-rail .rh { margin: 0; padding-bottom: 13px; border-bottom: 1px solid rgba(10, 11, 13, 0.07); }
.hero-rail .rh b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.hero-rail .steps { position: relative; }
.hero-rail ol { margin: 0; padding: 0; list-style: none; }
.hero-rail ol::before {
  content: "";
  position: absolute;
  left: 4px;
  top: calc(var(--row) / 2);
  bottom: calc(var(--row) / 2);
  width: 1px;
  background: linear-gradient(to bottom, rgba(47, 107, 255, 0.45), rgba(10, 11, 13, 0.14));
}
.hero-rail li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  height: var(--row);
  border-top: 1px solid rgba(10, 11, 13, 0.05);
}
.hero-rail li:first-child { border-top: 0; }
.hero-rail .d {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(10, 11, 13, 0.22);
}
.hero-rail .n {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hero-rail .t { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-faint); }
.hero-rail .run {
  position: absolute;
  left: 0;
  top: calc(var(--row) / 2);
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.14);
  z-index: 2;
  /* Step count comes from the markup (--n), so a four-row chain ends on its
     fourth marker instead of walking two rows past the card. */
  animation: railHop calc(var(--n, 6) * 420ms) steps(var(--n, 6), jump-none) infinite;
}
/* jump-none: 0 → 5 rows in six equal holds, so the dot rests on each marker
   and never overshoots the last one. `translate`, not `translateY` — the
   individual property is translate/rotate/scale; translateY is only a
   transform function, and Chrome silently drops the whole declaration. */
@keyframes railHop {
  from { translate: 0 0; }
  to { translate: 0 calc((var(--n, 6) - 1) * var(--row)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-rail .run { animation: none; }
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.grid { display: grid; gap: clamp(16px, 1.5vw, 22px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Same panel language as the landing page: translucent white, hairline, 26px. */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(22px, 1.8vw, 28px);
  border: 1px solid rgba(10, 11, 13, 0.09);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 0.5rem 1.375rem -0.25rem rgba(16, 24, 40, 0.08);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(10, 11, 13, 0.16); }
.card-kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.card h3 { font-size: var(--fs-lg); line-height: 1.35; letter-spacing: -0.012em; }
.card p { font-size: var(--fs-base); line-height: 1.62; color: var(--ink-soft); }
.card .card-link { margin-top: auto; padding-top: 8px; font-size: var(--fs-base); color: var(--accent); }
.card .card-link::after { content: " →"; }
.card-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

/* Numbered step list */
.steps { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}
.step-n { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; color: var(--accent); padding-top: 4px; }
.step h3 { font-size: var(--fs-lg); margin-bottom: 6px; }
.step p { font-size: var(--fs-base); color: var(--ink-soft); max-width: 68ch; }

/* Definition list style rows */
.rows { display: grid; border-top: 1px solid var(--line-soft); }
.row {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.row dt, .row .row-k { font-size: var(--fs-lg); font-weight: 500; }
.row dd, .row .row-v { margin: 0; font-size: var(--fs-base); line-height: 1.65; color: var(--ink-soft); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: var(--fs-base);
  color: var(--ink-soft);
}

/* Callout */
.callout {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--surface);
}
.callout strong { font-size: var(--fs-lg); }
.callout p { font-size: var(--fs-base); color: var(--ink-soft); }

.notice {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: var(--warn-soft);
  border: 1px solid rgba(180, 83, 9, 0.18);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: #7c3f06;
}

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  -webkit-overflow-scrolling: touch;
}
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { text-align: left; padding: 15px 20px; font-size: var(--fs-base); border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 400;
  background: rgba(10, 11, 13, 0.02);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
/* Keep row labels intact and balance the short text in Chinese table cells. */
html:lang(zh) .table-wrap td { text-wrap: balance; }
html:lang(zh) .table-wrap td:first-child { white-space: nowrap; }
td strong { font-weight: 600; }
.table-note { margin-top: 12px; font-size: var(--fs-sm); color: var(--ink-faint); }

/* ------------------------------------------------------------
   FAQ
   ------------------------------------------------------------ */
.faq { border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  font-size: var(--fs-lg);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--dur) var(--ease);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.faq details p { padding: 0 0 24px; font-size: var(--fs-base); line-height: 1.7; color: var(--ink-soft); max-width: 78ch; }

/* ------------------------------------------------------------
   Prose
   ------------------------------------------------------------ */
.prose { max-width: 78ch; display: grid; gap: 16px; }
.prose h2 { font-size: 22px; margin-top: 12px; text-wrap: balance; }
.prose h3 { font-size: var(--fs-lg); margin-top: 8px; }
.prose p, .prose li { font-size: var(--fs-base); line-height: 1.7; color: var(--ink-soft); }
.prose ul { display: grid; gap: 8px; }
.prose ul li { padding-left: 18px; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }


/* ------------------------------------------------------------
   CTA band
   ------------------------------------------------------------ */
.cta-band {
  position: relative;
  overflow: hidden;
  margin-block: var(--section-gap);
  padding: clamp(32px, 5vw, 60px);
  border-radius: var(--r-xl);
  background: #0b0d12;
  color: #f6f7fa;
  display: grid;
  gap: 26px;
  justify-items: start;
}
/* The light sits in the top-right corner rather than across the whole right
   half. At 55% / -40% it flooded the exact spot the wordmark occupies and the
   white letters washed out; pulled up and down to 42%, the mark lands outside
   the bright core and still reads as a light source. */
.cta-band::before {
  content: "";
  position: absolute;
  inset: -62% -12% auto auto;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle at center, rgba(47, 107, 255, 0.42), transparent 60%);
  filter: blur(10px);
  pointer-events: none;
}
.cta-band > * { position: relative; }
/* Brand mark. Scales with the band instead of sitting at one fixed size, and
   drops out below 900px where it would crowd the buttons. */
.cta-band .brand-mark {
  position: absolute;
  right: clamp(32px, 5vw, 60px);
  top: 50%;
  translate: 0 -50%;
  width: clamp(150px, 16.6vw, 240px);
  height: auto;
}
/* Reserve the mark's column so copy wraps before it instead of running under
   it — English headings hit the logo box at 1100 and 1000 without this. */
@media (min-width: 901px) {
  .cta-band { padding-right: calc(clamp(32px, 5vw, 60px) + clamp(150px, 16.6vw, 240px) + 40px); }
}
@media (width <= 900px) {
  .cta-band .brand-mark { display: none; }
}
.cta-band h2 { font-size: clamp(24px, 3.056vw, 60px); max-width: 22ch; color: #fff; text-wrap: balance; }
html:lang(zh) .cta-band h2:has(.cta-phrase) { max-inline-size: 13em; }
html:lang(en) .cta-band h2:has(.cta-phrase) { max-inline-size: 29ch; }
/* Keep phrases together when they fit and allow wrapping inside them on narrow screens. */
.cta-phrase { display: inline-block; max-inline-size: 100%; vertical-align: top; }
.cta-band p { font-size: var(--fs-base); line-height: 1.65; color: rgba(246, 247, 250, 0.72); max-width: 60ch; }
.cta-band .p-actions { margin-top: 4px; }
.cta-band .btn-ghost { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(255, 255, 255, 0.22); box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* ------------------------------------------------------------
   Footer
   Lives in assets/css/footer.css — one implementation shared by the
   landing page and every content page.
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   Motion
   ------------------------------------------------------------ */
/* Content is visible by default: crawlers, full-page captures and browsers
   without JS must all see the complete text. The JS observer only adds the
   optional is-in class; it never hides content that was already visible. */
[data-reveal] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (width <= 1024px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { grid-template-columns: 180px minmax(0, 1fr); }
}

@media (width <= 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width <= 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .step { grid-template-columns: 40px minmax(0, 1fr); gap: 12px; }
  .p-title { max-width: none; }
  .cta-band { border-radius: var(--r-lg); }
  .card { padding: 20px; }
}

/* Disabled buttons: the contact form endpoint is not connected yet. */
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

/* ------------------------------------------------------------
   Display type ladder — mirrors the landing page step for step.
   The landing page switches its title sizes at 1200 / 900 / 580
   (44/52, 29/46, 25/38 for the hero; 36/50, 30/42, 24/32 for section
   titles). Content pages used to scale continuously with vw, so below
   1200 a page title stood a full step taller than the same title on the
   landing page. These steps are copied, not derived.
   ------------------------------------------------------------ */
@media (width <= 1200px) {
  .p-title { font-size: 44px; line-height: 52px; }
  .h2, .cta-band h2 { font-size: 36px; line-height: 50px; }
}
@media (width <= 900px) {
  .p-title { font-size: 29px; line-height: 46px; }
  .h2, .cta-band h2 { font-size: 30px; line-height: 42px; }
}
@media (width <= 580px) {
  .p-title { font-size: 25px; line-height: 38px; }
  .h2, .cta-band h2 { font-size: 24px; line-height: 32px; }
  .cta-band { padding-inline: 24px; }
  html:lang(en) .cta-band h2:has(.cta-phrase) {
    font-size: clamp(20px, 6.05vw, 24px);
    line-height: 1.35;
  }
}
@media (width <= 360px) {
  .cta-band { padding-inline: 18px; }
  .cta-band h2 { font-size: 22px; line-height: 30px; }
}
