@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* Colours from the app (ui/palette.js): night first, like the app */
:root {
  --night: #08080C;
  --ink: #111117;
  --paper: #F7F3EC;
  --muted: #A6A4AD;
  --line: rgba(247, 243, 236, 0.14);
  --coral: #FF5C51;
  --glow: rgba(255, 92, 81, 0.35);
  color-scheme: dark light;
}
@media (prefers-color-scheme: light) {
  :root {
    --night: #F2EFEA;
    --ink: #FAF8F5;
    --paper: #111117;
    --muted: #6B6971;
    --line: rgba(17, 17, 23, 0.12);
    --coral: #D0342B;
    --glow: rgba(208, 52, 43, 0.22);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(120% 80% at 80% 0%, var(--ink) 0%, var(--night) 70%);
  background-color: var(--night);
  color: var(--paper);
  font-family: "Bricolage", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "calt" 0;
  overflow-x: hidden;
}

.frame { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .frame { padding: 0 40px; } }

a { color: var(--coral); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 2px; }

/* Header */
.top { position: relative; z-index: 2; }
.top .frame { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.brand { color: var(--paper); text-decoration: none; font-weight: 700; font-size: 18px; font-stretch: 80%; letter-spacing: 0.01em; }
.brand::before { content: ""; display: inline-block; width: 0.62em; height: 0.62em; margin-right: 0.45em; border-radius: 50%; background: var(--coral); vertical-align: 0.02em; }
nav { display: flex; gap: 6px 24px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 16px; padding: 2px 0; border-bottom: 1px solid transparent; }
nav a:hover { color: var(--paper); }
nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--coral); }

main { flex: 1; position: relative; display: flex; }
main > .frame { position: relative; z-index: 1; display: flex; flex-direction: column; }

/* Home: the moon, and the name standing under it */
.home { justify-content: center; padding-top: 6vh; padding-bottom: 7vh; }
.moon {
  position: absolute;
  z-index: 0;
  right: max(-8vw, -90px);
  top: 4vh;
  width: min(62vw, 560px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--coral) 70%, #fff 30%), var(--coral) 62%);
  box-shadow: 0 0 120px 10px var(--glow);
  animation: rise 1.6s cubic-bezier(.2,.7,.1,1) both;
  pointer-events: none;
}
@keyframes rise {
  from { transform: translateY(18%); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .moon { animation: none; } }

.name {
  margin: 0;
  font-weight: 800;
  font-stretch: 82%;
  font-size: clamp(60px, 14vw, 180px);
  line-height: 0.88;
  letter-spacing: 0;
  max-width: 9ch;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hello { display: block; width: min(600px, 88vw, 62vh); aspect-ratio: 270 / 140; margin-left: -2%; }
.details { margin: 22px 0 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.lead {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
}

.sky { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; fill: var(--paper); pointer-events: none; }
.maria { position: absolute; inset: 0; width: 100%; height: 100%; fill: #000; }
@media (prefers-color-scheme: light) { .sky { opacity: 0.35; } }

@media (max-width: 700px) {
  .moon { width: 52vw; top: 1vh; right: -14vw; }
  .home { justify-content: flex-end; padding-top: 30vw; }
}

/* Inner pages */
.page { padding-top: 10vh; padding-bottom: 12vh; }
.page h1 {
  margin: 0 0 32px;
  font-weight: 800;
  font-stretch: 75%;
  font-size: clamp(56px, 11vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.page p { max-width: 62ch; margin: 0 0 1em; font-size: clamp(19px, 2vw, 22px); }

/* Page not found: one screen, centred, no scrolling */
body.lost { height: 100vh; height: 100svh; min-height: 0; overflow: hidden; }
.notfound { justify-content: center; align-items: center; text-align: center; gap: 0; padding-top: 2vh; padding-bottom: 4vh; }
.notfound .cat { width: min(300px, 70vw, 38vh); aspect-ratio: 950 / 847; margin: 0 auto 2vh; }
.notfound h1 { margin: 0 0 2.2vh; font-weight: 800; font-stretch: 75%; font-size: clamp(44px, min(9vw, 9vh), 104px); line-height: 0.92; letter-spacing: -0.02em; }
.notfound p { margin: 0; font-size: clamp(17px, 2vw, 20px); }

/* Policy pages */
.legal h1 { margin-bottom: 12px; }
.legal .updated { color: var(--muted); font-size: 15px; margin-bottom: 48px; }
.legal h2 { margin: 52px 0 14px; font-weight: 700; font-stretch: 85%; font-size: clamp(24px, 3vw, 30px); line-height: 1.15; }
.legal p, .legal li { font-size: 18px; max-width: 64ch; }
.legal ul { margin: 0 0 1em; padding-left: 1.2em; }
.legal li { margin-bottom: 0.55em; }
.legal li::marker { color: var(--coral); }
.legal strong { font-weight: 650; }

/* Footer */
.bottom { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; position: relative; z-index: 1; }
.bottom .frame { padding-top: 22px; padding-bottom: 22px; }
