/* ============================================================
   VAL FORTUNA — site vitrine
   ============================================================ */

:root {
  --felt:        #0b2a22;
  --felt-deep:   #061713;
  --ink:         #05100d;
  --gold:        #e8c46a;
  --gold-soft:   #f7e2a8;
  --crimson:     #a8232f;
  --purple:      #4a2d6b;
  --cream:       #f2ece0;
  --muted:       rgba(242, 236, 224, .62);
  --line:        rgba(232, 196, 106, .22);

  --font-display: "Cinzel", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1080px;
}

* { box-sizing: border-box; }

/* Sinon le display des composants (.btn en inline-flex...) l'emporte sur l'attribut hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--cream);
  background-color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* Fond en trois couches fixes, sous le contenu (z-index 1).
   Le flou progressif demande deux copies de la texture a masques complementaires :
   filter: blur() est uniforme, il ne sait pas s'attenuer vers un bord. */

/* 1. texture nette, revelee au centre */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("../img/pattern.png");
  background-size: 300px 300px;
  opacity: .42;
  -webkit-mask-image: radial-gradient(100% 85% at 50% 42%, #000 16%, transparent 76%);
          mask-image: radial-gradient(100% 85% at 50% 42%, #000 16%, transparent 76%);
}

/* 2. meme texture floutee, revelee en peripherie.
   inset negatif : sans ce debord le flou echantillonnerait le vide et
   eclaircirait les bords. background-position compense le decalage pour que
   les deux copies restent alignees au pixel. */
body::before {
  content: "";
  position: fixed;
  inset: -60px;
  pointer-events: none;
  z-index: 0;
  background-image: url("../img/pattern.png");
  background-size: 300px 300px;
  background-position: 60px 60px;
  opacity: .42;
  filter: blur(5px);
  -webkit-mask-image: radial-gradient(100% 85% at 50% 42%, transparent 16%, #000 76%);
          mask-image: radial-gradient(100% 85% at 50% 42%, transparent 16%, #000 76%);
}

/* teintes et vignettage, par-dessus la texture */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(74, 45, 107, .32), transparent 62%),
    radial-gradient(90% 55% at 50% 0%, rgba(11, 42, 34, .55), transparent 72%),
    radial-gradient(115% 95% at 50% 45%, transparent 32%, rgba(3, 10, 8, .8) 100%);
}

main, .topbar, .footer { position: relative; z-index: 1; }

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

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .02em;
  margin: 0;
}

a { color: var(--gold-soft); }

section { padding: 0 24px; }

/* ---------- topbar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  max-width: var(--wrap);
  margin: 0 auto;
}

.topbar__brand {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

a.topbar__brand { text-decoration: none; transition: color .18s; }
a.topbar__brand:hover { color: var(--gold-soft); }

.lang { display: flex; gap: 2px; }

.lang__btn {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: color .18s, background-color .18s, border-color .18s;
}
.lang__btn:first-child { border-radius: 999px 0 0 999px; }
.lang__btn:last-child  { border-radius: 0 999px 999px 0; border-left: none; }
.lang__btn:hover { color: var(--gold-soft); }
.lang__btn[aria-pressed="true"] {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

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

.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: 8px;
  text-align: center;
}

.hero__logo { margin: 0 auto; max-width: 620px; }
.hero__logo img {
  width: 100%;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, .65));
}

.hero__tagline {
  max-width: 620px;
  margin: 18px auto 34px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
}

/* ---------- trailer ---------- */

.trailer {
  max-width: 900px;
  margin: 0 auto;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  background: var(--felt-deep);
}

.trailer__facade,
.trailer iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.trailer__facade {
  position: relative;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(140deg, var(--felt) 0%, var(--felt-deep) 70%);
  overflow: hidden;
}

.trailer__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
  transition: opacity .3s, transform .5s;
}
.trailer__facade:hover .trailer__thumb { opacity: 1; transform: scale(1.02); }

.trailer__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 84px; height: 84px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(232, 196, 106, .18), 0 12px 30px rgba(0, 0, 0, .5);
  transition: transform .2s, box-shadow .2s;
}
.trailer__play::after {
  content: "";
  position: absolute;
  top: 50%; left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 15px 0 15px 25px;
  border-color: transparent transparent transparent var(--ink);
}
.trailer__facade:hover .trailer__play {
  transform: translate(-50%, -50%) scale(1.07);
  box-shadow: 0 0 0 12px rgba(232, 196, 106, .22), 0 12px 30px rgba(0, 0, 0, .5);
}

/* ---------- liens ---------- */

.links {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 44px;
  padding-bottom: 64px;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: transform .18s, border-color .18s, background-color .18s, color .18s;
}
.btn:hover { transform: translateY(-2px); }

.btn__icon { width: 22px; height: 22px; flex: 0 0 auto; }

.btn--steam,
.btn--primary {
  padding: 16px 34px;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  text-align: left;
  box-shadow: 0 10px 28px rgba(232, 196, 106, .18);
}
.btn--steam strong,
.btn--primary strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .06em;
  text-transform: uppercase;
  line-height: 1.3;
}
.btn--steam small,
.btn--primary small {
  display: block;
  font-size: 12.5px;
  opacity: .7;
  line-height: 1.3;
}
.btn--steam:hover,
.btn--primary:hover { box-shadow: 0 14px 34px rgba(232, 196, 106, .28); }

