/* TheBiondos Games — stesso stile «sci-fi tech» del portfolio (token, caratteri, sfondo Tech Horizon).
   Sorgente: eaportfoliocv/giochi/ → copiato in giochi-sito/assets/ da strumenti/crea-giochi.cjs (non modificare il prodotto). */
@font-face { font-family: 'Inter'; src: url('fonts/inter-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Bangers'; src: url('fonts/bangers-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Orbitron'; src: url('fonts/orbitron-latin-900-normal.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'IM Fell English SC'; src: url('fonts/IMFellEnglishSC-400-latin.woff2') format('woff2'); font-display: swap; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video, canvas { -webkit-user-drag: none; -webkit-touch-callout: none; user-select: none; }
:root {
  --bg: #010810; --panel: rgba(4, 20, 44, .74); --panel-2: rgba(6, 28, 60, .9);
  --line: rgba(60, 150, 255, .18); --line-h: rgba(90, 190, 255, .45);
  --text: #e2efff; --text-m: #a9c4de; --text-d: #6f90ae;
  --cyan: #22d3ee; --blue: #3b82f6; --violet: #a78bfa;
  --grad: linear-gradient(100deg, #22d3ee 0%, #60a5fa 35%, #a78bfa 65%, #22d3ee 100%);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --disp: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --gx: clamp(16px, 5vw, 72px); --maxw: 1240px; --r: 14px;
  color-scheme: dark;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
#bg-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
.wrap { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gx); }
.grad { background: var(--grad); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: scorre 8s linear infinite; }
@keyframes scorre { to { background-position: 200% center } }

/* barra in alto */
.nav { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); background: rgba(1, 8, 16, .66); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 14px; height: 62px; }
.marchio { font-family: var(--disp); font-weight: 700; font-size: 19px; letter-spacing: -.01em; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.marchio svg { width: 26px; height: 26px; }
.nav .sp { flex: 1 }
.lingue { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; font-family: var(--mono); font-size: 13px; }
.lingue a { padding: 5px 10px; text-decoration: none; color: var(--text-d); }
.lingue a[aria-current] { background: rgba(34, 211, 238, .14); color: var(--cyan); }
.nav .port { font-size: 14px; color: var(--text-m); text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 5px 12px; }
.nav .port:hover { border-color: var(--line-h); color: var(--text); }

/* apertura */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(28px, 5vw, 56px); text-align: center; }
.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); }
.hero h1 { font-family: var(--disp); font-weight: 700; font-size: clamp(36px, 6.4vw, 76px); line-height: 1.04; letter-spacing: -.025em; margin: 14px auto 18px; max-width: 15ch; }
.hero p { color: var(--text-m); font-size: clamp(16px, 1.6vw, 19px); max-width: 60ch; margin: 0 auto; }

/* griglia dei giochi: 3 / 2 / 1 colonne, l'ultima riga centrata */
.giochi { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 2.2vw, 26px); padding-bottom: 80px; }
.gioco { position: relative; flex: 1 1 340px; max-width: 392px; min-height: 470px; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .45); transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .3s, box-shadow .35s;
  animation: entra .8s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i) * 110ms); }
@keyframes entra { from { opacity: 0; transform: translateY(26px) } }
.gioco:hover, .gioco:focus-within { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 18px 60px rgba(0, 0, 0, .55), 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent), 0 0 46px color-mix(in srgb, var(--c) 22%, transparent); }
.gioco .fondo { position: absolute; inset: 0; z-index: -2; }
.gioco .fondo img, .gioco .fondo video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease, opacity .5s, filter .5s;
  filter: brightness(.62) saturate(1.1); }   /* fondo smorzato: il logo e il testo restano in primo piano */
