/* Wayseer website: plain text over the deep. Tokens are the app's own themes (see DESIGN.md).
   Dark by default; light follows the desktop. */

@font-face { font-family: "Inter"; src: url("../assets/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/Inter-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/JetBrainsMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/JetBrainsMono-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/Newsreader.ttf") format("truetype"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("../assets/fonts/Newsreader-Italic.ttf") format("truetype"); font-weight: 200 800; font-style: italic; font-display: swap; }

/* ---------- tokens: the app's dark theme ---------- */
:root {
  --bg: #0b0e14; --surface: #11151d; --raised: #181d28; --border: #262d3b;
  --edge: #8fa3c233; --edge-solid: #8fa3c2; --grid: #8fa3c229;
  --text: #d9dee7; --muted: #a0abbc; --accent: #5cc8ff; --focus: #9edcff; --on-accent: #0b0e14;
  --ok: #35c486; --ok-dim: #1f7a55; --warn: #f5bf3a; --fail: #ff5a4f; --info: #7aa6ff; --unknown: #7b8496;
  --deep: .45;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --r-s: 3px; --r-m: 6px; --r-l: 10px;
  --fast: 120ms; --normal: 220ms; --slow: 400ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px; --measure: 40rem; --wide: 80rem;
  color-scheme: dark;
}
/* the app's light theme, when the desktop prefers it; data-theme lets the review tools force either */
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --bg: #eef1f5; --surface: #f7f8fa; --raised: #ffffff; --border: #cfd6e0; --edge: #3b4a664d; --edge-solid: #3b4a66; --grid: #3b4a6633; --text: #1a1f29; --muted: #454f61; --accent: #0a6cb4; --focus: #1f7fcc; --on-accent: #ffffff; --ok: #0e7656; --ok-dim: #0e7656; --warn: #8a5800; --fail: #a31c1c; --info: #3f6ee0; --unknown: #646d7c; --deep: .22; color-scheme: light; } }
:root[data-theme="light"] { --bg: #eef1f5; --surface: #f7f8fa; --raised: #ffffff; --border: #cfd6e0; --edge: #3b4a664d; --edge-solid: #3b4a66; --grid: #3b4a6633; --text: #1a1f29; --muted: #454f61; --accent: #0a6cb4; --focus: #1f7fcc; --on-accent: #ffffff; --ok: #0e7656; --ok-dim: #0e7656; --warn: #8a5800; --fail: #a31c1c; --info: #3f6ee0; --unknown: #646d7c; --deep: .22; color-scheme: light; }

/* ---------- base: one rem is 19.2px, so the whole type system and its spacing sit a fifth larger; 17.6px on a phone ---------- */
html { font-size: 120%; }
@media (max-width: 480px) { html { font-size: 110%; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--serif); font-optical-sizing: auto; font-size: 1.125rem; line-height: 1.6; overflow-x: hidden; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.1875rem; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
section:focus, div:focus { outline: none; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(2.375rem, 6vw, 4rem); letter-spacing: -0.02em; line-height: 1.02; }
h2 { font-size: clamp(1.6875rem, 3.6vw, 2.375rem); }
h3 { font-size: clamp(1.3125rem, 2vw, 1.5rem); line-height: 1.2; margin-top: 2.25rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
code, kbd, pre { font-family: var(--mono); font-size: 0.8em; }
code { color: var(--text); background: color-mix(in srgb, var(--raised) 70%, transparent); border: 1px solid var(--border); border-radius: var(--r-s); padding: 0 0.3125rem; white-space: nowrap; }
kbd { display: inline-block; min-width: 1.6em; text-align: center; padding: 0 0.375rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: var(--r-s); background: color-mix(in srgb, var(--raised) 80%, transparent); color: var(--text); line-height: 1.6; vertical-align: 1px; }
pre.shell { margin: 0.625rem 0 0.875rem; padding: 0.75rem 0.875rem; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--border); border-radius: var(--r-m); font-size: 0.78em; line-height: 1.6; overflow-x: auto; }
pre.shell code { background: none; border: 0; padding: 0; font-size: 1em; white-space: pre; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -62.4375rem; top: 0.5rem; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 0.5rem 0.875rem; border-radius: var(--r-m); font-family: var(--ui); font-size: 0.875rem; }
.skip:focus { left: 0.5rem; }
.dim { color: var(--muted); }
.small { font-size: 1rem; }
.muted { color: var(--muted); }
.road { display: inline-block; font-family: var(--mono); font-size: 0.71875rem; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: var(--r-s); padding: 0 0.375rem; margin-left: 0.25rem; vertical-align: 2px; white-space: nowrap; letter-spacing: 0; }

/* ---------- the deep: the cluster far beneath the page ---------- */
.deep-wrap { position: fixed; z-index: 0; inset: 0; pointer-events: none; will-change: transform; }
.deep { position: absolute; inset: -14vh -12vw; width: 124vw; height: 128vh; max-width: none; opacity: var(--deep); pointer-events: none; will-change: transform; animation: drift 140s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate3d(-3.5%, -2%, 0) scale(1); } to { transform: translate3d(3.5%, 2.5%, 0) scale(1.08); } }
/* the deep slips up a little as the page scrolls down: 6% of the scroll, up to 8vh, by the compositor alone */
@keyframes parallax { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -8vh, 0); } }
@supports (animation-timeline: scroll()) { .deep-wrap { animation: parallax linear both; animation-timeline: scroll(root); animation-range: 0 calc(8vh / 0.06); } }
@media (prefers-reduced-motion: reduce) { .deep, .deep-wrap { animation: none; transform: none !important; will-change: auto; } }
/* everything else sits above it */
.top, main, .foot { position: relative; z-index: 1; }

