/* =============================================================================
   styles.css: tokens, display type and the reading layout.
   =============================================================================

   The two token blocks are FLINT, copied unchanged from the extension
   (panel.html's :root and glass-surface.css's :root). Add no colours here. The
   only other literals the site may use are the composer beam's cool shades,
   which arrive with the beam.

   The reading layout below is the whole page today, and stays the page with JS
   off, with no WebGL, or under reduced motion. Nothing in it should depend on
   anything that is loaded later. */

:root {
  --ink:  #08090A;   /* page ground */
  --bone: #EAEEF0;   /* primary text, filled marks */
  --rim:  #9EB6C4;   /* accent: live, contradiction, citation */
  --rim-rgb:  158,182,196;
  --bone-rgb: 234,238,240;
  --warm-rgb:   220,228,232;
  --ink-rgb:    8,9,10;
  --panel-rgb:  16,20,22;
  --panel-hi-rgb: 24,30,33;
  --lit-rgb:    255,255,255;
  --litrim-rgb: 200,225,235;
  --danger-rgb: 232,96,92;
  --s-card:  rgba(var(--warm-rgb),.05);
  --s-inter: rgba(var(--warm-rgb),.10);
  --s-quiet: rgba(var(--warm-rgb),.04);
  --s-rim:   rgba(var(--rim-rgb),.12);
  --edge-k: .55;
  --lit-card: inset 0 0 0 1px rgba(var(--lit-rgb),calc(.16 * var(--edge-k)));
  --lit-pill: inset 0 0 0 1px rgba(var(--lit-rgb),calc(.20 * var(--edge-k)));
  --lit-rim:  inset 0 0 0 1px rgba(var(--litrim-rgb),calc(.36 * var(--edge-k)));
  --t-primary:   #eaeef0;
  --t-strong:    rgba(var(--bone-rgb),.82);
  --t-body:      rgba(var(--bone-rgb),.72);
  --t-secondary: rgba(var(--bone-rgb),.62);
  --t-meta:      rgba(var(--bone-rgb),.45);
  --t-faint:     rgba(var(--bone-rgb),.35);
  --hair:        rgba(var(--bone-rgb),calc(.10 * var(--edge-k)));
  --serif: Newsreader, Georgia, serif;
  --sans:  'Alegreya Sans', system-ui, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --r-card: 16px;    /* square outside, rounded inside */
  --r-pill: 999px;   /* thin tracks and skeleton bars only */
  --r-ctl: 8px;      /* every button, chip and toggle */
  --r-ctl-sm: 5px;
}

:root {
  --g-bone: 234 238 240;  --g-warm: 220 228 232;  --g-rim: 158 182 196;
  --g-ink: 8 9 10;        --g-panel: 16 20 22;     --g-danger: 232 96 92;
  --g-dark: 12 15 17;     --g-dark-rim: 24 33 39;
  --g-lit: 255 255 255;   --g-litrim: 200 225 235; --g-edge: 255 255 255;
  --g-shadow: 0 0 0;      --g-shadow-k: 1;
}

/* The site's own: the display face and the page's measure. */
:root {
  color-scheme: dark;
  --display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --gutter: clamp(20px, 5vw, 80px);
}

/* ---- type: the product's faces, self-hosted --------------------------------
   Newsreader is declared for the replica. It is never used outside it, so
   nothing fetches it until the replica exists. */
