@font-face {
  font-family: "Noto Sans Runic";
  src: url("../assets/noto-sans-runic.ttf") format("truetype");
  font-display: swap;
  unicode-range: U+16A0-16FF;
}

/* Black and quiet, in Yggdrasil's warm white, with Yggdrasil's easing. */
:root {
  color-scheme: dark;
  --bg: #000;
  --fg: #f4f1ee;
  --fg2: rgba(244, 241, 238, 0.64);
  --fg3: rgba(244, 241, 238, 0.52);
  --line: rgba(244, 241, 238, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(20px, 5vw, 56px);
  --sans: Geist, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, system-ui, sans-serif;
  --runic: "Noto Sans Runic", "Apple Symbols", "Segoe UI Symbol", sans-serif;
  --seal: clamp(200px, 26vw, 280px);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.lede, .sec-lede { text-wrap: balance; }
main { position: relative; z-index: 1; }

.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  color: #000;
  background: var(--fg);
  transform: translateY(-200%);
  transition: transform 200ms var(--ease);
}
.skip-link:focus { transform: none; }
/* Clipped away entirely until it has focus: parking it just above the top edge isn't enough, since Safari's
   rubber-band bounce pulls fixed elements down into view. */
.skip-link:not(:focus) { clip-path: inset(50%); opacity: 0; pointer-events: none; }

/* ---------- Threads and light ---------- */

.light-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The light the falling beam casts on the page behind it. landing.js sets its opacity. */
.beam-glow {
  position: fixed;
  z-index: 0;
  top: 0;
  left: 50%;
  width: min(100vw, 900px);
  height: 100%;
  translate: -50% 0;
  /* Feathered on every side with gradients rather than a blur filter, which would clip to the box. */
  background:
    linear-gradient(90deg,
      transparent 22%,
      rgba(255, 107, 122, .14) 36%,
      rgba(255, 171, 94, .13) 42%,
      rgba(255, 224, 138, .12) 48%,
      rgba(123, 216, 143, .12) 53%,
      rgba(92, 200, 255, .13) 59%,
      rgba(169, 139, 255, .14) 65%,
      transparent 78%);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(60% 75% at 50% 50%, #000 40%, transparent 100%);
  mask-image: radial-gradient(60% 75% at 50% 50%, #000 40%, transparent 100%);
}

.cursor-light {
  position: fixed;
  z-index: 0;
  left: 0;
  top: 0;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 241, 238, 0.05), transparent 70%);
  pointer-events: none;
  opacity: 0;
  translate: -50% -50%;
  transition: opacity 1s var(--ease);
  will-change: transform;
}
.has-pointer .cursor-light { opacity: 1; }

/* ---------- Header ---------- */

.top {
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad);
  font-size: 14px;
  background: linear-gradient(rgba(0, 0, 0, 0.9), transparent);
}

.brand { display: inline-flex; align-items: center; font-weight: 600; letter-spacing: .01em; }
/* The small mark docks in once the seal has scattered. */
.brand-mark {
  width: 0;
  margin-right: 0;
  opacity: 0;
  scale: .6;
  transition: opacity 600ms var(--ease), scale 600ms var(--ease), width 600ms var(--ease), margin 600ms var(--ease);
}
.brand-mark { height: 15px; }
.top.is-docked .brand-mark { width: 22px; margin-right: 9px; opacity: 1; scale: 1; }

.top-link { color: var(--fg2); transition: color 200ms var(--ease); }
.top-link:hover { color: var(--fg); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 90svh;
  padding: clamp(110px, 16vh, 150px) var(--pad) 40px;
  text-align: center;
}

/* The rune field sits behind the hero's content; everything else in the hero is lifted above it. */
.rune-field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero > :not(.rune-field) { position: relative; }

.seal-stage {
  position: relative;
  width: var(--seal);
  aspect-ratio: 1;
  margin-bottom: clamp(36px, 6vh, 64px);
}

.seal-fallback { position: absolute; inset: 25%; width: 50%; height: 50%; transition: opacity 240ms; }
.seals-drawn .seal-fallback { opacity: 0; }
.is-zoomed .light-canvas, .is-zoomed .beam-glow { visibility: hidden; }
.is-zoomed .seal-fallback { opacity: 1; }

/* A soft halo under the seal. */
.seal-stage::before {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 241, 238, 0.09), rgba(244, 241, 238, 0.025) 50%, transparent 75%);
  opacity: var(--halo, 1);
  content: "";
}

