/*
 * The front of the site: the home page, How it works, Help, and the page a
 * shared moment opens.
 *
 * Dark, always, for the reason the app's video surfaces are: anything that
 * frames footage reads on near-black, and the home page is a picture of the
 * grid. The documents (privacy, terms) keep style.css and follow the reader.
 *
 * ⚠️ Still no script and still nothing from anybody else. The grid on the home
 * page moves with CSS alone; the shared-moment page drains its life bar with
 * one CSS animation whose numbers come from the server. Both stop for
 * prefers-reduced-motion.
 */

/* Space Grotesk for display and numbers; Inter for everything functional.
   Self-hosted (Latin woff2), so the site still loads nothing third-party. */
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* The chrome follows the reader's setting — light by default, dark when the OS
     asks. Anything that frames video stays dark whatever this is: see the
     .phone and .viewer scopes below, which pin the palette back to dark. */
  color-scheme: light dark;
  --bg: #efeff2;
  --surface: #ffffff;
  --surface-high: #e3e3e9;
  --ink: #111114;
  --ink-muted: #55555e;
  --ink-faint: #6a6a73;
  --hairline: #d4d4db;
  --accent: #c6f432;
  --on-accent: #111114;
  /* The accent as *letters or a mark*, not a fill. Lime cannot carry a glyph on
     the light chrome (#c6f432 on #efeff2 is ~1.1:1, invisible), so on light it is
     ink and on dark it is the lime — mirroring the app's `accentText` token. Used
     by the logo mark, the step numbers, the headline stop and the live dot. */
  --accent-text: #111114;
  --record: #ff3b30;
  --wide: 68rem;
  --measure: 36rem;
  --gutter: 1.25rem;
  --display: 'Space Grotesk', Futura, 'Trebuchet MS', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --surface: #17171a;
    --surface-high: #202024;
    --ink: #f7f7f8;
    --ink-muted: #9a9aa3;
    --ink-faint: #84848e;
    --hairline: #2a2a2f;
    --accent-text: #c6f432;
  }
}

/* Video-framing surfaces are dark always — the phone mock, the moment viewer and
   the shared-moment window redefine the palette back to the dark values, so their
   innards (bars, tiles, captions, arrows) read on near-black whatever the page
   around them is doing. */
.phone,
.viewer,
.moment-window {
  --bg: #0b0b0d;
  --surface: #17171a;
  --surface-high: #202024;
  --ink: #f7f7f8;
  --ink-muted: #9a9aa3;
  --ink-faint: #84848e;
  --hairline: #2a2a2f;
  /* On the dark video surfaces the accent-as-mark stays lime whatever the page
     scheme is, so tile stamps and the phone's live dot never go ink. */
  --accent-text: #c6f432;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.006em;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.measure {
  max-width: var(--measure);
}

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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1.5rem 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

/* The mark is drawn by masking its silhouette with the accent-as-mark colour, so
   it is lime on dark and ink on light — legible on either, unlike the fixed lime
   image which vanished on the light chrome. One technique for every page. */
.wordmark .mark {
  width: 1.55rem;
  height: 1.35rem;
  display: block;
  background-color: var(--accent-text);
  -webkit-mask: url('whimzi-mark-white.png') no-repeat center / contain;
  mask: url('whimzi-mark-white.png') no-repeat center / contain;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--ink);
}

/* The one call to action in the bar wears the accent, sized to its words. */
.site-nav a.nav-cta {
  color: var(--on-accent);
  font-weight: 700;
}

.site-nav a.nav-cta:hover {
  color: var(--on-accent);
}

@media (max-width: 34rem) {
  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.9rem;
  }
}

/* The accent as a shape that means live, go, now — never as body text. Uses the
   accent-as-mark colour so a dot on the light chrome (the hero eyebrow) is ink
   and legible, while every dot on a dark surface (the phone) stays lime. */
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent-text);
  display: inline-block;
  flex: none;
}

.live-dot.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 244, 50, 0.55);
  }
  50% {
    box-shadow: 0 0 0 0.45rem rgba(198, 244, 50, 0);
  }
}

/* ---- Type ------------------------------------------------------------- */

h1,
h2,
.display {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 5.25rem);
  line-height: 0.98;
  margin: 0 0 1.25rem;
}

h1 .stop {
  color: var(--accent-text);
}

h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.05;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: clamp(1.125rem, 2.6vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 34rem;
}

.quiet {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 0.75rem;
}

