/* =========================================================================
   Retreat Blueprint
   Built on the project design system (Design.md / Design Tokens).
   Layer 1 = the system's raw tokens, verbatim.
   Layer 2 = semantic roles for this site, mapped onto those tokens.
   No component below hardcodes a value.
   ========================================================================= */

/* ---------------------------------------------------------------- tokens */
:root {
  /* Colors */
  --color-obsidian: #09090b;
  --color-graphite: #18181b;
  --color-slate:    #27272a;
  --color-iron:     #3f3f46;
  --color-steel:    #52525b;
  --color-fog:      #71717a;
  --color-ash:      #a1a1aa;
  --color-mist:     #d4d4d8;
  --color-cloud:    #ececee;
  --color-paper:    #f4f4f5;
  --color-snow:     #ffffff;
  --color-ember:    #ff5a00;

  /* Surfaces */
  --surface-canvas:      #f4f4f5;
  --surface-card:        #ffffff;
  --surface-subtle-card: #fafafa;
  --surface-dark:        #18181b;
  --surface-deep-dark:   #27272a;

  /* Type */
  --font-cosmica: "Cosmica", "DM Sans", ui-sans-serif, system-ui, -apple-system,
                  BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --text-caption: 12px;      --leading-caption: 1.64;
  --text-meta: 13px;         --leading-meta: 1.5;
  --text-ui: 14px;           --leading-ui: 1.5;
  --text-body: 16px;         --leading-body: 1.5;   /* token step base-7 — 16px floor per brief §10 */
  --text-body-lg: 18px;      --leading-body-lg: 1.45;
  --text-subheading: 20px;   --leading-subheading: 1.28;
  --text-heading-sm: 32px;   --leading-heading-sm: 1.28;
  --text-heading: 40px;      --leading-heading: 1.28;
  --text-heading-lg: 56px;   --leading-heading-lg: 1.28;
  --text-display: 64px;      --leading-display: 1.12;

  /* Spacing */
  --spacing-4: 4px;   --spacing-8: 8px;   --spacing-12: 12px; --spacing-16: 16px;
  --spacing-20: 20px; --spacing-24: 24px; --spacing-28: 28px; --spacing-32: 32px;
  --spacing-36: 36px; --spacing-40: 40px; --spacing-48: 48px; --spacing-64: 64px;
  --spacing-80: 80px; --spacing-120: 120px;

  /* Layout */
  --page-max-width: 1200px;
  --section-gap: 80px;
  --card-padding: 28px;
  --element-gap: 8px;

  /* Radii */
  --radius-md:      6px;
  --radius-badges:  12px;
  --radius-buttons: 14px;
  --radius-inputs:  14px;
  --radius-2xl:     16px;
  --radius-3xl:     24px;
  --radius-3xl-2:   28px;
  --radius-cards:   36px;
  --radius-icons:   40px;
  --radius-full:    48px;
  --radius-full-3:  64px;
  --radius-pills:   10000px;

  /* Elevation — hairline borders do the work; shadows are reserved */
  --shadow-primary-button:
    inset 0 0.5px 0 0 rgba(255,255,255,0.5),
    inset 0 9px 14px -5px rgba(117,123,133,0.4),
    0 0 0 1.5px rgb(44,46,52),
    0 4px 6px 0 rgba(0,0,0,0.14);
  --shadow-link-pill: inset 0 1px 0 0 rgb(228,228,231);
  --shadow-md: rgba(0,0,0,0.04) 0px 4px 12px 0px;

  /* ------------------------------------------------------ semantic roles */
  --ink:            var(--color-obsidian);   /* display headlines, dark CTA */
  --ink-body:       var(--color-graphite);   /* paragraphs, links, labels   */
  --ink-muted:      var(--color-iron);       /* secondary UI labels         */
  --ink-support:    var(--color-steel);      /* supporting metadata         */
  --ink-tertiary:   var(--color-steel);      /* helper text (fog fails AA on canvas) */
  --ink-quiet:      var(--color-fog);        /* de-emphasised copy, AA-safe on light */
  --line:           var(--color-cloud);      /* the 1px hairline everywhere */
  --line-strong:    var(--color-mist);
  --on-dark:        var(--color-snow);
  --on-dark-muted:  rgba(255,255,255,0.72);
  --on-dark-faint:  rgba(255,255,255,0.56);
  --on-dark-line:   rgba(255,255,255,0.16);
  --accent:         var(--color-ember);      /* status chips ONLY           */
  --danger:         #b3401f;
  --success:        #2f6b3f;

  /* Fluid steps — every stop is a token value */
  --step-display: clamp(2.25rem, 1.35rem + 4.2vw, 4rem);      /* 36 → 64 */
  --step-heading: clamp(1.75rem, 1.35rem + 1.9vw, 2.5rem);    /* 28 → 40 */
  --step-sub:     clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem); /* 18 → 20 */

  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(56px, 8vw, 80px);
  --measure: 62ch;
  --header-h: 68px;
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--surface-canvas);
  color: var(--ink-body);
  font-family: var(--font-cosmica);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 {
  margin: 0; font-family: var(--font-cosmica);
  font-weight: var(--font-weight-semibold);
  color: var(--ink); letter-spacing: -0.02em;
}
p { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--color-obsidian); outline-offset: 3px; border-radius: var(--radius-badges); }
.section--dark :focus-visible, .hero :focus-visible { outline-color: var(--color-snow); }

