/* ==========================================================================
   MoneyDoc — DISCOVER (Phase 1, public, no account)
   Scoped stylesheet. Built from tokens only — no colour literals.
   Colour strategy: COMMITTED. The drench carries the hero; the rest of the
   page returns to the restrained product palette.
   ========================================================================== */

/* ------------------------------- Shell ---------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--drench);
  color: var(--drench-fg);
  border-bottom: 1px solid var(--drench-rule);
}
.site-header .container {
  display: flex; align-items: center; gap: var(--space-5);
  min-height: 64px;
}
.brand { display: flex; align-items: baseline; gap: var(--space-2); text-decoration: none; color: inherit; }
.brand-mark { font-size: var(--text-lg); font-weight: 650; letter-spacing: -0.02em; }
.brand-fsp {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--drench-muted); letter-spacing: 0.02em;
}

.site-nav { display: none; gap: var(--space-5); margin-left: auto; }
.site-nav a {
  color: var(--drench-muted); text-decoration: none; font-size: var(--text-sm);
  padding-block: var(--space-2);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out-quart),
              border-color var(--dur-fast) var(--ease-out-quart);
}
.site-nav a:hover { color: var(--drench-fg); border-bottom-color: var(--accent); }
@media (min-width: 900px) { .site-nav { display: flex; } }

.header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
@media (min-width: 900px) { .header-actions { margin-left: 0; } }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: transparent; border: 1px solid var(--drench-rule);
  border-radius: var(--radius-md); color: var(--drench-muted); cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out-quart),
              border-color var(--dur-fast) var(--ease-out-quart);
}
.icon-btn:hover { color: var(--drench-fg); border-color: var(--drench-fg); }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon { display: none; }

/* --------------------------------- Hero --------------------------------- */
/* The drench. Committed strategy: the brand colour IS the surface here. */

.hero {
  position: relative;
  isolation: isolate;
  background: var(--drench);
  color: var(--drench-fg);
  padding-block: clamp(var(--space-7), 6vw, calc(var(--space-8) * 1.35));
  overflow: hidden;
}

/* The building. Full-bleed behind the drench, with a scrim that keeps the
   headline at AA contrast at every viewport. The photograph carries the
   institutional register; the type is never asked to fight it. */
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: 50% 34%;
  /* The supplied frame is a dusk shot; lifted so the building survives the
     scrim instead of collapsing into the navy. */
  filter: brightness(1.28) contrast(1.04) saturate(0.92);
}
/* The scrim is heavy under the headline column and lifts across the frame, so
   the building reads as a photograph rather than as texture, while the type
   above it never drops below AA. */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg,
      color-mix(in oklab, var(--drench) 92%, transparent) 0%,
      color-mix(in oklab, var(--drench) 82%, transparent) 34%,
      color-mix(in oklab, var(--drench) 34%, transparent) 60%,
      transparent 100%),
    linear-gradient(to bottom,
      color-mix(in oklab, var(--drench) 30%, transparent) 0%,
      transparent 38%,
      color-mix(in oklab, var(--drench) 42%, transparent) 100%);
}
@media (max-width: 1023px) {
  /* Single column: the type sits over the whole frame, so the scrim is even. */
  .hero::before {
    background:
      linear-gradient(to bottom,
        color-mix(in oklab, var(--drench) 82%, transparent) 0%,
        color-mix(in oklab, var(--drench) 72%, transparent) 55%,
        color-mix(in oklab, var(--drench) 88%, transparent) 100%);
  }
}
/* Fallback for engines without color-mix: an opaque-enough flat scrim. */
@supports not (background: color-mix(in oklab, red 50%, transparent)) {
  .hero::before { background: var(--drench); opacity: 0.82; }
}

.hero .container { position: relative; display: grid; gap: clamp(var(--space-6), 5vw, var(--space-7)); }
@media (min-width: 1024px) {
  .hero .container { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); align-items: center; }
}

.hero-title {
  font-size: var(--text-4xl);
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: var(--space-4);
}
.hero-title em { font-style: normal; color: var(--accent); }

