/* ==========================================================================
   Brahe, the public page: an observatory.

   The product's tokens, used at night. The ground is the deep violet the
   product already puts under its video (#140c2b); text is near-white and the
   muted tone is the lavender the product uses on that ground. Violet stays
   where the design puts it: the primary action, focus, and the played part of
   a session's trace, which here is the path across the sky. Severity uses the
   product's brighter set for dark grounds. Nothing glows: stars are points,
   paths are hairlines.
   ========================================================================== */

/* The page's own copies of the three faces (fonts/OFL.txt), so a visit asks
   nothing of Google. Latin subsets, which cover everything the page says. */
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 450 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader.woff2') format('woff2'); font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('fonts/ibm-plex-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --night:   #140c2b;
  --ink:     #f4f1ff;   /* 17.4:1 on --night */
  --soft:    #b9b2d4;   /*  9.0:1 */
  --rule:    rgba(213, 207, 239, .18);
  --edge:    #8b84a3;   /*  5.0:1, input borders */
  --accent:  #7c3aed;   /* the primary action, white on it 5.7:1 */
  --played:  #a78bfa;   /*  7.2:1, the path and focus */

  --serious:  #ef8a3c;
  --moderate: #d9b23c;
  --minor:    #b9b2d4;

  --display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --body: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s7: 32px; --s8: 40px; --s9: 48px; --s10: 64px;
  --r: 8px;
  --dur: 200ms; --slow: 300ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --gutter: clamp(20px, 6vw, 96px);
  --len: 15;   /* the scroll, in screen heights */
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night); color: var(--ink);
  font-family: var(--body); font-size: 16px; font-weight: 450; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--played); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--accent); color: #fff; }