/* ------------------------------------------------------------- utilities */
.container { width: 100%; max-width: var(--page-max-width); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 840px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 50%; translate: -50% -140%; z-index: 100;
  background: var(--color-obsidian); color: var(--color-snow);
  padding: var(--spacing-12) var(--spacing-20);
  border-radius: 0 0 var(--radius-buttons) var(--radius-buttons); text-decoration: none;
  font-size: var(--text-ui);
}
.skip-link:focus { translate: -50% 0; }

.eyebrow {
  font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-tertiary); margin: 0 0 var(--spacing-16);
}
.eyebrow--light { color: var(--on-dark-faint); }
.lede {
  font-size: var(--text-body-lg); line-height: var(--leading-body-lg);
  color: var(--ink-support); max-width: var(--measure);
}
.body { color: var(--ink-support); max-width: var(--measure); }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacing-8);
  min-height: 48px; padding: var(--spacing-12) var(--spacing-20);
  font-size: var(--text-ui); font-weight: var(--font-weight-medium);
  letter-spacing: 0.02em; text-decoration: none;
  border-radius: var(--radius-buttons);
  border: 1.5px solid rgb(44,46,52);
  background: var(--color-obsidian); color: var(--color-snow);
  box-shadow: var(--shadow-primary-button);
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn:hover { background: var(--color-graphite); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }
.btn .arw { transition: transform 160ms ease; }
.btn:hover .arw { transform: translateX(3px); }

.btn--pill { border-radius: var(--radius-pills); padding-inline: var(--spacing-24); }

.btn--light {
  background: var(--color-snow); color: var(--color-graphite);
  border-color: var(--color-snow); box-shadow: none;
}
.btn--light:hover { background: var(--color-paper); border-color: var(--color-paper); }

.btn--outline {
  background: transparent; color: var(--ink-muted);
  border: 1px solid var(--line); box-shadow: none;
}
.btn--outline:hover { background: var(--surface-subtle-card); border-color: var(--line-strong); color: var(--ink); }

.btn--outline-light {
  background: transparent; color: var(--color-snow);
  border: 1px solid var(--on-dark-line); box-shadow: none;
}
.btn--outline-light:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.4); }

