/* La pagina di presentazione di Extraction.
   Identita' "BODYCAM": la pagina e' la ripresa della telecamera sul casco di un operatore durante un
   raid. Riprende l'HUD del gioco (REC, CAM-01, il conto alla rovescia, gli arti) invece di
   inventare un linguaggio nuovo. Fondo nero, testo color osso, un solo accento: il rosso del REC.
   L'unica parte chiara e' il "contenitore sicuro" (l'account), che resta color carta: e' l'ultimo
   resto del vecchio fascicolo, e quello che sopravvive alla morte.
   Le caratteristiche sono oggetti di un deposito a griglia, come nel gioco.
   La versione precedente ("fascicolo di campo") e' copiata in server/landing_fascicolo.
   I caratteri sono quelli del gioco, serviti da dist/assets/fonts. */

@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('/assets/fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/assets/fonts/BarlowCondensed-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/assets/fonts/BarlowCondensed-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/assets/fonts/IBMPlexMono-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }

:root {
  --nero: #0b0b0c;
  --nero-2: #101012;
  --pannello: #141416;
  --filo: #24242a;
  --filo-forte: #3d3c38;
  --osso: #e8e0cc;
  --osso-chiaro: #f2ece0;
  --osso-2: #d9d1bd;
  --grigio: #b8b09c;
  --spento: #8a8576;
  /* l'accento: il rosso del REC. Un'unica variabile per tutta la pagina. */
  --rec: #e2412b;
  --rec-pieno: #b8301b;
  --carta: #e8e0cc;
  --inch: #1b1813;
  --largo: 1280px;
  --gronda: clamp(16px, 4vw, 48px);
  --mono: 'Plex Mono', ui-monospace, monospace;
  --cond: 'Barlow Condensed', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; background: var(--nero); }
body {
  background: var(--nero); color: var(--osso);
  font-family: 'Barlow', system-ui, sans-serif; font-weight: 500; font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, .marchio { font-family: var(--cond); text-transform: uppercase; }
::selection { background: var(--rec); color: var(--osso-chiaro); }
:focus-visible { outline: 2px solid var(--rec); outline-offset: 3px; }

.largo-max { max-width: var(--largo); margin: 0 auto; padding: 0 var(--gronda); }
.occhiello { font-family: var(--mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--rec); }
.scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px); }
.rec { animation: lampeggia 1.1s steps(1) infinite; }
@keyframes lampeggia { 50% { opacity: 0.12; } }

/* --- pulsanti --- */
.gioca {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rec-pieno); color: var(--osso-chiaro);
  font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 4px;
  transition: background 0.15s ease;
}
.gioca:hover { background: #cf3a22; color: #fff; }
.gioca.piccolo { height: 44px; padding: 0 22px; font-size: 16px; }
.gioca.grande { min-height: 64px; padding: 12px 44px; font-size: 22px; line-height: 1.15; text-align: center; }
.secondario {
  display: inline-flex; align-items: center; justify-content: center; height: 64px; padding: 0 26px;
  border: 1px solid #57544c; color: var(--osso);
  font-family: var(--mono); font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  transition: border-color 0.15s ease;
}
.secondario:hover { border-color: var(--osso); color: #fff; }
.azioni { display: flex; flex-wrap: wrap; gap: 14px; }

/* =========================== apertura =========================== */
.eroe { position: relative; min-height: max(760px, 100svh); display: flex; flex-direction: column; overflow: hidden; }
.eroe-fondo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) contrast(1.05); }
.eroe-velo {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 12, 0.92) 0%, rgba(11, 11, 12, 0.7) 38%, rgba(11, 11, 12, 0.1) 75%),
    linear-gradient(0deg, rgba(11, 11, 12, 1) 0%, rgba(11, 11, 12, 0) 30%);
}
.eroe > *:not(.eroe-fondo):not(.eroe-velo):not(.scan) { position: relative; }

