/* ==========================================================================
   Replay Lab Studio — foglio di stile unico
   Mobile first. Nessuna risorsa esterna. Font di sistema.
   ========================================================================== */

:root {
  --bg: #0a0c10;
  --bg-2: #11141b;
  --bg-3: #181c25;
  --line: #262b37;
  --text: #eef1f6;
  --muted: #a3abba;          /* contrasto ~8:1 su --bg */
  --accent: #3dff8f;         /* verde neon */
  --accent-ink: #04140b;     /* testo su accento */
  --accent-soft: rgba(61, 255, 143, 0.12);
  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Black", "Arial Black", system-ui, -apple-system, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.4rem, 9vw, 5rem); }
h2 { font-size: clamp(1.8rem, 6vw, 3rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Header / navigazione ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 16, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-height: 64px;
}

/* Logo provvisorio, solo testo */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
}
.logo-mark {                  /* simbolo: assets/img/favicon.svg */
  width: 30px;
  height: 30px;
  flex: none;
}
.logo b { color: var(--accent); font-weight: 900; }

.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-3); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-3); }

/* Con JS attivo, su mobile il menu si apre col pulsante */
@media (max-width: 759px) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; width: 100%; padding-bottom: 12px; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 14px 12px; font-size: 1.05rem; }
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #6bffab; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); }
.btn svg { width: 22px; height: 22px; flex: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.hero::before {              /* bagliore di sfondo, solo CSS */
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(61, 255, 143, 0.22), transparent 62%);
  pointer-events: none;
}
.hero::after {               /* griglia sottile */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero h1 span { color: var(--accent); }
.hero .lead { font-size: clamp(1.1rem, 3.6vw, 1.35rem); color: var(--muted); max-width: 40ch; margin-bottom: 1.6em; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(61, 255, 143, 0.3);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.page-hero { padding: 56px 0 40px; }
.page-hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 52ch; }

/* ---------- Sezioni ---------- */

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }

.grid { display: grid; gap: 16px; }
@media (min-width: 760px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }
.card-num {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 900;
  margin-bottom: 16px;
}

/* Passi numerati (pagina streamer) */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; }
.steps .card-num::before { content: counter(step); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li {
  position: relative;
  padding: 16px 16px 16px 52px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 18px; top: 50%;
  width: 18px; height: 10px;
  margin-top: -7px;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(-45deg);
}

/* Riquadro invito */
.cta-box {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #13241b 0%, var(--bg-2) 60%);
  border: 1px solid rgba(61, 255, 143, 0.35);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
}
.cta-box p { color: var(--muted); max-width: 56ch; }
@media (min-width: 760px) { .cta-box { padding: 48px; } }

.prose { max-width: 70ch; }
.prose h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); margin-top: 1.6em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }

.contact-mail {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.3rem, 6vw, 2.4rem);
  word-break: break-all;
  text-decoration: none;
}
.contact-mail:hover { text-decoration: underline; }

/* ---------- Shorts: anteprima statica, embed solo al clic ---------- */

.shorts {                    /* mobile: riga che scorre in orizzontale */
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 62%;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
  scroll-padding-left: 20px;
}
.shorts > .yt { scroll-snap-align: start; }
@media (min-width: 760px) {
  .shorts {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 260px));
    gap: 20px;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
}

.yt {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(61, 255, 143, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-3), var(--bg-2));
}
.yt-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}
.yt-title { font-weight: 800; font-size: 0.98rem; line-height: 1.3; margin: 0; }
.yt-note { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.yt-badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--muted);
}
.yt-play {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}
.yt-play::before {
  content: "";
  position: absolute;
  left: 50%; top: 45%;
  width: 68px; height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 8px rgba(61, 255, 143, 0.18);
  transition: transform 0.15s ease;
}
.yt-play::after {
  content: "";
  position: absolute;
  left: 50%; top: 45%;
  margin: -12px 0 0 -7px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent var(--accent-ink);
}
.yt-play:hover::before { transform: scale(1.08); }
.yt-play:focus-visible { outline-offset: -4px; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.small-note { font-size: 0.9rem; color: var(--muted); margin-top: 16px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 40px 0 32px;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.footer-legal {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}
.footer-legal p { margin: 0 0 6px; }

/* ---------- 404 ---------- */
.notfound { padding: 96px 0; text-align: center; }
.notfound .big {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(5rem, 28vw, 11rem);
  line-height: 1;
  color: var(--accent);
  margin: 0 0 8px;
}
.notfound .btn-row { justify-content: center; }