.hero-title {
  font-size: clamp(44px, 6.4vw, 72px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.hero-title .line { display: block; }

.lede {
  max-width: 34ch;
  margin-top: 18px;
  color: var(--fg2);
  font-size: clamp(17px, 1.6vw, 19px);
}

.actions { margin-top: 32px; }

.pill {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 24px;
  border: 1px solid var(--fg);
  border-radius: 999px;
  color: #000;
  background: var(--fg);
  font-size: 15px;
  font-weight: 500;
  transition: transform 400ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease);
}
.pill:hover { transform: translateY(-2px); }
.pill:active { transform: scale(.97); transition-duration: 120ms; }

.hero-runes {
  margin-top: auto;
  padding-top: 40px;
  color: var(--fg3);
  font: 13px var(--runic);
  letter-spacing: .4em;
}

/* ---------- Sections ---------- */

.sec {
  width: min(100% - var(--pad) * 2, 880px);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 120px) 0 0;
  text-align: center;
}

.sec h2 {
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.sec-lede {
  max-width: 40em;
  margin: 18px auto 0;
  color: var(--fg2);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.55;
}

.sec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 36px;
  padding-top: 72px;
  text-align: left;
}

.feat h3 { margin-top: 10px; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.feat p { margin-top: 8px; color: var(--fg2); font-size: 15px; line-height: 1.55; }
.feat-rune {
  display: block;
  color: var(--fg3);
  font: 22px/1 var(--runic);
  transition: color 300ms var(--ease), text-shadow 300ms var(--ease);
}
.feat:hover .feat-rune { color: var(--fg); text-shadow: 0 0 18px rgba(244, 241, 238, .45); }

.sec-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(110px, 18vh, 180px);
  padding-bottom: 40px;
}
.seal-stage-end { --seal: clamp(150px, 18vw, 200px); }

/* The light lands: the closing seal's halo flares in the bridge's colours, then settles. */
.seal-stage-end::after {
  position: absolute;
  inset: -45%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 224, 138, .35), rgba(92, 200, 255, .18) 45%, rgba(169, 139, 255, .08) 65%, transparent 80%);
  opacity: 0;
  pointer-events: none;
  content: "";
}
.seal-stage-end.is-flash::after { animation: land 1400ms var(--ease); }
@keyframes land {
  0% { opacity: 0; scale: .6; }
  18% { opacity: 1; scale: 1; }
  100% { opacity: 0; scale: 1.25; }
}

/* ---------- Footer ---------- */

/* The page ends on a thin beam of the bridge's spectrum, fading out at both ends, with the way across beneath it. */
.foot {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px var(--pad) 36px;
  color: var(--fg3);
  font-size: 14px;
}
.foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: linear-gradient(90deg, transparent, #ff6b7a 12%, #ffab5e 28%, #ffe08a 44%, #7bd88f 60%, #5cc8ff 76%, #a98bff 88%, transparent);
  opacity: .55;
}
.foot a { transition: color 200ms var(--ease); }
.foot a:hover { color: var(--fg); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 48px; }
.foot-about p { max-width: 300px; margin-top: 14px; line-height: 1.6; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.foot-mark { width: 24px; height: 17px; }
.foot .foot-runes { font-family: var(--runic); font-size: 12px; letter-spacing: .3em; color: var(--fg3); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.foot-head { margin-bottom: 14px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.foot-cols ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.foot-cols a { color: var(--fg2); }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; }
.foot-tmdb { display: inline-flex; align-items: center; gap: 8px; }
.foot-tmdb a { display: inline-flex; }
.foot-tmdb img { display: block; width: auto; height: 10px; opacity: .6; transition: opacity 200ms var(--ease); }
.foot-tmdb a:hover img { opacity: .9; }

@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 420px) {
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}

/* ---------- Legal pages (privacy.html, terms.html) ---------- */

.legal { max-width: 680px; margin: 0 auto; padding: 120px 16px 80px; line-height: 1.65; }
.legal h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.1; letter-spacing: -.03em; margin: 0 0 8px; }
.legal h2 { font-size: 20px; margin: 40px 0 8px; }
.legal p, .legal li { color: rgba(255, 255, 255, .78); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; }
.legal li + li { margin-top: 6px; }
.legal .updated { color: rgba(255, 255, 255, .5); margin-bottom: 32px; }
.legal a { color: inherit; text-decoration: underline; text-decoration-color: var(--fg3); text-underline-offset: 3px; }
.legal .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; color: rgba(255, 255, 255, .5); margin: 0 0 12px; }
.legal .links { color: rgba(255, 255, 255, .5); }
.legal strong { color: #fff; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- The real apps, right after the hero ---------- */

.text-link { margin-left: 22px; color: var(--fg2); font-size: 15px; text-decoration: underline; text-decoration-color: var(--fg3); text-underline-offset: 4px; transition: color 200ms var(--ease); }
.text-link:hover { color: var(--fg); }

.shots {
  position: relative;
  display: grid;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--pad) 96px;
}
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; }
.shot-desktop { width: 82%; }
.shot-browser { position: relative; z-index: 1; width: 66%; margin: -24% 0 0 auto; }
.shot-desktop img, .shot-browser img {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .4);
}
.shot-phone {
  position: absolute;
  z-index: 2;
  left: calc(var(--pad) + 6%);
  bottom: 110px;
  width: clamp(110px, 19%, 220px);
}
.shot-phone img {
  border: 1px solid rgba(244, 241, 238, .16);
  border-radius: clamp(18px, 3vw, 34px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .75), 0 0 0 6px #000, 0 0 0 7px rgba(244, 241, 238, .14);
}
.shots-caption { margin: 22px 0 0 auto; color: var(--fg3); font-size: 14px; text-align: right; max-width: 60%; }