/* ---------- the journey: the world canvas, and a scene per discovery ---------- */
.world { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; z-index: 0; pointer-events: none; }
/* on the journey the header floats over the first scene, so the hero and its "Descend" fill the first screen */
.journey .top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
.scene { position: relative; height: calc(100svh + var(--travel, 120svh)); view-timeline: --scene block; }
#surface { --travel: 60svh; } #topology { --travel: 150svh; } #time { --travel: 200svh; } #lenses { --travel: 260svh; } #line { --travel: 200svh; } #confirm { --travel: 110svh; } #machine { --travel: 130svh; }
.stage { position: sticky; top: 0; z-index: 1; isolation: isolate; height: 100svh; display: grid; grid-template-columns: minmax(0, 27.5rem) 1fr; align-items: center; width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.copy { position: relative; isolation: isolate; max-width: 27.5rem; }
/* a soft backdrop behind the copy, fading out on every side, so the world shows through at its edges */
.copy::before { content: ""; position: absolute; inset: -1.75rem -4.5rem -1.75rem -2.5rem; z-index: -1; background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent) 62%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); }
.copy.hero { max-width: 41.25rem; grid-column: 1 / -1; }
.copy.hero::before { display: none; }
.copy.hero h1 { margin-bottom: 1.5rem; }
.copy h2 { margin-bottom: 1rem; font-size: clamp(1.625rem, 3vw, 2.125rem); }
.copy p { font-size: 1.0625rem; line-height: 1.55; }
.copy p.small { font-size: 0.9375rem; }
.copy .lens { font-family: var(--mono); font-size: 0.78125rem; letter-spacing: .04em; color: var(--accent); margin-bottom: 0.875rem; }
/* the copy rises into view once its stage has pinned; the timeline is the scene's own scroll */
.journey .copy:not(.hero) { animation: copy-in linear both; animation-timeline: --scene; animation-range: contain 4% contain 22%; }
@keyframes copy-in { from { opacity: 0; transform: translateY(1.75rem); } to { opacity: 1; transform: none; } }
.next { position: absolute; left: 50%; bottom: 1.375rem; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 0.5rem; min-width: 2.25rem; height: 2.25rem; padding: 0 0.75rem; border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb, var(--raised) 80%, transparent); color: var(--muted); font-family: var(--ui); font-size: 0.8125rem; text-decoration: none; }
.next:hover { color: var(--text); border-color: var(--muted); }
.lensbar { list-style: none; padding: 0; margin: 0.875rem 0 0; display: grid; gap: 0.5rem; font-size: 0.90625rem; line-height: 1.4; color: var(--muted); }
.lensbar li { display: grid; gap: 2px; }
.lensbar b { font-family: var(--ui); font-weight: 500; font-size: 0.875rem; }
.lensbar li[aria-current] { color: var(--text); }
.lensbar li[aria-current] b { color: var(--accent); }
/* each scene's door into the walkthrough */
.copy .more { font-family: var(--ui); font-size: 0.9375rem; font-weight: 500; color: var(--accent); text-decoration: none; }
.copy .more:hover { text-decoration: underline; }
.copy .actions { margin-top: 1.25rem; }
@media (max-width: 820px) {
  .stage { grid-template-columns: 1fr; align-items: end; padding-bottom: 3.75rem; }
  .stage::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 74%; z-index: -1; background: linear-gradient(to bottom, transparent, var(--bg) 30%); }
  .copy { max-width: none; }
  .copy::before { display: none; }
  .lensbar { font-size: 0.8125rem; gap: 0.25rem; line-height: 1.35; }
  .copy h2 { font-size: 1.375rem; margin-bottom: 0.625rem; }
  .copy p { font-size: 0.9375rem; line-height: 1.45; }
  .copy .lens { margin-bottom: 0.5rem; }
  .copy.hero { padding-bottom: 0.5rem; }
  .next { bottom: 0.875rem; }
}
@media (prefers-reduced-motion: reduce) { .journey .copy:not(.hero) { animation: none; } }

