/* Fonts: self-hosted, latin and latin-ext subsets (OFL, licences in fonts/). */
/* latin-ext */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bodoni-moda-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/bodoni-moda-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/hanken-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/hanken-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/hanken-grotesk-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/hanken-grotesk-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/newsreader-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/newsreader-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/newsreader-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/newsreader-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The page is one night turning into one morning: Sera (dark) at the top, Alba (light) from the sunrise on.
   Values from DESIGN.md; each section says which of the two themes it stands in. */
:root {
  --plum-950: #140e17; --plum-900: #1c1420; --plum-850: #241a29; --plum-700: #3a283d;
  --plum-600: #5e4e60; --plum-500: #76667a; --plum-400: #a796a9; --plum-300: #cdbfce; --plum-100: #f3ecef;
  --paper: #fbf9f8;
  --horizon: linear-gradient(90deg, transparent, #9cafd8 18%, #b9b0d0 38%, #f1c7c1 62%, #fddac0 82%, transparent);
  --settle: cubic-bezier(.2, .8, .2, 1);
  --out: cubic-bezier(.16, 1, .3, 1);
  --display: "Bodoni Moda", "Bodoni 72", Didot, serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --keys: "SF Pro", system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
  --hz: 58%;
  --sun: min(34svh, 40vw, 380px);
}
[data-theme="sera"] {
  --bg: var(--plum-900); --raised: var(--plum-850);
  --ink: var(--plum-100); --ink-2: var(--plum-300); --ink-3: var(--plum-400);
  --line: rgba(243, 236, 239, .08); --line-strong: rgba(243, 236, 239, .2);
  --chip: rgba(243, 236, 239, .06); --chip-hover: rgba(243, 236, 239, .12);
  --work: #9cafd8; --personal: #fbc9b9; --bridge: #c9bfe6; --attention: #fbc9b9;
  --highlight: rgba(156, 175, 216, .34); --quote-line: rgba(217, 142, 122, .85);
  --fill: var(--plum-100); --on-fill: var(--plum-900); --focus: var(--plum-300);
  color: var(--ink);
}
[data-theme="alba"] {
  --bg: var(--paper); --raised: #fff;
  --ink: var(--plum-700); --ink-2: var(--plum-600); --ink-3: var(--plum-500);
  --line: rgba(58, 40, 61, .08); --line-strong: rgba(58, 40, 61, .2);
  --chip: rgba(58, 40, 61, .06); --chip-hover: rgba(58, 40, 61, .11);
  --work: #6e86bf; --personal: #d98e7a; --bridge: #9183b8; --attention: #c2735f;
  --highlight: rgba(251, 201, 185, .8); --quote-line: rgba(217, 142, 122, .75);
  --fill: var(--plum-700); --on-fill: var(--paper); --focus: var(--plum-600);
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  background: #0b080d;
  scrollbar-width: thin; scrollbar-color: rgba(167, 150, 169, .5) transparent;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
body { font: 400 15px/1.45 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
::selection { background: var(--highlight); color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Type: Bodoni speaks the one thing, Newsreader carries words from somewhere, Hanken does the work. */
.display-xl { font: 400 clamp(44px, 6.6vw, 96px)/1.02 var(--display); letter-spacing: -.02em; text-wrap: balance; }
.display { font: 400 clamp(36px, 4.4vw, 64px)/1.06 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.title { font: 400 clamp(28px, 2.9vw, 42px)/1.16 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.reading { font: 400 clamp(18px, 1.45vw, 21px)/1.6 var(--text); color: var(--ink-2); text-wrap: pretty; }
.caption { font: 400 13px/1.45 var(--sans); color: var(--ink-3); }
q { quotes: none; font-family: var(--text); font-style: italic; }
.key {
  display: inline-block; min-width: 20px; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 5px;
  font: 500 11px/1.5 var(--keys); color: var(--ink-3); text-align: center;
}

/* ---------- sky: one shader, with a CSS sky underneath for when WebGL is missing ---------- */
.sky { position: fixed; left: 0; top: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; }
.sky canvas { display: none; width: 100%; height: 100%; }
.gl .sky canvas { display: block; }
.gl .sky-css { display: none; }
.sky-css > i { position: absolute; inset: 0; }
/* The light that waits under the window, in the logo's colours: warm where the sun will be, cool on either side. */
.sky-night { background: linear-gradient(#0b080d, #140e17 80%, #170f1a); }
.sky-glow { opacity: 0; background:
  radial-gradient(40% 44% at 50% 112%, rgba(242, 140, 77, .5), rgba(213, 151, 194, .16) 50%, transparent 76%),
  radial-gradient(26% 40% at 72% 108%, rgba(213, 151, 194, .24), transparent 72%),
  radial-gradient(32% 44% at 18% 110%, rgba(156, 143, 219, .3), transparent 72%),
  radial-gradient(26% 56% at 90% 104%, rgba(126, 154, 230, .28), transparent 72%); }
html:not(.js) .sky-glow { opacity: 1; }
.sky-dawn { opacity: 0; background: radial-gradient(ellipse 90% 42% at 50% var(--hzp, 58%), rgba(253, 218, 192, .55), rgba(242, 164, 166, .3) 34%, rgba(156, 143, 219, .14) 62%, transparent 82%); }
.sky-day { opacity: 0; background: radial-gradient(ellipse 70% 40% at 50% -8%, rgba(156, 175, 216, .24), transparent 70%), var(--paper); }
/* Grain, one CSS pixel each, where the shader cannot draw it (a tile made by the script; none without it). */
.sky-css::after, .foot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grain) 0 0 / 128px 128px; image-rendering: pixelated; mix-blend-mode: soft-light; opacity: .45;
}
html:not(.js) section[data-theme="alba"] { background: var(--paper); }

header, main, footer { position: relative; z-index: 2; }

/* ---------- what flows in: words from the week, drifting in the dark ---------- */
.fragments { position: fixed; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; contain: strict; }
.js .fragments { animation: appear 2.4s var(--settle) .7s both; }
.fragments span {
  position: absolute; left: 0; top: 0; white-space: nowrap; will-change: transform, opacity;
  font: italic 400 var(--fs, 16px)/1.3 var(--text); color: var(--plum-300); filter: blur(var(--b, 0px));
}
.fragments i { display: block; font-style: inherit; animation: drift var(--dur, 18s) ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(var(--dx, 10px), var(--dy, -6px), 0); } }
@keyframes appear { from { opacity: 0; } }

/* ---------- nav ---------- */
.nav {
  position: fixed; z-index: 10; inset: 0 0 auto 0; height: 72px; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
  transition: transform .45s var(--settle), color .6s var(--settle);
}
.nav > * { pointer-events: auto; }
/* Past the hero the brand steps out and stays out: it has no ground of its own and would sit on the page's words.
   The language and the way to the waitlist stay, on their pills (waitlist.css). */
.nav .brand { transition: opacity .35s var(--settle), transform .45s var(--settle); }
.nav.away .brand { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.wordmark { font: 400 24px/1 var(--display); letter-spacing: -.01em; }
.act {
  position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px;
  border: 0; border-radius: 8px; background: none; cursor: pointer; text-decoration: none;
  font: 400 14px/1.4 var(--sans); color: var(--ink-2);
  transition: background-color .12s var(--settle), color .6s var(--settle);
}
.act:hover { background: var(--chip-hover); color: var(--ink); }
.nav .act .key { position: absolute; right: calc(100% + 2px); opacity: 0; transition: opacity .2s var(--settle); }
.nav .act:hover .key, .nav .act:focus-visible .key { opacity: 1; }

/* ---------- Sera: the problem ---------- */
/* The words stand above the light; the light keeps the foot of the window. */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; padding: 104px var(--gutter) clamp(96px, 12vh, 150px);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: end;
}
.hero h1 { grid-column: 1 / span 11; max-width: 15ch; }
.hero .lede { grid-column: 7 / span 5; grid-row: 2; margin-top: 36px; max-width: 44ch; }
.hero .wl { grid-column: 7 / span 5; grid-row: 3; margin-top: 30px; }
.hero .hint { position: absolute; left: var(--gutter); bottom: 34px; display: flex; align-items: center; gap: 10px; color: var(--ink); font-size: 13px; }
.hero .hint .key { color: var(--ink-2); border-color: rgba(243, 236, 239, .32); }
.js .hero h1 .w { display: inline-block; animation: rise 1s var(--out) both; animation-delay: calc(150ms + var(--i) * 46ms); }
.js .hero .lede, .js .hero .wl, .js .hero .hint { animation: rise 1s var(--out) both .75s; }
@keyframes rise { from { opacity: 0; transform: translateY(.22em); filter: blur(8px); } }

.mirror { padding: 7vh var(--gutter) 7vh; }
.mirror h2 { max-width: 22ch; margin-bottom: 6vh; }
.scenes { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 5vh; }
.scene { grid-column: var(--at); display: grid; grid-template-columns: 6.5em minmax(0, 1fr); column-gap: 16px; align-items: baseline; will-change: opacity, filter; }
.scene time { font: 500 13px/1.4 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scene p { font: 400 clamp(22px, 2.1vw, 30px)/1.36 var(--text); text-wrap: pretty; max-width: 30ch; }

/* ---------- the turn: the line wakes, the sun rises, the day comes ---------- */
.dawn { position: relative; }
.js .dawn { height: 300vh; }
.pin { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.js .pin { position: sticky; top: 0; }
.above { position: absolute; inset: 0 0 auto 0; height: var(--hz); overflow: hidden; }
.below { position: absolute; inset: var(--hz) 0 0 0; overflow: hidden; }
.sun, .reflection { position: absolute; left: 50%; width: var(--sun); aspect-ratio: 1; margin-left: calc(var(--sun) / -2); }
.sun { bottom: 0; transform: translate3d(0, -6%, 0); will-change: transform; }
.reflection { top: 0; opacity: 0; transform: translate3d(0, 6%, 0) scaleY(-1); filter: blur(7px); will-change: transform, opacity;
  -webkit-mask-image: linear-gradient(to top, #fff, transparent 70%); mask-image: linear-gradient(to top, #fff, transparent 70%); }
.sun svg, .reflection svg { display: block; width: 100%; height: 100%; overflow: visible; }
.horizon { position: absolute; left: 50%; top: var(--hz); width: min(1180px, calc(100% - 2 * var(--gutter))); height: 1px; translate: -50% 0; background: var(--horizon); }
.horizon::after { content: ""; position: absolute; inset: -6px 0; background: var(--horizon); filter: blur(10px); opacity: var(--bloom, 0); }
.beats {
  position: absolute; left: 0; right: 0; top: calc(var(--hz) + clamp(32px, 7svh, 72px));
  display: grid; justify-items: center; padding: 0 var(--gutter); text-align: center; pointer-events: none;
}
.js .beats > * { grid-area: 1 / 1; }
.beats .title { max-width: 21ch; }
.today { display: grid; justify-items: center; gap: 18px; background: none; }
.today .reading { color: var(--ink-2); }
.js [data-span] { opacity: 0; will-change: opacity, transform, filter; }

/* ---------- Alba: the proof ---------- */
/* The section and its demo live in demo.css. */
@keyframes breathe { 50% { transform: scale(1.07); opacity: .7; } }
/* Certainty as a mark, in the demo and in the principles: confirmed = filled, read in a source = ring, deduced = dashed. */
.cert { width: 12px; height: 12px; flex: none; fill: none; stroke: var(--work); stroke-width: 1.6; }
.cert.filled { fill: var(--work); }
.cert.dashed { stroke-dasharray: 2.4 2.2; }

.principles { padding: 2vh var(--gutter) 4vh; display: grid; gap: clamp(64px, 10vh, 112px); }
.principle { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 16px; align-items: start; }
.principle h3 { grid-column: 1 / span 5; font: 400 clamp(30px, 3.2vw, 46px)/1.08 var(--display); letter-spacing: -.015em; text-wrap: balance; }
.principle .body { grid-column: 7 / span 6; display: grid; gap: 18px; padding-top: .45em; }
.principle .reading { max-width: 54ch; font-size: clamp(17px, 1.25vw, 19px); line-height: 1.55; }
.trust { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; font: 400 14px/1.4 var(--sans); color: var(--ink-2); }
.trust li { display: inline-flex; align-items: center; gap: 8px; }
.graph { width: 100%; max-width: 420px; height: auto; overflow: visible; }
.graph .maybe { fill: none; stroke: var(--bridge); stroke-width: 1.4; stroke-dasharray: 4 4; animation: flow 8s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.graph .node { fill: var(--bg); stroke-width: 1.6; }
.graph .work { stroke: var(--work); }
.graph .personal { stroke: var(--personal); }
.graph .dash-work { fill: var(--work); }
.graph .dash-personal { fill: var(--personal); }
/* SVG units: at the graph's 420px these are the app's 15/13/15px; on a phone they stay at 11px or more. */
.graph .name { font: 400 18px var(--sans); fill: var(--ink-2); }
.graph .realm { font: 400 15px var(--sans); fill: var(--ink-3); }
.graph .might { font: italic 400 17px var(--text); fill: var(--bridge); }

/* ---------- the ask ---------- */
.join { padding: clamp(104px, 17vh, 184px) var(--gutter) clamp(80px, 12vh, 136px); display: grid; justify-items: center; text-align: center; }
/* The ask in three groups: the mark over its sentence, the sentence with its words, then the line to write on. */
.join > svg { width: 48px; height: 48px; }
.join .display-xl { max-width: 20ch; margin-top: 28px; font-size: clamp(38px, 4.8vw, 68px); }
.join .reading { max-width: 40ch; margin-top: 22px; }
/* The day ends on the horizon: below the line, the night, with the light lying on it. */
.foot {
  min-height: clamp(200px, 28vh, 300px); padding: 56px var(--gutter) 44px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 32px;
  background:
    radial-gradient(44% 52% at 50% 0, rgba(242, 140, 77, .42), rgba(213, 151, 194, .14) 50%, transparent 78%),
    radial-gradient(30% 42% at 20% 0, rgba(156, 143, 219, .28), transparent 72%),
    radial-gradient(28% 48% at 82% 0, rgba(126, 154, 230, .24), transparent 72%),
    linear-gradient(#130d16, #0b080d 72%);
}
.foot::after { opacity: .28; } /* the night's grain is a whisper, as the shader's is on the dark */
.foot::before { content: ""; position: absolute; z-index: 1; left: 50%; top: 0; width: min(1180px, calc(100% - 2 * var(--gutter))); height: 1px; translate: -50% 0; background: var(--horizon); }
.foot > * { position: relative; z-index: 1; }
.foot .brand svg { width: 22px; height: 22px; }
.foot .wordmark { font-size: 20px; }

@media (max-width: 960px) {
  .principle h3, .principle .body { grid-column: 1 / -1; }
  .principle .body { padding-top: 0; }
}
@media (max-width: 760px) {
  :root { --hz: 54%; --sun: min(30svh, 62vw, 260px); }
  .hero { padding-top: 92px; padding-bottom: 96px; }
  .hero h1, .hero .lede, .hero .wl { grid-column: 1 / -1; }
  .hero .lede { grid-row: 2; margin-top: 24px; }
  .hero .wl { margin-top: 24px; }
  .mirror { padding-top: 12vh; padding-bottom: 12vh; }
  .mirror h2 { margin-bottom: 9vh; }
  .scenes { row-gap: 9vh; }
  .principles { gap: 56px; padding-top: 2vh; padding-bottom: 6vh; }
  .scene { grid-column: 1 / -1 !important; grid-template-columns: 1fr; row-gap: 8px; }
  .scene:nth-child(even) { padding-left: 12%; }
}
@media (hover: none) {
  .hero .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .fragments, .fragments i, .js .hero h1 .w, .js .hero .lede, .js .hero .wl, .js .hero .hint, .graph .maybe { animation: none; }
  .nav { transition: color .12s linear; }
}