/* ---------- Walkthrough ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: step;
}
.step { position: relative; padding-top: 22px; border-top: 1px solid var(--line); counter-increment: step; }
.step::before { content: counter(step); position: absolute; top: 22px; right: 0; color: var(--fg3); font-size: 13px; font-variant-numeric: tabular-nums; }
.step-rune { font-family: var(--runic); font-size: 28px; line-height: 1; color: var(--fg2); }
.step h3 { margin-top: 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.step p { margin-top: 8px; color: var(--fg2); font-size: 15px; line-height: 1.55; }

/* ---------- Bridge to Yggdrasil: the spectrum band ---------- */

/* The band's colours are the bridge's spectrum, lifted toward white so black text reads on every part of it. */
.band {
  --band: linear-gradient(90deg, #ffb8c0 0%, #ffd2ab 22%, #fff0c4 42%, #c2eecb 60%, #b3e5ff 80%, #d6c8ff 100%);
  --cell: 14px;
  --edge: calc(var(--cell) * 8);
  position: relative;
  margin: clamp(110px, 16vh, 160px) 0 0;
  padding: calc(clamp(96px, 16vh, 150px) + var(--edge)) var(--pad);
  color: #0a0a0a;
  /* Solid only between the edges: landing.js dissolves the colour into the black across each edge. Without it,
     the edges are simply solid too. */
  background: var(--band);
  text-align: center;
}
.band.has-edges { background: var(--band) 0 var(--edge) / 100% calc(100% - var(--edge) * 2) no-repeat; }
.band-edge { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.band-inner { position: relative; max-width: 880px; margin: 0 auto; }
.band h2 { font-size: clamp(40px, 6vw, 68px); font-weight: 600; line-height: 1.05; letter-spacing: -.035em; }
.band-lede { max-width: 36em; margin: 20px auto 0; color: rgba(10, 10, 10, .72); font-size: clamp(16px, 1.6vw, 19px); line-height: 1.55; text-wrap: balance; }
.band-soon { display: inline-block; margin-bottom: 18px; padding: 6px 14px; border: 1px solid rgba(10, 10, 10, .28); border-radius: 999px; color: rgba(10, 10, 10, .78); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.band-runes { margin-bottom: 22px; color: rgba(10, 10, 10, .5); font: 13px var(--runic); letter-spacing: .4em; }
/* The section after the band needs a little more air above it. */
.band + .sec { padding-top: clamp(110px, 16vh, 160px); }

/* ---------- Questions ---------- */

.faq-list { max-width: 720px; margin: 40px auto 0; text-align: left; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding: 14px 0; cursor: pointer; list-style: none; font-size: 17px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; color: var(--fg3); font-size: 22px; font-weight: 300; transition: rotate 300ms var(--ease); }
.faq details[open] summary::after { rotate: 45deg; }
.faq summary:focus-visible { outline: 2px solid var(--fg); outline-offset: 4px; border-radius: 6px; }
.faq details p { padding: 0 0 22px; color: var(--fg2); font-size: 15px; line-height: 1.65; }
.faq details strong { color: var(--fg); font-weight: 500; }

/* ---------- About & credits ---------- */

.about-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; max-width: 1000px; margin: 40px auto 0; text-align: left; }
.about-grid h3 { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.about-grid p { margin-top: 8px; color: var(--fg2); font-size: 14px; line-height: 1.6; }
.about-grid a { text-decoration: underline; text-decoration-color: var(--fg3); text-underline-offset: 3px; }
.about-grid .tmdb a { display: inline-block; text-decoration: none; }
.about-grid .tmdb img { display: block; width: auto; height: 12px; opacity: .9; }
#download { scroll-margin-top: 120px; }

@media (max-width: 760px) {
  .steps, .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .shot-phone { width: 24%; bottom: 52px; }
  .shots-caption { max-width: 64%; }
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .shots { padding-bottom: 72px; }
  .shot-desktop img, .shot-browser img { border-radius: 8px; }
  .shot-desktop { width: 88%; }
  .shot-browser { width: 78%; margin-top: -18%; }
  .shot-phone { width: 28%; left: 16px; bottom: 44px; }
  .text-link { display: inline-block; margin: 18px 0 0 0; }
  .actions { display: flex; flex-direction: column; align-items: center; }
  body { font-size: 16px; }
  .sec-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 56px; }
  .hero-runes, .band-runes { letter-spacing: .25em; font-size: 11px; }
  .band { --cell: 12px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