@font-face { font-family: 'Alegreya Sans'; font-weight: 400; font-display: swap; src: url('/fonts/alegreya-sans-400-normal.ttf') format('truetype'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 500; font-display: swap; src: url('/fonts/alegreya-sans-500-normal.ttf') format('truetype'); }
@font-face { font-family: 'Alegreya Sans'; font-weight: 700; font-display: swap; src: url('/fonts/alegreya-sans-700-normal.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-400-normal.ttf') format('truetype'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-500-normal.ttf') format('truetype'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: normal; font-display: swap; src: url('/fonts/instrument-serif-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/instrument-serif-400-italic.woff2') format('woff2'); }
@font-face { font-family: Newsreader; font-weight: 300; font-display: swap; src: url('/fonts/newsreader-300-normal.ttf') format('truetype'); }
@font-face { font-family: Newsreader; font-weight: 400; font-display: swap; src: url('/fonts/newsreader-400-normal.ttf') format('truetype'); }
@font-face { font-family: Newsreader; font-weight: 400; font-style: italic; font-display: swap; src: url('/fonts/newsreader-400-italic.ttf') format('truetype'); }
@font-face { font-family: Newsreader; font-weight: 500; font-display: swap; src: url('/fonts/newsreader-500-normal.ttf') format('truetype'); }

/* ---- ground ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 19px/1.6 var(--sans);
  color: var(--t-body);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: rgba(var(--rim-rgb),.3); color: var(--bone); }

a { color: var(--t-strong); text-decoration: underline; text-decoration-color: rgba(var(--bone-rgb),.35); text-underline-offset: .18em; }
a:hover { color: var(--bone); text-decoration-color: var(--rim); }
:focus-visible { outline: 2px solid var(--rim); outline-offset: 3px; border-radius: var(--r-ctl); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--gutter); top: 12px; z-index: 10;
  padding: 10px 14px; border-radius: var(--r-ctl);
  background: var(--bone); color: var(--ink);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* A mono label, the way the product sets one. --t-secondary rather than the
   fainter steps because these get read. */
.label {
  font: 400 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--t-secondary);
}

/* ---- the top of the page ------------------------------------------------ */
.site-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 24px var(--gutter);
}
.wordmark { display: block; }
.wordmark img { display: block; height: 30px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a { font: 400 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--t-secondary); text-decoration: none; padding: 8px 0; }
.site-nav a:hover { color: var(--bone); }

.hero { padding: clamp(40px, 9vh, 96px) var(--gutter) clamp(48px, 9vh, 96px); }
.hero h1 {
  font: 400 clamp(64px, 11vw, 196px)/.92 var(--display);
  letter-spacing: -.03em; color: var(--t-primary);
  max-width: 11.5em; text-wrap: balance;
}
.hero h1 em, .chapter h2 em { font-style: italic; }
.hero-lead { margin-top: clamp(28px, 5vh, 48px); max-width: 62ch; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; color: var(--t-strong); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.btn {
  display: inline-block; padding: 13px 20px; border: 0; border-radius: var(--r-ctl);
  font: 500 17px/1.2 var(--sans); text-decoration: none; cursor: pointer;
  background: var(--bone); color: var(--ink);
}
.btn:hover { color: var(--ink); background: var(--t-primary); box-shadow: 0 0 0 1px var(--rim); }
.btn[disabled] { opacity: .6; cursor: progress; }
.text-link { font-size: 17px; }

/* While the immersive view loads, a plain cover, so the article doesn't flash first.
   The page under it still paints, so its headline is there from the start. */
html.pre-immersive body::after { content: ""; position: fixed; inset: 0; z-index: 50; background: var(--ink); }
/* Reserve the opening's final geometry before the replica styles arrive. */
html.pre-immersive .site-head { position: fixed; inset: 0 0 auto; padding: 20px var(--gutter); }
html.pre-immersive #arrival { height: 120vh; padding: 0; }
html.pre-immersive #arrival .chapter-copy { display: block; position: fixed; left: var(--gutter); top: 15vh; width: min(70vw, 1180px); }
html.pre-immersive .hero h1 { font-size: clamp(64px, 9.6vw, 176px); max-width: none; }
@media (max-width: 759px) {
  html.pre-immersive #arrival .chapter-copy { left: 18px; top: 13vh; width: calc(100vw - 36px); }
  html.pre-immersive .hero h1 { font-size: 64px; }
}

/* The words' wrapper is only a box in the immersive view. */
.chapter-copy { display: contents; }

/* ---- a chapter ------------------------------------------------------------
   Title across the page, then the words and the scene side by side. They swap
   sides on even chapters, so a long page doesn't turn into one repeated row. */
.chapter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(26px, 4vw, 48px) clamp(32px, 6vw, 96px);
  padding: clamp(56px, 10vh, 112px) var(--gutter);
  border-top: 1px solid var(--hair);
  scroll-margin-top: 16px;
}
.chapter-head { grid-column: 1 / -1; position: relative; }
.chapter-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; min-height: 26px; margin-bottom: 18px; padding-right: 1.4em; }
.chapter h2 {
  font: 400 clamp(48px, 8vw, 148px)/.95 var(--display);
  letter-spacing: -.025em; color: var(--t-primary);
  max-width: 13em; text-wrap: balance;
}
/* The giant numeral. Decoration: the label beside the title says the same. */
.chapter-index {
  position: absolute; right: 0; top: -.08em;
  font: 400 clamp(40px, 5vw, 84px)/1 var(--display);
  font-variant-numeric: tabular-nums; color: var(--t-meta);
}
.chapter-body { max-width: 62ch; }
.chapter-body > * + * { margin-top: 1em; }
.chapter:nth-of-type(even) .chapter-body { order: 2; }
.chapter:nth-of-type(even) .scene { order: 1; }