/* ---------- layout ---------- */
.top, main, .foot { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem 1.25rem; flex-wrap: wrap; padding-top: 1.375rem; padding-bottom: 1.375rem; font-family: var(--ui); font-size: 0.9375rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5625rem; color: var(--text); text-decoration: none; font-weight: 500; font-size: 1rem; }
.brand img { border-radius: 5px; }
.top nav { display: flex; align-items: center; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; padding: 0.375rem 0; }
.top nav a:hover { color: var(--text); }
.top nav a[aria-current] { color: var(--text); box-shadow: inset 0 -1.5px var(--accent); }
.top nav .btn { color: var(--on-accent); padding: 0.375rem 0.75rem; font-size: 0.875rem; }
.top nav .btn[aria-current] { box-shadow: none; }

main > section:not(.scene), main > .page { max-width: var(--measure); margin: 0 auto; }
main > .page.wide { max-width: var(--wide); }
/* a page section: its heading and lede at the left, the rest at the right */
.page .head p { color: var(--muted); }
@media (min-width: 900px) {
  .page.wide > section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 0.5rem 4.5rem; align-items: start; }
  .page.wide > section .head { position: sticky; top: 1.5rem; }
  .page.wide > section .body > :first-child { margin-top: 0; }
  .page.wide > section .body > h3:first-child { margin-top: 0.25rem; }
}
.hero { min-height: calc(100svh - 10rem); display: flex; flex-direction: column; justify-content: center; padding: 8vh 0 10vh; }
.hero h1 { margin-bottom: 1.625rem; }
.lede { font-size: clamp(1.1875rem, 2.2vw, 1.375rem); line-height: 1.5; color: var(--text); }
.lede.muted { color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 0.78125rem; letter-spacing: .04em; color: var(--muted); margin-bottom: 1.625rem; }
.eyebrow span + span::before { content: " · "; }
.eyebrow span:last-child { white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem 0.875rem; align-items: center; margin: 1.625rem 0 0; }
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; border: 1px solid var(--border); border-radius: var(--r-m); background: color-mix(in srgb, var(--raised) 85%, transparent); color: var(--text); font-family: var(--ui); font-size: 0.9375rem; line-height: 1.3; cursor: pointer; text-decoration: none; transition: border-color var(--fast), background var(--fast); }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--focus); border-color: var(--focus); }