.btn--sm { min-height: 44px; padding: var(--spacing-8) var(--spacing-16); font-size: var(--text-meta); }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface-canvas) 86%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.site-header__inner {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-16);
}
.wordmark {
  display: inline-flex; align-items: center; gap: var(--spacing-12);
  font-size: var(--text-body); font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em; text-decoration: none; color: var(--color-obsidian);
  padding-block: var(--spacing-8); min-height: 44px; white-space: nowrap;
}
.wordmark__glyph {
  width: 22px; height: 22px; flex: none; position: relative;
  border: 1.5px solid currentColor; border-radius: var(--radius-md, 6px);
}
.wordmark__glyph::before, .wordmark__glyph::after { content: ""; position: absolute; background: currentColor; }
.wordmark__glyph::before { left: 0; right: 0; top: 50%; height: 1.5px; translate: 0 -50%; }
.wordmark__glyph::after { top: 0; bottom: 0; left: 50%; width: 1.5px; translate: -50% 0; }
.site-header .btn { flex: none; }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 45%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top,
    rgba(9,9,11,0.88) 0%, rgba(9,9,11,0.62) 36%, rgba(9,9,11,0.22) 64%, rgba(9,9,11,0.34) 100%);
}
.hero__inner {
  min-height: min(92svh, 780px);
  padding-block: clamp(56px, 7vw, 88px) calc(clamp(40px, 7vw, 80px) + var(--bottom-inset, 0px));
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero h1 {
  font-size: var(--step-display); line-height: var(--leading-display);
  color: var(--color-snow); max-width: 14ch; text-wrap: balance;
}
.hero__body {
  margin-top: var(--spacing-20); max-width: 46ch;
  color: var(--on-dark-muted); font-size: var(--text-body-lg); line-height: var(--leading-body-lg);
}
.hero__actions { margin-top: var(--spacing-32); display: flex; flex-direction: column; gap: var(--spacing-12); align-items: flex-start; }
.hero__micro { font-size: var(--text-meta); color: var(--on-dark-faint); }
@media (max-width: 640px) {
  .hero__inner { min-height: min(94svh, 720px); }
  .hero__actions { align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .hero__micro { text-align: center; }
}

/* -------------------------------------------------------------- sections */
.section { padding-block: var(--section-y); }
.section--paper { background: var(--surface-card); border-block: 1px solid var(--line); }
.section--dark { background: var(--surface-dark); }
.section--dark h2, .section--dark h3 { color: var(--color-snow); }
.section--dark .body, .section--dark .lede { color: var(--on-dark-muted); }
/* ch units resolve against this element's own 16px font, so the cap lives
   on the heading itself where the display size makes it meaningful. */
.section__head { max-width: 640px; }
.section h2 { font-size: var(--step-heading); line-height: var(--leading-heading); text-wrap: balance; max-width: 20ch; }

/* Problem */
.problem__grid { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 900px) { .problem__grid { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.pieces { display: flex; flex-wrap: wrap; gap: var(--spacing-8) var(--spacing-12); margin: 0; padding: 0; list-style: none; }
.pieces li {
  font-size: var(--step-sub); line-height: 1.35;
  font-weight: var(--font-weight-semibold); letter-spacing: -0.02em; color: var(--ink);
}
.pieces li:nth-child(even) { color: var(--ink-quiet); }

/* Toolkit cards */
.cards { display: grid; gap: var(--spacing-16); margin-top: clamp(32px, 5vw, 48px); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--surface-subtle-card); border: 1px solid var(--line);
  border-radius: var(--radius-cards); padding: var(--card-padding);
  display: flex; flex-direction: column; gap: var(--spacing-12); min-height: 100%;
}
.card__num {
  font-size: var(--text-caption); font-weight: var(--font-weight-medium);
  letter-spacing: 0.12em; color: var(--ink-quiet);
}
.card h3 { font-size: var(--text-subheading); line-height: var(--leading-subheading); }
.card p { color: var(--ink-support); font-size: var(--text-ui); line-height: 1.56; }

/* Ecosystem */
.eco {
  display: grid; gap: 1px; background: var(--on-dark-line);
  border: 1px solid var(--on-dark-line); border-radius: var(--radius-cards);
  overflow: hidden; margin-top: clamp(32px, 5vw, 48px);
}
@media (min-width: 760px) { .eco { grid-template-columns: repeat(2, 1fr); } }
.eco__item { background: var(--surface-dark); padding: clamp(24px, 3.5vw, 36px); }
.eco__kicker {
  font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-snow);
  margin: 0 0 var(--spacing-12);
}
.eco__item p { color: var(--on-dark-muted); font-size: var(--text-ui); line-height: 1.68; max-width: 44ch; }
.eco__foot { margin-top: clamp(28px, 4vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacing-16) var(--spacing-24); }
.eco__foot p { color: var(--on-dark-muted); font-size: var(--text-ui); }

/* Live */
.live__grid { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 940px) { .live__grid { grid-template-columns: 1fr 1fr; } }
.live__media { border-radius: var(--radius-full); overflow: hidden; background: var(--color-mist); }
.live__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.beats { list-style: none; margin: var(--spacing-28) 0 0; padding: 0; }
.beats li {
  font-size: var(--step-sub); font-weight: var(--font-weight-medium); line-height: 1.4;
  padding: var(--spacing-12) 0; border-top: 1px solid var(--line); color: var(--ink);
}
.beats li:last-child { border-bottom: 1px solid var(--line); }
.section--dark .beats li { border-color: var(--on-dark-line); color: var(--color-snow); }
.dest-line { margin-top: var(--spacing-28); font-size: var(--text-ui); color: var(--ink-tertiary); }

/* Proof */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--spacing-12); margin-top: clamp(32px, 5vw, 48px); }
@media (min-width: 860px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: var(--spacing-16); } }
.gallery figure { margin: 0; border-radius: var(--radius-cards); overflow: hidden; background: var(--color-mist); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figure:nth-child(4n+1) img, .gallery figure:nth-child(4n) img { aspect-ratio: 4 / 5; }
.gallery figure:nth-child(4n+2) img, .gallery figure:nth-child(4n+3) img { aspect-ratio: 4 / 3; }
@media (min-width: 860px) {
  .gallery figure:nth-child(4n+2), .gallery figure:nth-child(4n+3) { align-self: center; }
}

/* ----------------------------------------------------------------- forms */
.capture {
  background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-cards); padding: clamp(28px, 4vw, 48px);
}
.section--dark .capture { background: var(--surface-deep-dark); border-color: var(--on-dark-line); }
.form { margin-top: var(--spacing-28); }
.form__row { display: grid; gap: var(--spacing-16); }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--spacing-8); }
.field label { font-size: var(--text-meta); font-weight: var(--font-weight-medium); color: var(--ink-muted); }
.section--dark .field label { color: var(--on-dark-muted); }
.field input {
  min-height: 48px; padding: var(--spacing-12) var(--spacing-16);
  font: inherit; font-size: var(--text-body); color: #333333;
  background: var(--color-snow); border: 1px solid var(--line-strong);
  border-radius: var(--radius-inputs);
}
.section--dark .field input { border-color: transparent; }
.field input::placeholder { color: var(--ink-quiet); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field__error { font-size: var(--text-meta); color: var(--danger); }
.section--dark .field__error { color: #ffb59b; }
.form__submit { margin-top: var(--spacing-20); }
@media (max-width: 619px) { .form__submit .btn { width: 100%; } }
.form__micro { margin-top: var(--spacing-12); font-size: var(--text-meta); line-height: 1.55; color: var(--ink-tertiary); }
.section--dark .form__micro { color: var(--on-dark-faint); }
.form__status { margin-top: var(--spacing-16); font-size: var(--text-ui); }
.form__status[data-state="error"] { color: var(--danger); }
.form__status[data-state="success"] { color: var(--success); }
.section--dark .form__status[data-state="error"] { color: #ffb59b; }
.section--dark .form__status[data-state="success"] { color: #a7d3b4; }
.form.is-busy .btn { pointer-events: none; }

.note {
  margin-top: var(--spacing-24); padding: var(--spacing-16) var(--spacing-20);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-2xl); background: var(--surface-subtle-card);
  color: var(--ink-support); font-size: var(--text-ui); line-height: 1.6;
}
.section--dark .note { background: rgba(255,255,255,0.04); border-color: var(--on-dark-line); border-left-color: var(--accent); color: var(--on-dark-muted); }

/* Optional segmentation */
.segment { margin-top: var(--spacing-24); padding-top: var(--spacing-24); border-top: 1px solid var(--line); }
.section--dark .segment { border-color: var(--on-dark-line); }
.segment[hidden] { display: none; }
.segment__q { font-size: var(--text-subheading); line-height: var(--leading-subheading); }
.segment__help { margin-top: var(--spacing-8); font-size: var(--text-meta); color: var(--ink-tertiary); }
.section--dark .segment__help { color: var(--on-dark-faint); }
.segment__opts { display: grid; gap: var(--spacing-8); margin-top: var(--spacing-16); }
.segment__opts .btn { justify-content: flex-start; text-align: left; font-size: var(--text-ui); font-weight: var(--font-weight-regular); }
.section--dark .segment__opts .btn { color: var(--color-snow); }

/* ------------------------------------------------- destination chooser */
.modal { border: none; padding: 0; background: transparent; width: 100%; max-width: min(560px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(9,9,11,0.6); backdrop-filter: blur(3px); }
.modal__panel {
  background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-cards); padding: clamp(24px, 4vw, 36px);
}
.modal__panel h2 { font-size: var(--text-heading-sm); line-height: var(--leading-heading-sm); }
.modal__panel p { margin-top: var(--spacing-12); color: var(--ink-support); font-size: var(--text-ui); }
.dest-list { display: grid; gap: var(--spacing-8); margin-top: var(--spacing-24); }
@media (min-width: 480px) { .dest-list { grid-template-columns: repeat(2, 1fr); } }
.dest-list .btn { justify-content: space-between; }
.modal__close {
  margin-top: var(--spacing-20); background: none; border: none; padding: var(--spacing-8) 0;
  color: var(--ink-tertiary); font-size: var(--text-meta); cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ------------------------------------------------------ destination page */
.dest-hero__inner { min-height: min(78svh, 700px); }
.dest-hero h1 { max-width: 16ch; }
.caps {
  display: flex; flex-wrap: wrap; gap: var(--spacing-4) var(--spacing-16);
  margin-top: var(--spacing-24); list-style: none; padding: 0;
  font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-muted);
}
.caps li { display: flex; align-items: center; gap: var(--spacing-16); }
.caps li + li::before { content: "\00B7"; color: var(--on-dark-faint); margin-left: calc(var(--spacing-8) * -1); }
.badge {
  display: inline-block; padding: var(--spacing-4) var(--spacing-8);
  border-radius: var(--radius-badges); background: var(--color-ember);
  /* System spec is white on ember (3.1:1). Brief §10 requires AA, so the chip
     carries obsidian text on ember instead (6.4:1). */
  color: var(--color-obsidian); font-size: var(--text-caption);
  font-weight: var(--font-weight-semibold); letter-spacing: 0.08em; text-transform: uppercase;
}
.badge-note { margin-top: var(--spacing-12); font-size: var(--text-ui); color: var(--ink-tertiary); }

/* ---------------------------------------------------------- plain pages */
.plain { padding-block: clamp(48px, 8vw, 80px) var(--section-y); }
.plain h1 { font-size: var(--step-heading); line-height: var(--leading-heading); max-width: 20ch; }
.plain h2 { font-size: var(--text-subheading); line-height: var(--leading-subheading); margin-top: var(--spacing-32); }
.plain p { color: var(--ink-support); margin-top: var(--spacing-12); max-width: var(--measure); }
.next-step {
  margin-top: clamp(40px, 6vw, 64px); padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line); border-radius: var(--radius-cards); background: var(--surface-card);
}
.next-step h2 { margin-top: 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { background: var(--surface-dark); color: var(--on-dark-muted); padding-block: clamp(40px, 6vw, 64px); }
.site-footer__inner { display: grid; gap: var(--spacing-24); }
@media (min-width: 760px) { .site-footer__inner { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer .wordmark { color: var(--color-snow); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: var(--spacing-12) var(--spacing-24); font-size: var(--text-ui); }
.site-footer a { color: var(--on-dark-muted); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--color-snow); }
.site-footer small { display: block; font-size: var(--text-caption); color: var(--on-dark-faint); margin-top: var(--spacing-8); }

/* ------------------------------------------------------- sticky mobile CTA */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: var(--spacing-12) var(--gutter) calc(var(--spacing-12) + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface-canvas) 94%, transparent);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 220ms ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .btn { width: 100%; }
@media (min-width: 900px) { .sticky-cta { display: none; } }

/* --------------------------------------------------------------- consent */
.consent {
  position: fixed; z-index: 50; left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--spacing-12) + env(safe-area-inset-bottom));
  max-width: 640px; margin-inline: auto;
  background: var(--surface-dark); color: var(--on-dark-muted);
  border-radius: var(--radius-3xl-2); padding: var(--spacing-16) var(--spacing-20);
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacing-12) var(--spacing-16);
  font-size: var(--text-meta); line-height: 1.55;
}
.consent[hidden] { display: none; }
.consent p { flex: 1 1 240px; margin: 0; }
.consent a { color: var(--color-snow); }
.consent__actions { display: flex; gap: var(--spacing-8); flex: none; }

