/* ==========================================================
   Deadlock Italia - style.css
   ========================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0b0d12;
  --panel: #131722;
  --line: #232a3b;
  --text: #e8eaf1;
  --muted: #9aa3b8;
  --amber: #ffb020;
  --violet: #8b5cf6;
  --radius: 14px;
  --wrap: 1120px;
  --header-h: 64px;
}

/* ---------- Reset e base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, iframe { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--amber); color: #000; padding: .5rem 1rem; z-index: 99; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  font-weight: 700; text-decoration: none; border-radius: 999px;
  padding: .8rem 1.4rem; border: 2px solid transparent;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn svg { width: 1.3em; height: 1.3em; fill: currentColor; flex: none; }
.btn-primary { background: var(--amber); color: #15100a; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,176,32,.35); }
.btn-lg { font-size: 1.15rem; padding: 1.05rem 2.1rem; animation: pulse 2.6s ease-out 1.2s 3; }
.btn-ghost { border-color: rgba(255,255,255,.28); color: var(--text); background: rgba(11,13,18,.35); }
.btn-ghost:hover { border-color: var(--violet); background: rgba(139,92,246,.2); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,176,32,.55); }
  70%, 100% { box-shadow: 0 0 0 18px rgba(255,176,32,0); }
}

/* ---------- Header fisso ---------- */
header.site {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(11,13,18,.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 900; text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 36px; height: auto; }
nav.main ul { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
nav.main a { text-decoration: none; color: var(--text); font-weight: 500; opacity: .85; }
nav.main a:hover { color: var(--amber); opacity: 1; }
nav.main a.btn { color: #15100a; opacity: 1; padding: .55rem 1.1rem; }
.burger { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: .45rem .7rem; font-size: 1.1rem; cursor: pointer; }

/* ---------- Hero fullpage ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;           /* occupa tutto lo schermo */
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 2rem) 0 6.5rem;  /* spazio per header e icona scroll */
}
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-bg img { object-fit: cover; object-position: center 30%; }
.hero::after {                                      /* velo scuro per leggibilità */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11,13,18,.92) 0%, rgba(11,13,18,.6) 55%, rgba(11,13,18,.25) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 35%);
}
.hero-logo { width: clamp(150px, 22vw, 230px); height: auto; margin-bottom: 1.4rem; opacity: .95; }
.hero h1 {
  margin: 0 0 1.2rem; font-weight: 900; line-height: .98; letter-spacing: -.035em;
  font-size: clamp(2.6rem, 9vw, 5.8rem); max-width: 14ch;
}
.hero h1 span { display: block; color: var(--amber); text-shadow: 0 0 40px rgba(255,176,32,.35); }
.hero .lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: #c3c9d8; max-width: 52ch; margin: 0 0 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-meta { margin: 2rem 0 0; color: var(--muted); font-size: .95rem; }

/* Icona di scroll animata (mouse con rotellina) */
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%);
  display: grid; place-items: center; width: 44px; height: 64px; text-decoration: none;
}
.mouse { width: 26px; height: 42px; border: 2px solid var(--text); border-radius: 14px; display: block; position: relative; opacity: .85; }
.wheel {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--amber); border-radius: 2px; animation: wheel 1.6s ease-in-out infinite;
}
.scroll-cue:hover .mouse { border-color: var(--amber); opacity: 1; }
@keyframes wheel {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Sezioni ---------- */
section:not(.hero) { padding: clamp(3.2rem, 8vw, 5.5rem) 0; }
h2 { font-size: clamp(1.8rem, 5vw, 2.7rem); line-height: 1.1; letter-spacing: -.025em; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.section-sub { color: var(--muted); max-width: 62ch; margin: 0 0 2.2rem; }

.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.about p { color: var(--muted); max-width: 62ch; }
.about strong { color: var(--text); }
.about figure { margin: 0; }
.about img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }

.cards { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: border-color .2s; }
.card:hover { border-color: var(--amber); }
.card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem; background: rgba(255,176,32,.12); color: var(--amber); }
.card:nth-child(2) .ico { background: rgba(139,92,246,.16); color: var(--violet); }
.card .ico svg { width: 24px; height: 24px; fill: currentColor; }
.card p { margin: 0; color: var(--muted); }

