/* getkomos.com — the home page only (2026-10-24), on top of site.css (the tokens, the buttons, the list form).
   Two layouts from one HTML: the plain stacked page (no script, or reduced motion) and the scroll stage
   (html.is-staged, set in the head before the first paint; home.js draws it). No decorative circles anywhere
   (founder 2026-10-14) — the light here is the loop's tube, the streets and the rooms. */
:root {
  /* The mark's own neon shading (scripts/design/komos_mark_gen.py, neon(): core · mid · edge · glow) — the route
     on the map is drawn as the same tube, so it can turn back into the mark without changing material. */
  --tube-core: #FADCFF;
  --tube-mid: #AA5AF4;
  --tube-edge: #7030CE;
  --tube-glow: #9242F2;
  --street: rgba(244, 241, 247, 0.07);
  --avenue: rgba(164, 67, 255, 0.24);
  /* The app's map, as MapCanvas.tsx lays it: its brand wash over tiles AND marks (styles.wash = palette.accentSoft)
     and the white of a mark's glyph (palette.onAccent). */
  --map-wash: rgba(148, 42, 251, 0.16);
  --on-accent: #FFFFFF;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* Masthead */
.mast {
  position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  max-width: 1040px; margin: 0 auto; padding: 22px;
}
.mast a.quiet { color: var(--muted); font-size: 14px; }

/* ---- The plain stacked page --------------------------------------------------------------------------------- */
/* site.css still carries the old home's beat list (a 44px grid column for a dot); none of it applies here */
.beats { margin: 0; padding: 0; border-top: 0; }
.beats > .beat { display: block; padding: 0; border-bottom: 0; }
.beats > .beat:not(.beat-hero) p { grid-column: auto; margin: 0; }
.beat-hero .lede { margin: 0 auto 28px; max-width: 30em; }
.beat-hero .fine { margin: 18px 0 0; max-width: none; }
.story { position: relative; }
.stage { position: relative; max-width: 680px; margin: 0 auto; padding: 18px 22px 0; }
.scene, .scrim, .hint, .ticks { display: none; }
.mark-img { width: 250px; height: auto; display: block; margin: 0 auto 14px; }
.nw { white-space: nowrap; } /* "going-out" never breaks at its hyphen */
.beat-hero { text-align: center; padding: 22px 0 36px; }
.beats > .beat:not(.beat-hero) { position: relative; padding: 26px 0 26px 46px; border-top: 1px solid var(--line); }
.beats > .beat:last-child { border-bottom: 1px solid var(--line); }
/* each beat's mark is a short length of lit tube, not a dot */
.beats > .beat:not(.beat-hero)::before {
  content: ""; position: absolute; left: 0; top: 39px; width: 26px; height: 6px; border-radius: 3px;
  background: var(--tube-mid); box-shadow: 0 0 14px 2px rgba(146, 66, 242, 0.55), inset 0 1px 0 rgba(250, 220, 255, 0.55);
}
.beats > .beat.warm::before { background: var(--gold); box-shadow: 0 0 14px 2px rgba(238, 173, 57, 0.45), inset 0 1px 0 rgba(255, 240, 210, 0.6); }
.beats > .beat.dim::before { opacity: 0.7; }
.beat h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.005em; margin-bottom: 4px; }
.beat p { color: var(--muted); max-width: 34em; }
@media (min-width: 900px) {
  .stage { max-width: 1040px; padding: 40px 40px 0; }
  .mark-img { width: 340px; margin-bottom: 22px; }
  .beat-hero { padding: 24px 0 52px; }
  .beats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
  .beat-hero { grid-column: 1 / -1; }
  /* "The going-out app" is 14.3 × its size wide in Syne 800 (measured): one line in the column, always */
  .beat-hero h1 { font-size: min(76px, calc((min(100vw, 1040px) - 96px) / 14.6)); }
  .beats > .beat:not(.beat-hero) { padding: 32px 0 34px; border-bottom: 1px solid var(--line); }
  .beats > .beat:not(.beat-hero)::before { position: static; display: block; margin: 0 0 18px; }
}