.testata {
  display: flex; align-items: center; gap: 32px; height: 72px; padding: 0 var(--gronda);
  border-bottom: 1px solid rgba(232, 224, 204, 0.14);
}
.marchio { font-weight: 700; font-size: 22px; letter-spacing: 7px; color: var(--osso); }
.voci { display: flex; gap: 28px; margin-right: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.voci a { color: var(--grigio); white-space: nowrap; transition: color 0.15s ease; }
.voci a b { font-weight: 500; }
.voci a span { color: var(--rec); }
.voci a:hover { color: #fff; }
.lingue { display: flex; border: 1px solid #57544c; margin-left: auto; }
.voci + .lingue { margin-left: 0; }
.lingue button { width: 40px; height: 42px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--grigio); }
.lingue button[aria-pressed="true"] { background: var(--osso); color: var(--nero); }

.hud-alto { display: flex; justify-content: space-between; align-items: flex-start; padding: 22px var(--gronda) 0; }
.hud-genere { width: 320px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--grigio); }
.hud-tempo { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tempo { font-family: var(--mono); font-size: 30px; letter-spacing: 2px; color: var(--osso-chiaro); font-variant-numeric: tabular-nums; }
.tempo-nome { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--spento); }
.hud-estr { width: 320px; text-align: right; font-family: var(--cond); font-weight: 600; font-size: 15px; letter-spacing: 1px; text-transform: uppercase; color: var(--grigio); }
.hud-estr b { color: var(--osso-chiaro); font-weight: 600; }

.eroe-testo { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px var(--gronda); }
.eroe h1 { font-weight: 700; font-size: clamp(64px, 11.5vw, 176px); line-height: 0.84; letter-spacing: -1px; color: var(--osso-chiaro); }
.eroe h1 span { display: block; }
.eroe h1 .rosso { color: var(--rec); }
.frase { margin-top: 28px; max-width: 520px; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; color: var(--osso-2); }
.eroe .azioni { margin-top: 32px; }
.nota { margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--spento); }

.hud-basso { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 0 var(--gronda) 26px; }
.arti { list-style: none; display: flex; flex-direction: column; gap: 3px; width: 180px; margin-bottom: 14px; }
.arti li {
  display: flex; justify-content: space-between; padding-bottom: 1px;
  border-bottom: 1px solid rgba(232, 224, 204, 0.55);
  font-family: var(--cond); font-weight: 600; font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
}
.rec-riga { display: flex; flex-wrap: wrap; gap: 22px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; text-transform: uppercase; color: var(--rec); font-variant-numeric: tabular-nums; }
.arma { font-family: var(--cond); font-weight: 600; font-size: 16px; letter-spacing: 2px; }

/* =========================== blocchi =========================== */
.blocco { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--filo); }
.scuro-2 { background: var(--nero-2); border-bottom: 1px solid var(--filo); }
.intesta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.blocco h2 { margin-top: 6px; font-weight: 700; font-size: clamp(48px, 7vw, 96px); line-height: 0.9; color: var(--osso-chiaro); }
.intro { max-width: 380px; color: var(--grigio); }

/* --- 01 il ciclo: la linea del tempo del raid --- */
.linea { position: relative; height: 40px; margin-top: 16px; }
.linea i { position: absolute; display: block; }
.linea::before { content: ''; position: absolute; left: 0; right: 0; top: 19px; height: 2px; background: #2f2e2b; }
.linea .pieno { left: 33.33%; right: 0; top: 18px; height: 4px; background: var(--rec); }
.linea .t0 { left: 0; top: 12px; width: 16px; height: 16px; border: 2px solid var(--spento); background: var(--nero); z-index: 1; }
.linea .t1 { left: 33.33%; top: 10px; width: 20px; height: 20px; margin-left: -10px; background: var(--rec); z-index: 1; }
.linea .t2 { right: 0; top: 10px; width: 20px; height: 20px; border: 2px solid var(--rec); background: var(--nero); z-index: 1; }
.passi { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; border-left: 1px solid var(--filo); }
.passi li { padding: 20px 28px 8px 24px; border-right: 1px solid var(--filo); }
.fase { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--spento); }
.passi .caldo .fase { color: var(--rec); }
.num { display: block; margin-top: 14px; font-family: var(--cond); font-weight: 700; font-size: 120px; line-height: 0.8; color: transparent; -webkit-text-stroke: 1px #57544c; }
.passi .caldo .num { -webkit-text-stroke-color: var(--rec); }
.passi h3 { margin: 18px 0 8px; font-weight: 700; font-size: 32px; letter-spacing: 1px; color: var(--osso-chiaro); }
.passi p { color: var(--grigio); }

/* --- 02 mappe --- */
.mappe { display: flex; flex-direction: column; gap: 24px; }
.mappa { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); border: 1px solid var(--filo-forte); background: var(--nero); }
.mappa.inversa { grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); }
.mappa.inversa .mappa-vista { order: 2; }
.mappa-vista { position: relative; min-width: 0; }
.mappa-vista .m3d { border-radius: 0; height: 100%; }
.mappa-testo {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 28px;
  background-image: linear-gradient(rgba(232, 224, 204, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 224, 204, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
}
.mappa .etichetta { position: absolute; top: 24px; left: 28px; font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--rec); }
.mappa h3 { font-weight: 700; font-size: clamp(44px, 5vw, 72px); line-height: 0.9; color: var(--osso-chiaro); }
.mappa p { color: var(--osso-2); }
.scala { display: flex; align-items: center; gap: 10px; white-space: nowrap; margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--grigio); }
.scala .barra { display: flex; width: 160px; height: 8px; border: 1px solid var(--osso); }
.scala .barra i { flex: 1; }
.scala .barra i:nth-child(odd) { background: var(--osso); }

