/* Valleys Rising website. The colours and type follow the game's style guide
   (game/src/ui/ui_theme.gd): slate panels, gold accents, Oswald headings, Barlow text. */

@font-face { font-family: "Oswald"; font-weight: 600; font-display: swap; src: url("../fonts/Oswald-600.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-weight: 700; font-display: swap; src: url("../fonts/Oswald-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url("../fonts/Barlow-400.woff2") format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url("../fonts/Barlow-600.woff2") format("woff2"); }

:root {
  --bg: #0e1218;
  --panel: #141a22;
  --raised: #1c2430;
  --raised-2: #253041;
  --line: #2c3846;
  --text: #f3f5f7;
  --text-2: #a3aebb;
  --gold: #d9a441;
  --gold-hi: #e7b759;
  --gold-ink: #241a06;
  --green: #3f8f4e;
  --green-text: #63c174;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--gold-hi); text-underline-offset: 0.18em; }
a:hover { color: #f3c870; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; letter-spacing: 0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); text-transform: uppercase; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--gold); color: var(--gold-ink); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---- small caps labels, buttons, pills ---- */

.eyebrow {
  font: 600 0.95rem/1.2 var(--head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin: 0 0 0.75rem;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0.7em 1.5em; border-radius: 999px; border: 2px solid transparent;
  font: 600 1.15rem/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  transition: background-color 0.15s, transform 0.15s, border-color 0.15s;
}
.btn .icon { width: 1.4em; height: 1.4em; }
.btn-play { background: var(--gold); color: var(--gold-ink); box-shadow: 0 6px 24px rgba(217, 164, 65, 0.28); }
.btn-play:hover { background: var(--gold-hi); color: var(--gold-ink); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(243, 245, 247, 0.55); color: var(--text); background: rgba(14, 18, 24, 0.45); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-small { min-height: 42px; padding: 0.5em 1.1em; font-size: 0.95rem; }
@media (max-width: 400px) { .btn:not(.btn-small) { font-size: 1rem; padding-inline: 1.1em; } }
.btn { white-space: nowrap; }
.play-sub { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--text-2); }

.points { display: flex; flex-wrap: wrap; gap: 8px 10px; padding: 0; margin: 1.5rem 0 0; list-style: none; }
.points li {
  display: inline-flex; align-items: center; gap: 0.45em; padding: 0.4em 0.9em 0.4em 0.7em; border-radius: 999px;
  background: rgba(20, 26, 34, 0.82); border: 1px solid var(--line);
  font: 600 0.92rem/1.2 var(--head); letter-spacing: 0.06em; text-transform: uppercase;
}
.points .icon { color: var(--green-text); width: 1.15em; height: 1.15em; }

/* ---- header ---- */

.site-head { position: absolute; inset: 0 0 auto; z-index: 10; }
.site-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: block; margin-right: auto; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none;
  font: 600 1rem/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase;
}
.nav a:hover { background: rgba(243, 245, 247, 0.1); color: var(--text); }
@media (max-width: 860px) { .nav { display: none; } }
@media (max-width: 400px) { .brand img { height: 34px; } .site-head .btn-small { padding-inline: 0.9em; } }
.page .site-head { position: static; background: var(--panel); border-bottom: 1px solid var(--line); }

/* ---- hero ---- */

.hero { position: relative; isolation: isolate; min-height: min(100svh, 980px); display: flex; align-items: center; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { z-index: -2; }
.hero-bg img { object-fit: cover; object-position: 50% 60%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(14, 18, 24, 0.78) 0%, rgba(14, 18, 24, 0.25) 26%, rgba(14, 18, 24, 0.35) 55%, var(--bg) 100%),
    radial-gradient(ellipse 70% 60% at 50% 45%, rgba(14, 18, 24, 0.55), transparent 75%);
}
.hero-inner { padding: 104px 0 64px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { margin: 0 0 1.25rem; }
.hero h1 img { width: clamp(220px, 34vw, 380px); filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.55)); }
.hero .lead {
  max-width: 34ch; margin: 0 auto 1.6rem; font-size: clamp(1.15rem, 1rem + 0.8vw, 1.45rem); line-height: 1.45;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}
.hero .eyebrow { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.4rem); }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero .points { justify-content: center; }

/* ---- sections ---- */

.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-head { max-width: 46rem; margin: 0 auto clamp(28px, 4vw, 48px); text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.125rem; }
.alt { background: var(--panel); border-block: 1px solid var(--line); }

.intro { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; grid-template-columns: 1fr; }
.intro p { font-size: 1.15rem; color: var(--text-2); }
.intro p strong { color: var(--text); font-weight: 600; }
.intro h2 { text-transform: none; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 1.75rem 0 0; }
.stat { background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font: 700 2rem/1.1 var(--head); color: var(--gold); }
.stat span { color: var(--text-2); font-size: 0.95rem; }
.phone {
  justify-self: center; width: min(100%, 320px); border-radius: 28px; overflow: hidden;
  border: 6px solid #05070a; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--line);
}
@media (min-width: 820px) { .intro { grid-template-columns: 1.25fr 1fr; } }

/* trailer */
.trailer-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000;
  border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); max-width: 980px; margin: 0 auto;
}
.trailer-frame video, .trailer-frame > img { width: 100%; height: 100%; object-fit: cover; }
.trailer-soon {
  position: absolute; inset: auto 0 0; padding: 14px 18px; text-align: center;
  background: linear-gradient(180deg, transparent, rgba(14, 18, 24, 0.92));
  font: 600 1.05rem/1.3 var(--head); letter-spacing: 0.08em; text-transform: uppercase;
}
.trailer-cta { text-align: center; margin-top: 28px; }

