/* ── SHARED.CSS ── Token universali, reset e componenti comuni ──

   Linkare come PRIMO foglio di stile in ogni pagina del sito.
   Contiene: token radice condivisi, reset, scanlines, nav moderna,
   close-section, scroll-reveal, print, reduced-motion.

   I token di famiglia (testo, superfici, colori secondari) restano
   nei CSS di pagina, che li dichiarano dopo questo file in :root.

   NOTA: il selettore `nav` copre la nav fissa di reskill /
   talesofbeauty / sognatore. fuoco.css sovrascrive con nav in-flow.
   index.html e beforeai.html non usano <nav> → nessun conflitto.
*/

/* ── TOKEN UNIVERSALI ── */
:root {
  --bg:   #0D0D0D;
  --rust: #C45A2A;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* ── SCANLINES ── effetto CRT comune a tutte le pagine */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 6px,
    rgba(255,255,255,0.012) 6px, rgba(255,255,255,0.012) 7px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ── NAV MODERNA ── reskill, talesofbeauty, sognatore
   Fallback su variabili di famiglia con valori di default espliciti,
   così il selettore funziona anche prima che la pagina dichiari il suo :root.
*/
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 3rem;
  background: rgba(13,13,13,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mono-dim, #3A3530);
}

.nav-logo {
  font-family: 'Big Shoulders Display', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--text, #E8E2D9);
  text-decoration: none;
  text-transform: uppercase;
}
.nav-logo:hover { color: var(--rust); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted, #6B6560);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text, #E8E2D9); }

/* ── CLOSE SECTION ── reskill, talesofbeauty */
.close-section {
  padding: 5rem 3rem 6rem;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2rem;
  border-top: 1px solid var(--mono-dim, #3A3530);
}

.close-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--rust);
  text-transform: uppercase;
  padding-top: 0.3rem;
}

.close-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--muted, #6B6560);
  font-weight: 300;
  max-width: 520px;
}

.close-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text, #E8E2D9);
  text-decoration: none;
  transition: gap 0.2s;
}
.close-arrow::after { content: '→'; color: var(--rust); }
.close-arrow:hover  { gap: 1.25rem; }

/* ── SCROLL REVEAL ── durata normalizzata 0.65s per tutto il sito */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE NAV + CLOSE ── */
@media (max-width: 680px) {
  nav            { padding: 1rem 1.5rem; }
  .nav-links     { gap: 1rem; }
  .nav-links a   { font-size: 0.6rem; }
  .close-section { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ── PRINT ── */
@media print {
  body::before   { display: none; }
  #cookie-banner { display: none; }
  .reveal        { opacity: 1; transform: none; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; opacity: 1; transform: none; }
}