/* the asks: a question, then the short answer */
.ask { padding: clamp(3.5rem, 11vh, 7.5rem) 0; }
.ask h2 { margin-bottom: 1.25rem; }
.ask p { color: var(--text); }
.ask p.small, .ask p.muted { color: var(--muted); }
.close { padding: clamp(3.5rem, 11vh, 7.5rem) 0 clamp(3rem, 8vh, 5rem); }
.page { padding: 2vh 0 6vh; }
.page h1 { margin-bottom: 1.375rem; }
.page > section { padding: clamp(2.5rem, 7vh, 4.5rem) 0 0; }
.page > section:first-of-type { padding-top: 1.5rem; }
.page h2 { margin-bottom: 1.125rem; scroll-margin-top: 1.5rem; }
.page .lede { margin-bottom: 1.2em; }

/* rows: a term, then its line, separated by hairlines; sources, lenses, answers */
.rows { margin: 0; display: grid; }
.rows > div { display: grid; gap: 0.25rem 1.5rem; padding: 0.875rem 0; border-top: 1px solid var(--border); }
.rows > div:last-child { border-bottom: 1px solid var(--border); }
.rows dt { font-size: 1.125rem; color: var(--text); }
.rows dt .kind { font-family: var(--mono); font-size: 0.71875rem; color: var(--muted); margin-left: 0.5rem; white-space: nowrap; }
.rows dd { margin: 0; color: var(--muted); font-size: 1.03125rem; line-height: 1.5; }
@media (min-width: 640px) { .rows.cols > div { grid-template-columns: 11em minmax(0, 1fr); } }

/* tables, as the app lays out a detail pane: a label column and a value column */
.tbl { width: 100%; border-collapse: collapse; margin: 0.375rem 0 1.625rem; font-size: 1rem; }
.tbl caption { text-align: left; font-family: var(--mono); font-size: 0.71875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-bottom: 0.5rem; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 0.625rem 0; border-top: 1px solid var(--border); }
.tbl tr:last-child th, .tbl tr:last-child td { border-bottom: 1px solid var(--border); }
.tbl th { font-family: var(--ui); font-weight: 500; font-size: 0.875rem; color: var(--text); white-space: nowrap; padding-right: 1.125rem; width: 1%; }
.tbl td { color: var(--muted); }
.tbl td b { color: var(--text); font-weight: 500; }
.tbl.downloads td { overflow-wrap: anywhere; }
.tbl.downloads .sum { font-size: 0.8125rem; }
.tbl.downloads .sum code { font-size: 0.75rem; white-space: normal; }
.tbl.paths td { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.25rem 0.625rem; align-items: baseline; }
.tbl.paths td span { font-family: var(--ui); font-size: 0.8125rem; }
.tbl.paths code { justify-self: start; white-space: normal; overflow-wrap: anywhere; }
.whatsnew { margin: -0.875rem 0 1.625rem; font-size: 0.96875rem; color: var(--muted); }
.whatsnew summary { cursor: pointer; font-family: var(--ui); font-size: 0.875rem; color: var(--text); padding: 0.25rem 0; }
.whatsnew p { margin: 0.5rem 0 0.375rem; }
.whatsnew ul { margin: 0; padding-left: 1.125rem; display: grid; gap: 0.375rem; }
.whatsnew b { color: var(--text); font-weight: 500; }
.steps { padding-left: 1.2em; margin: 0 0 1.2em; display: grid; gap: 0.75rem; color: var(--muted); }
.steps b { color: var(--text); font-weight: 500; }
.steps li::marker { font-family: var(--mono); color: var(--muted); font-size: 0.8125rem; }

