/* startupers.online v2 shell: the beta login look (aurora, lamp, mark) + the centred pixel-icon menu.
   Tokens, aurora, lamp, mark and pixel icons come from beta.css (extracted from the app). Desktop first:
   the content area under the menu is about 1280 × 550 and pages are built not to scroll. */
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url(fonts/HankenGrotesk-Regular.woff) format("woff"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-display: swap; src: url(fonts/HankenGrotesk-SemiBold.woff) format("woff"); }
@font-face { font-family: "Martian Mono"; font-weight: 400; font-display: swap; src: url(fonts/MartianMono-Regular.woff) format("woff"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(fonts/Nunito-ExtraBold.woff) format("woff"); }
:root { --font-nunito: Nunito; --font-hanken: "Hanken Grotesk"; --font-martian: "Martian Mono"; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { min-height: 100vh; background: var(--ground); color: var(--ink); font: 400 16px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
.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 { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- frame ---------- */
.frame { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; }
.lamp { position: fixed; right: 40px; z-index: 8; } /* above the header, so it can be tapped on phones too */
.site-head { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 40px; position: relative; z-index: 5; }
.site-head .su-mark { display: block; }
.brand-link { display: block; border-radius: 12px; text-decoration: none; }
.site-tabs { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; align-items: flex-end; }
.site-tab { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 600 14px/1 var(--font-sans); padding: 10px 14px; min-width: 96px; border-radius: 16px; }
.site-tab .key { width: 60px; height: 56px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-lg); color: var(--ink); transition: color .2s, background-color .2s, transform .15s; }
.site-tab .key svg { width: 32px; height: 32px; }
.site-tab:hover .key { color: var(--brand-ink); background: color-mix(in srgb, var(--surface) 80%, transparent); border-color: var(--key-line); box-shadow: 0 2px 0 var(--key-line); transform: translateY(-1px); }
.site-tab[aria-current="page"] { color: var(--brand-ink); }
.site-tab[aria-current="page"] .key { color: var(--brand-ink); background: color-mix(in srgb, var(--surface) 80%, transparent); border-color: var(--key-line); box-shadow: 0 2px 0 var(--key-line); }
.site-tab[aria-current="page"] .su-pixel { animation: nav-hop 1.6s ease-in-out infinite; }
.site-tab-cta, .site-tab-cta .key { color: var(--brand-ink); }
.site-tab:focus-visible { box-shadow: var(--focus-ring); }

main { position: relative; z-index: 4; width: 100%; flex: 1 1 auto; display: flex; flex-direction: column; transition: opacity .18s ease, transform .24s ease; view-transition-name: page; }
main.is-leaving { opacity: 0; transform: translateY(-6px); }
main.is-entering { opacity: 0; transform: translateY(8px); transition: none; }
/* View transitions: the header, the menu and the lamp keep still; the page cross-fades and settles. */
.site-head { view-transition-name: site-head; }
.lamp { view-transition-name: lamp; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-old(page) { animation: page-out .2s ease both; }
::view-transition-new(page) { animation: page-in .32s cubic-bezier(.22, .8, .24, 1) both; }
@keyframes page-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
.progress { position: fixed; left: 0; top: 0; height: 3px; width: 0; background: var(--brand); z-index: 60; transition: width .3s ease; }

/* ---------- shared parts agencies may use ---------- */
.label { font: 400 11px/16px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bubble { position: relative; display: inline-block; background: var(--surface); border: 1px solid var(--key-line); box-shadow: 0 2px 0 var(--key-line); border-radius: 12px; padding: 11px 18px; font: 400 13px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 11px; height: 11px; background: var(--surface); border-right: 1px solid var(--key-line); border-bottom: 1px solid var(--key-line); transform: translateX(-50%) rotate(45deg); }
.keycap { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--key-line); box-shadow: 0 2px 0 var(--key-line); background: color-mix(in srgb, var(--surface) 80%, transparent); font: 600 14px/1 var(--font-sans); color: var(--brand-ink); text-decoration: none; cursor: pointer; }
.keycap:active { transform: translateY(2px); box-shadow: none; }
.keycap.blue { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 2px 0 var(--brand-pressed); }
.keycap.off { color: var(--faint); box-shadow: none; background: transparent; pointer-events: none; }
.chip { font: 400 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 9px 10px; border-radius: 9px; border: 1px solid var(--key-line); box-shadow: 0 2px 0 var(--key-line); background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* The chapter line (Folio & Line, owner's pick 29 Nov): Back · chapters, the current underlined · Next. */
.toc { display: flex; justify-content: center; align-items: center; gap: 22px; }
.toc ol { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.toc li button { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 0; background: none; cursor: pointer; font: 400 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid transparent; }
.toc li button b { font-weight: 400; color: var(--faint); }
.toc li button[aria-current="step"] { color: var(--ink); border-bottom-color: var(--brand); }
.toc li button[aria-current="step"] b { color: var(--brand-ink); }
.toc .keycap { width: 118px; }

/* The story engine: [data-story] holds [data-ch] chapters; only the current one shows. */
[data-story] [data-ch]:not(.on) { display: none; }
[data-story] [data-ch].on { animation: ch-in .32s ease; }
@keyframes ch-in { from { opacity: 0; transform: translateY(6px); } }

/* The sign-up form (one contract: email + honeypot + source + role). */
.notify form { display: flex; flex-direction: column; gap: 10px; }
.notify .row { display: flex; gap: 8px; }
.notify input[type=email] { flex: 1; min-width: 0; height: 52px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--key-line); background: var(--surface); color: var(--ink); font: 400 16px var(--font-sans); }
.notify input[type=email]:focus { outline: none; border-color: var(--brand-ink); box-shadow: 0 0 0 3px var(--brand-soft); }
.notify input[aria-invalid=true] { border-color: var(--danger); }
.notify button[type=submit] { height: 52px; padding: 0 20px; border-radius: 14px; border: 0; background: var(--brand); color: #fff; font: 600 15px var(--font-sans); box-shadow: 0 2px 0 var(--brand-pressed); cursor: pointer; }
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notify .status { font-size: 14px; color: var(--danger); font-weight: 600; }
.notify .status:empty { display: none; }
.notify .consent { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.notify .done { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1.5px solid var(--success); background: var(--surface); }
.notify .done:focus { outline: none; }
.notify .done b { display: block; font: 800 17px/1.3 var(--font-head); }
.roles { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.roles legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.roles label { position: relative; }
.roles input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.roles span { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--key-line); background: color-mix(in srgb, var(--surface) 75%, transparent); font: 600 14px/1 var(--font-sans); }
.roles input:checked + span { color: var(--brand-ink); background: var(--surface); box-shadow: 0 2px 0 var(--key-line); }
.roles input:focus-visible + span { box-shadow: var(--focus-ring); }

/* ---------- footer: one quiet line ---------- */
.site-foot { position: relative; z-index: 4; width: 100%; display: flex; justify-content: center; gap: 18px; padding: 10px 16px 14px; font: 400 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.site-foot a { text-decoration: none; }
.site-foot button { all: unset; cursor: pointer; }
.site-foot a:hover, .site-foot button:hover { color: var(--ink); }
.site-foot button:focus-visible { outline: 2px solid var(--brand-ink, #000DFF); outline-offset: 2px; }

/* ---------- preview only: the version switcher ---------- */
.versions { position: fixed; left: 16px; bottom: 16px; z-index: 70; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--key-line); box-shadow: 0 8px 24px rgba(22,21,19,.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); font: 400 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.versions span { color: var(--muted); padding: 0 6px; }
.versions a { padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); }
.versions a[aria-current] { background: var(--brand); color: #fff; }

/* Phones (later): the menu shrinks; pages decide the rest. */
@media (max-width: 760px) {
  .lamp { right: 12px; }
  .site-head { padding-top: 22px; gap: 12px; }
  .site-head .su-mark-svg { height: 44px; width: auto; }
  .site-tabs { gap: 0; width: 100vw; justify-content: space-around; padding: 0 4px; }
  .site-tab { min-width: 0; padding: 6px 2px; font-size: 11px; gap: 4px; }
  .site-tab .key { width: 44px; height: 42px; }
  .site-tab .key svg { width: 27px; height: 27px; }
  /* the lamp scrolls away with the page and never covers the menu */
  .lamp { position: absolute; }
  /* tap targets: menu labels 13px, footer links 12px and at least 44px tall, chips 44px, Privacy easy to tap */
  .site-tab { font-size: 13px; text-align: center; line-height: 1.1; }
  .site-foot { flex-wrap: wrap; gap: 0 6px; padding: 4px 12px 10px; font-size: 12px; }
  .site-foot > * { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
  .roles span { min-height: 44px; }
  .notify .consent a { display: inline-block; padding: 12px 6px; margin: -12px -6px; }
}
/* Phones: chapters stack one after another as you scroll; no Back/Next line (shell.js marks every chapter .on). */
@media (max-width: 720px) {
  [data-story].is-stacked .toc { display: none; }
  [data-story].is-stacked [data-ch].on { animation: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ===== Scenes ("Under the Lamp", v3): full-height scenes, one moment each; the lamp's beam lights the one
   in view, a cord on the right edge has a knot per scene. [data-scenes] > section.scene ===== */
[data-scenes] { width: 100%; }
.scene { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 110px max(120px, 9vw); scroll-snap-align: start; }
.scene:first-child { min-height: calc(100vh - 236px); padding-top: 40px; padding-bottom: 40px; }
.scene::before { content: ""; position: absolute; left: 50%; top: 0; width: min(900px, 90vw); height: 100%; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity .9s ease;
  background: radial-gradient(ellipse 55% 60% at 50% 45%, color-mix(in srgb, #FFE9A8 38%, transparent), transparent 70%); }
:root[data-theme="dark"] .scene::before { background: radial-gradient(ellipse 55% 60% at 50% 45%, rgba(255, 214, 120, .10), transparent 70%); }
.scene.lit::before { opacity: 1; }
.scene .sc-in { position: relative; width: 100%; max-width: 1120px; display: grid; gap: 64px; align-items: center; }
.scene h2, .scene h1 { font: 800 clamp(36px, 4.4vw, 56px)/1.06 var(--font-head); letter-spacing: -.03em; color: var(--ink); }
.scene .sc-text { display: flex; flex-direction: column; gap: 22px; max-width: 560px; }
.scene .sc-text p { font: 400 21px/1.6 var(--font-sans); color: var(--ink-2); text-wrap: pretty; }
.scene .sc-text p b { color: var(--ink); font-weight: 600; }
.scene .sc-art { display: flex; justify-content: center; align-items: flex-end; min-height: 360px; }
.scene .sc-art img.cast { width: 220px; height: auto; }
.scene .sc-next { display: inline-flex; align-items: center; gap: 12px; font: 600 19px/1 var(--font-sans); color: var(--brand-ink); text-decoration: none; }
.scene .sc-next:hover { text-decoration: underline; }
.scene .sc-soon { font: 400 16px/1.5 var(--font-sans); color: var(--muted); }
.scene .sc-soon b { font: 400 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--brand-ink); margin-right: 8px; }
.scene .rise { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.scene.lit .rise { opacity: 1; transform: none; }
.scene.lit .rise.d1 { transition-delay: .12s; } .scene.lit .rise.d2 { transition-delay: .24s; } .scene.lit .rise.d3 { transition-delay: .36s; }
/* the cord: hangs from the lamp down the right edge, one knot per scene */
.cord { position: fixed; right: 57px; top: 80px; bottom: 40px; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; pointer-events: none; }
.cord::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: linear-gradient(var(--ink) 0 0) center / 2px 100% no-repeat; opacity: .14; }
.cord button { position: relative; width: 14px; height: 14px; padding: 0; border-radius: 4px; border: 2px solid var(--ink); background: var(--ground); cursor: pointer; pointer-events: auto; opacity: .45; transition: transform .2s, opacity .2s, background .2s; }
.cord button::after { content: ""; position: absolute; inset: -14px; }
.cord button[aria-current] { opacity: 1; background: var(--brand); border-color: var(--brand); transform: scale(1.25); }
@media (max-width: 760px) {
  .scene, .scene:first-child { min-height: 92vh; padding: 56px 36px 64px 22px; }
  .scene:first-child { min-height: calc(100vh - 150px); padding-top: 24px; }
  .scene .sc-in { grid-template-columns: 1fr !important; gap: 28px; }
  .scene .sc-art { order: -1; min-height: 0; }
  .scene .sc-art img.cast { width: 150px; }
  .scene .sc-text p { font-size: 18px; }
  .cord { right: 8px; gap: 16px; }
  .cord button { width: 10px; height: 10px; }
}
@media (prefers-reduced-motion: reduce) { .scene .rise { opacity: 1; transform: none; } }