/* ---- After the story ---------------------------------------------------------------------------------------- */
.after { position: relative; z-index: 1; }
.stmt h2 { font-family: var(--font-display); font-weight: 700; color: var(--text); text-wrap: balance; margin-bottom: 12px; }
.promise h2 { font-size: clamp(30px, 7.4vw, 46px); line-height: 1.04; letter-spacing: -0.01em; }
.promise p { font-size: 18px; }
.house h2 { font-size: 24px; }
@media (min-width: 900px) {
  .stmts { grid-template-columns: 1.45fr 1fr; gap: 0 64px; align-items: end; }
  .promise h2 { font-size: 54px; }
}
[data-reveal] { transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
[data-reveal="out"] { opacity: 0; transform: translate3d(0, 24px, 0); }

/* ---- The scroll stage --------------------------------------------------------------------------------------- */
.is-staged .mast {
  position: fixed; top: 0; left: 0; right: 0; max-width: none;
  padding: 20px max(22px, calc((100vw - 1200px) / 2));
  background: linear-gradient(to bottom, var(--base) 0, var(--base) 58%, rgba(1, 1, 1, 0) 100%);
}
.is-staged .story { height: 460vh; height: 460svh; }
.is-staged .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; max-width: none; margin: 0; padding: 0; overflow: hidden;
}
/* full-bleed layers overshoot their box by a few px and let the stage clip them (R-20.4-0922-zoom) */
.is-staged .scene { display: block; position: absolute; top: 0; left: -2px; }
.is-staged .scrim {
  display: block; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(1, 1, 1, 0.9) 0, rgba(1, 1, 1, 0) 16%, rgba(1, 1, 1, 0) 44%, rgba(1, 1, 1, 0.84) 74%, var(--base) 100%);
}
.is-staged .mark-slot { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform, opacity; pointer-events: none; }
/* the script reveals the mark over the exact art; the still comes back on its own if the script never arrives */
.is-staged .mark-img { width: 100%; margin: 0; opacity: 0; animation: mark-still 400ms ease-out 2400ms forwards; }
.is-staged.stage-live .mark-img { display: none; }
@keyframes mark-still { to { opacity: 1; } }
.mark-canvas { display: block; }

.is-staged .beats { display: block; position: absolute; inset: 0; pointer-events: none; }
/* A beat off the stage is transparent and lets touches through — never `visibility: hidden`, which would take its
   words out of the accessibility tree (second opinion 134040 F1); home.js moves the opacity and the links' tab order. */
.is-staged .beats > .beat {
  position: absolute; left: 0; right: 0; bottom: max(9vh, 52px); max-width: 560px; margin: 0 auto; padding: 0 22px;
  border: 0; opacity: 0; will-change: opacity, transform; pointer-events: none;
}
.is-staged .beats > .beat::before { display: none; }
.is-staged .beats > .beat-hero { max-width: 680px; padding-bottom: 0; opacity: 1; pointer-events: auto; }
.is-staged .beat h2 { font-size: clamp(32px, 8.4vw, 46px); line-height: 1.02; letter-spacing: -0.01em; margin-bottom: 12px; }
.is-staged .beat p { font-size: 17px; color: var(--muted); }
.is-staged .beat.warm h2 { color: var(--gold-text); }

.is-staged .hint {
  display: flex; position: absolute; left: 0; right: 0; bottom: 14px; flex-direction: column; align-items: center; gap: 2px;
  color: var(--dim); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; pointer-events: none;
}
.is-staged .hint svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .is-staged .hint svg { animation: nudge 1.6s var(--ease-out) infinite; }
  @keyframes nudge { 0%, 100% { transform: translateY(0); } 45% { transform: translateY(4px); } }
}
.is-staged .ticks { display: none; }
/* Apple's logo, cut from Apple's own map picture, and the places' sources, kept on screen while the map shows
   (home.js credit()) */
.map-credit {
  position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 2; opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 10px; line-height: 1.2;
}
.map-credit-logo { flex: none; display: block; background-repeat: no-repeat; border-radius: 3px; }
.map-credit-note { flex: none; color: var(--muted); font-weight: 600; }

