/* eraform.app — one stylesheet for every page. Colours mirror src/ui/tokens.ts (dark first, light for
   people whose phone is in light mode). Michroma for headlines, Instrument Sans for everything else. */

:root {
  --bg: #050510;
  --surface: #0e0e20;
  --surface2: #15152c;
  --line: #22223d;
  --text: #ecebf7;
  --muted: #9b9ab8;
  --accent: #8f55ff;
  --accent-strong: #6e2bff;
  --accent-text: #d9c8ff;
  --glow: rgba(124, 58, 255, .55);
  --gym: #ff5c39;
  --run: #2ed3ff;
  --food: #c8ff3d;
  --sleep: #3f6fff;
  --display: 'Michroma', 'Eurostile', 'Arial Black', sans-serif;
  --body: 'Instrument Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5fc; --surface: #ffffff; --surface2: #efedf9; --line: #e2e0f0; --text: #14132b; --muted: #5e5c7c;
    --accent: #6e2bff; --accent-strong: #6e2bff; --accent-text: #5418e0; --glow: rgba(110, 43, 255, .25);
    --gym: #d9431f; --run: #0a8fb8; --food: #5e8c00; --sleep: #2448c9;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--accent-text); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Language: English unless the page says nl. Elements carry lang="en" / lang="nl". */
html:not([data-lang="nl"]) [lang="nl"], html[data-lang="nl"] [lang="en"] { display: none !important; }
html[data-lang] [lang] { } /* keep specificity simple */

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 720px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); font-family: var(--display); font-size: 14px; letter-spacing: .16em; }
.eclipse { flex: none; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle, #000 58%, #1b0f3a 72%); box-shadow: 0 0 0 2px var(--accent), 0 0 16px var(--glow); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.lang { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.lang button { font: 700 12px var(--body); letter-spacing: .04em; color: var(--muted); background: none; border: 0; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.lang button[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--accent) 28%, transparent); }
@media (max-width: 620px) { .nav a.hide-sm { display: none; } .nav { gap: 14px; } }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(30px, 7vw, 58px); line-height: 1.12; letter-spacing: .02em; }
h2 { font-size: clamp(20px, 3.4vw, 28px); line-height: 1.2; letter-spacing: .03em; }
h3 { font-size: 14px; letter-spacing: .1em; line-height: 1.4; }
p, ul, ol { margin: 0; }
.lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 34em; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 16px; font: 700 15px var(--body); text-decoration: none; }
.btn.primary { background: var(--accent-strong); color: #fff; box-shadow: 0 10px 30px -12px var(--glow); }
.btn.ghost { border: 1px solid var(--line); color: var(--text); background: var(--surface); }

/* Home */
.hero { position: relative; overflow: hidden; padding-block: clamp(56px, 11vw, 120px) clamp(48px, 8vw, 90px); }
.hero::before { content: ""; position: absolute; inset: -30% -20% auto auto; width: 720px; height: 720px; max-width: 120vw; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 30%, transparent), transparent); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.status { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 13px; font-weight: 600; color: var(--accent-text); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--food); box-shadow: 0 0 10px var(--food); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.big-eclipse { justify-self: center; width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #000 60%, #160b33 71%, transparent 72%); box-shadow: 0 0 0 4px var(--accent), 0 0 60px 8px var(--glow), 0 0 160px 30px color-mix(in srgb, var(--accent) 22%, transparent); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 4px var(--accent), 0 0 80px 14px var(--glow), 0 0 200px 40px color-mix(in srgb, var(--accent) 26%, transparent); } }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .big-eclipse { order: -1; width: 150px; } }

.section { padding-block: clamp(48px, 8vw, 88px); border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; max-width: 640px; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.pillar { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.pillar::after { content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px; background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 30%, transparent), transparent); }
.pillar h3 { color: var(--c); display: flex; align-items: center; gap: 10px; }
.pillar h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.pillar p { color: var(--muted); font-size: 15px; line-height: 1.55; position: relative; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; gap: 12px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.card.era { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 40px -18px var(--glow); }
.card p { color: var(--muted); font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface2); font-size: 13px; font-weight: 600; }

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.plan.pro { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.price { font-family: var(--display); font-size: 26px; }
.price small { font-family: var(--body); font-size: 14px; color: var(--muted); }
.plan ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.plan li::before { content: "✓"; color: var(--accent-text); font-weight: 700; margin-right: 10px; }
.note { color: var(--muted); font-size: 14px; }

/* Text pages (privacy, terms, support) */
.doc { padding-block: 48px 80px; display: flex; flex-direction: column; gap: 30px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-top: 10px; }
.doc section { display: flex; flex-direction: column; gap: 10px; }
.doc h2 { font-size: 15px; letter-spacing: .1em; color: var(--accent-text); margin-top: 6px; }
.doc ul, .doc ol { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.doc .short { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px 22px; box-shadow: 0 0 30px -16px var(--glow); }
.doc .small { color: var(--muted); font-size: 15px; line-height: 1.6; }
.mail { font-weight: 700; color: var(--text); user-select: all; }
details { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); padding: 4px 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; padding: 14px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details > div { padding-bottom: 16px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; }
.foot a { color: var(--muted); text-decoration: none; font-weight: 600; }
.foot a:hover { color: var(--text); }
.foot .legal { flex-basis: 100%; font-size: 12px; line-height: 1.6; }

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