.hero-lede {
  font-size: var(--text-lg);
  /* Light type on dark reads lighter — extra leading per the brand register. */
  line-height: 1.68;
  color: var(--drench-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.hero-cta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

.hero-proof {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5);
  margin-top: var(--space-6); padding-top: var(--space-4);
  border-top: 1px solid var(--drench-rule);
  font-size: var(--text-xs); color: var(--drench-muted);
}
.hero-proof span { display: flex; align-items: center; gap: var(--space-1); }
.hero-badges { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.hero-fsp-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fg);
}

/* ------------------------- The rate ledger (imagery) --------------------- */

.ledger {
  background: var(--bg-elevated);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.ledger-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}
.ledger-title { font-size: var(--text-sm); font-weight: 600; }
.ledger-live { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--fg-muted); }
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--pos);
  animation: md-pulse 2.4s var(--ease-out-quart) infinite;
}
@keyframes md-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.ledger-rows { display: grid; }
.ledger-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-pair { font-size: var(--text-sm); font-weight: 550; }
.ledger-pair small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--fg-muted); }
.ledger-rate { font-size: var(--text-xl); font-weight: 600; }
.ledger-move {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: 550;
  min-width: 8.5ch; justify-content: flex-end;
}
/* Direction carries a glyph AND a label — never colour alone. */
.ledger-move[data-dir="up"]   { color: var(--pos); }
.ledger-move[data-dir="down"] { color: var(--neg); }
.ledger-move[data-dir="flat"] { color: var(--fg-muted); }

.ledger-foot {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  font-size: var(--text-xs); color: var(--fg-muted);
  display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: space-between;
}

/* ------------------------------- Sections -------------------------------- */

.section { padding-block: clamp(var(--space-6), 5vw, var(--space-8)); }
.section-tight { padding-block: clamp(var(--space-5), 4vw, var(--space-7)); }
.section-sunken { background: var(--bg-sunken); }

.section-head { max-width: 62ch; margin-bottom: var(--space-6); }
.section-head h2 {
  font-size: var(--text-3xl); font-weight: 620; letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}
.section-head p { color: var(--fg-muted); font-size: var(--text-lg); line-height: 1.55; }

/* ------------------------------- Journey --------------------------------- */
/* The ONE place numbered markers are legitimate: the order is real. */

.journey { display: grid; gap: var(--space-4); counter-reset: step; }
@media (min-width: 860px) { .journey { grid-template-columns: repeat(4, 1fr); gap: 0; } }

.journey-step { position: relative; padding: var(--space-4) 0; counter-increment: step; }
@media (min-width: 860px) {
  .journey-step { padding: var(--space-5) var(--space-4) var(--space-5) 0; }
  .journey-step + .journey-step { padding-left: var(--space-4); border-left: 1px solid var(--border); }
}
.journey-step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono); font-size: var(--text-xs);
  color: var(--accent); margin-bottom: var(--space-2);
}
.journey-step h3 { font-size: var(--text-base); font-weight: 600; margin-bottom: var(--space-2); }
.journey-step p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.55; }

.journey-contrast {
  margin-top: var(--space-6);
  display: grid; gap: var(--space-4);
}
@media (min-width: 760px) { .journey-contrast { grid-template-columns: 1fr 1fr; } }

/* Audience switch: segmented control; one panel open at a time, expands in place. */
.audience-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  padding: var(--space-1);
  background: var(--bg-sunken);
  border-radius: var(--radius-full);
  max-width: 28rem;
}
.audience-btn {
  appearance: none;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  color: var(--fg-muted);
  border: 0;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: var(--text-base);
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: background-color 240ms var(--ease-out), color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
.audience-btn:hover { color: var(--fg); }
.audience-btn[aria-expanded="true"] {
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: 0 1px 2px oklch(0.22 0.035 274 / 0.12), 0 0 0 1px var(--border);
}
.audience-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

/* Panels: closed = 0fr row, open = 1fr row, so the height animates. */
.audience-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 460ms var(--ease-out-quart);
}
.audience-panel.is-open { grid-template-rows: 1fr; }
.audience-panel-inner {
  min-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 240ms var(--ease-out), transform 460ms var(--ease-out-quart);
}
.audience-panel.is-open .audience-panel-inner { opacity: 1; transform: none; transition-delay: 70ms; }