.eyebrow .live-dot {
  width: 0.45rem;
  height: 0.45rem;
}

/* ---- Buttons ----------------------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--hairline);
  color: var(--ink);
  background: var(--surface);
}

.btn:hover {
  background: var(--surface-high);
}

/* The one control that wears the accent: going. As in the app, sized to its
   words — a decision to leave the house, not a form's submit button. */
.btn.go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn.go:hover {
  filter: brightness(1.05);
}

.actions + .quiet {
  margin-top: 0.75rem;
}

.btn.small {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

/* The official App Store and Play Store badges, matched to one height. */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  margin: 1.75rem 0 1.5rem;
}

.store-badge {
  display: inline-flex;
  border-radius: 12px;
}

.store-badge img {
  height: 3.25rem;
  width: auto;
  display: block;
}

.store-badge[aria-disabled='true'] {
  cursor: default;
}

.store-badge:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---- Home: hero ------------------------------------------------------- */

.hero {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 58rem) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    padding: 4rem 0 6rem;
  }
}

/* ---- Home: the living grid -------------------------------------------- */

/*
 * A picture of the front door, made of light rather than footage.
 *
 * No real clip is shown on the home page: every real clip is somebody's
 * moment, and a marketing page is not where it should end up. So each tile
 * is a colour field that suggests a kind of place — dusk on a rooftop, a
 * bar's neon, a market's awnings — drifting slowly, with the stamp and the
 * place in the corners exactly where the app puts them. Nothing sits over the
 * middle of a tile: no scrim, the same rule as the app.
 */
.showcase {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* A lime halo behind the device — live, go, now — never on the footage itself. */
.showcase::before {
  content: '';
  position: absolute;
  inset: -8% 0 4%;
  background: radial-gradient(58% 44% at 50% 42%, rgba(198, 244, 50, 0.2), transparent 70%);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(280px, 74vw);
  aspect-ratio: 9 / 19;
  padding: 0.55rem;
  border-radius: 2.4rem;
  background: #050506;
  border: 1px solid #26262b;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.6), inset 0 0 0 2px #000;
}

/* The pill notch, so it reads as a phone at a glance. */
.phone::before {
  content: '';
  position: absolute;
  top: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 0.5rem;
  border-radius: 999px;
  background: #050506;
  z-index: 3;
}

.phone-screen {
  height: 100%;
  border-radius: 1.95rem;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.phone-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 1.5rem 0.9rem 0.55rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--ink);
}

.phone-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 0.35rem;
  padding: 0 0.35rem 0.35rem;
  overflow: hidden;
}

/* Each tile: a colour field that suggests a kind of place — a rooftop at dusk,
   a bar's neon, a market's awnings — drifting slowly, stamp and place in the
   corners exactly where the app puts them. Never a real person's moment. */
.tile {
  position: relative;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  background-size: 220% 220%;
  animation: drift 14s ease-in-out infinite alternate;
}

.tile:nth-child(2) {
  animation-duration: 17s;
}
.tile:nth-child(3) {
  animation-duration: 12s;
}
.tile:nth-child(4) {
  animation-duration: 19s;
}
.tile:nth-child(5) {
  animation-duration: 15s;
}
.tile:nth-child(6) {
  animation-duration: 13s;
}

@keyframes drift {
  from {
    background-position: 0% 30%;
  }
  to {
    background-position: 100% 70%;
  }
}

