/* 1307 — landing page. Same palette and type as the app (lib/app/theme.dart). */
:root {
  --bg: #070A12;
  --ink: #0E1320;
  --night: #141C2E;
  --surface: #1A2235;
  --raised: #232D44;
  --line: #344058;
  --parch: #EFE4C8;
  --text: #F3ECDC;
  --text2: #B3AB98;
  --dim: #8A8474;
  --gold: #D6A93C;
  --gold-deep: #8E6B1E;
  --wax: #B8262B;
  --wax-deep: #6E1316;
  --info: #4F8FD6;
  --conj: #4F8FD6;
  --head: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 var(--body); overflow-x: hidden;
}
a { color: var(--gold); }
img, video { max-width: 100%; display: block; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.wrap.narrow { width: min(560px, 100% - 32px); }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin: 0; }
.muted { color: var(--text2); font-size: 15px; }
sup { font-size: .65em; }

/* Buttons, the app's slanted plates */
.btn {
  display: inline-block; font: 600 17px/1 var(--head); letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: #fff; padding: 17px 26px; border: 0; cursor: pointer;
  clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.12); }
.btn-red { background: linear-gradient(180deg, #C8323A, var(--wax)); box-shadow: 0 6px 0 var(--wax-deep); }
.btn-ghost { background: rgba(26, 34, 53, .85); color: var(--text); outline: 1px solid var(--line); }
.btn-block { display: block; width: 100%; text-align: center; }

.section-title { text-align: center; font-size: clamp(26px, 5vw, 40px); color: var(--gold); margin: 0 0 28px; }
.section-title span { display: inline-block; padding: 0 18px; position: relative; }
.section-title span::before, .section-title span::after {
  content: ''; position: absolute; top: 50%; width: 46px; height: 1px; background: var(--gold-deep);
}
.section-title span::before { right: 100%; }
.section-title span::after { left: 100%; }
.lead { font-size: 19px; color: var(--text); text-align: center; max-width: 760px; margin: 0 auto 36px; }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: 100svh; display: grid; place-items: end center; overflow: hidden; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 50% 30%, rgba(7, 10, 18, .55), transparent 70%),
    linear-gradient(180deg, rgba(7, 10, 18, .2) 0%, rgba(7, 10, 18, .1) 45%, var(--bg) 100%);
}
.hero-content { position: relative; text-align: center; padding: 0 16px 13vh; max-width: 760px; }
.kicker { font: 600 13px/1 var(--head); letter-spacing: .28em; text-transform: uppercase; color: var(--parch); opacity: .85; margin: 0 0 10px; }
.hero h1 {
  font-size: clamp(88px, 22vw, 190px); line-height: .9; color: var(--gold); font-weight: 700; letter-spacing: .04em;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .7), 0 0 60px rgba(214, 169, 60, .25);
}
.tagline { font: 600 clamp(18px, 3.4vw, 28px)/1.2 var(--head); letter-spacing: .22em; text-transform: uppercase; margin: 6px 0 18px; }
.pitch { color: var(--text); text-shadow: 0 2px 10px #000; margin: 0 auto 26px; max-width: 620px; }
.cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.scroll-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: var(--gold); text-decoration: none; font-size: 28px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* Embers rising over the hero (pure CSS) */
.embers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.embers i {
  position: absolute; bottom: -10px; width: 4px; height: 4px; border-radius: 50%;
  background: #FFB060; box-shadow: 0 0 8px 2px rgba(255, 140, 50, .7);
  animation: ember linear infinite;
}
@keyframes ember {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  100% { transform: translate(var(--dx, 40px), -70vh); opacity: 0; }
}

/* Fog between sections */
.fog-divider {
  height: 90px; margin: -45px 0; position: relative; z-index: 1; pointer-events: none;
  background: radial-gradient(60% 50% at 30% 50%, rgba(147, 163, 196, .10), transparent 70%),
              radial-gradient(50% 50% at 75% 50%, rgba(147, 163, 196, .08), transparent 70%);
  background-size: 200% 100%; animation: drift 26s linear infinite alternate;
}
@keyframes drift { to { background-position: 100% 0, -100% 0; } }

/* ─── Live band ────────────────────────────────────────────────────────── */
.band { padding: 80px 0 70px; background: linear-gradient(180deg, var(--bg), var(--ink) 30%, var(--bg)); }
.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; margin-bottom: 26px; }
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 12px; text-align: center; }
.counter b { display: block; font: 700 clamp(30px, 6vw, 42px)/1.1 var(--head); color: var(--gold); }
.counter span { font-size: 13px; color: var(--text2); text-transform: uppercase; letter-spacing: .08em; }
.map-card { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #2b2829; margin-bottom: 26px; }
#worldmap { height: clamp(260px, 45vw, 440px); background: #2b2829; }
/* OSM tiles turned into the app's Templar map: charcoal ground, red accents */
#worldmap .leaflet-tile-pane { filter: grayscale(.85) sepia(.35) hue-rotate(-25deg) saturate(1.6) brightness(.55) contrast(1.15); }
.leaflet-container { font-family: var(--body); }
.leaflet-control-attribution { background: rgba(7, 10, 18, .75) !important; color: var(--text2) !important; }
.leaflet-control-attribution a { color: var(--gold) !important; }
.pin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 4px rgba(184, 38, 43, .35), 0 0 16px rgba(184, 38, 43, .9); background: var(--wax); animation: pulse 2s ease-out infinite; }
.pin.gold { background: var(--gold); box-shadow: 0 0 0 4px rgba(214, 169, 60, .35), 0 0 16px rgba(214, 169, 60, .9); }
@keyframes pulse { 50% { transform: scale(1.25); } }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 10px 14px; background: var(--ink); color: var(--text2); font-size: 14px; }
.map-legend small { margin-left: auto; color: var(--dim); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.red { background: var(--wax); } .dot.gold { background: var(--gold); }
.map-empty { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); margin: 0; padding: 12px 18px; background: rgba(7, 10, 18, .85); border: 1px solid var(--line); border-radius: 10px; z-index: 500; text-align: center; }
.boards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.board { background: var(--surface); border-radius: 12px; padding: 18px; border-top: 3px solid var(--conj); }
.board-red { border-top-color: var(--wax); } .board-gold { border-top-color: var(--gold); }
.board h3 { font-size: 20px; }
.board-sub { margin: 2px 0 10px; color: var(--dim); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.board ol { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.board li { counter-increment: r; display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(52, 64, 88, .5); }
.board li::before { content: counter(r); width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--raised); font: 600 14px var(--head); color: var(--text2); }
.board li:nth-child(1)::before { background: var(--gold); color: var(--ink); }
.board li:nth-child(2)::before { background: #9AA3B5; color: var(--ink); }
.board li:nth-child(3)::before { background: #9B6B3A; color: var(--ink); }
.board li .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li .v { font: 600 18px var(--head); color: var(--gold); }
.board .empty { color: var(--dim); font-style: italic; border: 0; }
.board .empty::before { display: none; }

/* ─── History ──────────────────────────────────────────────────────────── */
.history { position: relative; padding: 0 0 80px; }
.history-media { position: relative; max-height: 72vh; overflow: hidden; margin-bottom: 40px; }
.history-media video { width: 100%; height: 100%; max-height: 72vh; object-fit: cover; object-position: 30% 30%; }
.history-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, transparent 18%, transparent 60%, var(--bg) 100%); }
.chronicle { list-style: none; padding: 0; margin: 0 auto 60px; max-width: 820px; position: relative; }
.chronicle::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold-deep), var(--wax-deep)); }
.chronicle li { position: relative; padding: 0 0 26px 44px; }
.chronicle li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); }
.chronicle li.key::before { background: var(--wax); border-color: var(--wax); box-shadow: 0 0 14px var(--wax); }
.chronicle time { font: 600 14px var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.chronicle h3 { font-size: 22px; margin: 2px 0 6px; }
.chronicle p { margin: 0; color: var(--text2); }
.legend-tag { display: inline-block; font: 600 11px/1 var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); background: var(--parch); padding: 4px 7px; border-radius: 4px; margin-right: 4px; vertical-align: 2px; }
.fiction { background: linear-gradient(180deg, rgba(110, 19, 22, .18), rgba(14, 19, 32, .4)); border: 1px solid rgba(184, 38, 43, .35); border-radius: 16px; padding: clamp(22px, 5vw, 44px); max-width: 860px; margin: 0 auto; }
.fiction p { color: var(--text); }
.fiction b { color: var(--parch); }
.quote { text-align: center; font: italic 22px/1.4 var(--body); color: var(--gold) !important; margin: 26px 0 0; }