/* --------------------------------------- replaceable media placeholder */
.media-tag {
  position: absolute; z-index: 2; top: var(--spacing-12); right: var(--gutter);
  max-width: calc(100% - (var(--gutter) * 2));
  padding: var(--spacing-4) var(--spacing-8); border-radius: var(--radius-badges);
  background: var(--color-ember); color: var(--color-obsidian);
  font-size: var(--text-caption); font-weight: var(--font-weight-semibold); letter-spacing: 0.04em;
}

/* -------------------------------------------------------------- spinner */
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------ small viewports */
@media (max-width: 560px) {
  .site-header .btn, .site-header .btn--pill { font-size: var(--text-caption); padding-inline: var(--spacing-16); }
  .media-tag { font-size: 11px; }
}
@media (max-width: 430px) { .wordmark__text { display: none; } }
@media (max-width: 400px), (max-height: 780px) {
  .hero h1 { font-size: clamp(1.85rem, 7.4vw, 2.5rem); }
  .hero__body { font-size: var(--text-body); line-height: var(--leading-body); margin-top: var(--spacing-16); }
  .hero__actions { margin-top: var(--spacing-20); }
  .hero__inner { padding-block: var(--spacing-48) calc(var(--spacing-24) + var(--bottom-inset, 0px)); }
  .hero__micro { font-size: var(--text-caption); }
}
@media (max-height: 900px) { .hero__inner { min-height: calc(100svh - var(--header-h)); } }
@media (max-width: 560px) {
  .consent { padding: var(--spacing-12) var(--spacing-16); font-size: var(--text-caption); }
  .consent p { flex: 1 1 100%; }
  .consent__actions { width: 100%; }
  .consent__actions .btn { flex: 1; }
}