.social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn--ghost {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.btn--ghost:hover {
  color: var(--gold-soft);
  border-color: rgba(232, 196, 106, .55);
  background: rgba(232, 196, 106, .06);
}

/* ---------- a propos ---------- */

.about {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 56px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 46px;
  align-items: center;
  border-top: 1px solid var(--line);
}

.about__art {
  width: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, .6));
}

.about__text h2 {
  font-size: clamp(24px, 3.4vw, 32px);
  color: var(--gold);
  margin-bottom: 14px;
}

.about__text p { margin: 0 0 14px; color: rgba(242, 236, 224, .82); }

.facts {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}
.facts li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
}
.facts li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(232, 196, 106, .25);
}

/* ---------- screenshots ---------- */

.shots {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 56px;
  padding-bottom: 72px;
  border-top: 1px solid var(--line);
}

.shots h2,
.press-section > h2 {
  font-size: 15px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  margin-bottom: 28px;
}

.shots__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.shot {
  padding: 0;
  border: 1px solid var(--line);
  background: var(--felt-deep);
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  transition: border-color .2s, transform .2s;
}
.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s, opacity .2s;
  opacity: .88;
}
.shot:hover { border-color: rgba(232, 196, 106, .6); transform: translateY(-2px); }
.shot:hover img { transform: scale(1.05); opacity: 1; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 6vw;
  background: rgba(4, 12, 10, .95);
  backdrop-filter: blur(6px);
}
.lightbox[hidden] { display: none; }

.lightbox__img {
  max-width: 100%;
  max-height: 92vh;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  font-family: var(--font-body);
  color: var(--cream);
  background: rgba(4, 12, 10, .55);
  border: 1px solid var(--line);
  cursor: pointer;
  line-height: 1;
  transition: color .18s, border-color .18s, background-color .18s;
}
.lightbox__close:hover,
.lightbox__nav:hover {
  color: var(--gold);
  border-color: rgba(232, 196, 106, .6);
  background: rgba(11, 42, 34, .8);
}

.lightbox__close {
  top: 18px; right: 20px;
  width: 44px; height: 44px;
  font-size: 26px;
  border-radius: 50%;
}

.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 64px;
  font-size: 34px;
  border-radius: 4px;
}
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }

.lightbox__count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted);
}

/* ---------- press kit ---------- */

.press-hero { padding-bottom: 48px; }
.press-hero .hero__logo { max-width: 440px; }
.press-hero .hero__tagline { margin-bottom: 0; }

.press-hero__kicker {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
}

.press-section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-top: 52px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
}

.press-panel {
  border: 1px solid var(--line);
  background: rgba(6, 23, 19, .55);
}

.press-facts {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  align-items: start;
}

.factsheet { margin: 0; padding: 22px 24px; }
.factsheet dt {
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.factsheet dt:first-child { margin-top: 0; }
.factsheet dd { margin: 2px 0 0; font-size: 14.5px; line-height: 1.5; }

.press-text p { margin: 0 0 14px; color: rgba(242, 236, 224, .82); }
.press-text .press-text__lead {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 23px);
  line-height: 1.4;
  color: var(--gold);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.feature { padding: 24px 26px; }
.feature h3 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: var(--gold);
}
.feature p { margin: 0 0 10px; font-size: 14.5px; color: rgba(242, 236, 224, .82); }
.feature ul { margin: 0 0 10px; padding-left: 18px; font-size: 14px; color: var(--muted); }
.feature li { margin: 5px 0; }
.feature li::marker { color: var(--gold); }
.feature strong { font-weight: 600; color: var(--cream); }

.press-note {
  margin: 18px 0 0;
  font-size: 13px;
  text-align: center;
  color: var(--muted);
}

.downloads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.download {
  display: flex;
  flex-direction: column;
  color: var(--cream);
  text-decoration: none;
  transition: border-color .2s, transform .2s;
}
.download:hover { border-color: rgba(232, 196, 106, .6); transform: translateY(-2px); }

.download__img {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 16px;
  overflow: hidden;
  background: var(--felt-deep);
}
.download__img img { max-height: 100%; width: auto; object-fit: contain; }
.download__img--cover { padding: 0; }
.download__img--cover img { width: 100%; height: 100%; object-fit: cover; }
.download__img--pixel img { image-rendering: pixelated; }

.download__label { padding: 12px 14px; font-size: 14px; }
.download__label small { display: block; font-size: 12px; color: var(--muted); }

.press-zip { margin-top: 30px; text-align: center; }

/* ---------- footer ---------- */

.footer {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 30px 24px 46px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer__logo { height: 30px; width: auto; opacity: .7; }

.footer__legal {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

/* ---------- focus ---------- */

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .about {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
    text-align: center;
  }
  .about__art { max-width: 140px; }
  .facts { justify-content: center; }
  .press-facts, .features { grid-template-columns: 1fr; gap: 24px; }
  .downloads { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  section { padding-left: 18px; padding-right: 18px; }
  .shots__grid, .downloads { grid-template-columns: 1fr; }
  .btn--steam, .btn--primary { width: 100%; justify-content: center; text-align: center; }
  .trailer__play { width: 64px; height: 64px; }
  .trailer__play::after { border-width: 12px 0 12px 20px; }
  .lightbox__nav { width: 40px; height: 52px; font-size: 26px; }
  .footer { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