.tile.dusk {
  background-image: linear-gradient(160deg, #ff8a5b 0%, #b8467a 45%, #2b1b4f 100%);
}
.tile.neon {
  background-image: radial-gradient(circle at 30% 30%, #ff3db8 0%, transparent 45%),
    radial-gradient(circle at 70% 70%, #3dd6ff 0%, transparent 50%), linear-gradient(180deg, #16061f, #07121f);
}
.tile.market {
  background-image: linear-gradient(180deg, rgba(11, 11, 13, 0.1) 40%, rgba(11, 11, 13, 0.75) 100%),
    repeating-linear-gradient(115deg, #d99a00 0 18px, #c2382f 18px 36px, #17725c 36px 54px);
}
.tile.park {
  background-image: linear-gradient(180deg, #a8e0ff 0%, #6cc27b 55%, #2f6b3a 100%);
}
.tile.stadium {
  background-image: radial-gradient(ellipse at 50% 0%, #fffbe0 0%, transparent 55%),
    linear-gradient(180deg, #0d1b2a 0%, #1b3a2a 100%);
}
.tile.road {
  background-image: repeating-linear-gradient(90deg, transparent 0 22px, rgba(255, 70, 70, 0.8) 22px 26px, transparent 26px 60px),
    linear-gradient(180deg, #0a0a14 0%, #2a1e4a 60%, #ff9a3c 100%);
}

.tile .stamp,
.moment-window .stamp {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.tile .where {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
  line-height: 1.25;
}

/* Tiles are links to the real moment when the wall is live; the video is the
   clip's own first frame, playing silently exactly as the app's preview does. */
.tile {
  display: block;
  text-decoration: none;
  color: #fff;
}

/* Clickable, and it says so: a play glyph sits on every live tile (faint, so it
   never fights the footage) and lifts on hover. Only real, linked tiles. */
.phone-grid a.tile,
.wall a.tile {
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.phone-grid a.tile::after,
.wall a.tile::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  /* Tiles show a still first frame now, so the play glyph is what says "video,
     not photo" — kept clearly visible, not just a hover hint. */
  opacity: 0.9;
  transition: opacity 0.15s ease, transform 0.15s ease;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='19' fill='black' opacity='0.4'/%3E%3Ccircle cx='20' cy='20' r='19' fill='none' stroke='white' stroke-opacity='0.9' stroke-width='1.5'/%3E%3Cpath d='M16 13 L28 20 L16 27 Z' fill='white'/%3E%3C/svg%3E");
}

.phone-grid a.tile:hover,
.wall a.tile:hover {
  filter: brightness(1.08);
}

.phone-grid a.tile:hover::after,
.wall a.tile:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.showcase-hint {
  text-align: center;
  margin: 1.1rem 0 0;
  color: var(--ink-faint);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.tile-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #101014;
}

/* ---- Home: search ----------------------------------------------------- */

.search {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 30rem;
}

.search input {
  flex: 1;
  min-width: 0;
  min-height: 3rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.search input::placeholder {
  color: var(--ink-faint);
}

.search input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

/* ---- A wall of moments (a place page) --------------------------------- */

.wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.wall .tile {
  aspect-ratio: 3 / 4;
  height: auto;
  border-radius: 14px;
}

/* ---- Search results --------------------------------------------------- */

.results {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.6rem;
}

.results li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
}

.results li > a {
  display: block;
  padding: 0.9rem 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.results li:not(:has(> a)) {
  padding: 0.9rem 1.1rem;
}

.results li > a:hover {
  background: var(--surface-high);
  border-radius: 12px;
}

.results strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.results span {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

/* ---- Home: sections --------------------------------------------------- */

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--hairline);
}

.beats {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 48rem) {
  .beats {
    grid-template-columns: repeat(3, 1fr);
  }
}

.beat .num {
  font-family: var(--display);
  font-size: 0.875rem;
  color: var(--accent-text);
  margin-bottom: 0.4rem;
  display: block;
}

.beat p {
  color: var(--ink-muted);
  margin: 0;
}

/* Get the app: the pitch and the stores side by side where there is room. */
.get {
  display: grid;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.get .lede {
  margin-bottom: 0;
}

@media (min-width: 48rem) {
  .get {
    grid-template-columns: 1fr auto;
  }
}

/* What it will never do — the list other apps would never write down. */
.nevers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

@media (min-width: 48rem) {
  .nevers {
    grid-template-columns: repeat(2, 1fr);
  }
}

.nevers li {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
}

.nevers strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.nevers span {
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

/* ---- Documents on the dark site (How it works, Help, Delete) ------------ */

.doc {
  padding: 1rem 0 4rem;
}

.doc h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.6rem;
}

.doc ol,
.doc ul {
  padding-left: 1.25rem;
}

.doc li {
  margin-bottom: 0.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}

.panel > :last-child {
  margin-bottom: 0;
}

/* The same loud placeholder as the documents: a decision still owed by a person. */
.to-confirm {
  border: 2px dashed var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  background: var(--surface-high);
  font-size: 0.9375rem;
}

.to-confirm > :last-child {
  margin-bottom: 0;
}

.to-confirm::before {
  content: 'Before launch';
  display: block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

/* ---- A shared moment --------------------------------------------------- */

/*
 * On a phone: when and where first, then the clip, then going. The clip is
 * the page, but a link opened from a chat has to say what it is before it
 * asks for a full screen of attention. Side by side where there is room.
 */
.moment {
  display: grid;
  grid-template-areas: 'head' 'window' 'rest';
  gap: 1.25rem;
  padding: 0.5rem 0 4rem;
  align-items: start;
}

.moment-head {
  grid-area: head;
}

.moment-window {
  grid-area: window;
}

.moment-rest {
  grid-area: rest;
}

@media (min-width: 52rem) {
  .moment {
    grid-template-columns: minmax(0, 22rem) 1fr;
    grid-template-areas: 'window head' 'window rest';
    grid-template-rows: auto 1fr;
    column-gap: 3.5rem;
    row-gap: 0;
    padding-top: 2rem;
  }
}

/*
 * The window. The clip is the page; everything else is about going.
 *
 * Phone-shaped because that is how it was filmed. The accent ring means it is
 * current — filmed within the hour — and it is the only colour on the footage.
 */
.moment-window {
  position: relative;
  /* Never taller than most of the screen, so going is always in reach. */
  width: min(100%, 22rem, calc(62vh * 0.5625));
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  margin: 0 auto;
  border: 1px solid var(--hairline);
}

.moment-window.current {
  box-shadow: 0 0 0 2px var(--accent), 0 0 3rem rgba(198, 244, 50, 0.18);
  border-color: transparent;
}

.moment-window video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.moment-window.passed {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: radial-gradient(circle at 50% 35%, #202024 0%, #0b0b0d 70%);
}

.moment-window.passed .display {
  font-size: 1.75rem;
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

.when {
  font-family: var(--display);
  font-size: clamp(2.2rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.place {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.area {
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}

.moment-rest .life {
  margin-top: 0.5rem;
}

/*
 * How long it has left, draining while you look at it.
 *
 * The one thing no other video page has: the clip's own expiry, made visible.
 * The width it starts at and how long it takes to reach nothing are set per
 * page, in a nonce'd style block, because they are this clip's numbers.
 */
.life {
  margin: 0 0 2rem;
}

.life-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.life-track {
  height: 6px;
  border-radius: 999px;
  background: var(--surface-high);
  overflow: hidden;
}

.life-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
  animation-name: drain;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.life-fill.current {
  background: var(--accent);
}

.facts {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.facts li::before {
  content: '— ';
  color: var(--ink-faint);
}

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

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2rem 0 4rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.site-footer a {
  color: var(--ink-muted);
}

/* ---- The in-page moment viewer (home page, app.js) --------------------- */

body.viewer-open {
  overflow: hidden;
}

.viewer[hidden] {
  display: none;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 6, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.viewer-stage {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2.5rem;
  align-items: center;
  width: 100%;
  max-width: 62rem;
  grid-template-columns: minmax(0, 21rem) 1fr;
}

@media (max-width: 46rem) {
  .viewer-stage {
    grid-template-columns: 1fr;
    max-width: 26rem;
    gap: 1.25rem;
    max-height: 100%;
    overflow-y: auto;
  }
}

.viewer-window {
  position: relative;
  aspect-ratio: 9 / 16;
  width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 2px var(--accent), 0 0 3rem rgba(198, 244, 50, 0.18);
}

.viewer-window video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.viewer-info .when {
  font-family: var(--display);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.viewer-info .place {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
}

.viewer-info .area {
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.life-line {
  margin: 0 0 1.25rem;
  font-weight: 700;
}

.viewer-info .facts {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.5rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
}

.viewer-info .facts li::before {
  content: '— ';
  color: var(--ink-faint);
}

.viewer-close,
.viewer-arrow {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  border: none;
  /* High contrast against the dark backdrop, so moving between moments is
     obvious. The accent on hover ties it to "go". */
  background: #ffffff;
  color: #0b0b0d;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.viewer-close {
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.viewer-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 4rem;
  height: 4rem;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 0.25rem;
}

.viewer-arrow.prev {
  left: 1.5rem;
}

.viewer-arrow.next {
  right: 1.5rem;
}

.viewer.single .viewer-arrow {
  display: none;
}

.viewer-close:hover,
.viewer-arrow:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.viewer-arrow:focus-visible,
.viewer-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 46rem) {
  .viewer-arrow {
    top: auto;
    bottom: 1rem;
    transform: none;
    width: 3.5rem;
    height: 3.5rem;
    font-size: 2rem;
  }
  .viewer-arrow.prev {
    left: 1.25rem;
  }
  .viewer-arrow.next {
    right: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tile,
  .live-dot.pulse,
  .life-fill {
    animation: none;
  }
}