/* --- 03 il deposito --- */
.esamina { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.dep-testa { display: flex; justify-content: space-between; padding-bottom: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--spento); }
.dep {
  --riga: 92px;
  display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); grid-auto-rows: var(--riga); grid-auto-flow: dense;
  background-color: #0f0f11;
  background-image: linear-gradient(var(--filo) 1px, transparent 1px), linear-gradient(90deg, var(--filo) 1px, transparent 1px);
  background-size: 10% var(--riga);
  border-right: 1px solid var(--filo); border-bottom: 1px solid var(--filo);
}
.cella {
  grid-column: span var(--w); grid-row: span var(--h);
  position: relative; overflow: hidden; text-align: left;
  border: 1px solid var(--filo-forte); background: #17171a; color: var(--osso);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cella:hover { background: #202024; border-color: var(--spento); }
.cella[aria-pressed="true"] { border-color: var(--rec); box-shadow: inset 0 0 0 1px var(--rec); background: #22140f; }
.cella img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.8; }
.cella h3 {
  position: absolute; left: 8px; top: 5px; right: 8px;
  font-weight: 600; font-size: 14px; line-height: 1.15; letter-spacing: 0.5px; color: var(--osso-chiaro);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.cella p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cella::after {
  content: attr(data-taglia); position: absolute; right: 7px; bottom: 4px;
  font-family: var(--mono); font-size: 10px; color: var(--grigio); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}
.ispeziona { border: 1px solid var(--filo-forte); background: #121214; padding: 22px; }
.isp-testa { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--spento); }
.isp-taglia { color: var(--rec); }
.isp-foto[hidden] { display: none; }
.isp-foto { margin-top: 16px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--filo-forte); }
.isp-nome { margin: 16px 0 8px; font-weight: 700; font-size: 34px; line-height: 1; color: var(--osso-chiaro); }
.isp-testo { color: var(--osso-2); }
.isp-aiuto { margin-top: 22px; padding-top: 14px; border-top: 1px solid #2f2e2b; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--spento); }

/* --- il contenitore sicuro: l'unica cosa chiara della pagina --- */
.online { background: var(--carta); color: var(--inch); border-top: 0; }
.online-griglia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.online .occhiello { color: #a23829; }
.online h2 { color: #14110c; font-size: clamp(44px, 6vw, 84px); margin-bottom: 24px; }
.punti { list-style: none; border-top: 1px solid #ab9f82; margin-bottom: 28px; }
.punti li { display: flex; gap: 18px; padding: 14px 0; border-bottom: 1px solid #c6bca1; }
.punti span { font-family: var(--mono); font-size: 13px; color: #a23829; padding-top: 3px; }
.stampa { border: 10px solid #14110c; background: #14110c; position: relative; }
.stampa figcaption { position: absolute; left: -10px; bottom: -36px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: #514a3c; }

/* --- 04 riprese --- */
.schermo { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--filo-forte); background: #000; cursor: zoom-in; }
.schermo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.schermo-rec, .schermo-n { position: absolute; top: 16px; font-family: var(--mono); font-size: 13px; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.schermo-rec { left: 20px; color: var(--rec); }
.schermo-n { right: 20px; color: var(--osso-chiaro); }
.schermo-titolo {
  position: absolute; left: 20px; bottom: 16px; text-align: left;
  font-family: var(--cond); font-weight: 700; font-size: clamp(22px, 2.6vw, 34px); text-transform: uppercase;
  color: var(--osso-chiaro); text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.galleria { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.foto { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--filo-forte); background: #000; opacity: 0.7; transition: opacity 0.15s ease; }
.foto:hover { opacity: 1; border-color: var(--osso); }
.foto[aria-pressed="true"] { opacity: 1; border-color: var(--rec); box-shadow: inset 0 0 0 1px var(--rec); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto span { position: absolute; left: 6px; top: 4px; font-family: var(--mono); font-size: 10px; color: var(--osso-chiaro); text-shadow: 0 1px 2px #000; }

/* --- chiusura: tieni premuto per estrarre --- */
.chiusura { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--filo); }
.chiusura h2 { margin: 24px 0 32px; font-weight: 700; font-size: clamp(56px, 10vw, 150px); line-height: 0.85; color: var(--osso-chiaro); }
.tieni {
  position: relative; overflow: hidden; width: 100%; max-width: 560px; height: 96px; padding: 0 28px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; text-align: left;
  border: 1px solid var(--rec); background: #160d0b; color: var(--osso);
  user-select: none; -webkit-user-select: none; touch-action: none;
}
.tieni[hidden] { display: none; }
.tieni-pieno { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--rec-pieno); }
.tieni-titolo { position: relative; font-family: var(--cond); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: 3px; text-transform: uppercase; }
.tieni-sotto { position: relative; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--grigio); }
.tieni.premuto .tieni-sotto { color: var(--osso-chiaro); }
.estratto-titolo { font-family: var(--cond); font-weight: 700; font-size: 36px; letter-spacing: 3px; text-transform: uppercase; color: #8fbf7a; margin-bottom: 16px; }
.riprova { background: transparent; }

/* --- piede --- */
.piede {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  padding: 28px var(--gronda); border-top: 1px solid var(--filo);
  font-family: var(--mono); font-size: 12px; color: var(--spento);
}
.piede .marchio { font-size: 18px; letter-spacing: 6px; color: var(--osso); }

/* --- lente sulla galleria --- */
.lente { position: fixed; inset: 0; z-index: 50; background: rgba(5, 5, 6, 0.94); display: flex; align-items: center; justify-content: center; padding: 4vw; }
.lente[hidden] { display: none; }
.lente img { max-width: 100%; max-height: 100%; border: 1px solid var(--filo-forte); cursor: pointer; }
.lente .chiudi { position: absolute; top: 14px; right: 20px; font-size: 40px; line-height: 1; color: var(--osso); }

/* =========================== schermi stretti =========================== */
@media (max-width: 1060px) { .voci { display: none; } .lingue { margin-left: auto; } }
@media (max-width: 860px) {
  .voci, .hud-genere, .hud-estr, .arti, .arma, .rec-riga .largo { display: none; }
  .hud-alto { justify-content: center; }
  .testata { gap: 12px; }
  .passi { grid-template-columns: 1fr; }
  .mappa, .mappa.inversa { grid-template-columns: 1fr; }
  .mappa.inversa .mappa-vista { order: 0; }
  .mappa-testo { padding-top: 56px; }
  .dep { --riga: 80px; grid-template-columns: repeat(4, minmax(0, 1fr)); background-size: 25% var(--riga); }
  .cella { grid-column: span var(--wm); grid-row: span var(--hm); }
  .esamina { grid-template-columns: 1fr; }
  .online-griglia { grid-template-columns: 1fr; }
  .stampa { margin-bottom: 36px; }
  .galleria { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .marchio { font-size: 18px; letter-spacing: 4px; }
  .gioca.piccolo { padding: 0 14px; letter-spacing: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rec { animation: none; }
}
