/* Dreamwagon Games, 2026 redesign
   Epic-dark: forged gold and steel on night, ember for the hive. */

:root {
  --night: #0a0d14;
  --night-2: #0f1420;
  --steel-panel: #141b2a;
  --line: #2a3349;
  --bone: #ebe5d6;
  --steel: #9aa3b8;

  --gold: #c9a35b;
  --gold-hi: #f2d58a;
  --gold-lo: #7a5c28;

  --ember: #e0532b;
  --ember-hi: #ff8d4a;
  --ash: #150c0c;
  --ice: #6fa8dc;

  --display: "Cinzel", "Trajan Pro", Georgia, serif;
  --ui: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 64ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

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

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-hi); text-underline-offset: 0.2em; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }

h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.1; }
p { margin: 0 0 1em; }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--gold); color: var(--night); padding: 0.5rem 1rem;
}
.skip:focus { top: 1rem; }

/* ---------- Type treatments ---------- */
/* forged metal: used for the game title and the closing call only */
.title-metal {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6dc 0%, var(--gold-hi) 38%, var(--gold) 55%, var(--gold-lo) 78%, #e9c87a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,0.6)) drop-shadow(0 0 28px rgba(224, 83, 43, 0.35));
}
/* carved: section headings */
.title-carved {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  color: var(--bone);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 0 #000;
}
.title-carved::after {
  content: "";
  display: block;
  width: 5rem;
  height: 2px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.8rem;
  border: 1px solid transparent;
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 10px 100%, 0 50%);
  transition: filter 120ms ease, background-color 120ms ease;
}
.btn-ember {
  color: #fff;
  background: linear-gradient(180deg, var(--ember-hi), var(--ember) 55%, #a8341a);
}
.btn-ember:hover { color: #fff; filter: brightness(1.15); }
.btn-steel {
  color: var(--bone);
  background: linear-gradient(180deg, #2b3550, #18203a);
  border-color: var(--line);
}
.btn-steel:hover { color: #fff; filter: brightness(1.25); }
.btn-small {
  font-size: 0.9rem;
  padding: 0.55rem 1.2rem;
  color: var(--night);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
}
.btn-small:hover { color: var(--night); filter: brightness(1.1); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.7rem var(--gutter);
  background: linear-gradient(180deg, rgba(10,13,20,0.92), rgba(10,13,20,0.7));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(201,163,91,0.25);
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  color: var(--bone); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: 0.06em;
}
.brand img { border-radius: 6px; }
.site-header nav { margin-right: auto; }
.site-header ul { display: flex; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a {
  font-family: var(--ui); font-weight: 600; font-size: 1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--steel); text-decoration: none;
}
.site-header nav a:hover { color: var(--gold-hi); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem var(--gutter) 5rem;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse 60% 45% at 50% 108%, rgba(255, 120, 50, 0.75) 0%, rgba(224, 83, 43, 0.35) 35%, transparent 70%),
    radial-gradient(ellipse 120% 60% at 50% 120%, #3a120a 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 30%, #172038 0%, transparent 70%),
    var(--night);
}
/* the planet's curve, glowing from beneath */
.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -118vmax;
  width: 160vmax;
  height: 130vmax;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 0%, #1a0d0a 0%, #070505 60%);
  box-shadow: 0 -2px 0 rgba(255, 160, 90, 0.8), 0 -20px 60px rgba(224, 83, 43, 0.55);
  z-index: -1;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.65) 100%);
}

.hero-inner { max-width: 60rem; }
.hero-status {
  font-family: var(--ui); font-weight: 600; font-size: 1.05rem;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ember-hi);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-size: clamp(3rem, 10.5vw, 8.5rem);
  line-height: 0.92;
  margin-bottom: 1.5rem;
}
.hero-tagline {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  color: var(--bone);
  margin-bottom: 1rem;
}
.hero-lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: #cdc6b6; max-width: 46ch; margin: 0 auto 2.25rem; }
.hero-verse { max-width: 60ch; line-height: 1.8; font-style: italic; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.hero-genre {
  margin-top: 2.5rem; margin-bottom: 0;
  font-family: var(--ui); font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--steel); font-size: 0.95rem;
}