/* pricing: the two tiers, and the buy box */
.tiers { display: grid; gap: 1.75rem 2.5rem; margin: 0.5rem 0 2rem; }
@media (min-width: 720px) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier h2 { font-size: 1.5625rem; margin-bottom: 0.25rem; }
.tier .sub { font-family: var(--mono); font-size: 0.78125rem; color: var(--muted); margin-bottom: 0.875rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 0.875rem; display: grid; gap: 0.625rem; font-size: 1.03125rem; color: var(--muted); line-height: 1.5; }
.tier li { padding-left: 1.125rem; position: relative; }
.tier li::before { content: ""; position: absolute; left: 0; top: .6em; width: 0.4375rem; height: 0.4375rem; border-radius: 50%; background: var(--ok); }
.tier.key li::before { background: transparent; border: 1.5px solid var(--warn); width: 0.5rem; height: 0.5rem; box-sizing: border-box; }
.tier li b { color: var(--text); font-weight: 500; }
.buy { padding: 1.375rem 1.5rem; border: 1px solid var(--border); border-radius: var(--r-l); background: color-mix(in srgb, var(--raised) 80%, transparent); margin-bottom: 1.75rem; }
.buy .what { font-family: var(--mono); font-size: 0.78125rem; color: var(--muted); margin-bottom: 0.5rem; }
.buy .price { font-size: 1.5rem; line-height: 1.3; margin-bottom: 0.625rem; }
.buy p { font-size: 1rem; color: var(--muted); }
.buy .actions { margin-top: 1.125rem; }

/* the checkout form */
.buy-form { display: grid; gap: 1.25rem; margin-top: 1.5rem; align-content: start; }
.buy-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 0.5rem; }
.buy-form legend, .buy-form .entry > span:first-child { font-family: var(--ui); font-size: 0.8125rem; letter-spacing: .02em; color: var(--muted); margin-bottom: 0.375rem; }
.buy-form .entry { display: grid; gap: 0.375rem; align-content: start; justify-items: start; }
.buy-form .entry input { width: 100%; max-width: 36ch; padding: 0.5625rem 0.6875rem; border: 1px solid var(--border); border-radius: var(--r-m); background: var(--raised); color: var(--text); font: inherit; font-family: var(--ui); font-size: 1rem; }
.buy-form .entry input[type="number"] { max-width: 10ch; }
.buy-form .hint { font-size: 0.9375rem; color: var(--muted); }
.buy-form .choice, .buy-form .check { display: grid; grid-template-columns: auto 1fr; gap: 0.625rem; align-items: start; cursor: pointer; }
.buy-form .choice input, .buy-form .check input { margin: 0.375rem 0 0; width: 1rem; height: 1rem; accent-color: var(--accent); }
.buy-form .form-note { margin: 0; min-height: 1.4em; }
.buy-form .form-note.error { color: var(--fail); }

/* the license, as the generator writes it */
.legal h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.legal h2 { font-size: clamp(1.3125rem, 2vw, 1.5rem); line-height: 1.2; margin: 2.25rem 0 0.75rem; scroll-margin-top: 1.5rem; }
.legal p, .legal li { margin: 0 0 0.75rem; }
.legal ul { padding-left: 1.2em; margin: 0 0 0.75rem; }
.legal b { font-weight: 600; }

/* ---------- footer ---------- */
.foot { padding-top: 1.75rem; padding-bottom: 2.5rem; margin-top: 2.5rem; font-family: var(--ui); font-size: 0.84375rem; color: var(--muted); display: grid; gap: 0.5rem; }
.foot p { margin: 0; }
.foot a { color: var(--muted); text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.foot a:hover { color: var(--text); }
.foot .line { display: flex; align-items: center; gap: 0.5rem; color: var(--text); }
.foot .line img { border-radius: 4px; }

/* a long command in running text wraps on a phone rather than pushing the page wide */
@media (max-width: 640px) { code { white-space: normal; overflow-wrap: anywhere; } }
@media (max-width: 480px) {
  body { font-size: 1.0625rem; }
  .rows dt { font-size: 1.0625rem; }
  .top { padding-top: 1rem; padding-bottom: 1rem; }
  .hero { min-height: calc(100svh - 7.5rem); }
}
