/* Petalwar — the game's own start menu as a page: deep green panels, gold
   hairline frames, cream buttons, Marcellus capitals. No inline styles
   anywhere (style-src 'self'), no script. */

@font-face { font-family: "Marcellus"; src: url("/web/fonts/marcellus.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/web/fonts/alegreya-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("/web/fonts/alegreya-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #0e1b17;
  --panel: #13261f;
  --panel-2: #183029;
  --gold: #d6b06a;
  --gold-dim: #9c8150;
  --cream: #f3ead6;
  --text: #e4dac4;
  --muted: #b3aa95;
  --ink: #17261f;
  --line: rgba(214, 176, 106, 0.38);
  --sunhearth: #e7ac52;
  --mossglade: #a3c784;
  --moonveil: #aeb1f5;
  --gutter: clamp(16px, 4vw, 40px);
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.125rem/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--cream); line-height: 1.15; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); letter-spacing: 0.02em; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
p { margin: 0 0 1em; }
figure { margin: 0; }
figcaption { font-size: 0.92rem; color: var(--muted); margin-top: 0.6rem; }

.wordmark { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cream); text-decoration: none; }
.wordmark.small { font-size: 1.05rem; }
.eyebrow { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }

/* Buttons: the menu's double-ruled frame, cream for the one that matters. */
.btn { display: inline-block; padding: 0.8em 1.5em; font: 700 0.9rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--cream); background: rgba(19, 38, 31, 0.82); border: 1px solid var(--gold); border-radius: 6px; box-shadow: inset 0 0 0 3px rgba(14, 27, 23, 0.9), inset 0 0 0 4px var(--line); transition: background 0.15s, color 0.15s; }
.btn:hover { background: var(--panel-2); color: var(--cream); }
.btn.primary { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 3px var(--cream), inset 0 0 0 4px var(--gold-dim); }
.btn.primary:hover { background: #fff8e8; color: var(--ink); }

/* The hero: the loading-screen key art, dimmed from the bottom and the left
   so the title reads over the sunlit sky. */
.hero { position: relative; min-height: min(94vh, 920px); display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.hero > picture { position: absolute; inset: 0; z-index: -2; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
@media (max-width: 700px) { .hero-art { object-position: 50% 30%; } }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 27, 23, 0.55) 0%, rgba(14, 27, 23, 0) 18%, rgba(14, 27, 23, 0) 42%, rgba(14, 27, 23, 0.78) 74%, var(--bg) 100%), linear-gradient(90deg, rgba(14, 27, 23, 0.55) 0%, rgba(14, 27, 23, 0) 60%); }
.top { display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter); }
.top-link { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cream); text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.hero-copy { max-width: 1180px; width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 8vh, 88px); }
.title { font-size: clamp(3.2rem, 11vw, 7.4rem); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 0.25em; text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55); }
.lede { max-width: 34rem; font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--cream); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.7); margin-bottom: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* Sections */
main > section { max-width: 1180px; margin: 0 auto; padding: clamp(56px, 9vw, 110px) var(--gutter) 0; }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.split { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1.08fr; }
  .split.reverse { grid-template-columns: 1.08fr 1fr; }
}
.copy p { color: var(--text); }
.frame img { border: 1px solid var(--gold-dim); border-radius: 8px; padding: 6px; background: var(--panel); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.frame.wide { margin-top: 0.5rem; }

/* Factions: copy and vehicle beside the faction's concept sheet. */
.faction { display: grid; gap: clamp(20px, 3vw, 40px); align-items: center; padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .faction { grid-template-columns: 1fr 1.9fr; } }
.faction h3 { margin-bottom: 0.2em; }
.motto { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 1rem; }
.f-sunhearth h3, .f-sunhearth .motto { color: var(--sunhearth); }
.f-mossglade h3, .f-mossglade .motto { color: var(--mossglade); }
.f-moonveil h3, .f-moonveil .motto { color: var(--moonveil); }
.unit { max-width: 300px; margin-top: 1.2rem; padding: 14px 16px; border-radius: 10px; background: radial-gradient(ellipse at 50% 42%, rgba(243, 234, 214, 0.14), rgba(243, 234, 214, 0) 70%), var(--panel); border: 1px solid var(--line); }
.unit img { margin: 0 auto; max-height: 190px; width: auto; }
.unit figcaption { margin-top: 0.4rem; }
.unit strong { display: block; color: var(--cream); font-family: var(--display); font-weight: 400; font-size: 1.1rem; }
.sheet img { border-radius: 8px; border: 1px solid var(--gold-dim); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }

.points { list-style: none; margin: 0; padding: 0; }
.points li { padding: 0.9rem 0 0.9rem 1.6rem; border-bottom: 1px solid var(--line); position: relative; }
.points li:last-child { border-bottom: 0; }
.points li::before { content: ""; position: absolute; left: 0; top: 1.45rem; width: 9px; height: 9px; background: var(--gold); transform: rotate(45deg); }
.points strong { color: var(--cream); }

/* Downloads: one framed card per desktop, driven by /builds/latest.json. */
.download { text-align: center; }
.download > p { color: var(--muted); max-width: 36rem; margin-left: auto; margin-right: auto; }
.cards { list-style: none; margin: 2rem auto 0; padding: 0; display: grid; gap: 16px; max-width: 640px; }
@media (min-width: 560px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; padding: 26px 20px; background: var(--panel); border: 1px solid var(--gold-dim); border-radius: 10px; box-shadow: inset 0 0 0 4px var(--panel), inset 0 0 0 5px var(--line); }
.platform { font-family: var(--display); font-size: 1.5rem; color: var(--cream); }
.soon { font-weight: 700; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding: 0.6em 1.2em; border: 1px dashed var(--gold-dim); border-radius: 6px; }
.size { font-size: 0.9rem; color: var(--muted); }
.note { font-size: 0.95rem; margin-top: 1.4rem; }

.foot { max-width: 1180px; margin: clamp(64px, 10vw, 120px) auto 0; padding: 28px var(--gutter) 40px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.95rem; }
.foot p { margin: 0.3rem 0; }

/* 404 */
.lost-main { max-width: 40rem; margin: 0 auto; padding: 22vh var(--gutter) 0; text-align: center; }
.lost-main .title { font-size: clamp(2.4rem, 8vw, 4rem); letter-spacing: 0.08em; }
