/* The website (src/site.js): the game's colours, its cut corners and gold lines. */
:root {
  --bg: #14100c;
  --panel: #211a13;
  --panel-2: #2a2118;
  --line: #5a4526;
  --gold: #e0b44c;
  --gold-dim: #a7801c;
  --text: #ece6da;
  --dim: #a89f8f;
  --blue: #5b93d6;
  --red: #e0584c;
  --cut: polygon(12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(26px, 4vw, 36px); color: var(--gold); margin-bottom: 28px; }
h2::after { content: ""; display: block; width: 72px; height: 2px; margin-top: 12px; background: linear-gradient(90deg, var(--gold), transparent); }
h3 { font-size: 20px; }
p { margin: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0; }

/* the bar on top */
.bar { position: sticky; top: 0; z-index: 5; background: rgba(20, 16, 12, .94); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 20px var(--serif); white-space: nowrap; }
.brand img { border-radius: 8px; }
.bar nav { display: flex; gap: 20px; margin-left: auto; }
.bar nav a { color: var(--text); text-decoration: none; font-size: 15px; padding: 8px 0; }
.bar nav a:hover, .bar nav a:focus-visible { color: var(--gold); }
.langs { display: flex; gap: 10px; font-size: 14px; }
.langs a { color: var(--dim); text-decoration: none; }
.langs a:hover { color: var(--gold); }
.langs b { color: var(--gold); font-weight: 600; }

/* "still being built" */
.ribbon { margin: 0; padding: 10px 16px; text-align: center; font-size: 15px; background: repeating-linear-gradient(135deg, #2c2212 0 14px, #251c10 14px 28px); border-bottom: 1px solid var(--line); }
.ribbon span { color: var(--text); }
.ribbon a { font-weight: 600; white-space: nowrap; }

.hero { padding: 0; background: linear-gradient(180deg, rgba(20, 16, 12, .72), rgba(20, 16, 12, .86) 60%, var(--bg)), url(shots/europe.jpg) center / cover no-repeat #1a1410; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 64px; padding-bottom: 80px; }
.crest { border-radius: 28px; box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0, 0, 0, .6); }
.badge { display: inline-block; margin: 28px 0 14px; padding: 4px 12px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--gold); clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 50%, calc(100% - 6px) 100%, 6px 100%, 0 50%); }
h1 { font-size: clamp(42px, 9vw, 84px); letter-spacing: .01em; text-shadow: 0 2px 24px rgba(0, 0, 0, .8); }
.lead { max-width: 620px; margin-top: 16px; font-size: clamp(18px, 2.4vw, 21px); color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

.btn { display: inline-block; min-height: 48px; padding: 12px 24px; font: 600 17px/1.4 system-ui, sans-serif; color: var(--text); text-decoration: none; text-align: center; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line); border-radius: 0; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn.gold { color: #1a1410; background: linear-gradient(180deg, #edc766, #c9992f); border-color: #edc766; }
.btn.gold:hover { color: #1a1410; background: linear-gradient(180deg, #f5d57e, #d6a63a); }
.btn:disabled { opacity: .6; cursor: default; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* gold-lined panels with cut corners: the line is the outer box, the fill the inner one */
.panel, .card { background: var(--line); padding: 1px; clip-path: var(--cut); }
.panel > .in, .card > .in { background: linear-gradient(180deg, var(--panel-2), var(--panel)); clip-path: var(--cut); height: 100%; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.card > .in { padding: 22px; }
.card img { margin-bottom: 14px; }
.card h3 { color: var(--gold); margin-bottom: 8px; }
.card p { color: var(--dim); font-size: 16px; }

.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.shot { position: relative; display: block; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; overflow: hidden; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .3s; }
.shot:hover img { transform: scale(1.03); }
.shot:hover { border-color: var(--gold); }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 8px; font-size: 14px; background: linear-gradient(180deg, transparent, rgba(20, 16, 12, .92)); }

.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.stages li { position: relative; padding: 28px 20px 0 0; border-top: 2px solid var(--line); }
.stages i { position: absolute; top: -9px; left: 0; width: 16px; height: 16px; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--line); }
.stages .past { border-color: var(--gold-dim); }
.stages .past i { background: var(--gold-dim); border-color: var(--gold-dim); }
.stages .now i { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px rgba(224, 180, 76, .22); }
.stages h3 { margin-bottom: 6px; }
.stages .now h3 { color: var(--gold); }
.stages em { font: 600 12px system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--bg); background: var(--gold); padding: 2px 7px; vertical-align: middle; margin-left: 6px; }
.stages p { color: var(--dim); font-size: 16px; }
.stages .next h3 { color: var(--dim); }

/* the sign-up */
.beta { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 36px; }
.pitch .badge { margin-top: 0; }
.pitch h2 { margin-bottom: 18px; }
.pitch p { font-size: 18px; }
.pitch ul { margin: 20px 0 0; padding: 0; list-style: none; color: var(--dim); }
.pitch li { position: relative; padding: 6px 0 6px 24px; }
.pitch li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 9px; height: 9px; transform: rotate(45deg); background: var(--gold); }
form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
form > label:first-child { font-weight: 600; margin-bottom: -6px; }
input[type=email] { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 0; }
input[type=email]:focus { border-color: var(--gold); outline: none; }
input::placeholder { color: #6f675a; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.captcha { margin: 0; padding: 14px; border: 1px solid var(--line); background: rgba(20, 16, 12, .5); min-width: 0; }
.captcha legend { padding: 0 6px; font-size: 14px; color: var(--dim); }
.ask { font-size: 16px; }
.ask b { color: var(--gold); }
.tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 12px 0 10px; min-height: 56px; }
.tile { position: relative; aspect-ratio: 1; min-width: 0; padding: 4px; cursor: pointer; background: #efe7d6; border: 2px solid var(--line); border-radius: 0; }
.tile img { width: 100%; height: 100%; }
.tile:hover { border-color: var(--gold); }
.tile.on { border-color: var(--gold); background: #f8edc9; }
.tile b { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; font: 700 13px/22px system-ui, sans-serif; text-align: center; color: var(--bg); background: var(--gold); border-radius: 50%; }
.tools { display: flex; gap: 16px; justify-content: flex-end; }
.tools button { padding: 6px 0; font: inherit; font-size: 14px; color: var(--dim); background: none; border: 0; text-decoration: underline; cursor: pointer; }
.tools button:hover { color: var(--gold); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--dim); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); }
.error { padding: 10px 12px; font-size: 15px; color: #ffd9d4; background: rgba(224, 88, 76, .16); border-left: 3px solid var(--red); }
[hidden] { display: none !important; }
.done { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; padding: 24px 0; }
.done h3 { font-size: 26px; color: var(--gold); }
.done p { color: var(--dim); }

.foot { padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--dim); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--gold); }
.foot span { margin-right: auto; }

/* the wiki (src/wiki.js) */
.wiki { padding: 32px 0 64px; }
.wiki h1 { font-size: clamp(30px, 5vw, 44px); color: var(--gold); margin: 6px 0 16px; }
.wiki .intro { max-width: 820px; font-size: 18px; margin-bottom: 28px; }
.wiki .cards a.in { display: block; color: var(--text); text-decoration: none; }
.wiki .cards a.in:hover h3 { text-decoration: underline; }
.crumbs { font-size: 14px; color: var(--dim); }
.crumbs a { color: var(--dim); }
.wtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 6px; }
.wtabs a, .wtabs b { padding: 6px 12px; font-size: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--text); }
.wtabs a:hover { border-color: var(--gold); color: var(--gold); }
.wtabs b { color: var(--bg); background: var(--gold); border-color: var(--gold); font-weight: 600; }
.wsec { padding: 0; margin-top: 40px; }
.wsec h2 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 16px; }
.table { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); -webkit-overflow-scrolling: touch; }
.table table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 9px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(90, 69, 38, .5); white-space: nowrap; }
.table thead th { font-size: 13px; font-weight: 600; letter-spacing: .02em; color: var(--gold); background: var(--panel-2); }
.table tbody th { font-weight: 600; color: var(--text); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: rgba(224, 180, 76, .05); }
.table .w { display: inline-block; min-width: 240px; white-space: normal; }
.ic { display: inline-block; width: 22px; height: 22px; vertical-align: -5px; }
.cost { white-space: nowrap; }
.notes { margin: 14px 0 0; padding-left: 20px; color: var(--dim); max-width: 860px; }
.notes li { margin: 6px 0; }
.note { margin-top: 12px; color: var(--dim); max-width: 860px; }
.flagc { display: inline-block; width: 22px; height: 16px; vertical-align: -2px; border: 1px solid #000; }
.src { margin-top: 40px; font-size: 14px; color: var(--dim); }

/* the privacy policy (src/legal.js) */
.prose { max-width: 760px; margin: 0 auto; padding: 40px 16px 64px; }
.prose h1 { font-size: clamp(28px, 5vw, 40px); color: var(--gold); margin-bottom: 20px; }
.prose h2 { font-size: 22px; margin: 36px 0 12px; }
.prose h2::after { display: none; }
.prose p { margin: 12px 0; }
.prose ul { padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose b { color: #fff; }
.prose a { overflow-wrap: anywhere; }

@media (max-width: 820px) {
  section { padding: 40px 0; }
  .bar .wrap { gap: 12px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
  .bar nav { order: 3; width: 100%; margin: 0; justify-content: space-between; gap: 12px; }
  .langs { margin-left: auto; }
  html { scroll-padding-top: 110px; }
  .hero .wrap { padding-top: 40px; padding-bottom: 56px; }
  .crest { width: 104px; height: 104px; }
  .beta { grid-template-columns: 1fr; gap: 28px; padding: 22px 18px; }
  .stages { grid-template-columns: 1fr; }
  .stages li { padding: 0 0 24px 30px; border-top: 0; border-left: 2px solid var(--line); }
  .stages li:last-child { padding-bottom: 0; }
  .stages i { top: 4px; left: -9px; }
  .tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shot img { transition: none; }
}