@media (min-width: 900px) {
  .is-staged .scrim {
    background:
      linear-gradient(to right, rgba(1, 1, 1, 0.92) 0, rgba(1, 1, 1, 0.6) 30%, rgba(1, 1, 1, 0) 52%),
      linear-gradient(to bottom, rgba(1, 1, 1, 0.9) 0, rgba(1, 1, 1, 0) 18%, rgba(1, 1, 1, 0) 78%, var(--base) 100%);
  }
  .is-staged .beats > .beat:not(.beat-hero) {
    top: 0; bottom: 0; left: max(40px, calc((100vw - 1200px) / 2)); right: auto; width: 440px; max-width: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; justify-content: center;
  }
  .is-staged .beats > .beat-hero { bottom: max(8vh, 56px); max-width: 1100px; }
  .is-staged .beat-hero h1 { font-size: min(80px, calc((min(100vw, 1100px) - 64px) / 14.6)); }
  .is-staged .beat h2 { font-size: 56px; }
  .is-staged .beat p { font-size: 19px; }
  .is-staged .ticks {
    display: flex; position: absolute; right: max(28px, calc((100vw - 1260px) / 2)); top: 50%; transform: translateY(-50%);
    flex-direction: column; align-items: flex-end; gap: 12px; pointer-events: none;
  }
  .is-staged .ticks i {
    display: block; width: 26px; height: 2px; border-radius: 1px; background: var(--line);
    transform: scaleX(0.5); transform-origin: right center; transition: transform 300ms var(--ease-out), background-color 300ms var(--ease-out);
  }
  .is-staged .ticks i.on { background: var(--text); transform: scaleX(1); }
}
.is-staged .after { background: var(--base); padding-top: 32px; }

/* ── after the story (2026-11-12, founders: "add the liveliness all the way at the bottom after the scroll"): the bar
   that moves, the nights, and the download stage. The motion is alive.css + alive.js; nothing above is touched. ── */
.moves { position: relative; z-index: 1; background: var(--base); padding: 52px 0 8px; }
.moves-head { max-width: 1040px; margin: 0 auto; padding: 0 22px 22px; }
.moves-head h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 7vw, 56px); line-height: 1.02; letter-spacing: -0.01em; color: var(--text); text-wrap: balance; }
.moves-head p { margin-top: 10px; color: var(--muted); max-width: 34em; }
/* a night is a window onto its night over its name: a still from that night's loop (real footage or the founders' own
   film, never a drawn stand-in; R-3-real-media), the words below it */
.nights .track { padding: 6px 0 12px; }
.night {
  flex: 0 0 auto; width: 280px; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.night:hover { text-decoration: none; transform: translateY(-3px); border-color: rgba(164, 67, 255, 0.55); }
.night:focus-visible { outline: 2px solid var(--purple-text); outline-offset: -2px; }
.night-sky { position: relative; display: block; height: 150px; background: linear-gradient(180deg, var(--surface-2), var(--base)); border-bottom: 1px solid var(--line); }
.night-sky img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.night b { display: block; padding: 14px 16px 2px; font: 800 20px/1.15 var(--font-display); }
.night .line { display: block; padding: 0 16px 16px; color: var(--muted); font-size: 14px; line-height: 1.35; }

/* the download stage: the words and the code, then a phone with three sample events drifting over it (as /press/) */
.get-stage { margin-top: 48px; display: grid; gap: 8px; align-items: center; }
/* on a phone the stage sits right under the button, and its first card rises ~42 px above the stage while you scroll
   (lift 360 × 0.16, drift 16, tilt): it covered "Download on the App Store" (measured 2026-11-12). Room for the rise. */
@media (max-width: 899px) { .get-stage .alive-stage { margin-top: 40px; } }
.get-copy h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 6vw, 44px); line-height: 1.04; margin-bottom: 8px; text-wrap: balance; }
.get-copy .sub { color: var(--muted); margin-bottom: 20px; max-width: 30em; }
.get-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.get-row .ctas { justify-content: flex-start; }
@media (min-width: 900px) {
  .get-stage { grid-template-columns: 1fr 1.05fr; gap: 40px; margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .nights .track { padding: 6px 22px 12px; justify-content: center; }
  .night, .night:hover { transition: none; transform: none; }
}
