/* ==========================================================================
   BIKER NIGHT — Industrial Showroom Aesthetic
   Cinematic. Raw. Midnight-garage energy.
   ========================================================================== */

/* ===== Design Tokens ===== */
:root {
  /* Palette */
  --bg: #0a0a0a;
  --primary: #c0392b;
  --primary-light: #e74c3c;
  --primary-dark: #962d22;
  --secondary: #e67e22;
  --accent: #f39c12;
  --text: #f5f5f5;
  --text-muted: rgba(245, 245, 245, 0.5);
  --surface-base: #0e0e0e;
  --surface-elevated: #161616;
  --surface-floating: #1e1e1e;
  --surface-overlay: #262626;

  /* Typography */
  --font-display: 'Bebas Neue', cursive;
  --font-subtitle: 'Oswald', sans-serif;
  --font-body: 'Roboto', sans-serif;

  /* Layered shadows — color-tinted */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5), 0 0 1px rgba(192,57,43,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 2px 6px rgba(192,57,43,0.06);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.6), 0 4px 16px rgba(192,57,43,0.08);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.7), 0 8px 24px rgba(192,57,43,0.1);
  --shadow-glow: 0 0 30px rgba(192,57,43,0.35), 0 0 60px rgba(192,57,43,0.12), 0 0 100px rgba(230,126,34,0.06);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;

  /* Easing — spring feel */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Borders */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

@media (max-width: 768px) {
  html { scroll-padding-top: 56px; }
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 512px 512px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }

/* Faster taps on mobile — prevent 300ms delay */
a, button, input, select, textarea, label { touch-action: manipulation; }

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 var(--space-lg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}

.navbar.scrolled {
  border-bottom-color: rgba(192, 57, 43, 0.15);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar__logo {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--primary);
  letter-spacing: 4px;
  user-select: none;
}

.navbar__links {
  display: flex;
  list-style: none;
  gap: var(--space-lg);
}

.navbar__links a {
  font-family: var(--font-subtitle);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: var(--space-xs) 0;
  position: relative;
  transition: color 0.3s var(--ease-out);
}

.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.4s var(--ease-spring);
}

.navbar__links a:hover { color: var(--text); }
.navbar__links a:hover::after { width: 100%; }
.navbar__links a:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 2px; }
.navbar__links a:active { opacity: 0.7; }

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease-out);
}
.navbar__hamburger:hover { background: rgba(192, 57, 43, 0.12); }
.navbar__hamburger:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.navbar__hamburger span { width: 22px; height: 2px; background: var(--text); transition: transform 0.3s var(--ease-spring), opacity 0.3s; }

/* ===== HERO — Asymmetric Split ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px var(--space-lg) var(--space-xl);
  position: relative;
  overflow: hidden;
  background: var(--bg);
}

.hero__content {
  display: flex;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Desktop: text left-aligned, takes ~50% width, moto fills right via background */
.hero__text {
  text-align: left;
  max-width: 50%;
}

.hero__tagline {
  font-family: var(--font-subtitle);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeSlideUp 0.7s var(--ease-out) 0.2s forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 13vw, 12rem);
  color: var(--text);
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -2px;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out) 0.4s forwards;
}

.hero__subtitle {
  font-family: var(--font-subtitle);
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  font-weight: 400;
  color: var(--secondary);
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.6s forwards;
}

.hero__location {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.7s forwards;
}

.hero__cta {
  display: inline-block;
  padding: 1rem 3.5rem;
  font-family: var(--font-subtitle);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border: none;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 3px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  opacity: 0;
  animation: fadeSlideUp 0.6s var(--ease-out) 0.9s forwards;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.4s var(--ease-out);
}

.hero__cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-glow);
}
.hero__cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hero__cta:active { transform: translateY(-1px) scale(0.98); }

/* Right column: locandina */
.hero__locandina {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeSlideRight 1s var(--ease-out) 0.5s forwards;
}

.hero__locandina-frame {
  position: relative;
  max-width: 400px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: var(--shadow-xl);
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-out);
}

