/* Custom styles — estendono Tailwind CDN */

:root {
  --ink: #0A0A0A;
  --ink-2: #141414;
  --ink-3: #1f1f1f;
  --accent: #FF4D1C;
  --accent-2: #FFB800;
  --text-main: #F5F5F5;
  --text-muted: #A0A0A0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--ink);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: 'Anton', 'Bebas Neue', Impact, sans-serif;
  letter-spacing: 0.01em;
  font-weight: 400;
}

/* ---------- Hero ---------- */
.hero-bg {
  background:
    linear-gradient(135deg, rgba(255,77,28,0.35) 0%, rgba(10,10,10,0.6) 45%, rgba(10,10,10,0.95) 100%),
    radial-gradient(ellipse at 30% 20%, rgba(255,184,0,0.25), transparent 60%),
    #0A0A0A;
  position: relative;
  overflow: hidden;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 80px);
  pointer-events: none;
}
.hero-bg::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -20%;
  width: 70vw;
  height: 70vw;
  background: radial-gradient(circle, rgba(255,77,28,0.25), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}

/* Noise overlay (CSS only) */
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
  opacity: 0.06;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ---------- Image placeholder blocks ---------- */
.img-placeholder {
  background:
    linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%),
    repeating-linear-gradient(45deg, rgba(255,77,28,0.08) 0 2px, transparent 2px 12px);
  background-blend-mode: overlay;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-family: 'Anton', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}
.img-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,77,28,0.25), transparent 55%);
  pointer-events: none;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Nav ---------- */
.site-nav {
  background: #000;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-nav.scrolled {
  box-shadow: 0 10px 30px -15px rgba(0,0,0,0.8);
}

/* ---------- Hamburger ---------- */
.burger span {
  transition: transform .3s ease, opacity .2s ease;
  transform-origin: center;
}
.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu panel animazione */
[data-mobile-menu] {
  overflow: hidden;
  max-height: 0;
  transition: max-height .35s ease;
}
[data-mobile-menu].open { max-height: 80vh; }

/* ---------- Parallax ---------- */
.parallax {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
}
.parallax::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.55) 50%, rgba(10,10,10,0.9) 100%);
  pointer-events: none;
}
.parallax > * { position: relative; z-index: 1; }

/* Fallback mobile: iOS non supporta bg-attachment: fixed correttamente */
@media (max-width: 1024px) {
  .parallax { background-attachment: scroll; }
}
.nav-link {
  position: relative;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--accent); }

/* ---------- Scroll arrow ---------- */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(10px); opacity: 1; }
}
.scroll-arrow {
  display: inline-block;
  animation: scroll-bounce 1.6s ease-in-out infinite;
}

/* ---------- Marquee stats ---------- */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee {
  display: flex;
  gap: 4rem;
  animation: marquee 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 1rem 2rem;
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  border: 2px solid var(--accent);
  transition: all .25s ease;
  display: inline-block;
}
.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(255,77,28,0.6);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  padding: 1rem 2rem;
  font-family: 'Anton', sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.95rem;
  border: 2px solid rgba(255,255,255,0.25);
  transition: all .25s ease;
  display: inline-block;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Card hover ---------- */
.card-link {
  transition: transform .4s ease, border-color .3s ease;
  border: 1px solid rgba(255,255,255,0.08);
}
.card-link:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}
.card-link:hover .card-arrow { transform: translateX(6px); color: var(--accent); }
.card-arrow { transition: transform .3s ease, color .3s ease; }

/* ---------- Big section numbers ---------- */
.big-num {
  font-family: 'Anton', sans-serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  line-height: 0.9;
  color: var(--accent);
}

/* ---------- Utility ---------- */
.divider-accent {
  width: 60px;
  height: 4px;
  background: var(--accent);
  display: inline-block;
}

/* Selection */
::selection { background: var(--accent); color: #fff; }

/* Scrollbar (webkit) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: #2a2a2a; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---------- Hero: overlay più marcato per leggibilità del titolo ---------- */
.parallax.hero-dark::before {
  background:
    linear-gradient(90deg, rgba(10,10,10,0.96) 0%, rgba(10,10,10,0.92) 35%, rgba(10,10,10,0.6) 62%, rgba(10,10,10,0.35) 100%),
    linear-gradient(0deg, rgba(10,10,10,0.75) 0%, rgba(10,10,10,0.2) 55%, rgba(10,10,10,0.6) 100%);
}

/* Hero home: su schermi stretti usa la versione verticale (soggetto in basso,
   spazio scuro in alto per il titolo). !important perché l'url è inline sul section. */
@media (max-width: 1024px) {
  .parallax.hero-dark {
    background-image: url('/assets/img/hero-home-mobile.jpg') !important;
    background-position: center bottom;
  }
  .parallax.hero-dark::before {
    background:
      linear-gradient(0deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.62) 30%, rgba(10,10,10,0.8) 52%, rgba(10,10,10,0.92) 74%, rgba(10,10,10,0.96) 100%);
  }
}

/* ---------- Mobile: interlinea dei titoli display ----------
   Anton ha maiuscole molto alte: leading 0.85/0.9 va bene sui titoli
   grandi da desktop, ma su telefono le righe si toccano. */
@media (max-width: 767px) {
  h1.font-display,
  h2.font-display,
  h3.font-display,
  blockquote.font-display,
  p.font-display {
    line-height: 1.02;
  }
}

/* Menu mobile: aree di tocco da 44px (linea guida touch) */
[data-mobile-menu] nav a {
  display: block;
  padding: 0.85rem 0;
  min-height: 44px;
}

/* Menu mobile: niente sottolineatura a tutta larghezza sulla voce attiva */
[data-mobile-menu] .nav-link::after { display: none; }
