/* everburngame.com (doc 38 §5). Scuro come il menu del gioco, con il rosso della scritta e il carattere del menu,
   Saira Black Italic (SIL Open Font License, fonts/OFL-Saira.txt). Il resto con i caratteri del sistema. */

@font-face {
  font-family: "Saira Black Italic";
  src: url("/fonts/saira-black-italic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0c0a0b;
  --bg-2: #141012;
  --surface: #1a1517;
  --line: #2e2528;
  --text: #f0e9e4;
  --muted: #b0a29a;
  --ember: #ff4f1f;
  --ember-2: #ff7a2e;
  --hot: #ffc27a;
  --steel: #cdc7c2;
  --radius: 10px;
  --wide: 1180px;
  --display: "Saira Black Italic", "Arial Black", Impact, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hot); text-underline-offset: 0.18em; }
a:hover { color: #fff; }

:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 50;
  background: var(--ember); color: #160805; padding: 8px 14px; border-radius: 6px; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--wide), 100% - 32px); margin-inline: auto; }

h1, h2, h3, .display {
  font-family: var(--display);
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.08;
  text-transform: uppercase;
}

h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); margin: 0 0 0.5em; }
h3 { font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem); margin: 0 0 0.45em; }

/* ------------------------------------------------------------------ testata */

.top {
  position: absolute; inset: 0 0 auto; z-index: 10;
  padding: 14px 0;
}
.top .wrap { display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: 36px; }
.brand span { font-family: var(--display); font-style: italic; font-size: 1.15rem; letter-spacing: 0.04em; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}
.top nav a:hover { color: var(--hot); }
.top nav .lang {
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 3px 12px; font-size: 0.85rem;
  background: rgba(12, 10, 11, 0.45);
}
.top--plain { position: static; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.top--plain nav a { text-shadow: none; }

@media (max-width: 640px) {
  .top nav .opt { display: none; }
  .brand span { display: none; }
}

/* ------------------------------------------------------------------ apertura */

.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: grid;
  place-items: center;
  padding: 96px 0 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(12, 10, 11, 0.15), rgba(12, 10, 11, 0.6) 70%),
    linear-gradient(to bottom, rgba(12, 10, 11, 0.7) 0%, rgba(12, 10, 11, 0.2) 22%, rgba(12, 10, 11, 0.35) 62%, var(--bg) 100%);
}
.hero-inner { text-align: center; display: grid; justify-items: center; gap: 18px; }

.wordmark {
  position: relative;
  width: min(1040px, 96vw);
  margin: 0 0 -1.5%;
}
.wordmark img { width: 100%; transition: opacity 0.4s ease; }
.wordmark canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wordmark.is-live img { opacity: 0; }

.tagline {
  font-family: var(--display); font-style: italic; text-transform: uppercase;
  font-size: clamp(1.35rem, 0.9rem + 2.2vw, 2.4rem);
  margin: 0; line-height: 1.1;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}
.lead {
  max-width: 44rem; margin: 0; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); color: #f6efe9;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.9);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.platform { margin: 0; color: var(--steel); font-size: 0.95rem; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.9); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 24px;
  border-radius: 999px; font-weight: 800; font-size: 1.02rem; text-decoration: none; letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-steam {
  background: linear-gradient(180deg, var(--ember-2), var(--ember));
  color: #1a0904;
  box-shadow: 0 0 0 1px rgba(255, 160, 100, 0.5) inset, 0 8px 30px rgba(255, 79, 31, 0.35);
}
.btn-steam:hover { color: #1a0904; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255, 190, 140, 0.7) inset, 0 10px 36px rgba(255, 79, 31, 0.5); }
.btn-soon {
  background: rgba(12, 10, 11, 0.6); color: var(--text);
  box-shadow: 0 0 0 1.5px var(--ember) inset, 0 0 26px rgba(255, 79, 31, 0.25);
}
.btn-ghost { color: var(--text); background: rgba(255, 255, 255, 0.06); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22) inset; }
.btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.btn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 10px var(--ember); }

/* ------------------------------------------------------------------ sezioni */

section { padding: clamp(56px, 8vw, 110px) 0; }
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--muted); margin: 0; font-size: 1.1rem; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ember-2); margin-bottom: 10px;
}

