/* The title screen (landing.html). Same palette and faces as the play view (play.css): deep navy, engraved
   Cinzel for titles, Spectral for text, one gold accent. Deliberately single-theme, like the game itself. */
:root{
  --bg:#0f151e; --panel:#1a2331; --raised:#212d3e; --line:#2c3a4d;
  --ink:#e9eef5; --muted:#9aa7b8; --gold:#d8b568; --gold-bright:#ecca7e; --gold-dim:#7a663a;
  --accent:#5bb1e8; --display:"Cinzel","Spectral",Georgia,serif; --serif:"Spectral",Georgia,serif;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 var(--serif)}
a{color:var(--gold-bright)}
.muted{color:var(--muted)}.small{font-size:13px}

/* ---- hero ---- */
.hero{position:relative;overflow:hidden;min-height:clamp(600px,46vw,820px);display:flex;align-items:center;justify-content:center;
  padding:56px 16px 48px;text-align:center;isolation:isolate;
  background:#101824 url("/static/img/map-terrain.jpg") center/cover no-repeat}
.hero-art{position:absolute;inset:0;z-index:-2}
.hero-art img{width:100%;height:100%;object-fit:cover;display:block}
.hero::before{content:"";position:absolute;inset:0;z-index:-1;
  /* a soft pool of shade behind the title and join box, the picture left clear at the edges, and a fade into
     the page below */
  background:radial-gradient(ellipse 46% 60% at 50% 46%,#0b111ab8 0%,#0b111a70 55%,#0b111a00 100%),
             linear-gradient(180deg,#0b111a66 0%,#0b111a00 22%,#0b111a00 70%,#0f151e 100%)}
.hero-in{max-width:880px;width:100%}
.eyebrow{font-family:var(--display);font-size:13px;letter-spacing:.32em;text-transform:uppercase;color:var(--gold)}
.wordmark{font-family:var(--display);font-weight:800;font-size:clamp(46px,9vw,104px);line-height:.95;margin:14px 0 18px;
  letter-spacing:.06em;color:#f6efdc;text-shadow:0 4px 30px #000c,0 1px 0 #000}
.wordmark>span{display:block}
/* the lockup: BALANCE / — of — / THREAT, the small "of" riding between two gold rules */
.wm-of{display:flex!important;align-items:center;justify-content:center;gap:.5em;font-weight:600;font-size:.3em;
  letter-spacing:.35em;color:var(--gold);margin:.35em 0 .3em;text-shadow:none}
.wm-of::before,.wm-of::after{content:"";height:1px;width:min(150px,22vw);background:linear-gradient(90deg,#0000,var(--gold))}
.wm-of::after{background:linear-gradient(90deg,var(--gold),#0000)}
.hook{font-size:clamp(16px,2vw,19px);color:#dfe5ee;max-width:52ch;margin:0 auto 18px;text-wrap:balance;
  text-shadow:0 2px 12px #000}
.flagrow{display:flex;justify-content:center;flex-wrap:wrap;gap:14px 18px;margin:0 auto 28px}
.fr-item{display:flex;flex-direction:column;align-items:center;gap:5px}
.fr-flag{width:42px;height:28px;display:block;border-radius:2px;box-shadow:0 3px 10px #000b}
.fr-name{font-family:var(--display);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;color:#cfd6e0}

.joinbox{max-width:480px;margin:0 auto;padding:16px 18px;border:1px solid var(--gold-dim);border-radius:12px;
  background:linear-gradient(180deg,#1a2331ee,#131b27ee);box-shadow:0 20px 50px -20px #000}
.joinlab{display:block;font-size:14.5px;color:var(--muted);margin-bottom:9px}
.joinrow{display:flex;gap:10px}
.joinrow input{flex:1;min-width:0;background:#0f1721;color:var(--ink);border:1px solid var(--line);border-radius:8px;
  padding:11px 14px;font:600 17px/1 var(--serif);letter-spacing:.16em;text-transform:uppercase;text-align:center}
.joinrow input:focus{outline:none;border-color:var(--gold)}
.herolinks{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:12px;margin-top:18px}
.textlink{font-size:14px;color:var(--muted);text-decoration:none}.textlink:hover{color:var(--gold-bright)}

.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font:600 15px/1 var(--serif);letter-spacing:.02em;
  padding:12px 20px;border-radius:999px;cursor:pointer;text-decoration:none;border:1px solid transparent;white-space:nowrap}
.btn.primary{background:linear-gradient(180deg,#e2bf73,#c49a47);color:#1b1407;border-color:#f0d494}
.btn.primary:hover{filter:brightness(1.07)}
.btn.ghost{background:#0f1721aa;color:var(--ink);border-color:var(--line)}
.btn.ghost:hover{border-color:var(--gold-dim);color:var(--gold-bright)}
.btn:focus-visible,.mode:focus-visible,summary:focus-visible{outline:2px solid var(--gold);outline-offset:3px}

/* ---- below the fold ---- */
.wrap{max-width:1160px;margin:0 auto;padding:10px 16px 40px}
.sec-h{font-family:var(--display);font-size:20px;letter-spacing:.08em;color:var(--gold-bright);margin:26px 0 14px;font-weight:700}
.sec-h span{font-family:var(--serif);font-size:14px;letter-spacing:0;color:var(--muted);font-weight:400;margin-left:8px;font-style:italic}
.sec-h.inline{margin:0;font-size:17px}
.modes{display:grid;grid-template-columns:repeat(5,1fr);gap:16px}
@media (max-width:1200px){.modes{grid-template-columns:repeat(3,1fr)}}
@media (max-width:1000px){.modes{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.modes{grid-template-columns:1fr}}
.mode{display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:12px;
  color:var(--ink);text-decoration:none;transition:transform .18s ease,border-color .18s ease}
.mode:hover{border-color:var(--gold-dim);transform:translateY(-2px)}
.mode-art{aspect-ratio:16/8;background:linear-gradient(135deg,#243247,#141c28);overflow:hidden;border-radius:11px 11px 0 0}
.mode-art img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.8) brightness(.9)}
.mode-tx{padding:13px 15px 15px;display:flex;flex-direction:column;flex:1}
.mode h3{font-family:var(--display);font-size:16.5px;letter-spacing:.04em;margin:0 0 6px;color:#f3ead4}
.mode p{margin:0 0 12px;font-size:14.5px;color:var(--muted);line-height:1.5;flex:1}
.go{font-size:14px;color:var(--gold-bright);font-weight:600}

.teacher{margin-top:30px}
details{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:0}
summary{cursor:pointer;list-style:none;padding:16px 18px;display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px}
summary::-webkit-details-marker{display:none}
summary::before{content:"▸";display:inline-block;color:var(--gold);margin-right:2px;transition:transform .15s}
details[open] summary::before{transform:rotate(90deg)}
summary .muted{font-size:14px}
.card{padding:4px 18px 18px;margin:0;border-top:1px solid var(--line)}
.row{display:grid;grid-template-columns:150px 1fr;align-items:center;gap:12px;margin:10px 0;font-size:14.5px}
@media (max-width:560px){.row{grid-template-columns:1fr;gap:4px}}
input[type=text],input[type=number],select{background:#0f1721;color:var(--ink);border:1px solid var(--line);border-radius:7px;
  padding:8px 10px;font:14.5px var(--serif);min-width:0}
.seatgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px 16px;margin:6px 0}
@media (max-width:700px){.seatgrid{grid-template-columns:1fr}}
.seatrow{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#131b27;border:1px solid var(--line);
  border-radius:8px;padding:7px 10px}
.seatrow label{display:flex;align-items:center;gap:8px;cursor:pointer}
.seatrow select{padding:4px 6px;font-size:13px}.seatrow select:disabled{opacity:.4}
.seatflag{display:inline-flex}.seat-flag{width:21px;height:14px;display:block;border-radius:1px}

.foot{display:flex;flex-wrap:wrap;gap:8px 20px;justify-content:center;margin-top:40px;padding-top:18px;border-top:1px solid var(--line);
  font-size:13.5px;color:var(--muted)}
.foot a{color:var(--muted)}.foot a:hover{color:var(--gold-bright)}

@media (max-width:560px){
  .hero{padding:40px 16px 36px}
  .joinrow{flex-direction:column}
  .fr-flag{width:34px;height:23px}
  .flagrow{gap:10px 12px}
}
@media (prefers-reduced-motion:no-preference){
  .hero-in>*{animation:rise .7s cubic-bezier(.2,.8,.2,1) both}
  .hero-in>*:nth-child(2){animation-delay:.08s}.hero-in>*:nth-child(3){animation-delay:.16s}
  .hero-in>*:nth-child(4){animation-delay:.24s}.hero-in>*:nth-child(5){animation-delay:.32s}.hero-in>*:nth-child(6){animation-delay:.4s}
  @keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
}

/* =====================================================================
   THE OTHER FRONT-DOOR PAGES (join, solo / campaign / terror setup, quick game + lobby): the title screen's
   look carried through — a slim top bar, a picture banner, and dark cards.
   ===================================================================== */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;
  background:#0b111a;border-bottom:1px solid var(--line)}
.brand{font-family:var(--display);font-weight:800;font-size:17px;letter-spacing:.08em;color:#f3ead4;text-decoration:none;white-space:nowrap}
.brand span{font-weight:600;font-size:.62em;letter-spacing:.2em;color:var(--gold);margin:0 .25em}
.topbar-links{display:flex;gap:16px;font-size:14px}
.topbar-links a{color:var(--muted);text-decoration:none}.topbar-links a:hover{color:var(--gold-bright)}

.pagehero{position:relative;overflow:hidden;isolation:isolate;min-height:clamp(240px,26vw,340px);display:flex;align-items:flex-end;
  padding:40px 16px 26px;background:linear-gradient(135deg,#1c2a3a,#101824)}
.pagehero.short{min-height:clamp(180px,18vw,240px)}
.ph-art{position:absolute;inset:0;z-index:-2}
.ph-art img{width:100%;height:100%;object-fit:cover;display:block}
.pagehero::before{content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(0deg,#0f151e 0%,#0f151ee6 22%,#0f151e88 60%,#0f151e44 100%)}
/* the hero's text column is the page's content column (.page: 880 less its 16px padding each side), so the headline
   starts on the same left edge as the cards below it (owner, Oct 2026: it sat 16px further left) */
.ph-in{max-width:848px;width:100%;margin:0 auto}
.pagehero h1{font-family:var(--display);font-weight:800;font-size:clamp(30px,5vw,50px);line-height:1.05;letter-spacing:.04em;
  color:#f6efdc;margin:8px 0 8px;text-shadow:0 3px 20px #000c;text-wrap:balance}
.ph-lede{max-width:64ch;margin:0;font-size:16.5px;color:#dfe5ee;text-shadow:0 1px 10px #000}
.ph-nation{display:flex;align-items:center;gap:16px}
.ph-flag .fd-flag{width:66px;height:44px;box-shadow:0 4px 16px #000b}
.ph-epithet{margin:0;font-style:italic;font-size:18px;color:#dfe5ee;text-shadow:0 1px 10px #000}
.fd-flag{display:block;border-radius:2px;box-shadow:0 2px 8px #0009}

.page{max-width:880px;margin:0 auto;padding:22px 16px 48px}
.page .card{background:var(--panel);border:1px solid var(--line);border-radius:12px;padding:18px 22px 22px;margin:0}
.solo-card{max-width:560px}
.card-h{font-family:var(--display);font-size:17px;letter-spacing:.06em;color:var(--gold-bright);margin:6px 0 4px;font-weight:700}
.card-h:not(:first-child){margin-top:24px}
.card-lede{color:var(--muted);font-size:14.5px;margin:0 0 12px}
.card-lede b{color:var(--ink)}
.actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:18px}

/* nation cards (solo: pick yours; quick game: mark the computer seats) */
/* four columns: the seats come by continent, so Valmera's four fill the first row and the eastern three the second */
.nations{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
@media (max-width:980px){.nations{grid-template-columns:repeat(3,1fr)}}
@media (max-width:760px){.nations{grid-template-columns:repeat(2,1fr)}}
@media (max-width:480px){.nations{grid-template-columns:1fr}}
.nation{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#131b27;
  transition:border-color .15s,background .15s}
.nation:has(input:checked){border-color:var(--gold);background:linear-gradient(180deg,#2a2618,#171d27)}
.n-pick{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:10px;cursor:pointer}
.n-pick input{accent-color:var(--gold);margin:0}
.n-flag{display:inline-flex}.n-flag .fd-flag{width:36px;height:24px}
.n-tx{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.n-tx b{font-family:var(--display);font-size:15px;letter-spacing:.04em;color:#f3ead4}
.n-ep{font-size:12.5px;color:var(--muted);font-style:italic}
.n-you,.n-bot{font-size:11.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);visibility:hidden}
.nation:has(input:checked) .n-you,.nation:has(input:checked) .n-bot{visibility:visible}
.nation select{font-size:13px;padding:5px 8px}
.nation select:disabled{opacity:.35}

/* the quick-game lobby */
.pageshare{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 8px}
.pageshare input{flex:1;min-width:200px;font-family:ui-monospace,Consolas,monospace;font-size:12.5px}
.seat{display:grid;grid-template-columns:150px 1fr auto;gap:12px;align-items:center;padding:12px 0;border-top:1px solid var(--line)}
.seat .who{display:flex;align-items:center;gap:10px;font-family:var(--display);letter-spacing:.04em;color:#f3ead4}
.seatlink{display:block;color:var(--gold-bright);font-family:ui-monospace,Consolas,monospace;font-size:12.5px;word-break:break-all;line-height:1.35}
.seat .sub{color:var(--muted);font-size:12px}
.seat .act{display:flex;gap:8px}
.btn.small{padding:8px 14px;font-size:13.5px}
@media (max-width:560px){.seat{grid-template-columns:1fr;gap:6px}.topbar-links a:first-child{display:none}}

/* classroom opt-ins on the create forms */
.optsgrp{display:grid;gap:8px}
.optsgrp label{display:block;line-height:1.4}

/* ---- the tutorials: wide cards (image left), above the play modes ---- */
.learn{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.learncard{margin:0}
.learncard button{all:unset;box-sizing:border-box;cursor:pointer;display:flex;width:100%;height:100%;background:var(--panel);
  border:1px solid var(--gold-dim);border-radius:12px;transition:border-color .15s,transform .15s}
.learncard button:hover{border-color:var(--gold);transform:translateY(-2px)}
.learncard button:focus-visible{outline:2px solid var(--gold);outline-offset:3px}
.learn-art{flex:0 0 34%;background:linear-gradient(135deg,#243247,#141c28);overflow:hidden;border-radius:11px 0 0 11px}
.learn-art img{width:100%;height:100%;object-fit:cover;display:block;filter:saturate(.8) brightness(.9)}
.learn-tx{display:flex;flex-direction:column;gap:5px;padding:13px 16px 15px;flex:1;min-width:0}
.learn-k{font-family:var(--display);font-size:11.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--gold)}
.learn-tx b{font-family:var(--display);font-size:17px;letter-spacing:.04em;color:#f3ead4;font-weight:700}
.learn-p{font-size:14.5px;color:var(--muted);line-height:1.5;flex:1}
/* (owner, Oct 2026: "on Chrome when I mouse over the game options there's a stutter") — two Chrome hover glitches on a
   card that lifts (the card no longer clips its children — its picture rounds its own corners — so the strip isn't
   clipped away): (1) Chrome gave the card its own GPU layer only while the lift ran, so its text and picture snapped
   between two renderings as the transition began and ended — the card now keeps its layer all the time; (2) a pointer
   near the card's foot fell off it as it rose, so it dropped, was hovered again, and jittered — a strip under the card
   (::after) fills the gap the lift opens, so the pointer stays on it */
.mode,.learncard button{position:relative;will-change:transform;backface-visibility:hidden;transform:translateZ(0)}
.mode:hover,.learncard button:hover{transform:translateY(-2px) translateZ(0)}
.mode::after,.learncard button::after{content:"";position:absolute;left:0;right:0;top:100%;height:4px}
@media (prefers-reduced-motion:reduce){.learncard button,.mode{transition:none}.learncard button:hover,.mode:hover{transform:translateZ(0)}}
@media (max-width:760px){.learn{grid-template-columns:1fr}.learn-art{flex-basis:30%}}

/* what the page hides stays hidden: the world picker hides a crisis scenario's fixed settings and the other world's
   seats and blurb, but .row / .seatgrid's display:grid overrode the hidden attribute and left them all on screen */
[hidden]{display:none !important}