/* The status tag. The accent only marks what ships today. */
.status {
  display: inline-block; padding: 4px 9px 3px; border-radius: var(--r-ctl);
  box-shadow: inset 0 0 0 1px rgba(var(--bone-rgb),.28);
  font: 500 10px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--t-strong);
}
.status-live { color: var(--rim); box-shadow: inset 0 0 0 1px rgba(var(--rim-rgb),.55); }
.status-coming { color: var(--t-secondary); box-shadow: inset 0 0 0 1px var(--hair); }

/* ---- the scene ------------------------------------------------------------
   What the replica acts out, written down: this is the transcript a reader
   gets when the replica isn't running. */
.scene {
  align-self: start; padding: 20px 22px 22px;
  border-radius: var(--r-card); background: var(--s-quiet); box-shadow: var(--lit-card);
  font-size: 17px; line-height: 1.5;
}
.scene figcaption { margin-bottom: 14px; }
.scene > * + *:not(figcaption) { margin-top: 12px; }
.scene > figcaption + * { margin-top: 0; }
.turn-who { display: block; margin-bottom: 2px; font: 400 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--t-secondary); }
.turn-you { color: var(--t-strong); }
.log {
  font: 400 12.5px/1.75 var(--mono); color: var(--t-secondary);
  overflow-wrap: anywhere;
}
.log b { font-weight: 500; color: var(--t-strong); }
.scene > .reactions { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); font: 400 12px/1.5 var(--mono); color: var(--t-secondary); }
.scene > .verdict { margin-top: 6px; font: 400 clamp(56px, 7vw, 104px)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--t-primary); }

pre.code {
  overflow-x: auto; padding: 14px 16px; border-radius: var(--r-ctl);
  background: var(--s-quiet); box-shadow: var(--lit-card);
  font: 400 12.5px/1.65 var(--mono); color: var(--t-strong);
}

/* The delivery levels and the roadmap: terms in the mono register, one hairline
   between each. */
.rule { margin-top: 1em; }
.rule p { margin-top: 1em; }
.terms > div { padding: 12px 0; border-top: 1px solid var(--hair); }
.terms dt { font: 500 12px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--t-primary); }
.terms dd { margin-top: 3px; }

.apps-lists { grid-column: 1 / -1; display: grid; gap: 28px; }
.apps-live, .apps-catalog { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.apps-live li, .apps-catalog li { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-ctl); background: rgb(var(--panel-rgb)); box-shadow: var(--lit-card); }
.apps-live span { padding-right: 6px; font-size: 15px; color: var(--t-primary); }
.apps-live img, .apps-catalog img { display: block; width: 32px; height: 32px; }
.fineprint { font-size: 16px; color: var(--t-secondary); }
.kairos-picture { display: block; width: min(100%, 460px); height: auto; margin-bottom: 14px; }