/* embers: the one piece of ambient motion on the page */
.embers { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.embers span {
  position: absolute;
  bottom: -10px;
  width: var(--s, 3px);
  height: var(--s, 3px);
  border-radius: 50%;
  background: var(--ember-hi);
  box-shadow: 0 0 8px 2px rgba(255, 120, 50, 0.7);
  opacity: 0;
  animation: rise var(--d, 9s) linear var(--delay, 0s) infinite;
}
@keyframes rise {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.9; }
  100% { transform: translate(var(--drift, 30px), -95vh); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }

/* ---------- World ---------- */
.world {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(180deg, #070505 0%, var(--night) 18%, var(--night-2) 100%);
}
.world-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.world-copy { font-size: 1.2rem; color: #d3ccbc; max-width: var(--measure); }
.world-copy p:first-child::first-letter {
  float: left;
  font-family: var(--display); font-weight: 900;
  font-size: 4.2rem; line-height: 0.85;
  padding: 0.3rem 0.6rem 0 0;
  color: var(--gold);
}

/* ---------- Studio ---------- */
.studio {
  padding: clamp(5rem, 10vw, 7rem) 0;
  background:
    linear-gradient(90deg, rgba(201,163,91,0.07), transparent 40%),
    var(--night);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.studio-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.studio-mark {
  width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 0 0 1px var(--gold-lo), 0 0 0 6px var(--night), 0 0 0 7px rgba(201,163,91,0.35), 0 30px 60px -20px #000;
}
.studio-lede {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--gold-hi);
  margin: 1.5rem 0 1rem;
}
.studio p:not(.studio-lede) { color: #cdc6b6; max-width: var(--measure); font-size: 1.1rem; }

/* ---------- Legacy games ---------- */
.games { padding: clamp(5rem, 10vw, 7rem) 0; background: var(--night-2); }
.games-intro { color: var(--steel); margin: 1.5rem 0 3rem; }

.vault {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
  gap: 2.25rem 3rem;
}
/* compact card: small cover on the left, details on the right */
.game {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  column-gap: 1.25rem;
  align-items: start;
}
.game .box { grid-row: 1 / span 4; }
.box {
  position: relative;
  aspect-ratio: 200 / 273; /* XBLIG box art proportions */
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(224,83,43,0.25), transparent 60%),
    linear-gradient(170deg, #1b2336, #0b0e16);
  border: 1px solid var(--gold-lo);
  box-shadow: 0 20px 40px -20px #000;
}
.box:has(img) { aspect-ratio: auto; }
.box-title {
  position: absolute; inset: auto 0.6rem 0.7rem 0.6rem;
  font-family: var(--display); font-weight: 700;
  font-size: 0.95rem; line-height: 1.15;
  color: var(--gold-hi);
  text-shadow: 0 2px 0 #000;
}
/* show the whole cover at its own proportions; it sits above the title plate */
.box img { position: relative; display: block; width: 100%; height: auto; }
.game h3 { font-family: var(--display); font-size: 1.1rem; margin: 0 0 0.25rem; }
.game .meta {
  font-family: var(--ui); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  font-size: 0.9rem; color: var(--gold); margin-bottom: 0.5rem;
}
.game p:not(.meta) { color: #c3bcac; font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Closer ---------- */
.closer {
  text-align: center;
  padding: clamp(5rem, 11vw, 8rem) 0;
  background:
    radial-gradient(ellipse 50% 70% at 50% 100%, rgba(224,83,43,0.4), transparent 70%),
    var(--ash);
  border-top: 1px solid rgba(224,83,43,0.5);
}
.closer-title { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1rem; text-wrap: balance; max-width: 22ch; margin-inline: auto; }
.closer p { color: #e0cfc4; font-size: 1.15rem; }
.closer .closer-sub {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--ember-hi);
  margin-bottom: 1.5rem;
}
.closer .btn { margin-top: 1rem; }

/* ---------- Footer ---------- */
.site-footer { padding: 2.25rem 0; background: #06080d; color: var(--steel); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem 2rem; }
.socials { display: flex; gap: 0.75rem; list-style: none; margin: 0; padding: 0; }
.socials a {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  color: var(--steel);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: color 120ms ease, border-color 120ms ease;
}
.socials a:hover { color: var(--gold-hi); border-color: var(--gold); }
.socials svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.footer-grid p { margin: 0; }
.footer-grid .contact { justify-self: end; }
.footer-grid .fine {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .world-grid, .studio-grid { grid-template-columns: 1fr; }
  .studio-mark { max-width: 32rem; }
}
@media (max-width: 680px) {
  .site-header { flex-wrap: wrap; gap: 0.5rem 0.75rem; }
  .site-header nav { order: 3; width: 100%; margin-right: 0; }
  .site-header ul { justify-content: space-between; gap: 0.75rem; }
  .site-header nav a { font-size: 0.92rem; white-space: nowrap; }
  .btn-small { display: none; } /* the hero's own button is right below */
  .hero { padding-top: 9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .game { grid-template-columns: 6rem 1fr; column-gap: 1rem; }
  .footer-grid .contact { justify-self: start; }
}
