/* ==========================================================================
   1. DESIGN TOKENS & VARIABILI GLOBALI (:root)
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;600;700;800;900&display=swap');

:root {
  /* --- Colori Brand & Palette --- */
  --c-brand-navy: #09202a;
  --c-brand-navy-dark: #03090c;
  --c-brand-cyan: #18dcdc;
  --c-brand-cyan-dark: #109898;
  --c-brand-amber: #f79e04;
  --c-brand-amber-hover: #ffaa1d;

  /* --- Sfondi & Superfici --- */
  --bg-page: #050e14;
  --bg-surface: #09202a;
  --bg-nav: rgba(0, 0, 0, 0.95);
  --bg-card: rgba(255, 255, 255, 0.02);

  /* --- Tipografia & Colori Testo --- */
  --font-main: 'Mulish', sans-serif;
  --c-text-main: #f8fafc;
  --c-text-muted: #94a3b8;
  --c-text-dark: #050e14;

  /* --- Glassmorphism --- */
  --c-glass-bg: rgba(9, 32, 42, 0.95);
  --c-glass-bg-white: rgba(255, 255, 255, 0.05);
  --c-glass-border: rgba(255, 255, 255, 0.08);

  /* --- Spaziature & Transizioni --- */
  --gap-standard: 1rem;
  --transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Breakpoints (per riferimento logico) --- */
  --bp-sm: 576px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1200px;
}

/* ==========================================================================
   2. RESET & NORMALIZZAZIONE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-page);
  color: var(--c-text-main);
  line-height: 1.6;
  font-size: 1rem;
  overflow-x: hidden;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   3. STILI GLOBALI / BASE (Tipografia e Testi)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--c-text-main);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

p, span, label {
  color: var(--c-text-main);
}

/* Tipografia Responsiva con clamp() */
.text-grande {
  font-size: clamp(2.5rem, 5vw, 5rem);
}

.text-medio {
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
}

.text-piccolo {
  font-size: clamp(0.75rem, 1.2vw, 0.95rem);
  color: var(--c-text-muted);
}

/* ==========================================================================
   4. LAYOUT & STRUTTURA
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pagina {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content-wrapper {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto 60px auto;
  position: relative;
  z-index: 1;
}

/* --- Hero Section --- */
.hero-stage {
  position: relative;
  width: 100%;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 20px;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-glass-border);
}

.hero-logo-svg {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto 1.5rem auto;
}

.hero-logo-svg path, 
.hero-logo-svg g {
  fill: var(--c-text-main);
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  color: var(--c-text-muted);
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* ==========================================================================
   5. COMPONENTI & MODULI
   ========================================================================== */

/* --- Bottoni --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--c-glass-border);
  color: var(--c-text-main);
}

.btn-secondary:hover {
  background-color: var(--c-text-main);
  color: var(--c-text-dark);
  transform: translateY(-2px);
}

.btn-success {
  background-color: var(--c-brand-amber);
  color: var(--c-text-dark);
  width: 100%;
}

.btn-success:hover {
  background-color: var(--c-brand-amber-hover);
  transform: translateY(-2px);
}

/* --- Griglia Download / Prodotti --- */
.download-section {
  margin-top: 50px;
}

.section-title {
  font-size: 1.8rem;
  margin-bottom: 25px;
  font-weight: 600;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  align-items: stretch;
}

.download-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
  padding: 25px;
  background: var(--bg-card);
  border: 1px solid var(--c-glass-border);
  border-radius: 12px;
}

/* --- Carrello & Dropdown (Glassmorphism) --- */
.header-cart-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 100;
}

.cart-dropdown-panel {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  width: 340px;
  background: var(--c-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--c-glass-border);
  border-top: 1px solid var(--c-brand-amber);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(5, 14, 20, 0.8), 0 0 25px rgba(24, 220, 220, 0.08);
  padding: 20px;
  z-index: 101;
  animation: dropdownIn var(--transition) forwards;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cart-badge {
  background: var(--c-brand-cyan-dark);
  color: var(--c-text-dark);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 15px;
  text-align: center;
}

/* --- Footer Moderno --- */
.site-footer {
  background-color: var(--bg-surface);
  color: var(--c-text-main);
  padding: 60px 20px 25px;
  font-size: 0.9rem;
  border-top: 1px solid var(--c-glass-border);
  margin-top: 80px;
}

.foot-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding-bottom: 40px;
}

.foot-col {
  flex: 1;
  min-width: 250px;
  max-width: 350px;
}

/* ==========================================================================
   6. HELPER / UTILITY CLASSES
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-uppercase { text-transform: uppercase; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.mt-sm { margin-top: 20px; }
.mt-lg { margin-top: 50px; }

/* ==========================================================================
   7. RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */
@media (max-width: 768px) {
  .hero-stage {
    min-height: 60vh;
    padding: 40px 15px;
  }
  
  .foot-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}