/* Landing page. Colours: --accent and --hero-image come from /theme.css (generated from the game's settings). */
:root {
  --bg: #0a0708;
  --surface: #130d0f;
  --surface-2: #1a1114;
  --line: #2d2024;
  --text: #ece6e4;
  --muted: #a89a9c;
  --accent-ink: color-mix(in srgb, var(--accent, #a3202a) 52%, white);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* film grain over everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; }
.muted { color: var(--muted); }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); }
code { background: var(--surface-2); padding: 0.1em 0.4em; border-radius: 5px; font-size: 0.92em; }

.skip { position: absolute; left: -999px; top: 0; background: var(--accent, #a3202a); color: #fff; padding: 10px 14px; z-index: 100; }
.skip:focus { left: 0; }

.announce { background: color-mix(in srgb, var(--accent, #a3202a) 70%, #000); color: #fff; text-align: center; padding: 9px 16px; font-size: 0.95rem; }
.announce a { color: #fff; font-weight: 600; }

/* navigation */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; flex-wrap: wrap; padding-block: 6px; }
.brand { font-family: var(--serif); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); text-decoration: none; font-size: 0.98rem; }
.nav nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; padding: 4px 0; }
.nav nav a:hover { color: #fff; }

/* hero */
.hero { position: relative; min-height: min(90vh, 860px); display: grid; align-items: center; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1100px 560px at 80% 8%, color-mix(in srgb, var(--accent, #a3202a) 40%, transparent), transparent 62%),
    radial-gradient(800px 480px at 6% 92%, color-mix(in srgb, var(--accent, #a3202a) 20%, transparent), transparent 58%),
    var(--bg); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero-image, none) center / cover no-repeat; opacity: 0.45; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgba(10, 7, 8, 0.15), var(--bg) 97%), radial-gradient(ellipse at center, transparent 38%, rgba(0, 0, 0, 0.7)); }
.hero-inner { padding-block: 90px 70px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.78rem; color: var(--accent-ink); margin: 0 0 14px; }
.title { font-size: clamp(2.7rem, 8.5vw, 5.8rem); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 0.12em; text-shadow: 0 0 44px color-mix(in srgb, var(--accent, #a3202a) 60%, transparent); }
.tagline { font-family: var(--serif); font-size: clamp(1.15rem, 3vw, 1.6rem); margin: 0 0 18px; color: #f3ecea; }
.lead { max-width: 56ch; color: #cfc4c5; font-size: 1.08rem; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.countdown { margin: 26px 0 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.cd-value { color: var(--text); font-weight: 600; margin-left: 6px; }

@media (prefers-reduced-motion: no-preference) {
  .title { animation: flicker 8s infinite; }
}
@keyframes flicker {
  0%, 90%, 100% { opacity: 1; }
  91% { opacity: 0.5; }
  92% { opacity: 1; }
  95% { opacity: 0.72; }
  96% { opacity: 1; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; transition: transform 0.15s, background 0.15s, border-color 0.15s; }
.btn:hover { background: #241719; border-color: #4a3036; color: #fff; transform: translateY(-1px); }
.btn.primary { background: var(--accent, #a3202a); border-color: transparent; color: #fff; box-shadow: 0 8px 28px -10px var(--accent, #a3202a); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent, #a3202a) 82%, white); }

/* sections */
.section { padding: 84px 0; }
.section.alt { background: linear-gradient(to bottom, transparent, var(--surface) 12%, var(--surface) 88%, transparent); }
.section h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 26px; }
.section h2::after { content: ""; display: block; width: 56px; height: 3px; margin-top: 14px; background: var(--accent, #a3202a); border-radius: 2px; }
.about p { max-width: 68ch; font-size: 1.1rem; color: #d8cfd0; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.chips li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 0.88rem; color: var(--muted); }
.highlights { list-style: none; padding: 0; margin: 38px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.gallery img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { padding: 10px 14px; font-size: 0.9rem; color: var(--muted); }

.posts { display: grid; gap: 18px; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.post header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 0.85rem; color: var(--muted); }
.tag { background: color-mix(in srgb, var(--accent, #a3202a) 30%, transparent); color: #ffd9dc; border-radius: 6px; padding: 2px 9px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; }
.post h3 { font-size: 1.45rem; margin-bottom: 12px; }
.post-image { border-radius: 10px; margin: 0 0 14px; }
.post-body p { margin: 0 0 12px; color: #d3c9ca; overflow-wrap: anywhere; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 18px 28px 18px 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; color: var(--accent-ink); transition: transform 0.2s; }
.faq[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 18px; color: var(--muted); }

.community { text-align: center; padding: 48px 24px; background: radial-gradient(600px 240px at 50% 0%, color-mix(in srgb, var(--accent, #a3202a) 22%, transparent), transparent 70%), var(--surface); }
.community h2::after { margin-inline: auto; }
.community p { max-width: 52ch; margin: 0 auto 22px; color: #d3c9ca; }
.community .actions { justify-content: center; }
.fine { font-size: 0.88rem; color: var(--muted); margin-top: 24px !important; }

.footer { border-top: 1px solid var(--line); padding: 30px 0 44px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.footer p { margin: 4px 0; }

/* reveal on scroll (only when the script has run, and never for people who ask for less motion) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* single-message pages: maintenance, errors, account linking */
body.plain { display: grid; place-items: center; min-height: 100vh; padding: 28px 18px; background: radial-gradient(900px 500px at 50% 0%, color-mix(in srgb, var(--accent, #a3202a) 28%, transparent), transparent 70%), var(--bg); }
.message { width: min(520px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 38px 30px; }
.message.wide { width: min(720px, 100%); text-align: left; }
.message .brand { display: block; margin-bottom: 16px; color: var(--accent-ink); }
.message h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); margin-bottom: 16px; }
.message h2 { font-size: 1.1rem; margin: 26px 0 8px; }
.message p, .message li { color: #d3c9ca; }
.message ul { padding-left: 20px; }
.message.error h1 { color: #ff9aa2; }
.error { background: color-mix(in srgb, #ed4245 22%, transparent); border: 1px solid #ed4245; border-radius: 8px; padding: 10px 14px; }
.consent { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent, #a3202a); flex: none; }

@media (max-width: 640px) {
  .section { padding: 60px 0; }
  .hero-inner { padding-block: 64px 48px; }
  .nav-inner { justify-content: center; }
  .btn { width: 100%; }
}