/* features */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px;
}
.alt .card { background: var(--raised); }
.card h3 { display: flex; align-items: center; gap: 0.55em; margin-bottom: 0.45em; }
.card h3 .icon { color: var(--gold); width: 1.5em; height: 1.5em; }
.card p { color: var(--text-2); margin: 0; }
.card.fair { border-color: rgba(99, 193, 116, 0.55); }
.card.fair h3 .icon { color: var(--green-text); }

/* gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); margin-top: 14px; }
.shot { margin: 0; }
.shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--raised); }
.shot img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; transition: transform 0.25s; }
.wide .shot img { aspect-ratio: 16 / 9; }
.shot img.natural { aspect-ratio: auto; }
.shot a:hover img { transform: scale(1.03); }
.shot figcaption { margin-top: 8px; font-size: 0.92rem; color: var(--text-2); line-height: 1.35; }

/* eras */
.eras { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); padding: 0; margin: 0; list-style: none; }
.era {
  position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; overflow: hidden;
}
/* Each era's colour (no inline styles, so the site's content security policy can forbid them). */
.era:nth-child(1) { --era: #d9a441; }
.era:nth-child(2) { --era: #e08a4a; }
.era:nth-child(3) { --era: #63c174; }
.era:nth-child(4) { --era: #4e9bff; }
.era:nth-child(5) { --era: #b38cff; }
.era::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--era, var(--gold)); }
.era .when { font: 700 1.6rem/1 var(--head); color: var(--era, var(--gold)); }
.era h3 { font-size: 1.15rem; margin: 6px 0 6px; text-transform: uppercase; letter-spacing: 0.04em; }
.era p { margin: 0; color: var(--text-2); font-size: 0.97rem; }
.era .trains { margin-top: 10px; font-size: 0.9rem; color: var(--text); }
.era img { width: calc(100% + 36px); max-width: none; margin: -18px -18px 14px; aspect-ratio: 16 / 7; object-fit: cover; background: #b9d3e6; }

/* download */
.download { text-align: center; }
.download .wrap { max-width: 760px; }
.download p { color: var(--text-2); font-size: 1.125rem; }
.contact { margin-top: 2rem; font-size: 1rem; color: var(--text-2); }
.contact a { display: inline-flex; align-items: center; gap: 0.4em; }

/* faq */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 4px; font: 600 1.2rem/1.3 var(--head); letter-spacing: 0.02em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px; border: solid var(--gold); border-width: 0 3px 3px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details > div { padding: 0 4px 18px; color: var(--text-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* footer */
.site-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 40px 0 32px; font-size: 0.95rem; color: var(--text-2); }
.site-foot .wrap { display: grid; gap: 18px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot nav a { color: var(--text); font-weight: 600; text-decoration: none; }
.site-foot nav a:hover { color: var(--gold-hi); text-decoration: underline; }
.site-foot img { height: 36px; width: auto; }
.site-foot small { display: block; font-size: 0.85rem; line-height: 1.5; }

/* ---- text pages (privacy, terms, press, 404) ---- */

.doc { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 3rem); text-transform: uppercase; }
.doc h2 { font-size: 1.6rem; margin-top: 2.2rem; text-transform: none; }
.doc h3 { margin-top: 1.6rem; }
.doc p, .doc li { color: #ccd3db; }
.doc ul { padding-left: 1.3em; }
.doc li { margin-bottom: 0.4em; }
.doc .updated { color: var(--text-2); }
.doc table { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: 1rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { width: 34%; color: var(--text); font-weight: 600; }
.doc td { color: #ccd3db; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 1.2rem 0; }
.downloads { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); margin: 1rem 0 1.5rem; }
.download-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.download-tile .preview { display: flex; align-items: center; justify-content: center; height: 170px; padding: 16px; background: var(--raised); }
.download-tile .preview.light { background: #ffffff; }
.download-tile .preview img { max-height: 100%; max-width: 100%; width: auto; height: auto; }
.download-tile div.links { padding: 10px 14px 12px; font-size: 0.95rem; }
.download-tile b { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }
.notfound { text-align: center; }
.notfound .wrap > img { width: min(240px, 60vw); margin: 0 auto 1.5rem; }

/* ---- lightbox (screenshots) ---- */

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; }
.lightbox::backdrop { background: rgba(5, 7, 10, 0.92); }
.lightbox figure { margin: 0; display: grid; place-items: center; width: 100vw; height: 100vh; height: 100dvh; padding: 56px 12px 16px; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 120px); width: auto; border-radius: 12px; }
.lightbox figcaption { color: var(--text); margin-top: 10px; text-align: center; }
.lightbox button {
  position: fixed; top: 10px; right: 10px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); display: grid; place-items: center; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
