/* dawnkeeper.app. Colours are the game's (lib/game/world.dart, tiers.dart,
   painter.dart): the night, the heart's gold, the cyan ring, the violet
   gloom. System fonts only: no third-party requests. */

:root {
  --night: #02070F;
  --night-2: #061421;
  --pocket: #0A2C3C;
  --panel: rgba(10, 32, 46, 0.62);
  --panel-solid: #0A1D2A;
  --line: rgba(159, 243, 255, 0.13);
  --line-strong: rgba(159, 243, 255, 0.26);
  --ink: #E9F6FA;
  --muted: #9CB6C1;
  --faint: #6F8B97;
  --cyan: #9FF3FF;
  --cyan-deep: #38D0E0;
  --gold: #FFD27A;
  --gold-soft: #FFE6A0;
  --violet: #B65CFF;
  --gloom: #B05CD6;
  --gutter: 16px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; background: var(--night); }
body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 78% -120px, rgba(56, 208, 224, 0.10), transparent 70%),
    radial-gradient(900px 600px at -10% 30%, rgba(182, 92, 255, 0.06), transparent 70%),
    var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--cyan); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #FFFFFF; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
::selection { background: rgba(255, 210, 122, 0.35); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--panel-solid); padding: 6px 12px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-top: 18px; padding-bottom: 18px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line), 0 0 24px rgba(255, 210, 122, 0.18); }
.wordmark { color: var(--gold-soft); font-weight: 400; font-size: 17px; letter-spacing: 0.32em; text-transform: uppercase; margin-right: -0.32em; }
.brand:hover .wordmark { color: #FFF1C2; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang { border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 11px; font-size: 13px; letter-spacing: 0.08em; color: var(--ink); }
.nav .lang:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Small caps labels, as in the game ("TONIGHT'S WISH") */
.eyebrow { margin: 0 0 14px; color: var(--gold); font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }

h1, h2, h3 { line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6.2vw, 58px); margin: 0 0 20px; }
h1 em { font-style: normal; color: var(--gold-soft); }
h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 16px; }
h3 { font-size: 19px; margin: 0 0 6px; }
.lede { font-size: clamp(18px, 2.2vw, 20px); color: #C9DDE4; margin: 0 0 28px; max-width: 34em; }
.muted { color: var(--muted); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center; padding-top: 20px; padding-bottom: 56px; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 88px; } }
.hero-art { position: relative; order: -1; width: min(84%, 340px); margin: 0 auto; aspect-ratio: 1; }
@media (min-width: 880px) { .hero-art { order: 0; width: 100%; max-width: 500px; } }
.hero-art canvas, .hero-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art img { border-radius: 50%; }
.hero-art.live img { display: none; }

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px 10px 14px; border-radius: 14px;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--ink); text-decoration: none; line-height: 1.2;
}
.store svg { width: 24px; height: 24px; flex: none; fill: none; stroke: var(--cyan); stroke-width: 1.6; stroke-linecap: round; }
.store small { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.store b { font-weight: 600; font-size: 16px; }
a.store:hover { border-color: var(--gold); color: #FFFFFF; }
.soon { font-size: 15px; color: var(--muted); margin: 0; }

.button {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  background: var(--gold); color: #1A1206; font-weight: 600; text-decoration: none;
  box-shadow: 0 0 32px rgba(255, 210, 122, 0.28);
}
.button:hover { background: #FFE0A0; color: #1A1206; }
.button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; }
.button.ghost:hover { border-color: var(--gold); color: var(--gold-soft); }

/* Sections */
.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: #C2D6DD; margin: 0; font-size: 18px; }

/* "Made for the metro" */
.facts { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 620px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 20px; }
.fact .glyph { display: block; width: 34px; height: 34px; margin-bottom: 14px; color: var(--cyan); }
.fact .glyph svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fact p { margin: 0; color: var(--muted); font-size: 16px; }

/* Split rows: a phone and some text */
.split { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split.flip > :first-child { order: 2; }
}
.phones { display: flex; justify-content: center; gap: 18px; }
.phone {
  flex: none; width: min(280px, 72vw); margin: 0;
  padding: 9px; border-radius: 42px;
  background: linear-gradient(160deg, #1A2A36, #070D14 60%);
  border: 1px solid rgba(159, 243, 255, 0.18);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 60px -10px rgba(56, 208, 224, 0.20);
}
.phone img { display: block; width: 100%; aspect-ratio: 390 / 844; border-radius: 34px; background: var(--night); }
.phones .phone + .phone { margin-top: 56px; }
@media (max-width: 560px) {
  .phones .phone { width: 46vw; padding: 6px; border-radius: 28px; }
  .phones .phone img { border-radius: 23px; }
  .phones .phone + .phone { margin-top: 36px; }
}

.steps { counter-reset: step; list-style: none; margin: 0 0 32px; padding: 0; display: grid; gap: 22px; }
.steps li { position: relative; padding-left: 52px; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--cyan-deep); color: var(--cyan); font-size: 15px; font-weight: 600;
  box-shadow: 0 0 18px rgba(56, 208, 224, 0.28);
}
.steps p { margin: 0; color: var(--muted); }

/* The light ladder: Spark to Great Light */
.ladder { display: flex; gap: 4px; align-items: flex-end; margin: 0; padding: 18px 18px 14px; list-style: none; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.ladder li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.25; hyphens: auto; }
.ladder i { display: block; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #FFFFFF 0 18%, var(--c) 52%); box-shadow: 0 0 calc(var(--s) * 0.9) var(--c); width: var(--s); height: var(--s); }
.ladder .warm { color: var(--gold-soft); }
@media (max-width: 480px) { .ladder { padding: 14px 6px 12px; gap: 2px; } .ladder li { font-size: 10.5px; } }
.t0 { --c: #6FE3FF; --s: 9px; }
.t1 { --c: #A79BFF; --s: 11px; }
.t2 { --c: #7DFFB0; --s: 14px; }
.t3 { --c: #FFE27A; --s: 17px; }
.t4 { --c: #FFB45E; --s: 21px; }
.t5 { --c: #FF8F6B; --s: 25px; }
.t6 { --c: #FFF1C2; --s: 30px; }
.ladder-note { margin: 12px 0 0; font-size: 15px; color: var(--muted); }

/* The forest's ten steps */
.groves { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 40px; }
@media (min-width: 760px) { .groves { grid-template-columns: 1fr 1fr; } }
.groves li { display: grid; grid-template-columns: 56px 1fr; gap: 2px 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.groves .pct { grid-row: span 2; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 1px; }
.groves q { font-style: italic; color: var(--ink); quotes: none; }
.groves span:last-child { color: var(--cyan); font-size: 14.5px; }

/* Feature list with small glowing bullets */
.points { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 26px; color: var(--muted); }
.points li::before { content: ""; position: absolute; left: 3px; top: 0.6em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.points b { color: var(--ink); font-weight: 600; }

.cards { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 20px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }

.finale { text-align: center; padding-top: 84px; padding-bottom: 76px; }
.finale h2 { margin-bottom: 12px; }
.finale p { color: var(--muted); max-width: 32em; margin: 0 auto 28px; }
.finale .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Text pages (privacy, terms, legal, support, press) */
.page { padding-top: 28px; padding-bottom: 64px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 8px; }
.page h2 { font-size: 23px; margin: 44px 0 10px; }
.page h3 { margin-top: 26px; }
.page p, .page li { color: #CADCE2; }
.page ul { padding-left: 22px; }
.page li { margin: 6px 0; }
.page li::marker { color: var(--gold); }
.stamp { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.summary { background: var(--panel); border: 1px solid var(--line-strong); border-left: 3px solid var(--gold); border-radius: 14px; padding: 18px 20px; margin: 24px 0 8px; }
.summary p { margin: 0; color: var(--ink); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
th { color: var(--gold-soft); font-weight: 600; background: rgba(255, 210, 122, 0.05); }
td { color: #CADCE2; }
code { font-size: 0.92em; background: rgba(159, 243, 255, 0.08); padding: 1px 6px; border-radius: 5px; }

details { border-bottom: 1px solid var(--line); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; padding: 14px 30px 14px 0; font-weight: 600; color: var(--ink); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 11px; font-size: 22px; font-weight: 300; color: var(--gold); }
details[open] summary::after { content: "−"; }
details > p, details > ul { margin: 0 0 16px; }

.contact-box { background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px; padding: 24px; margin: 24px 0 8px; }
.contact-box p { margin: 0 0 10px; }
.contact-box p:last-child { margin-bottom: 0; }
.contact-box .big { font-size: 21px; font-weight: 600; }

/* Press kit */
.facts-table th { width: 34%; white-space: nowrap; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; list-style: none; padding: 0; margin: 18px 0; }
.downloads li { margin: 0; }
.downloads a { display: block; text-decoration: none; color: var(--muted); font-size: 14px; }
.downloads img { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 8px; background: var(--night); }
.downloads a:hover img { border-color: var(--gold); }
.downloads a:hover { color: var(--ink); }

/* Footer */
.foot { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 404 */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding-top: 40px; padding-bottom: 40px; }
.lost p { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: rise 0.9s ease-out both; }
  @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}
