/* ============================================================
   SunStack pitch deck — styles
   Apple design language (DESIGN.md) recoloured to the SunStack
   sun-amber brand (buyer-console/theme.css). Full-bleed tiles,
   one accent, one shadow, tight display type.
   ============================================================ */

/* ---------- Fonts (self-hosted, no CDN at runtime) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jbmono-var.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
  font-style: normal;
}

/* ---------- Design tokens ---------- */
:root {
  /* accent — the single brand colour */
  --amber: #e8932a;
  --amber-strong: #c8761a;
  --amber-soft: #fdf3e6;
  --gold: #f3b865;
  --teal: #5db8a6;        /* secondary data hue, used sparingly */

  /* surfaces */
  --canvas: #ffffff;
  --parchment: #faf8f4;
  --surface-2: #f4f0e8;
  --dark: #161410;
  --dark-2: #211e18;
  --dark-3: #0f0d0a;

  /* ink */
  --ink: #16140f;
  --body: #44413a;
  --muted: #837d72;
  --on-dark: #f4f0e8;
  --on-dark-muted: #b3ab9c;

  /* lines */
  --line: #e9e4da;
  --line-soft: #f1ece3;
  --line-dark: #322d24;

  /* radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;

  /* the single product shadow (DESIGN.md) */
  --shadow: 0 12px 48px rgba(20, 18, 12, 0.14);
  --shadow-soft: 0 1px 2px rgba(20, 18, 12, 0.05), 0 8px 24px rgba(20, 18, 12, 0.06);

  --maxw: 1120px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--body);
  background: var(--canvas);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv05" 1; /* Inter single-storey a, closer to SF */
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 800;
  text-wrap: balance;
}
a { color: inherit; text-decoration: none; }
code { font-family: "JetBrains Mono", ui-monospace, monospace; }
::selection { background: var(--amber); color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* On short viewports, relax snapping and shrink display type + media so
   tall tiles (e.g. tile 3) never clip. */
@media (max-height: 760px) {
  html { scroll-snap-type: y proximity; }
  .tile { padding-block: clamp(28px, 4vh, 56px); }
  .display { font-size: clamp(30px, 4.6vw, 52px); }
  h2.h { font-size: clamp(26px, 3.6vw, 44px); }
  .media .figure img, .media .frame img, .media .videowrap video { max-height: 62vh; }
  #tile-3 .figure img { max-height: 32vh; }
  .stack > * + * { margin-top: 14px; }
}
@media (max-height: 620px) {
  #tile-3 .figure { display: none; } /* headline + flow labels still tell the story */
  .media .figure img, .media .frame img { max-height: 54vh; }
}

/* Phones + small tablets: turn OFF scroll-snap so every tile can grow to fit
   its content and the page scrolls normally (nothing gets trapped/clipped). */
@media (max-width: 820px) {
  html { scroll-snap-type: none; }
  .tile {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
    min-height: 100svh;
    height: auto;
    padding: 64px 20px;
  }
  .split { align-items: start; }
}
@media (max-width: 560px) {
  .tile { min-height: auto; padding: 56px 18px; }
  .backers { gap: 8px; }
  .logo-chip { height: 40px; padding: 7px 10px; }
  .logo-chip img { max-height: 22px; max-width: 78px; }
}

/* ============================================================
   Tile system — full-bleed, one viewport, alternating surfaces
   ============================================================ */
.tile {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vh, 88px) clamp(20px, 5vw, 64px);
  isolation: isolate;
}
/* only tiles with full-bleed background art clip their overflow (Ken Burns) */
.cover, .thanks { overflow: hidden; }
/* keep media inside the viewport so a tile never overflows vertically */
.media .figure img, .media .frame img, .media .videowrap video { max-height: 72vh; object-fit: contain; }
#tile-2 .figure { width: fit-content; max-width: 100%; margin-inline: auto; }
#tile-2 .figure img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 30vh;
  margin-inline: auto;
}
/* tile 8: two stacked demo videos */
.media-videos { display: flex; flex-direction: column; gap: 14px; }
/* show the FULL video (incl. the input bar) — never crop the aspect ratio */
#tile-8 .videowrap { background: var(--dark-2); }
#tile-8 .videowrap video { max-height: 34vh; object-fit: contain; width: 100%; }
@media (max-width: 900px) { #tile-8 .videowrap video { max-height: none; } }
.tile-inner { width: 100%; max-width: var(--maxw); }
.tile-inner.wide { max-width: 1280px; }
.tile-inner.narrow { max-width: 860px; }

/* surface modes — the colour change IS the divider */
.t-light { background: var(--canvas); }
.t-parchment { background: var(--parchment); }
.t-dark { background: var(--dark); }
.t-dark, .t-dark h1, .t-dark h2, .t-dark h3, .t-dark h4 { color: var(--on-dark); }
.t-dark { color: var(--on-dark-muted); }

/* ============================================================
   Typography helpers
   ============================================================ */
.eyebrow {
  font-size: clamp(11px, 1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-strong);
  margin-bottom: 20px;
}
.t-dark .eyebrow { color: var(--gold); }

.display {
  font-size: clamp(38px, 6.4vw, 82px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  color: var(--ink);
}
.t-dark .display { color: #fff; }

h2.h {
  font-size: clamp(30px, 4.6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.04;
}
h3.h { font-size: clamp(20px, 2vw, 26px); font-weight: 700; }

.lead {
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.5;
  color: var(--body);
  font-weight: 400;
  max-width: 46ch;
}
.t-dark .lead { color: var(--on-dark); }
.lead.center { margin-inline: auto; }

.kicker {
  font-size: clamp(16px, 1.7vw, 21px);
  font-weight: 600;
  color: var(--amber-strong);
  letter-spacing: -0.01em;
}
.t-dark .kicker { color: var(--gold); }

.accent { color: var(--amber); }
.t-dark .accent { color: var(--gold); }

.stack > * + * { margin-top: 22px; }
.stack-sm > * + * { margin-top: 12px; }

/* ============================================================
   Sun mark (animated)
   ============================================================ */
.sunmark { width: 64px; height: 64px; }
.sunmark .core { fill: var(--amber); transform-origin: center; }
.sunmark .ray {
  stroke: var(--amber); stroke-width: 6; stroke-linecap: round;
  transform-origin: center;
}
.t-dark .sunmark .core, .t-dark .sunmark .ray { fill: var(--gold); stroke: var(--gold); }
.tile.in .sunmark .core { animation: sun-pop 0.7s var(--ease) both; }
.tile.in .sunmark .ray { animation: ray-in 0.6s var(--ease) both; }
.tile.in .sunmark .ray:nth-child(2) { animation-delay: .30s; }
.tile.in .sunmark .ray:nth-child(3) { animation-delay: .36s; }
.tile.in .sunmark .ray:nth-child(4) { animation-delay: .42s; }
.tile.in .sunmark .ray:nth-child(5) { animation-delay: .48s; }
.tile.in .sunmark .ray:nth-child(6) { animation-delay: .54s; }
.tile.in .sunmark .ray:nth-child(7) { animation-delay: .60s; }
.tile.in .sunmark .ray:nth-child(8) { animation-delay: .66s; }
.tile.in .sunmark .ray:nth-child(9) { animation-delay: .72s; }
@keyframes sun-pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes ray-in { from { opacity: 0; stroke-dashoffset: 20; } to { opacity: 1; stroke-dashoffset: 0; } }
.sunmark.spin .rays { animation: spin 40s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Reveal-on-enter (staggered)
   ============================================================ */
[data-anim] {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}
.tile.in [data-anim] { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ============================================================
   Cover
   ============================================================ */
.cover { text-align: left; }
.cover .bg {
  position: absolute; inset: 0; z-index: -2;
  background: var(--dark-3) center/cover no-repeat;
}
.cover .bg.has-img { animation: kenburns 18s ease-out both; }
.tile:not(.in) .bg.has-img { animation-play-state: paused; }
@keyframes kenburns { from { transform: scale(1.08); } to { transform: scale(1); } }
.cover .scrim {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(15,13,10,.72) 0%, rgba(15,13,10,.45) 40%, rgba(15,13,10,.82) 100%),
    radial-gradient(1200px 640px at 78% -10%, rgba(232,147,42,.28), transparent 60%);
}
.cover-head { display: flex; align-items: center; gap: 18px; margin-bottom: 30px; }
.cover .display { max-width: 15ch; }
.cover .sub { color: var(--on-dark); font-size: clamp(17px, 1.9vw, 23px); max-width: 40ch; margin-top: 22px; font-weight: 400; }

/* ============================================================
   Two-column split (copy + media)
   ============================================================ */
.split { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split.media-left { grid-template-columns: 0.98fr 1.02fr; }
.split.media-left .copy { order: 2; }
.split.media-left .media { order: 1; }
@media (max-width: 900px) {
  .split, .split.media-left { grid-template-columns: 1fr; gap: 32px; }
  .split.media-left .copy { order: 1; } .split.media-left .media { order: 2; }
}

/* ============================================================
   Stats / counters
   ============================================================ */
.stats { display: flex; flex-wrap: wrap; gap: clamp(18px, 3vw, 40px); margin-top: 8px; }
.stat { }
.stat .num {
  font-size: clamp(44px, 7vw, 92px);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.t-dark .stat .num { color: #fff; }
.stat .num.amber { color: var(--amber); }
.t-dark .stat .num.amber { color: var(--gold); }
.stat .lbl { margin-top: 12px; font-size: clamp(14px, 1.3vw, 17px); color: var(--muted); max-width: 22ch; }
.t-dark .stat .lbl { color: var(--on-dark-muted); }
.stat .vs { align-self: center; font-size: 22px; font-weight: 700; color: var(--muted); }

/* never break a numeric range mid-token */
.stat .num, .bignum { white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* gap tile (combined motivation) */
.gap-stats { display: flex; flex-direction: column; gap: 18px; margin-top: 6px; }
.gstat { display: flex; flex-direction: column; }
.gstat .num { font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; color: #fff; white-space: nowrap; }
.gstat .num.amber { color: var(--gold); }
.gstat .gl { margin-top: 8px; font-size: 14px; color: var(--on-dark-muted); }
.cardnote { margin-top: 18px; font-size: 14.5px; color: var(--on-dark-muted); line-height: 1.5; }
.t-light .cardnote { color: var(--muted); }

/* duo: two parties side by side (merged benefits) */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 820px) { .duo { grid-template-columns: 1fr; gap: 30px; } }
.duo-h { font-size: clamp(14px, 1.3vw, 17px); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber-strong); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.t-dark .duo-h { color: var(--gold); border-color: var(--line-dark); }
.duo .points { gap: 18px; }
.duo .point .txt h3 { font-size: clamp(16px, 1.5vw, 19px); }
.duo .point .txt p { font-size: 14px; }

/* big single figure */
.bignum { font-size: clamp(64px, 12vw, 168px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; color: var(--amber); font-variant-numeric: tabular-nums; }
.t-dark .bignum { color: var(--gold); }

/* ============================================================
   Cards grid (why-australia, generic)
   ============================================================ */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 12px; }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.cards.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .cards, .cards.three { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards, .cards.two, .cards.three { grid-template-columns: 1fr; } }
.card {
  background: var(--canvas); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(20px, 2.4vw, 30px);
}
.t-dark .card { background: var(--dark-2); border-color: var(--line-dark); }
.t-parchment .card { background: var(--canvas); }
.card .knum { font-size: 15px; font-weight: 800; color: var(--amber-strong); letter-spacing: 0.02em; }
.t-dark .card .knum { color: var(--gold); }
.card h3 { font-size: clamp(18px, 1.7vw, 22px); margin: 14px 0 8px; letter-spacing: -0.02em; }
.card p { font-size: clamp(14px, 1.3vw, 16px); color: var(--muted); line-height: 1.55; }
.t-dark .card p { color: var(--on-dark-muted); }

/* icon chip inside a card/point */
.chip { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--amber-soft); color: var(--amber-strong); flex-shrink: 0; }
.t-dark .chip { background: rgba(232,147,42,.14); color: var(--gold); }
.chip svg { width: 24px; height: 24px; }

/* ============================================================
   Points list (benefits)
   ============================================================ */
.points { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.point { display: flex; gap: 16px; align-items: flex-start; }
.point .txt h3 { font-size: clamp(18px, 1.7vw, 22px); letter-spacing: -0.02em; }
.point .txt p { font-size: clamp(14px, 1.35vw, 17px); color: var(--muted); margin-top: 5px; line-height: 1.55; }
.t-dark .point .txt p { color: var(--on-dark-muted); }

/* ============================================================
   Trio (three parties)
   ============================================================ */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 12px; align-items: stretch; }
@media (max-width: 820px) { .trio { grid-template-columns: 1fr; } }
.who { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; position: relative; }
.t-dark .who { background: var(--dark-2); border-color: var(--line-dark); }
.who .role { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-strong); }
.t-dark .who .role { color: var(--gold); }
.who h3 { font-size: clamp(19px, 1.8vw, 24px); margin: 10px 0; }
.who p { font-size: 15px; color: var(--muted); line-height: 1.55; }
.t-dark .who p { color: var(--on-dark-muted); }
/* connectors between trio cards (desktop) */
.trio.flow .who + .who::before {
  content: "→"; position: absolute; left: -18px; top: 50%; transform: translateY(-50%);
  color: var(--amber); font-weight: 700; font-size: 22px;
}
@media (max-width: 820px) { .trio.flow .who + .who::before { content: "↓"; left: 50%; top: -20px; transform: translateX(-50%); } }

/* ============================================================
   Value-flow strip (tile 3) — HTML labels over the art
   ============================================================ */
.flowstrip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 34px; }
@media (max-width: 720px) { .flowstrip { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
.flowstep { text-align: center; position: relative; padding: 0 8px; }
.flowstep .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--gold); margin: 0 auto 14px; box-shadow: 0 0 0 6px rgba(243,184,101,.18); }
.flowstep h4 { color: #fff; font-size: clamp(16px, 1.6vw, 21px); letter-spacing: -0.02em; }
.flowstep p { color: var(--on-dark-muted); font-size: 13.5px; margin-top: 6px; }
#tile-2 .flowstep h4 { color: var(--ink); }
#tile-2 .flowstep p { color: var(--body); }
.flowstep:not(:last-child)::after {
  content: ""; position: absolute; top: 7px; right: -4px; width: 8px; left: calc(50% + 30px);
  height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 12px);
  opacity: .5;
}
@media (max-width: 720px) { .flowstep::after { display: none; } }

/* ============================================================
   Media: device-framed screenshots, figures, video
   ============================================================ */
.figure { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--surface-2); }
.figure img { width: 100%; height: auto; }
.figure.contain { background: var(--parchment); padding: 0; }

/* browser chrome frame for product screenshots */
.frame { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.t-dark .frame { border-color: var(--line-dark); }
.frame .bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.t-dark .frame .bar { background: var(--dark-2); border-color: var(--line-dark); }
.frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: #d9d2c6; display: block; }
.frame .bar i:nth-child(1) { background: #e6a15a; }
.frame .bar i:nth-child(2) { background: #e8c65a; }
.frame .bar i:nth-child(3) { background: #7bc38a; }
.frame .bar .url { margin-left: 10px; font-size: 12px; color: var(--muted); font-family: "JetBrains Mono", monospace; }
.frame img { width: 100%; height: auto; display: block; }

.videowrap { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: zoom-in; }
.videowrap video { width: 100%; height: auto; display: block; background: #000; }
.videowrap .tag { position: absolute; left: 14px; bottom: 14px; background: rgba(22,20,15,.72); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: var(--r-pill); backdrop-filter: blur(6px); display: flex; gap: 7px; align-items: center; }
.videowrap .tag .live { width: 7px; height: 7px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 0 0 rgba(110,231,160,.7); animation: livepulse 1.8s infinite; }
@keyframes livepulse { 0%{box-shadow:0 0 0 0 rgba(110,231,160,.6);} 70%{box-shadow:0 0 0 8px rgba(110,231,160,0);} 100%{box-shadow:0 0 0 0 rgba(110,231,160,0);} }

.operator-shot { width: 100%; max-width: 1120px; margin: 26px auto 0; }
.operator-shot img { width: 100%; height: auto; }

/* code card — OpenAI-compatible API sample (matches product landing) */
.codecard { background: var(--dark-2); border: 1px solid var(--line-dark); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow); }
.codecard .bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line-dark); }
.codecard .bar i { width: 11px; height: 11px; border-radius: 50%; background: #4a4337; display: block; }
.codecard pre { margin: 0; padding: 18px 20px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: clamp(12px, 1.15vw, 14px); line-height: 1.75; color: #e7dfd0; overflow-x: auto; white-space: pre; }
.codecard .k { color: var(--gold); }
.codecard .s { color: #9ec79b; }
.codecard .c { color: #6f6757; }
.codecard .n { color: #e8a55a; }

/* fullscreen lightbox for video */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,9,6,.9); display: none; place-items: center; padding: 4vw; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox video { width: min(1400px, 96vw); max-height: 92vh; border-radius: 12px; box-shadow: var(--shadow); }

/* ============================================================
   Timeline (roadmap)
   ============================================================ */
.timeline { position: relative; margin-top: 40px; }
.timeline .rail { position: absolute; left: 0; right: 0; top: 21px; height: 2px; background: var(--line); }
.timeline .rail::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--amber), var(--gold)); transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease) .2s; }
.tile.in .timeline .rail::after { transform: scaleX(1); }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 820px) { .phases { grid-template-columns: 1fr 1fr; row-gap: 34px; } }
@media (max-width: 480px) { .phases { grid-template-columns: 1fr; } }
.phase { position: relative; padding-top: 44px; }
.phase .node { position: absolute; top: 14px; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px var(--parchment); }
.phase .when { font-size: 13px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--amber-strong); }
.phase h3 { font-size: clamp(16px, 1.5vw, 19px); margin: 8px 0 6px; }
.phase p { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ============================================================
   Backer logos
   ============================================================ */
.backers { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.backers .lead-in { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-dark-muted); margin-right: 4px; }
.logo-chip { display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 9px; padding: 9px 13px; height: 46px; }
.logo-chip img { max-height: 26px; max-width: 92px; width: auto; height: auto; object-fit: contain; }
/* Stacked logos (mark over wordmark, e.g. Energy Spurt) need more height so they aren't shrunk/cut */
.logo-chip-stacked { height: auto; padding: 6px 12px; }
.logo-chip-stacked img { max-height: 44px; max-width: 130px; }

/* ============================================================
   Thank-you tile
   ============================================================ */
.thanks { text-align: center; }
.thanks .display { max-width: 20ch; margin-inline: auto; }
.thanks .sub { color: var(--on-dark); font-size: clamp(17px, 1.9vw, 23px); margin-top: 22px; }
.thanks .ty { margin-top: 40px; font-size: clamp(28px, 4vw, 46px); font-weight: 800; color: #fff; letter-spacing: -0.03em; }

/* ============================================================
   Deck chrome — progress bar, dot rail, counter, scroll hint
   ============================================================ */
.progressbar { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--amber), var(--gold)); z-index: 120; transition: width 0.12s linear; }

/* ---- top chapter stepper: the section roadmap ("you are here") ---- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 115;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px clamp(18px, 4vw, 44px);
  opacity: 0; transform: translateY(-8px); pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.topbar.show { opacity: 1; transform: none; }
.topbar .wordmark { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; letter-spacing: -0.02em; color: var(--ink); pointer-events: auto; }
.topbar .wordmark .sm { width: 20px; height: 20px; flex-shrink: 0; }
.topbar .wordmark .sm .core { fill: var(--amber); }
.topbar .wordmark .sm .ray { stroke: var(--amber); stroke-width: 8; stroke-linecap: round; }
/* SunstackAI wordmark: the "AI" always renders in the brand amber (matches cloud) */
.wordmark .ai, .cover-head .eyebrow .ai { color: var(--amber); }
.chapters { display: flex; align-items: center; gap: clamp(10px, 1.7vw, 24px); pointer-events: auto; }
.chapter {
  background: none; border: none; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; letter-spacing: -0.01em; padding: 4px 0;
  color: var(--muted); position: relative; white-space: nowrap; transition: color 0.2s;
}
.chapter::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--amber); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.28s var(--ease); }
.chapter:hover { color: var(--ink); }
.chapter.active { color: var(--ink); }
.chapter.active::after { transform: scaleX(1); }
.chapter .cn { color: var(--amber-strong); margin-right: 7px; font-variant-numeric: tabular-nums; }
.topbar.on-dark .wordmark { color: #fff; }
.topbar.on-dark .chapter { color: var(--on-dark-muted); }
.topbar.on-dark .chapter:hover, .topbar.on-dark .chapter.active { color: #fff; }
.topbar.on-dark .chapter::after { background: var(--gold); }
.topbar.on-dark .chapter .cn { color: var(--gold); }
/* compact: below the full-list breakpoint, show only the active chapter (still tells them the section) */
@media (max-width: 820px) {
  .topbar { padding: 12px 18px; }
  .chapters { gap: 0; }
  .chapter:not(.active) { display: none; }
  .chapter.active::after { display: none; }
  .chapter.active { color: var(--amber-strong); }
  .topbar.on-dark .chapter.active { color: var(--gold); }
}

.dots { position: fixed; right: clamp(12px, 2vw, 26px); top: 50%; transform: translateY(-50%); z-index: 120; display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 700px), (max-height: 560px) { .dots { display: none; } }
.dots button {
  width: 10px; height: 10px; padding: 0; border: none; border-radius: 50%;
  background: rgba(131,125,114,.4); cursor: pointer; transition: transform .2s var(--ease), background .2s;
}
.dots button:hover { background: var(--amber); transform: scale(1.25); }
.dots button.active { background: var(--amber); transform: scale(1.4); }
.dots.on-dark button { background: rgba(244,240,232,.35); }
.dots.on-dark button.active, .dots.on-dark button:hover { background: var(--gold); }

.counter { position: fixed; left: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vh, 34px); z-index: 120; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter b { color: var(--ink); }
.counter.on-dark { color: var(--on-dark-muted); } .counter.on-dark b { color: #fff; }
@media (max-width: 700px) { .counter { display: none; } }

.scrollhint { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 10; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--on-dark-muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; animation: hintbob 2.4s ease-in-out infinite; }
@keyframes hintbob { 0%,100%{ transform: translate(-50%,0); opacity:.8; } 50%{ transform: translate(-50%,7px); opacity:1; } }
.scrollhint .m { width: 22px; height: 34px; border: 2px solid var(--on-dark-muted); border-radius: 12px; position: relative; }
.scrollhint .m::after { content:""; position:absolute; left:50%; top:6px; width:3px; height:7px; background: var(--on-dark-muted); border-radius:2px; transform: translateX(-50%); animation: wheel 2.4s ease-in-out infinite; }
@keyframes wheel { 0%,100%{ opacity:1; top:6px; } 50%{ opacity:.3; top:12px; } }

/* keyboard hint pill (fades out) */
.kbdhint { position: fixed; right: 22px; bottom: 22px; z-index: 120; background: rgba(22,20,15,.8); color: #fff; font-size: 12px; padding: 8px 13px; border-radius: var(--r-pill); backdrop-filter: blur(6px); transition: opacity .5s; display: flex; gap: 8px; align-items: center; }
.kbdhint kbd { font-family: inherit; background: rgba(255,255,255,.16); border-radius: 5px; padding: 1px 6px; font-weight: 600; }
.kbdhint.hide { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .scrollhint, .cover .bg.has-img, .videowrap .tag .live { animation: none !important; }
}

/* skip-to-content for a11y */
.skip { position: fixed; left: -999px; top: 8px; z-index: 300; background: #fff; color: var(--ink); padding: 10px 16px; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--amber-strong); outline-offset: 3px; border-radius: 4px; }

/* deck CTA button */
.btn { display: inline-block; padding: 13px 28px; border-radius: var(--r-pill); background: var(--amber); color: #fff; font-weight: 700; font-size: clamp(14px, 1.3vw, 16px); letter-spacing: -0.01em; text-decoration: none; transition: background .15s, transform .1s; }
.btn:hover { background: var(--amber-strong); }
.btn:active { transform: scale(.97); }
.t-dark .btn { background: var(--gold); color: var(--dark-1); }
.t-dark .btn:hover { background: #d4941e; }

/* ============================================================
   Investor tiles — value ladder, market metrics, citations
   (value-adding services + the-market chapter)
   ============================================================ */

/* --- Value ladder (commodity → premium) --- */
/* built on .cards.three; .card-hi flags the premium rung SunStack captures */
.card.card-hi { border-color: var(--amber); background: var(--amber-soft); box-shadow: var(--shadow-soft); }
.t-dark .card.card-hi { border-color: var(--gold); background: rgba(232,147,42,.14); }
.card .tier { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card.card-hi .tier, .card.card-hi .knum { color: var(--amber-strong); }
.t-dark .card .tier { color: var(--on-dark-muted); }
.t-dark .card.card-hi .tier, .t-dark .card.card-hi .knum { color: var(--gold); }

/* the ascending value/margin axis under the ladder */
.value-track { height: 6px; border-radius: var(--r-pill); margin: 28px 0 10px; background: linear-gradient(90deg, var(--line) 0%, var(--gold) 60%, var(--amber) 100%); }
.t-dark .value-track { background: linear-gradient(90deg, var(--line-dark) 0%, var(--gold) 100%); }
.value-track-labels { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); }
.value-track-labels .hi { color: var(--amber-strong); }
.t-dark .value-track-labels { color: var(--on-dark-muted); }
.t-dark .value-track-labels .hi { color: var(--gold); }

/* --- Market metrics (a compact vertical stat list, used in .duo columns) ---
   kept dense so a stat-heavy, fully-cited tile still fits one viewport. */
.metrics { display: flex; flex-direction: column; gap: clamp(11px, 1.6vw, 18px); margin-top: 6px; }
.metric .mv { font-size: clamp(24px, 2.7vw, 38px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.t-dark .metric .mv { color: #fff; }
.metric .mv .accent { color: var(--amber); }
.t-dark .metric .mv .accent { color: var(--gold); }
.metric .ml { margin-top: 5px; font-size: clamp(13px, 1.1vw, 15px); color: var(--muted); line-height: 1.45; max-width: 34ch; }
.t-dark .metric .ml { color: var(--on-dark-muted); }

/* bottom-up build-up rows (share tile): "assumption → result" */
.buildup { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.buildup .row { display: flex; align-items: baseline; gap: 10px; font-size: clamp(14px, 1.35vw, 16.5px); color: var(--on-dark); }
.t-light .buildup .row { color: var(--body); }
.buildup .row .rv { font-weight: 800; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.t-light .buildup .row .rv { color: var(--ink); }
.buildup .row .rv.accent { color: var(--gold); }
.t-light .buildup .row .rv.accent { color: var(--amber-strong); }
.buildup .arrow { color: var(--gold); font-weight: 700; }
.t-light .buildup .arrow { color: var(--amber); }

/* --- Citations: superscript refs + a tidy source footer --- */
sup.ref { font-size: 0.62em; font-weight: 700; color: var(--amber-strong); margin-left: 1px; }
.t-dark sup.ref { color: var(--gold); }
.sources { list-style: none; display: flex; flex-wrap: wrap; gap: 5px 22px; margin-top: clamp(16px, 2vw, 26px); padding-top: 12px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.4; color: var(--muted); }
.t-dark .sources { border-color: var(--line-dark); color: var(--on-dark-muted); }
.sources li { display: flex; gap: 6px; max-width: 46ch; }
.sources .rn { color: var(--amber-strong); font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.t-dark .sources .rn { color: var(--gold); }
.sources a { color: inherit; transition: color .15s; }
.sources a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.t-dark .sources a:hover { color: #fff; }

/* 7-chapter stepper: tighten between the full-list and compact breakpoints
   so the extra "The market" chapter doesn't crowd the topbar */
@media (min-width: 821px) and (max-width: 1180px) {
  .chapters { gap: clamp(8px, 1.1vw, 15px); }
  .chapter { font-size: 12px; }
}

/* Dense, fully-cited market tiles: compact them on shorter laptops (the
   761-860px band the deck's ≤760px shrink rule doesn't reach) so the source
   footer never clips under mandatory scroll-snap. */
@media (min-width: 821px) and (max-height: 860px) {
  #tile-16 h2.h, #tile-17 h2.h { font-size: clamp(26px, 3.2vw, 40px); }
  #tile-16 .lead, #tile-17 .lead { font-size: clamp(15px, 1.6vw, 18px); margin-top: 12px; }
  #tile-16 .duo, #tile-17 .duo { margin-top: 18px; }
  #tile-16 .metric .mv { font-size: clamp(22px, 2.3vw, 32px); }
  #tile-16 .metrics, #tile-17 .metrics { gap: clamp(9px, 1.2vw, 14px); }
  #tile-17 .buildup { gap: 10px; }
  #tile-16 .sources, #tile-17 .sources { margin-top: 12px; }
}