.gioco:hover .fondo img, .gioco.anim .fondo video { filter: brightness(.78) saturate(1.15); }
.gioco:hover .fondo img { transform: scale(1.06); }
.gioco .fondo video { position: absolute; inset: 0; opacity: 0; }
.gioco.anim .fondo video { opacity: 1; }
.gioco::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(1, 8, 16, .2) 0%, rgba(1, 8, 16, .3) 30%, rgba(1, 8, 16, .9) 55%, rgba(1, 8, 16, .98) 70%, #010810 100%); }
.gioco::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); opacity: .85; }
.logo { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 20px 8px; gap: 6px; }
.logo img { max-width: 86%; max-height: 170px; width: auto; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .6)); transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.gioco:hover .logo img { transform: scale(1.05); }
.logo img.emblema { max-height: 120px; }
/* emblema = icona dell'app (NOVA REGNUM, dipinta a tutta pagina dal 2026-10-22): angoli come le icone sul telefono */
.logo img.emblema, .logo-p .emblema { border-radius: 22%; }
.logo .scritta { font-size: clamp(28px, 3vw, 36px); line-height: 1; text-align: center; text-shadow: 0 3px 14px rgba(0, 0, 0, .7); }
.scritta.f-bangers { font-family: 'Bangers', var(--disp); letter-spacing: .04em; color: #ffcf3f; -webkit-text-stroke: 1px #2a1240; }
.scritta.f-orbitron { font-family: 'Orbitron', var(--disp); font-weight: 900; letter-spacing: .06em; background: linear-gradient(90deg, #22d3ee, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.corpo { padding: 0 20px 20px; }
.corpo p { color: var(--text-m); font-size: 14.5px; line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { font-family: var(--mono); font-size: 11.5px; letter-spacing: .02em; color: var(--text-m); border: 1px solid var(--line); background: rgba(2, 15, 31, .7); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.chip.lingua { color: color-mix(in srgb, var(--c) 80%, white); border-color: color-mix(in srgb, var(--c) 40%, transparent); }

/* i 3 pulsanti */
.azioni { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.azioni.due { grid-template-columns: 1fr 1fr; }
.btn { font: 600 14px/1 var(--sans); display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 12px; border-radius: 10px;
  text-decoration: none; cursor: pointer; border: 1px solid var(--line-h); background: rgba(6, 28, 60, .7); color: var(--text); transition: background .2s, border-color .2s, transform .15s; white-space: nowrap; }
.btn:hover { border-color: var(--cyan); background: rgba(34, 211, 238, .1); }
.btn:active { transform: scale(.97); }
.btn.gioca { background: linear-gradient(100deg, var(--c), color-mix(in srgb, var(--c) 55%, #3b82f6)); border-color: transparent; color: #021018; }
.btn.gioca:hover { filter: brightness(1.1); }
.btn svg { width: 15px; height: 15px; flex: none; }

/* scheda Info */
.scheda { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: clamp(0px, 3vw, 32px); background: rgba(0, 4, 10, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.scheda.aperta { display: flex; animation: appare .25s ease both; }
@keyframes appare { from { opacity: 0 } }
.pannello { position: relative; width: min(1180px, 100%); max-height: 100%; overflow: auto; background: var(--panel-2); border: 1px solid var(--line-h); border-radius: var(--r);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .6), 0 0 60px color-mix(in srgb, var(--c) 18%, transparent); display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.pannello::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.visore { background: #00060d; display: flex; flex-direction: column; min-width: 0; }
.schermo { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 320px; max-height: 72vh; }
.schermo video, .schermo img { width: 100%; height: 100%; max-height: 72vh; object-fit: contain; display: block; }
.miniature { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: thin; }
.miniature button { flex: none; width: 92px; height: 58px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: #02101f; cursor: pointer; position: relative; padding: 0; }
.miniature button img { width: 100%; height: 100%; object-fit: cover; }
.miniature button[aria-current] { border-color: var(--c); }
.miniature button.vid::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 16px; text-shadow: 0 1px 6px #000; }
.info { padding: clamp(20px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.info .logo-p img { max-height: 92px; max-width: 70%; width: auto; }
.info .logo-p .scritta { font-size: 30px; }
/* il nome c'è già nel logo: il titolo resta per i lettori di schermo, nascosto alla vista */
.info h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.info p { color: var(--text-m); }
.info .azioni { margin-top: auto; }
.chiudi { position: absolute; top: 10px; right: 10px; z-index: 3; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line-h); background: rgba(1, 8, 16, .8); color: var(--text); font-size: 20px; cursor: pointer; }
.frecce { display: flex; gap: 8px; }
.frecce button { flex: 1; font: 500 13px var(--sans); color: var(--text-m); background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 8px; cursor: pointer; }
.frecce button:hover { color: var(--text); border-color: var(--line-h); }

footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--text-d); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--text-m); }

@media (max-width: 900px) {
  .pannello { grid-template-columns: 1fr; border-radius: 0; min-height: 100%; }
  .scheda { padding: 0; }
  .schermo, .schermo video, .schermo img { max-height: 56vh; }
}
@media (max-width: 520px) {
  .nav .port { display: none; }
  .gioco { min-height: 440px; }
  .btn { font-size: 13px; padding: 0 8px; }
  /* nella scheda il logo resta piccolo: sul telefono lo spazio va al testo e ai pulsanti */
  .info .logo-p img { max-height: 58px; }
  .info .logo-p .emblema { height: 52px !important; width: auto; }
  .info .logo-p .scritta { font-size: 22px !important; white-space: nowrap; }
}
/* The Drowned Dawn (26-10): il carattere del titolo del gioco, ottone su notte */
.scritta.f-fell { font-family: 'IM Fell English SC', Georgia, serif; letter-spacing: .03em; color: #f1d58e; text-shadow: 0 2px 12px rgba(0, 0, 0, .7), 0 0 18px rgba(94, 240, 180, .18); }