/* Video 16:9 con placeholder (facade) */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; cursor: pointer; }
.video img, .video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.play {
  position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%;
  border: 0; background: var(--amber); color: #15100a; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(255,176,32,.25); transition: transform .2s; pointer-events: none;
}
.play:hover { transform: scale(1.08); }
.play svg { width: 40px; height: 40px; fill: currentColor; }

/* FAQ */
.faq { display: grid; gap: .8rem; max-width: 800px; }
details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem; }
summary { cursor: pointer; font-weight: 700; }
details[open] { border-color: var(--violet); }
details p { color: var(--muted); margin: .8rem 0 0; }

/* CTA finale */
.cta-final { text-align: center; background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(255,176,32,.14)); border: 1px solid var(--line); border-radius: 22px; padding: clamp(2rem, 7vw, 4rem) 1.5rem; }
.cta-final p { color: var(--muted); max-width: 50ch; margin: 0 auto 1.6rem; }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid var(--line); padding: 2.5rem 0 2rem; color: var(--muted); font-size: .95rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
footer .brand { color: var(--text); }
footer h2 { font-size: 1rem; color: var(--text); letter-spacing: 0; margin-bottom: .7rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
footer a { text-decoration: none; }
footer a:hover { color: var(--amber); }
.legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: .85rem; }

/* ---------- Pulsante "torna su" ---------- */
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--amber); color: #15100a; display: grid; place-items: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.5);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { box-shadow: 0 6px 26px rgba(255,176,32,.45); }
.to-top svg { width: 24px; height: 24px; fill: currentColor; }

/* ---------- Pagine di testo (privacy) ---------- */
.page { padding: calc(var(--header-h) + 3rem) 0 4rem; max-width: 760px; }
.page p, .page li { color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about, .foot { grid-template-columns: 1fr; }
  .burger { display: block; }
  nav.main { position: absolute; inset: 100% 0 auto 0; display: none; background: var(--bg); border-bottom: 1px solid var(--line); }
  nav.main.open { display: block; }
  nav.main ul { flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.2rem; }
  nav.main li a { display: block; padding: .8rem 0; }
  nav.main a.btn { text-align: center; margin-top: .5rem; }
  .hero::after { background: linear-gradient(to bottom, rgba(11,13,18,.55), rgba(11,13,18,.88) 70%, var(--bg)); }
  .actions .btn { width: 100%; }
  /* [MOD] Modale Privacy su mobile */
  .privacy-dialog { padding: 1.6rem 1.2rem; margin: 1rem; }
}
@media (max-height: 560px) { .scroll-cue { display: none; } }

/* ========== [MOD] MODALE PRIVACY POLICY ========== */
/* Overlay a schermo intero semi-trasparente */
.privacy-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(11, 13, 18, .85); backdrop-filter: blur(8px);
  padding: 1rem;
}
.privacy-overlay[hidden] { display: none; }
/* Finestra di dialogo */
.privacy-dialog {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); max-width: 560px; width: 100%;
  padding: 2.2rem 2rem; box-shadow: 0 10px 40px rgba(0, 0, 0, .6);
}
.privacy-dialog h2 { font-size: 1.5rem; color: var(--amber); margin-bottom: 1.2rem; }
.privacy-dialog ul { list-style: disc; padding-left: 1.3rem; margin: 0; }
.privacy-dialog li { margin-bottom: .8rem; color: var(--muted); font-size: .95rem; line-height: 1.6; }
/* Pulsante chiusura */
.privacy-close {
  position: absolute; top: .8rem; right: .8rem; background: none; border: 0;
  color: var(--muted); font-size: 1.8rem; cursor: pointer; line-height: 1;
  transition: color .2s;
}
.privacy-close:hover { color: var(--amber); }

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