.audience-panel-body {
  display: grid;
  gap: var(--space-6);
  padding: var(--space-7) var(--space-1) var(--space-3);
  margin-top: var(--space-6);
  border-top: 1px solid var(--border);
}
@media (min-width: 860px) {
  .audience-panel-body { grid-template-columns: 1fr 1.15fr; gap: var(--space-8); align-items: start; }
}
.audience-panel h3 { font-size: var(--text-3xl); line-height: var(--leading-tight); margin-bottom: var(--space-3); }
.audience-sub { color: var(--fg-muted); font-size: var(--text-lg); line-height: var(--leading-snug); max-width: 36ch; }
.audience-lead { font-size: var(--text-base); line-height: var(--leading-base); color: var(--fg); max-width: 56ch; margin-bottom: var(--space-5); }
.audience-label { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--space-3); }
.audience-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.audience-list li {
  padding: var(--space-2) var(--space-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--fg);
}
@media (prefers-reduced-motion: reduce) {
  .audience-panel, .audience-panel-inner, .audience-btn { transition: none !important; }
}
.contrast-panel { padding: var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.contrast-panel h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.contrast-panel p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; }
.contrast-then { background: var(--bg-sunken); }
.contrast-now  { background: var(--primary-weak); border-color: var(--primary); }

/* ------------------------------- Products -------------------------------- */

.products { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .products { grid-template-columns: 1.15fr 1fr; align-items: start; } }

.product-list { display: grid; gap: 0; border-top: 1px solid var(--border); }
.product-row {
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-3);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.product-row h4 { font-size: var(--text-base); font-weight: 600; }
.product-row p { font-size: var(--text-sm); color: var(--fg-muted); margin-top: var(--space-1); max-width: 52ch; }

/* ------------------------- Service cards (hover reveal) ------------------- */
/* Reproduces the interaction MoneyDoc already uses and asked us to keep:
   a product image with the title over it; on hover the card grows, the
   image fades out, the title rises to the top and the detail appears.

   Their implementation is hover-only, which excludes touch and keyboard.
   This one opens on hover, on focus-within, AND on tap via a real
   disclosure button, so the same appeal works for everyone. */

.svc-grid { display: grid; gap: var(--space-4); }
@media (min-width: 560px)  { .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.svc {
  display: grid;
  /* media · head · body — the body track is what animates open. */
  grid-template-rows: 190px auto 0fr;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: grid-template-rows var(--dur-slow) var(--ease-out-quart),
              border-color var(--dur-base) var(--ease-out-quart),
              box-shadow var(--dur-base) var(--ease-out-quart);
}
.svc:hover, .svc:focus-within, .svc[data-open="true"] {
  grid-template-rows: 0px auto 1fr;
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.svc-media { position: relative; overflow: hidden; }
.svc-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity var(--dur-base) var(--ease-out-quart);
}
.svc:hover .svc-media img,
.svc:focus-within .svc-media img,
.svc[data-open="true"] .svc-media img { opacity: 0; }

/* The head is a real button: keyboard operable and tappable. */
.svc-toggle {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3);
  width: 100%; min-height: 44px;
  padding: var(--space-4);
  background: transparent; border: 0; cursor: pointer;
  text-align: left;
}
.svc-title { font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.02em; }
.svc-chev {
  flex: none; color: var(--fg-subtle);
  transition: transform var(--dur-base) var(--ease-out-quart);
}
.svc:hover .svc-chev,
.svc:focus-within .svc-chev,
.svc[data-open="true"] .svc-chev { transform: rotate(180deg); color: var(--primary); }

.svc-body { overflow: hidden; }
.svc-body-inner {
  padding: 0 var(--space-4) var(--space-4);
  display: grid; gap: var(--space-3);
}
.svc-body p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; }
.svc-meta {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3); border-top: 1px solid var(--border);
  font-size: var(--text-xs); color: var(--fg-muted);
}
.svc-meta b { font-family: var(--font-mono); color: var(--fg); font-weight: 550; }