.pull {
  grid-column: 1 / -1; max-width: 18em;
  font: 400 clamp(36px, 5vw, 88px)/1.04 var(--display);
  letter-spacing: -.02em; color: var(--t-primary);
}
.pull em { font-style: italic; }
.aftermath { grid-column: 1 / -1; max-width: 62ch; color: var(--t-strong); }

/* The roadmap has no scene, so its three items take the full width. */
#next .chapter-body { grid-column: 1 / -1; max-width: none; }
#next .terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 3vw, 48px); }

/* ---- the end of the page: joining, plans ---------------------------------- */
#join { grid-column: 1 / -1; scroll-margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.join-lead { font-size: 21px; line-height: 1.5; color: var(--t-strong); }
.live-today { margin-top: 18px; }
.live-today strong { font-weight: 500; color: var(--t-primary); }
.other-paths { margin-top: 18px; font-size: 17px; }

#waitlist-title { margin-bottom: 14px; }
.waitlist-form { display: grid; gap: 14px; max-width: 460px; }
.waitlist-form[hidden] { display: none; }
.field-label { display: grid; gap: 6px; font: 400 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--t-secondary); }
.field-input {
  width: 100%; padding: 12px 14px; border: 0; border-radius: var(--r-ctl);
  background: var(--s-quiet); box-shadow: inset 0 0 0 1px rgba(var(--bone-rgb),.28);
  font: 400 18px/1.3 var(--sans); letter-spacing: 0; text-transform: none; color: var(--t-primary);
}
.field-input:focus { outline: 2px solid var(--rim); outline-offset: 1px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 17px; }
.check-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--rim); }
/* The honeypot: bots fill every field, people never see this one. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note { min-height: 1.5em; font-size: 16px; color: var(--t-secondary); }
.form-note.is-error { color: rgb(var(--danger-rgb)); }
.form-note.is-success { color: var(--rim); }

.plans { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(16px, 3vw, 40px); border-top: 1px solid var(--hair); }
.plan { padding: 24px clamp(18px, 2.4vw, 36px) 6px; border-left: 1px solid var(--hair); }
.plan:first-child { padding-left: 0; border-left: 0; }
.plan h3 { font: 500 12px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--t-primary); }
.plan-price { margin-top: 8px; font: 400 clamp(42px, 4.8vw, 76px)/1 var(--display); color: var(--t-primary); }
.plan-tagline { margin-top: 10px; color: var(--t-strong); }
.plan ul { margin-top: 14px; font-size: 17px; line-height: 1.45; }
.plan li { padding: 9px 0; border-top: 1px solid var(--hair); }
.plan .status { margin-left: 4px; vertical-align: 1px; }
.plans-more { grid-column: 1 / -1; font-size: 17px; }

.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
  padding: 30px var(--gutter) 40px; border-top: 1px solid var(--hair);
  font-size: 16px; color: var(--t-secondary);
}
.site-foot ul { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { display: inline-block; padding: 4px 0; color: var(--t-secondary); }

/* ---- narrow: one column, the words before the scene ------------------------ */
@media (max-width: 860px) {
  .chapter, #join { grid-template-columns: minmax(0, 1fr); }
  .chapter:nth-of-type(even) .chapter-body, .chapter:nth-of-type(even) .scene { order: 0; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan, .plan:first-child { padding: 22px 0 8px; border-left: 0; border-top: 1px solid var(--hair); }
  .plan:first-child { border-top: 0; }
  .chapter-index { position: static; display: block; margin-bottom: 8px; }
  .chapter-meta { padding-right: 0; }
  #next .terms { grid-template-columns: minmax(0, 1fr); }
}