/* Gradient border */
.hero__locandina-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* Bottom vignette on image */
.hero__locandina-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.5), transparent);
  pointer-events: none;
  z-index: 1;
}

.hero__locandina-frame:hover {
  transform: rotate(0deg) scale(1.03);
  box-shadow: var(--shadow-xl), 0 0 80px rgba(192, 57, 43, 0.15);
}

.hero__locandina-frame img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.hero__locandina-frame:hover img {
  transform: scale(1.04);
}

/* Hero bottom fade */
.hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  pointer-events: none;
  z-index: 3;
}

/* Decorative diagonal lines */
.hero__deco {
  position: absolute;
  top: 12%;
  right: -8%;
  width: 1px;
  height: 350px;
  background: linear-gradient(to bottom, transparent, rgba(192, 57, 43, 0.12), transparent);
  transform: rotate(25deg);
  pointer-events: none;
  z-index: 2;
}
.hero__deco--left {
  right: auto;
  left: -8%;
  top: 18%;
  transform: rotate(-25deg);
}

/* ===== Keyframes ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideRight {
  from { opacity: 0; transform: translateX(40px) rotate(2deg); }
  to { opacity: 1; transform: translateX(0) rotate(2deg); }
}

@keyframes flameWave {
  0%, 100% { opacity: 1; transform: scaleY(1); }
  50% { opacity: 0.65; transform: scaleY(1.15); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

/* ===== Hero 3D Motorcycle Background ===== */
.hero__3d-bg {
  position: absolute;
  top: 0;
  left: 40%;
  width: 60%;
  height: 100%;
  z-index: 0;
}

.hero__3d-bg model-viewer {
  display: block;
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  --progress-bar-color: var(--primary);
  --progress-bar-height: 3px;
  background: transparent;
}

/* Dark overlay so text stays readable over the 3D model */
.hero__3d-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0.3) 40%, rgba(10,10,10,0.1) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ===== Locandina Section ===== */
.locandina-section {
  padding: var(--space-2xl) var(--space-lg);
  display: flex;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(192, 57, 43, 0.06) 0%, transparent 60%),
    var(--surface-base);
}

.locandina-section__frame {
  position: relative;
  max-width: 420px;
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-out);
}

.locandina-section__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 3px;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

.locandina-section__frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 25%;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.5), transparent);
  pointer-events: none;
  z-index: 1;
}

.locandina-section__frame:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-xl), 0 0 80px rgba(192, 57, 43, 0.15);
}

.locandina-section__frame img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out);
}

.locandina-section__frame:hover img {
  transform: scale(1.04);
}

/* ===== Section Shared ===== */
.section-divider {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 1px;
  margin: 0 auto var(--space-lg);
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Info Section ===== */
.info {
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  max-width: 1000px;
  margin: 0 auto;
}

.info__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--text);
  text-align: center;
  letter-spacing: 5px;
  margin-bottom: var(--space-xs);
}

.info__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.info__card {
  background: var(--surface-elevated);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out);
}

.info__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.04) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}

.info__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.info__card:hover::before { opacity: 1; }

.info__card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192, 57, 43, 0.08);
  border-radius: var(--radius-sm);
  padding: 8px;
}

.info__card-icon svg { width: 100%; height: 100%; fill: var(--primary); }

.info__card-content h3 {
  font-family: var(--font-subtitle);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.info__card-content p {
  font-size: 0.95rem;
  color: var(--text);
  opacity: 0.8;
  line-height: 1.55;
}

.info__extra {
  margin-top: var(--space-lg);
  text-align: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-sm);
}

.info__extra p {
  font-family: var(--font-subtitle);
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: 0.2rem;
  letter-spacing: 0.5px;
}

/* ===== Registration Form ===== */
.iscrizione {
  padding: var(--space-2xl) var(--space-lg);
  max-width: 620px;
  margin: 0 auto;
}

.iscrizione__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--text);
  text-align: center;
  letter-spacing: 5px;
  margin-bottom: var(--space-xs);
}

.iscrizione__subtitle {
  font-family: var(--font-subtitle);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
}

.form-card {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-family: var(--font-subtitle);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 400;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--surface-floating);
  border: 1.5px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.2s var(--ease-spring);
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
  transform: translateY(-1px);
}