/* Reduced motion: reveal without the size animation. */
@media (prefers-reduced-motion: reduce) {
  .svc { transition: none; grid-template-rows: 190px auto 0fr; }
  .svc:hover, .svc:focus-within, .svc[data-open="true"] { grid-template-rows: 0px auto 1fr; }
  .svc-media img, .svc-chev { transition: none; }
}

/* -------------------------------- Calculator ----------------------------- */

.calc { display: grid; gap: var(--space-4); }
.calc-io { display: grid; gap: var(--space-3); }
@media (min-width: 620px) { .calc-io { grid-template-columns: 1fr auto 1fr; align-items: end; } }

.calc-group { display: grid; gap: var(--space-2); }
.calc-group label { font-size: var(--text-xs); font-weight: 600; color: var(--fg-muted); }
.calc-input {
  display: flex; align-items: stretch;
  border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  background: var(--bg); overflow: hidden;
}
.calc-input input {
  flex: 1; min-width: 0; min-height: 48px;
  padding: var(--space-2) var(--space-3);
  border: 0; background: transparent;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: var(--text-lg); font-weight: 600;
}
.calc-input input:focus { outline: none; }
.calc-input:focus-within { border-color: var(--primary); }
.calc-input select {
  border: 0; border-left: 1px solid var(--border);
  background: var(--bg-sunken); padding-inline: var(--space-3);
  font-size: var(--text-sm); font-weight: 600; cursor: pointer;
}

.calc-swap {
  justify-self: center; align-self: center;
  width: 44px; height: 44px; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); background: var(--bg);
  color: var(--fg-muted); cursor: pointer;
  display: grid; place-items: center;
  transition: color var(--dur-fast) var(--ease-out-quart),
              border-color var(--dur-fast) var(--ease-out-quart),
              transform var(--dur-base) var(--ease-out-quart);
}
.calc-swap:hover { color: var(--primary); border-color: var(--primary); transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .calc-swap:hover { transform: none; } }

/* The transparency claim, made literal. */
.calc-breakdown { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.calc-line {
  display: flex; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border);
}
.calc-line:last-child { border-bottom: 0; }
.calc-line dt { color: var(--fg-muted); }
.calc-line dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 550; }
.calc-line-total { background: var(--bg-sunken); font-weight: 650; }
.calc-line-total dt { color: var(--fg); font-weight: 650; }

/* Venue name, not a number — the mono/tabular treatment fights it. */
.calc-line dd[data-calc-source] {
  font-family: var(--font-sans);
  font-weight: 600;
  text-align: right;
}

.calc-board { max-width: 820px; margin-top: var(--space-4); }
.calc-board:empty { display: none; }
.calc-board-note {
  max-width: 820px;
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  line-height: var(--leading-snug);
}

/* ------------------------------- Corridors ------------------------------- */

.corridor-table { min-width: 620px; }

/* ------------------------------- Compliance ------------------------------ */

.compliance { display: grid; gap: var(--space-4); }
@media (min-width: 700px) { .compliance { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.compliance-item { padding-top: var(--space-4); border-top: 1px solid var(--border-strong); }
.compliance-item h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.compliance-item p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.55; }
.compliance-item .mono { font-size: var(--text-xs); color: var(--accent); }

/* Corporate profile policy documents. A ledger of what exists and what does
   not — a pending document is never dressed up as an available one. */
.policy-block {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-strong);
}
.policy-head h3 { font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.02em; }
.policy-head p {
  margin-top: var(--space-2); max-width: 66ch;
  font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6;
}
.policy-list { list-style: none; margin: var(--space-5) 0 0; padding: 0; display: grid; }
.policy {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
}
.policy:first-child { border-top: 1px solid var(--border); }
.policy-name { flex: 1 1 16rem; font-size: var(--text-sm); font-weight: 550; }
.policy-name small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--fg-muted); }
.policy-get {
  font-size: var(--text-sm); font-weight: 550; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out-quart);
}
.policy-get:hover { border-bottom-color: currentColor; }
.policy[data-pending] .policy-name { color: var(--fg-muted); }

/* CLIENT NOTE 2 (Round 2): the documents no longer link out to
   moneydoc.africa, so the block ends by saying so rather than leaving the
   reader to check every href. */