/* Placeholder chips sit on the page, not in the artwork, so a crop never eats them. */
.live__media, .gallery figure { position: relative; }
.media-tag--sm {
  top: var(--spacing-8); right: var(--spacing-8);
  max-width: calc(100% - var(--spacing-16));
  font-size: 11px; letter-spacing: 0.02em; line-height: 1.35;
}

/* <picture> is inline by default; these slots need it to fill its box. */
.hero__media picture, .live__media picture, .gallery picture { display: block; height: 100%; }
.gallery picture img { display: block; }

/* ---------- Toolkit downloads (thank-you page) ---------- */
.downloads { margin-top: clamp(32px, 5vw, 48px); }
.downloads h2 { font-size: var(--step-heading); line-height: var(--leading-heading); }
.downloads__intro { margin-top: var(--spacing-12); color: var(--ink-support); max-width: var(--measure); }
.dl-list { list-style: none; margin: var(--spacing-24) 0 0; padding: 0; display: grid; gap: var(--spacing-12); }
.dl {
  background: var(--surface-card); border: 1px solid var(--line);
  border-radius: var(--radius-cards); padding: var(--card-padding);
}
.dl__link {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--spacing-8) var(--spacing-16); min-height: 44px;
  text-decoration: none; color: var(--ink);
}
.dl__name {
  font-size: var(--text-subheading); font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em; text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: var(--line-strong); text-decoration-thickness: 1px;
}
.dl__link:hover .dl__name { text-decoration-color: var(--ink); }
.dl__meta {
  flex: none; font-size: var(--text-caption); font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-tertiary);
}
.dl__note { margin-top: var(--spacing-8); color: var(--ink-support); font-size: var(--text-ui); line-height: 1.55; }