.form-group input:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}

.form-group input::placeholder { color: rgba(245, 245, 245, 0.18); }
.form-group input.error { border-color: #e74c3c; box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1); }
.form-group input.valid { border-color: #27ae60; box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.08); }

.form-group .error-msg {
  display: none;
  color: #e74c3c;
  font-size: 0.78rem;
  margin-top: 0.35rem;
  font-weight: 500;
}
.form-group .error-msg.visible { display: block; }

/* File input */
.file-upload { position: relative; }
.file-upload__input { position: absolute; opacity: 0; width: 0; height: 0; }

.file-upload__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 1.2rem;
  background: var(--surface-floating);
  border: 2px dashed rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  color: var(--text-muted);
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out), transform 0.2s var(--ease-spring);
}

.file-upload__label:hover {
  border-color: var(--primary);
  background: rgba(192, 57, 43, 0.04);
  transform: translateY(-1px);
}

.file-upload__label svg { width: 20px; height: 20px; fill: var(--primary); }

.image-preview { display: none; margin-top: var(--space-sm); text-align: center; }
.image-preview img { max-height: 180px; border-radius: var(--radius-md); border: 2px solid var(--primary); margin: 0 auto; box-shadow: var(--shadow-md); }
.image-preview.visible { display: block; }

/* Checkboxes */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  background: var(--surface-floating);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  margin-top: 2px;
  transition: background 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.15s var(--ease-spring);
}

.checkbox-group input[type="checkbox"]:hover { border-color: var(--primary); transform: scale(1.08); }
.checkbox-group input[type="checkbox"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.checkbox-group input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.checkbox-group input[type="checkbox"]:active { transform: scale(0.9); }

.checkbox-group input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-group label {
  font-size: 0.8rem;
  color: var(--text);
  opacity: 0.65;
  cursor: pointer;
  line-height: 1.5;
}

/* Submit button */
.btn-submit {
  width: 100%;
  padding: 1.1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: var(--text);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  background-size: 200% 200%;
  background-position: 0% 50%;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.4s var(--ease-out), background-position 0.5s var(--ease-out);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow-glow), var(--shadow-lg);
  background-position: 100% 50%;
}
.btn-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.btn-submit:active:not(:disabled) { transform: translateY(-1px) scale(0.98); }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.3); }

/* Spinner */
.spinner {
  display: none;
  width: 38px;
  height: 38px;
  margin: var(--space-sm) auto;
  border: 3px solid var(--surface-floating);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.spinner.visible { display: block; }

/* Messages */
.form-message {
  display: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-sm);
  text-align: center;
  font-family: var(--font-subtitle);
  font-size: 1rem;
}
.form-message.success { display: block; background: rgba(39,174,96,0.08); border: 1px solid rgba(39,174,96,0.25); color: #2ecc71; }
.form-message.error { display: block; background: rgba(231,76,60,0.08); border: 1px solid rgba(231,76,60,0.25); color: #e74c3c; }

/* ===== Counter Section ===== */
.counter {
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(192, 57, 43, 0.05) 0%, transparent 55%),
    var(--surface-base);
}

.counter::before,
.counter::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192, 57, 43, 0.3), transparent);
}
.counter::before { top: 0; }
.counter::after { bottom: 0; }

.counter__label {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: var(--text);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.counter__number {
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 10rem);
  color: var(--primary);
  line-height: 1;
  text-shadow: 0 0 10px rgba(192,57,43,0.35), 0 0 40px rgba(230,126,34,0.15), 0 0 80px rgba(243,156,18,0.06);
  animation: countPulse 4s var(--ease-in-out) infinite;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}

.footer__ztl {
  max-width: 660px;
  margin: 0 auto var(--space-lg);
  padding: var(--space-md);
  background: var(--surface-elevated);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.footer__ztl h3 {
  font-family: var(--font-subtitle);
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-xs);
}

.footer__ztl p { font-size: 0.82rem; opacity: 0.6; line-height: 1.7; }