.policy-foot {
  margin: var(--space-4) 0 0;
  font-size: var(--text-xs);
  color: var(--fg-subtle);
  line-height: var(--leading-snug);
}

/* ---------------------------------- CTA ---------------------------------- */

.cta {
  background: var(--drench); color: var(--drench-fg);
  padding-block: clamp(var(--space-6), 5vw, var(--space-8));
}
.cta .container { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .cta .container { grid-template-columns: 1.1fr 1fr; align-items: center; } }
.cta h2 { font-size: var(--text-3xl); font-weight: 620; letter-spacing: -0.03em; margin-bottom: var(--space-3); }
.cta p { color: var(--drench-muted); font-size: var(--text-lg); line-height: 1.6; max-width: 46ch; }

.cta-card {
  background: var(--bg-elevated); color: var(--fg);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.cta-fields { display: grid; gap: var(--space-2); margin: var(--space-4) 0; }
.cta-field {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--fg-muted);
  background: var(--bg-sunken);
}
.cta-field span:first-child { color: var(--pos); }

/* Two doors, side by side: the real onboarding, and the guided walkthrough.
   Reviewers could not find where onboarding began — so it is labelled. */
.cta-choice { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .cta-choice { grid-template-columns: 1fr 1fr; align-items: start; } }
/* The two-door layout needs the full measure — the split heading/card layout
   squeezes it into a column too narrow to read. */
@media (min-width: 900px) {
  .cta .container:has(.cta-choice) { grid-template-columns: 1fr; }
  .cta .container:has(.cta-choice) > div:first-child { max-width: 62ch; }
}
.cta-card-primary { border-color: var(--accent); }
.cta-card-tag {
  display: inline-block; margin-bottom: var(--space-2);
  font-size: 10px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent);
}
.cta-card-title { display: block; font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.02em; }
.cta-card-body {
  margin-top: var(--space-2);
  font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6;
  max-width: none;
}
.cta-tour-list { list-style: none; padding: 0; margin: var(--space-4) 0; display: grid; gap: var(--space-2); }
.cta-tour-list li {
  display: flex; align-items: baseline; gap: var(--space-3);
  font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.5;
}
.cta-tour-list li span {
  flex: none; width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 50%;
  font-family: var(--font-mono); font-size: 10px; color: var(--fg);
}
.cta-tour-list li b { color: var(--fg); font-weight: 600; }

/* The second onboarding flow, named on the landing page but given no button:
   verification is triggered by a regulated action, never offered as a door. */
.cta-next {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px dashed var(--border-strong);
}
.cta-next strong { display: block; margin-top: 2px; font-size: var(--text-base); font-weight: 620; }
.cta-next p {
  margin-top: var(--space-2);
  font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6;
}

/* A ghost button that survives the drenched hero, where --border is invisible. */
.btn-outline-drench {
  background: transparent; color: var(--drench-fg);
  border: 1px solid var(--drench-rule);
}
.btn-outline-drench:hover { border-color: var(--drench-fg); background: rgb(255 255 255 / 0.06); }

/* Sits over photography, so it carries its own ground rather than relying
   on whatever part of the building is behind it. */
.hero-tour-note {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in oklab, var(--drench) 78%, transparent);
  font-size: var(--text-sm); color: var(--drench-muted);
  line-height: 1.6; max-width: 52ch;
}
.hero-tour-note strong { color: var(--drench-fg); font-weight: 600; }

.site-nav a.nav-tour { color: var(--drench-fg); font-weight: 550; }
.site-nav a.nav-tour::before { content: "\25B6"; font-size: 8px; margin-right: 6px; color: var(--accent); }

/* --------------------------------- Footer -------------------------------- */