/* ─── Rules ────────────────────────────────────────────────────────────── */
.rules { padding: 80px 0; background: linear-gradient(180deg, var(--bg), var(--ink) 20%, var(--ink) 80%, var(--bg)); }
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 0 0 44px; }
.tl-step { position: relative; text-align: center; padding: 16px 6px 14px; background: var(--surface); clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%, 8% 50%); }
.tl-step:first-child { clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%); }
.tl-step i { display: block; font-style: normal; font-size: 24px; color: var(--gold); }
.tl-step b { display: block; font: 600 15px var(--head); letter-spacing: .1em; text-transform: uppercase; }
.tl-step span { font-size: 12px; color: var(--text2); }
.tl-night { background: linear-gradient(180deg, #2a1418, var(--surface)); }
.tl-night i { color: var(--wax); }
@media (max-width: 640px) {
  .timeline { grid-template-columns: 1fr; }
  .tl-step, .tl-step:first-child { clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%); padding-bottom: 22px; }
}
.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.step { background: var(--surface); border-radius: 14px; padding: 22px; border-left: 3px solid var(--gold-deep); }
.step h3 { font-size: 22px; display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.step h3 em { font-style: normal; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: 20px; flex: none; }
.step p { margin: 0 0 10px; color: var(--text2); }
.step b { color: var(--text); }
.step-safety { border-left-color: var(--wax); }
.step-safety h3 em { background: var(--wax); color: #fff; }
ul.icons { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
ul.icons li { display: block; position: relative; padding-left: 42px; color: var(--text2); min-height: 30px; }
ul.icons li .ic { position: absolute; left: 0; top: 0; }
.ic { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--ink); border: 2px solid; font-size: 15px; }
.ic.gold { border-color: var(--gold); color: var(--gold); }
.ic.blue { border-color: var(--info); color: var(--info); }
.ic.red { border-color: var(--wax); color: var(--wax); }
.ic.parch { border-color: var(--parch); color: var(--parch); }
.camps-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.camp { border-radius: 14px; padding: 22px; border: 1px solid; }
.camp h3 { font-size: 24px; margin-bottom: 6px; }
.camp ul { margin: 0; padding-left: 20px; color: var(--text2); }
.camp li { margin: 6px 0; }
.camp b { color: var(--text); }
.goal { font-weight: 700; margin: 0 0 10px; }
.camp-blue { background: linear-gradient(180deg, rgba(79, 143, 214, .14), var(--surface)); border-color: rgba(79, 143, 214, .45); }
.camp-blue h3 { color: var(--info); }
.camp-red { background: linear-gradient(180deg, rgba(184, 38, 43, .16), var(--surface)); border-color: rgba(184, 38, 43, .5); }
.camp-red h3 { color: #E0484E; }
.victory { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.v { padding: 16px; border-radius: 10px; text-align: center; }
.v b { display: block; font: 600 20px var(--head); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.v span { color: var(--text2); font-size: 15px; }
.v-blue { background: rgba(79, 143, 214, .12); border: 1px solid rgba(79, 143, 214, .4); }
.v-blue b { color: var(--gold); }
.v-red { background: rgba(184, 38, 43, .14); border: 1px solid rgba(184, 38, 43, .45); }
.v-red b { color: #E0484E; }

/* ─── Features ─────────────────────────────────────────────────────────── */
.features { padding: 80px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 30px 22px; }
.feature { text-align: center; }
.feature h3 { font-size: 20px; margin: 16px 0 6px; color: var(--parch); }
.feature p { margin: 0; color: var(--text2); font-size: 15px; }
.phone {
  width: min(230px, 70vw); margin: 0 auto; aspect-ratio: 9 / 19.5; border-radius: 30px; padding: 9px;
  background: linear-gradient(145deg, #2a3348, #10151f); box-shadow: 0 20px 40px rgba(0, 0, 0, .55), inset 0 0 0 1px #3b4660;
  transition: transform .3s ease;
}
.phone:hover { transform: translateY(-6px) rotate(-1deg); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }

/* ─── Download ─────────────────────────────────────────────────────────── */
.download { padding: 80px 0 60px; }
.dl { background: var(--surface); border-radius: 16px; padding: 24px; border-top: 3px solid var(--wax); }
.dl h3 { font-size: 22px; margin-bottom: 14px; }
.release { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; color: var(--text2); margin: 14px 0 0; }
.release dt { color: var(--dim); }
.release dd { margin: 0; word-break: break-all; }
.r-sha { font-family: ui-monospace, monospace; font-size: 12px; }
.qr-wrap { display: grid; place-items: center; margin: 6px 0 16px; }
#qr { background: #fff; padding: 12px; border-radius: 10px; }
#qr img, #qr canvas { width: 220px; height: 220px; }
.safety { text-align: center; color: var(--text2); margin: 22px 0 0; font-size: 15px; }

.footer { padding: 40px 0 50px; text-align: center; color: var(--dim); font-size: 14px; border-top: 1px solid var(--night); }
.foot-title { font: 700 26px var(--head); color: var(--gold); letter-spacing: .08em; margin: 0 0 6px; }
.foot-title span { font-size: 14px; color: var(--text2); letter-spacing: .2em; text-transform: uppercase; margin-left: 8px; }
.credits a { color: var(--text2); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.shown { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .embers { display: none; }
  .reveal { opacity: 1; transform: none; }
}