.footer__notice {
  font-family: var(--font-subtitle);
  color: var(--secondary);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.footer__credits { font-size: 0.75rem; opacity: 0.3; }

.footer__dev {
  font-size: 0.75rem;
  opacity: 0.35;
  margin-top: var(--space-xs);
}

.footer__dev a {
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.3s var(--ease-out);
}

.footer__dev a:hover { opacity: 1; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 0 var(--space-sm);
    height: 56px;
  }

  .navbar__logo { font-size: 1.5rem; letter-spacing: 3px; }

  .navbar__links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(192, 57, 43, 0.1);
    box-shadow: var(--shadow-lg);
  }
  .navbar__links.open { display: flex; }
  .navbar__links a { display: block; padding: 1rem var(--space-md); text-align: center; font-size: 1rem; min-height: 48px; }
  .navbar__links a::after { display: none; }

  /* Hamburger — 44px minimum touch target */
  .navbar__hamburger {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 10px;
  }

  .hero {
    padding: 72px var(--space-sm) var(--space-md);
    min-height: 100vh;
    min-height: 100dvh;
  }

  .hero__3d-bg {
    left: 0;
    width: 100%;
  }

  .hero__3d-overlay {
    background:
      radial-gradient(ellipse at 50% 40%, rgba(10,10,10,0.45) 0%, rgba(10,10,10,0.7) 100%);
  }

  .hero__content {
    justify-content: center;
    text-align: center;
  }

  .hero__text {
    text-align: center;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__title {
    font-size: clamp(3.5rem, 15vw, 6rem);
    letter-spacing: 0;
    text-align: center;
  }

  .hero__tagline {
    text-align: center;
    letter-spacing: 2px;
    font-size: 0.75rem;
    margin-bottom: var(--space-sm);
  }
  .hero__subtitle { text-align: center; }
  .hero__location { text-align: center; margin-bottom: var(--space-md); }

  .hero__cta {
    padding: 0.9rem 2.5rem;
    font-size: 0.9rem;
    letter-spacing: 2px;
    /* Ensure touch target */
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Show 3D model on mobile — reduce overlay opacity for visibility */
  .hero__3d-overlay {
    background:
      radial-gradient(ellipse at 50% 40%, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.75) 100%);
  }

  .locandina-section { padding: var(--space-lg) var(--space-sm); }
  .locandina-section__frame { max-width: 280px; margin: 0 auto; }

  .info { padding: var(--space-lg) var(--space-sm); }
  .info__title { margin-bottom: var(--space-xs); }
  .info__grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .info__card { padding: var(--space-sm) var(--space-sm); }
  .info__extra { padding: var(--space-sm); }

  .iscrizione { padding: var(--space-lg) var(--space-sm); }
  .form-card { padding: var(--space-md) var(--space-sm); }

  /* Bigger touch targets for form inputs */
  .form-group input[type="text"],
  .form-group input[type="email"],
  .form-group input[type="tel"] {
    padding: 0.9rem 0.85rem;
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  .file-upload__label {
    padding: 1rem;
    min-height: 48px;
  }

  /* Larger checkboxes for touch */
  .checkbox-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }
  .checkbox-group input[type="checkbox"]:checked::after {
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
  }
  .checkbox-group label { font-size: 0.78rem; }

  .btn-submit {
    padding: 1rem;
    font-size: 1.3rem;
    min-height: 52px;
  }

  .image-preview img { max-height: 140px; }

  .counter { padding: var(--space-xl) var(--space-sm); }

  .footer { padding: var(--space-lg) var(--space-sm); }
  .footer__ztl { padding: var(--space-sm); }
  .footer__ztl p { font-size: 0.78rem; }
}

/* Small phones (≤ 380px) */
@media (max-width: 380px) {
  .hero__title { font-size: clamp(3rem, 18vw, 4.5rem); }
  .locandina-section__frame { max-width: 240px; }

  .form-card { padding: var(--space-sm) var(--space-xs); }
  .form-group label { font-size: 0.75rem; }

  .counter__number { font-size: clamp(4rem, 18vw, 6rem); }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero__content { gap: var(--space-lg); }
  .locandina-section__frame { max-width: 360px; }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