.site-footer {
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  padding-block: var(--space-6) var(--space-5);
  font-size: var(--text-sm);
}
.footer-grid { display: grid; gap: var(--space-5); }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
/* Four columns once the Compliance list is present. */
@media (min-width: 800px) { .footer-grid:has(> :nth-child(4)) { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
@media (min-width: 800px) and (max-width: 1023px) {
  .footer-grid:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; }
}
.footer-grid h5 { font-size: var(--text-xs); font-weight: 650; margin-bottom: var(--space-3); }
.footer-links { display: grid; gap: var(--space-2); list-style: none; padding: 0; }
.footer-links a { color: var(--fg-muted); text-decoration: none; }
.footer-links a:hover { color: var(--fg); text-decoration: underline; }
.footer-legal {
  margin-top: var(--space-6); padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  color: var(--fg-muted); font-size: var(--text-xs); line-height: 1.7;
  max-width: 88ch;
}

/* Grid utility for trust section */
.grid {
  display: grid;
  gap: var(--space-4);
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

.trust-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.trust-item h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--fg);
}
.trust-item p {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  line-height: 1.55;
}

/* ------------------------- Learn (Phase 1 content) ----------------------- */
/* Spec items, verbatim: educational content, sample portfolios, FAQs. */

.learn-grid { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .learn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.article {
  display: grid; gap: var(--space-2); align-content: start;
  padding: var(--space-5);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.article .kicker { font-size: var(--text-xs); color: var(--accent); font-family: var(--font-mono); }
.article h3 { font-size: var(--text-lg); font-weight: 620; letter-spacing: -0.02em; }
.article p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.6; }
.article .read { font-size: var(--text-xs); color: var(--fg-subtle); }

/* Sample portfolios — allocation bars, no account needed. */
.portfolios { display: grid; gap: var(--space-4); }
@media (min-width: 760px) { .portfolios { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.portfolio {
  display: grid; gap: var(--space-3); align-content: start;
  padding: var(--space-5);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}
.portfolio h3 { font-size: var(--text-base); font-weight: 620; }
.portfolio > p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.55; }

.alloc { display: grid; gap: var(--space-2); }
.alloc-bar { display: flex; height: 8px; border-radius: var(--radius-full); overflow: hidden; background: var(--bg-sunken); }
.alloc-seg { height: 100%; }
.alloc-seg[data-k="shares"]      { background: var(--primary); }
.alloc-seg[data-k="derivatives"] { background: var(--neg); }
.alloc-seg[data-k="short"]       { background: var(--accent); }
.alloc-seg[data-k="long"]        { background: var(--pos); }

.alloc-key { display: grid; gap: var(--space-1); margin: 0; }
.alloc-row { display: flex; justify-content: space-between; gap: var(--space-2); font-size: var(--text-xs); }
.alloc-row .dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: var(--space-2); }
.alloc-row dt { color: var(--fg-muted); }
.alloc-row dd { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-weight: 550; }

.portfolio-figs {
  display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4);
  padding-top: var(--space-3); border-top: 1px solid var(--border);
  font-size: var(--text-xs); color: var(--fg-muted);
}
.portfolio-figs b { font-family: var(--font-mono); color: var(--fg); font-weight: 550; }

/* FAQs — native <details>, so keyboard operation comes for free. */
.faqs { display: grid; gap: 0; border-top: 1px solid var(--border); max-width: 78ch; }
.faq { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) 0; cursor: pointer; list-style: none;
  font-size: var(--text-base); font-weight: 600; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+'; font-family: var(--font-mono); font-size: var(--text-lg);
  color: var(--accent); flex: none;
}
.faq[open] summary::after { content: '−'; }
.faq p { font-size: var(--text-sm); color: var(--fg-muted); line-height: 1.65; padding-bottom: var(--space-4); max-width: 70ch; }

/* -------------------------------- Reveal --------------------------------- */
/* CONTENT IS VISIBLE BY DEFAULT. The hidden state is opt-in, applied only
   after JS confirms IntersectionObserver support by stamping .js-reveal on
   <html>. Without JS, in a headless renderer, or on a hidden tab, every
   section renders fully — a reveal that never fires can never ship a blank
   section. discover.js also force-reveals everything after 1.2s as a net. */

@media (prefers-reduced-motion: no-preference) {
  :root.js-reveal .reveal {
    opacity: 0.001;
    transform: translateY(10px);
    transition: opacity var(--dur-slow) var(--ease-out-quart),
                transform var(--dur-slow) var(--ease-out-quart);
  }
  :root.js-reveal .reveal.is-in { opacity: 1; transform: none; }
}