.features { display: grid; gap: clamp(36px, 6vw, 72px); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) .feature-img { order: 2; }
.feature-img {
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 24px 60px rgba(0, 0, 0, 0.55);
  aspect-ratio: 16 / 9;
}
.feature-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-text p { margin: 0; color: #ded4cd; font-size: 1.08rem; }
.feature-text h3::before {
  content: ""; display: block; width: 46px; height: 4px; margin-bottom: 16px; border-radius: 2px;
  background: linear-gradient(90deg, var(--ember), var(--hot));
  box-shadow: 0 0 14px rgba(255, 79, 31, 0.6);
}
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-child(even) .feature-img { order: 0; }
}

.more { margin-top: clamp(48px, 7vw, 88px); }
.more h3 { margin-bottom: 18px; }
.more--flat { margin-top: 0; }
.more ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 22px;
}
.more li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px solid var(--line); color: #e6ddd6; }
.more li::before {
  content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 9px; transform: rotate(45deg);
  background: var(--ember); box-shadow: 0 0 8px rgba(255, 79, 31, 0.8);
}

/* ------------------------------------------------------------------ mondi e galleria */

.worlds { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 18%, var(--bg-2) 82%, var(--bg) 100%); }

.gallery {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
}
.shot {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line); aspect-ratio: 16 / 9; color: var(--text); text-decoration: none;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.shot span {
  position: absolute; inset: auto 0 0; padding: 26px 14px 10px; font-weight: 700; font-size: 0.98rem;
  background: linear-gradient(to top, rgba(8, 6, 7, 0.88), rgba(8, 6, 7, 0));
}
.shot:hover img, .shot:focus-visible img { transform: scale(1.035); }
.shot:hover { color: #fff; }
.note { color: var(--muted); font-size: 0.92rem; margin: 14px 0 0; }

.biomes { margin-top: clamp(40px, 6vw, 64px); }
.biomes h3 { margin-bottom: 16px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 6px 14px; border-radius: 999px; font-size: 0.95rem; color: #e9e0da;
  background: rgba(255, 255, 255, 0.04); box-shadow: 0 0 0 1px var(--line) inset;
}

dialog.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(6, 5, 6, 0.94); color: var(--text);
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, 0.6); }
.lightbox figure {
  margin: 0; height: 100%; display: grid; grid-template-rows: 1fr auto; place-items: center; padding: 56px 16px 16px;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 130px); width: auto; height: auto; border-radius: 6px; }
.lightbox figcaption { padding: 12px 0 4px; font-weight: 700; }
.lightbox button {
  position: absolute; border: 0; cursor: pointer; color: var(--text); background: rgba(255, 255, 255, 0.08);
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; line-height: 1; display: grid; place-items: center;
}
.lightbox button:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox [data-close] { top: 12px; right: 12px; }
.lightbox [data-prev] { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox [data-next] { right: 12px; top: 50%; transform: translateY(-50%); }

/* ------------------------------------------------------------------ invito e piede */

.cta { text-align: center; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: auto 0 -40%; height: 90%; z-index: -1;
  background: radial-gradient(ellipse 50% 60% at 50% 100%, rgba(255, 79, 31, 0.28), rgba(255, 79, 31, 0));
}
.cta .wrap { display: grid; justify-items: center; gap: 14px; }
.cta p { margin: 0; color: var(--muted); max-width: 36rem; font-size: 1.1rem; }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.92rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--steel); }
footer p { margin: 0; }

/* ------------------------------------------------------------------ pagine di testo (stampa, privacy) */

.page { padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); }
.page h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.6rem); margin: 0 0 0.35em; }
.page h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 1.8em 0 0.6em; }
.page .intro { font-size: 1.15rem; color: #e3d9d2; max-width: 46rem; }
.page p, .page li { max-width: 46rem; }
.prose p { color: #e0d6cf; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0; margin: 0; max-width: 46rem; }
.facts dt, .facts dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-right: 28px; }
@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 0; }
}

.downloads { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.downloads a {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none;
  padding: 10px 16px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--line) inset;
}
.downloads a:hover { box-shadow: 0 0 0 1px var(--ember) inset; }
.downloads small { color: var(--muted); font-weight: 400; }

.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.logos figure {
  margin: 0; padding: 22px; border-radius: var(--radius); display: grid; place-items: center; min-height: 160px;
  background: repeating-conic-gradient(#1d181a 0% 25%, #151113 0% 50%) 50% / 22px 22px;
  box-shadow: 0 0 0 1px var(--line);
}
.logos img { max-height: 150px; width: auto; }

.notfound { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.notfound .wrap { display: grid; justify-items: center; gap: 12px; }

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