button, input { font: inherit; color: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 90; background: var(--accent); color: #fff; padding: 12px 16px; border-radius: var(--r); }

/* --- the fixed world ------------------------------------------------------ */

.sky { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.marks { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.copy { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.spacer { height: calc(var(--len) * 100svh); }

/* Each waypoint's words. Their opacity and rise are written from the scroll;
   a waypoint that is not showing takes no pointer and no focus (landing.js
   makes it inert). */
.wp { position: absolute; opacity: 0; pointer-events: auto; will-change: opacity, transform; }
[data-cue] { will-change: opacity, transform; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s5) var(--gutter);
}
.top-acts { display: flex; gap: var(--s2); }
/* One of the two, never both: the class is set before the first paint. */
html.signed-in .when-out, html:not(.signed-in) .when-in { display: none; }
.btn:not(.btn--go):hover { border-color: var(--played); }
.mark { font-family: var(--display); font-size: 24px; font-weight: 500; letter-spacing: -0.4px; color: var(--ink); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px var(--s5); border: 1px solid var(--edge); border-radius: var(--r);
  background: var(--night); color: var(--ink); font-size: 15px; font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.btn--go { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--go:hover { background: #6d2fdb; border-color: #6d2fdb; }

/* --- the map -------------------------------------------------------------- */

/* A rail along the foot of the screen, like a session's scrubber: a hairline,
   the played part in violet up to where the reader is, and each waypoint as a
   tick with its name under it. */
.map { position: fixed; left: var(--gutter); right: var(--gutter); bottom: 22px; height: 34px; z-index: 4; }
.map::before { content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--rule); border-radius: 1px; }
.map-played { position: absolute; left: 0; right: 0; top: 5px; height: 2px; background: var(--played); border-radius: 1px; transform-origin: 0 50%; transform: scaleX(0); }
.map ol { list-style: none; margin: 0; padding: 0; }
.map li { position: absolute; top: 0; }
.map a {
  display: flex; flex-direction: column; align-items: center; gap: 6px; translate: -50% 0;
  color: var(--soft); text-decoration: none; font-size: 13px; white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.map li:first-child a { align-items: flex-start; translate: -1px 0; }
.map li:last-child a { align-items: flex-end; translate: calc(-100% + 1px) 0; }
.map a::before { content: ""; width: 2px; height: 12px; border-radius: 1px; background: var(--soft); }
.map a:hover, .map a[aria-current="true"] { color: var(--ink); }
.map a[aria-current="true"]::before { background: var(--played); }

/* --- type ----------------------------------------------------------------- */

.display {
  font-family: var(--display); font-weight: 500; margin: 0;
  font-size: clamp(38px, 4.4vw, 60px); line-height: 1.08; letter-spacing: -1.4px; text-wrap: balance;
}
.big {
  font-family: var(--display); font-weight: 500; margin: 0;
  font-size: clamp(30px, 3.4vw, 46px); line-height: 1.15; letter-spacing: -0.9px; text-wrap: balance;
}
.big--quiet { color: var(--soft); margin-top: var(--s4); }
.head { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.2; letter-spacing: -0.6px; margin: 0 0 var(--s5); }
.lede { color: var(--soft); font-size: 18px; line-height: 1.55; margin: var(--s5) 0 0; max-width: 44ch; text-wrap: pretty; }

/* --- the start field ------------------------------------------------------ */

.field {
  display: flex; gap: var(--s2); align-items: center; margin-top: var(--s7);
  max-width: 480px; padding: 6px 6px 6px var(--s5);
  border: 1px solid var(--edge); border-radius: 12px; background: var(--night);
  transition: border-color var(--dur) var(--ease);
}
.field:focus-within { border-color: var(--played); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; padding: var(--s3) 0; color: var(--ink); }
.field input::placeholder { color: var(--soft); opacity: 1; }
.field .btn { min-height: 48px; }
.said { min-height: 1.6em; margin: var(--s3) 0 0; font-size: 15px; color: var(--soft); }
.said b { color: var(--ink); font-weight: 500; }
form.is-sent { display: none; }

/* --- waypoints ------------------------------------------------------------ */

.wp--hero { left: var(--gutter); top: 50%; translate: 0 -46%; width: min(640px, 52vw); }
.wp--lost { left: var(--gutter); right: var(--gutter); bottom: 16vh; max-width: 900px; }
.wp--session { left: var(--gutter); top: 96px; width: min(420px, 60vw); }
.legend { margin: 0; font-size: 15.5px; color: var(--ink); }
.legend--key { color: var(--soft); margin-top: var(--s2); }
.clock { margin: var(--s4) 0 0; font-family: var(--mono); font-size: 13px; color: var(--soft); }

.wp--catalogue { right: var(--gutter); top: 50%; translate: 0 -50%; width: min(460px, 40vw); }
.catalogue { list-style: none; margin: 0; padding: 0; }
.catalogue li { border-top: 1px solid var(--rule); }
.catalogue li:last-child { border-bottom: 1px solid var(--rule); }
.catalogue button {
  display: grid; grid-template-columns: 76px minmax(0, 1fr) 40px; gap: var(--s3); align-items: baseline;
  width: 100%; padding: 9px 0; border: 0; background: none; text-align: left; cursor: pointer; font-size: 15px; line-height: 1.35;
}
.catalogue .t { color: var(--ink); }
.catalogue .time { font-family: var(--mono); font-size: 12.5px; color: var(--soft); text-align: right; }
.catalogue button:hover .t, .catalogue button[aria-pressed="true"] .t { text-decoration: underline; text-decoration-color: var(--played); text-underline-offset: 4px; }
.sev { font-size: 13.5px; font-weight: 600; }
.sev--serious { color: var(--serious); } .sev--moderate { color: var(--moderate); } .sev--minor { color: var(--minor); }
.quote { min-height: 3.2em; margin: var(--s5) 0 0; font-family: var(--display); font-size: 19px; line-height: 1.4; color: var(--ink); }
.aside { margin: var(--s3) 0 0; font-size: 15px; color: var(--soft); max-width: 44ch; }

.wp--personas { left: var(--gutter); top: 50%; translate: 0 -50%; width: min(460px, 44vw); }
.observers { list-style: none; margin: 0; padding: 0; }
.observers li { padding: 6px 0; }
.observers button {
  display: block; padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 24px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.3; color: var(--soft);
  transition: color var(--dur) var(--ease);
}
.observers span { display: block; font-size: 15px; color: var(--soft); max-height: 0; overflow: hidden; opacity: 0; transition: opacity var(--dur) var(--ease); }
.observers button[aria-pressed="true"] { color: var(--ink); }
.observers button[aria-pressed="true"] + span { max-height: 3em; opacity: 1; }

.wp--how { left: var(--gutter); bottom: 14vh; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.how li { font-family: var(--display); font-size: clamp(28px, 3vw, 42px); font-weight: 500; line-height: 1.2; letter-spacing: -0.8px; }

/* Pricing: one plan, and what is in it. No card; hairlines and space. */
.wp--pricing { left: var(--gutter); top: 50%; translate: 0 -50%; width: min(600px, 60vw); }
.display--price span { color: var(--soft); font-size: 0.5em; letter-spacing: -0.4px; }
.included { list-style: none; margin: var(--s8) 0 0; padding: 0; max-width: 48ch; }
.included li { padding: 10px 0; border-top: 1px solid var(--rule); font-size: 16px; }
.included li:last-child { border-bottom: 1px solid var(--rule); }

/* Questions down the left, the open answer beside them. */
.wp--faq { left: var(--gutter); top: 50%; translate: 0 -50%; right: var(--gutter); max-width: 1040px; }
.faq { list-style: none; margin: 0; padding: 0; position: relative; width: min(440px, 44%); }
.faq li { border-top: 1px solid var(--rule); }
.faq li:last-child { border-bottom: 1px solid var(--rule); }
.faq button {
  display: block; width: 100%; padding: 11px 0; border: 0; background: none; cursor: pointer; text-align: left;
  font-size: 16.5px; font-weight: 500; line-height: 1.4; color: var(--soft);
  transition: color var(--dur) var(--ease);
}
.faq button:hover, .faq button[aria-expanded="true"] { color: var(--ink); }
.faq .a {
  position: absolute; top: 0; left: calc(100% + var(--s10)); width: min(460px, 110%);
  margin: 0; font-family: var(--display); font-size: 22px; line-height: 1.45; color: var(--ink);
}

.wp--close { left: var(--gutter); top: 50%; translate: 0 -50%; width: min(620px, 56vw); }
.display--close { max-width: 14ch; }
.footnote { margin: var(--s9) 0 0; font-size: 13.5px; line-height: 1.5; color: var(--soft); max-width: 52ch; }

/* --- marks in the sky ----------------------------------------------------- */

.m { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.m--said {
  font-family: var(--display); font-size: 21px; line-height: 1.3; color: var(--ink);
  width: max-content; max-width: 24ch; translate: -50% -100%;
}
.m--inc { font-size: 14px; line-height: 1.35; width: max-content; max-width: 26ch; translate: -50% 18px; }
.m--inc span { display: block; margin-top: 6px; }
.m--inc b { display: block; font-weight: 600; font-size: 12.5px; }
.m--you { font-size: 14px; color: var(--soft); translate: 14px -50%; }

/* --- narrow --------------------------------------------------------------- */

@media (max-width: 1023px) { .wp--catalogue { right: var(--gutter); } }
@media (max-width: 760px) { .map a { font-size: 0; gap: 0; } .map { height: 16px; bottom: 12px; } }
@media (max-width: 760px) {
  .top { padding: var(--s4) var(--gutter); }
  .top .btn { min-height: 40px; padding: 8px var(--s3); font-size: 14px; }
  .wp--hero, .wp--close { top: auto; bottom: 7vh; translate: none; width: auto; right: var(--gutter); }
  .display { font-size: 38px; letter-spacing: -1px; }
  .lede { font-size: 16.5px; }
  .field { flex-wrap: wrap; padding: 6px; }
  .field input { flex-basis: 100%; padding: var(--s3); }
  .field .btn { width: 100%; }
  .wp--session { top: 76px; right: var(--gutter); width: auto; }
  .legend { font-size: 14.5px; }
  .wp--catalogue, .wp--personas { top: auto; bottom: 48px; translate: none; left: var(--gutter); right: var(--gutter); width: auto; }
  .catalogue button { grid-template-columns: 68px minmax(0, 1fr) 36px; padding: 7px 0; font-size: 14px; }
  .quote { min-height: 0; font-size: 16px; }
  .quote:empty { display: none; }
  .aside { display: none; }
  .observers button { font-size: 20px; }
  .m--said { font-size: 17px; max-width: 18ch; }
  .m--inc { font-size: 13px; max-width: 20ch; }
  .footnote { margin-top: var(--s6); }
  .wp--pricing, .wp--faq { top: auto; bottom: 48px; translate: none; right: var(--gutter); width: auto; }
  .included { margin-top: var(--s5); }
  .included li { padding: 7px 0; font-size: 14.5px; }
  .faq { width: auto; }
  .faq button { padding: 8px 0; font-size: 15px; }
  .faq .a { position: static; width: auto; padding: 0 0 var(--s3); font-size: 17px; }
}

/* --- without a script ----------------------------------------------------- */

html:not(.js) :is(.sky, .marks, .map, .spacer) { display: none; }
html:not(.js) .copy { position: static; padding: 120px var(--gutter) 64px; }
html:not(.js) .wp { position: static; opacity: 1; translate: none; width: auto; max-width: 720px; margin: 0 0 120px; }
html:not(.js) .top { position: absolute; }
html:not(.js) .observers span { max-height: none; opacity: 1; }
html:not(.js) .faq { width: auto; }
html:not(.js) .faq .a { position: static; width: auto; padding-bottom: var(--s4); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; }
}
