/* Tidy Disaster Games — studio site
   Palette fixed by brand (Gamestudio/Tidy Disaster Games/README.md):
   charcoal #1b1b1b, cream #f5e9d2, signal red #ea512b. Nothing else.
   No external resources: no webfonts, no CDN, no tracking (DSGVO). */

/* Jost (SIL OFL 1.1, see assets/fonts/OFL-Jost.txt), self-hosted, Latin subset,
   variable weight. Futura-alike for the wordmark and display text. */
@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/jost-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --charcoal: #1b1b1b;
  --charcoal-2: #242424;
  --charcoal-3: #2e2e2e;
  --cream: #f5e9d2;
  --cream-2: #efe1c6;
  --cream-dim: rgba(245, 233, 210, 0.72);
  --red: #ea512b;
  --red-dark: #c9401f;
  --ink: #1b1b1b;
  --ink-dim: rgba(27, 27, 27, 0.72);
  --max: 1180px;
  --gutter: 16px;
  --display: "Jost", "Futura", "Avenir Next", "Century Gothic", "Trebuchet MS", "Helvetica Neue", Arial, sans-serif;
  --body: "Avenir Next", "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--charcoal);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Type */
h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.1;
  margin: 0;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.05rem; letter-spacing: 0.12em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.1rem; max-width: 36rem; }
.rule { width: 64px; height: 3px; background: var(--red); border: 0; margin: 1.2rem 0 1.6rem; }
.center { text-align: center; }
.center .rule { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.9rem 1.5rem;
  border-radius: 6px;
  border: 2px solid var(--red);
  background: var(--red);
  color: var(--cream);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--red); }
.btn.ghost:hover { background: var(--red); color: var(--cream); }
.light .btn.ghost { color: var(--red); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(27, 27, 27, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(245, 233, 210, 0.08);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand img { width: 40px; height: auto; }
.brand .word { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.16em; font-size: 1.05rem; line-height: 1; }
.brand .word small { display: block; color: var(--red); letter-spacing: 0.5em; font-size: 0.42em; margin-top: 0.35em; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; text-decoration: none; color: var(--cream); opacity: 0.9; }
.nav a:hover { color: var(--red); opacity: 1; }
.nav .lang { opacity: 0.6; }
.nav .btn { padding: 0.65rem 1.1rem; }
@media (max-width: 720px) {
  .nav a:not(.btn):not(.lang) { display: none; }
}

/* Hero: the storm illustration from the Scenario mockup (brand/website-mockup-scenario.png)
   as a full-bleed background; the tornado sits in the right half, text on the left. */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--charcoal);
  background-image: url("/assets/img/hero-storm-2x.v2.jpg");
  background-image: -webkit-image-set(url("/assets/img/hero-storm-1x.v2.jpg") 1x, url("/assets/img/hero-storm-2x.v2.jpg") 2x);
  background-image: image-set(url("/assets/img/hero-storm-1x.v2.jpg") 1x, url("/assets/img/hero-storm-2x.v2.jpg") 2x);
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
}
.hero::before {
  /* keep the copy legible whatever the viewport does to the image */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--charcoal) 0%, var(--charcoal) 28%, rgba(27,27,27,0.85) 40%, rgba(27,27,27,0) 58%);
  pointer-events: none;
}
.hero .wrap {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center;
  gap: 2rem; min-height: clamp(360px, 27vw, 440px); padding-top: 2.5rem; padding-bottom: 2.5rem;
}
.hero h1 .twist { color: var(--red); display: block; }
.hero .lead { text-shadow: 0 1px 2px rgba(0,0,0,0.6); }
@media (max-width: 1100px) {
  /* banner above the copy: show the tornado at a sane size, fade into charcoal */
  .hero { background-size: auto 300px; background-position: 48% 0; }
  .hero::before { background: linear-gradient(180deg, rgba(27,27,27,0) 0%, rgba(27,27,27,0) 170px, rgba(27,27,27,0.85) 270px, var(--charcoal) 300px); }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; min-height: 0; padding-top: 250px; padding-bottom: 2.5rem; }
  .hero .rule { margin-left: auto; margin-right: auto; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .nav { gap: 1rem; }
  .nav .btn { white-space: nowrap; font-size: 0.72rem; padding: 0.6rem 0.9rem; }
}

/* Sections */
section { padding: 4.5rem 0; }
.light { background: var(--cream); color: var(--ink); }
.light h2, .light h3 { color: var(--ink); }
.light p { color: var(--ink); }
.light .muted { color: var(--ink-dim); }
.muted { color: var(--cream-dim); }

/* Games */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; margin-top: 2.5rem; }
@media (max-width: 760px) { .games { grid-template-columns: 1fr; } }
.card {
  background: var(--charcoal); color: var(--cream);
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(27,27,27,0.3);
  box-shadow: 0 14px 32px rgba(27,27,27,0.18);
  display: flex; flex-direction: column;
}
.card .cover { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover .logo {
  position: absolute; left: 1rem; bottom: 1rem; width: 44%; height: auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}
.card .cover .tag {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem;
  background: var(--red); color: var(--cream); padding: 0.35rem 0.6rem; border-radius: 4px;
}
.card .body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.card h3 { font-size: 1.2rem; }
.card .genre { color: var(--red); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; font-family: var(--display); }
.card p { color: var(--cream-dim); margin: 0; }
.card .facts { list-style: none; padding: 0; margin: 0.4rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.9rem; color: var(--cream-dim); }
.card .facts li::before { content: "•"; color: var(--red); margin-right: 0.45rem; }
.card .actions { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.card .actions .btn { font-size: 0.75rem; padding: 0.7rem 1.1rem; }

/* About / contact split */
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.panel { background: var(--charcoal-2); border: 1px solid rgba(245,233,210,0.08); border-radius: 10px; padding: 1.6rem; }
.panel h3 { margin-bottom: 1rem; }
.panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.2rem; }
.panel dt { color: var(--cream-dim); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; font-family: var(--display); padding-top: 0.2rem; }
.panel dd { margin: 0; }
.panel a { color: var(--cream); text-decoration-color: var(--red); }
.panel a:hover { color: var(--red); }

/* Footer */
.site-footer { border-top: 1px solid rgba(245,233,210,0.08); padding: 2rem 0; font-size: 0.85rem; color: var(--cream-dim); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer a { text-decoration: none; color: var(--cream-dim); }
.site-footer a:hover { color: var(--red); }
.site-footer nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* Legal pages */
.legal { max-width: 46rem; }
.legal h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.5rem; }
.legal h2 { font-size: 1.1rem; letter-spacing: 0.12em; margin: 2.2rem 0 0.8rem; color: var(--red); }
.legal p, .legal li { color: var(--cream-dim); }
.legal address { font-style: normal; color: var(--cream); line-height: 1.7; }
.legal a { text-decoration-color: var(--red); }
.legal a:hover { color: var(--red); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
