/* ===== Variables ===== */
:root {
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-section: #0d1117;
  --bg-section-alt: #131920;
  --accent: #e8b84a;
  --accent-hover: #f0c85c;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --border: #30363d;
  --font-head: 'Instrument Serif', Georgia, serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --transition: 0.25s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}
.logo:hover { color: var(--accent); }
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent) 0%, #c9942e 100%);
  border-radius: 10px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: 22px;
  -webkit-mask-size: 22px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover { color: var(--text); }
.nav-cta {
  color: var(--accent) !important;
  padding: 0.5rem 1rem;
  background: rgba(232, 184, 74, 0.12);
  border-radius: var(--radius);
}
.nav-cta:hover {
  background: rgba(232, 184, 74, 0.2);
  color: var(--accent-hover) !important;
}
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 0 auto;
  transition: transform var(--transition), opacity var(--transition);
}
.burger:hover { background: var(--bg-card); border-color: var(--accent); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 991px) {
  .burger { display: flex; }
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.5rem 1.5rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 32px rgba(0,0,0,0.3);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav-cta { margin-top: 1rem; text-align: center; border: none; }
}

/* ===== Full-page background ===== */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(232, 184, 74, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(232, 184, 74, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-section-alt) 100%);
  overflow: hidden;
  pointer-events: none;
}
.page-bg-icon {
  position: absolute;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: var(--size, 20px);
  height: var(--size, 20px);
  transform: translate(-50%, -50%);
  animation: page-bg-float 8s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  opacity: 0.2;
}
.page-bg-icon--star {
  background: rgba(232, 184, 74, 0.35);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: page-bg-float 8s ease-in-out infinite, page-bg-pulse 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s), var(--delay, 0s);
}
.page-bg-icon--circle {
  background: transparent;
  border: 2px solid rgba(232, 184, 74, 0.4);
  border-radius: 50%;
  animation: page-bg-float 10s ease-in-out infinite, page-bg-pulse 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s), var(--delay, 0s);
}
@keyframes page-bg-float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0) scale(1); }
  25% { transform: translate(-50%, -50%) translateY(-12px) translateX(8px) scale(1.05); }
  50% { transform: translate(-50%, -50%) translateY(-5px) translateX(-6px) scale(0.98); }
  75% { transform: translate(-50%, -50%) translateY(-15px) translateX(4px) scale(1.02); }
}
@keyframes page-bg-pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.35; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 7rem 0 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 1rem;
  color: var(--text);
}
.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.hero-desc {
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #c9942e 100%);
  color: #0d1117;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background: rgba(232, 184, 74, 0.12);
  border-color: var(--accent-hover);
  color: var(--accent-hover);
}
.btn-large { padding: 1rem 2.25rem; font-size: 1.1rem; }
.hero-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
  background: rgba(13, 17, 23, 0.75);
}
.section:nth-child(even) { background: rgba(19, 25, 32, 0.7); }
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--text);
}

/* Come Funziona */
.come-funziona .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.step:hover {
  border-color: rgba(232, 184, 74, 0.4);
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, #c9942e 100%);
  color: #0d1117;
  font-weight: 700;
  font-size: 1.25rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}
.step h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.steps-tagline {
  text-align: center;
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0;
}
@media (max-width: 768px) {
  .come-funziona .steps { grid-template-columns: 1fr; }
}

/* Premi */
.premi-intro {
  text-align: center;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}
.premi-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto 1rem;
}
.premi-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--text);
}
.premi-icon { font-size: 1.5rem; }
.premi-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* 100% Gratuito */
.check-list {
  max-width: 400px;
  margin: 0 auto 1.5rem;
}
.check-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 2.5rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1rem;
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e8b84a' stroke-width='2.5'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.gratuito-claim {
  text-align: center;
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 500;
  margin: 0;
}

/* Sicurezza & Frequenza */
.sicurezza .container p,
.frequenza .container p {
  max-width: 600px;
  margin: 0 auto 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

.legal-company {
  font-weight: 600;
  color: var(--text) !important;
  margin-bottom: 0.75rem !important;
}
.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}
.legal-links a {
  font-size: 0.95rem;
  color: var(--accent);
}
.legal-links a:hover { text-decoration: underline; }

/* CTA Section */
.cta-section {
  text-align: center;
  padding: 5rem 0;
  background: linear-gradient(180deg, var(--bg-section-alt) 0%, rgba(232, 184, 74, 0.06) 100%);
}
.cta-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin: 0 0 0.5rem;
  color: var(--text);
}
.cta-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Footer */
.footer {
  padding: 3rem 0 2rem;
  background: rgba(13, 17, 23, 0.85);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-decoration: none;
  transition: color 0.25s ease;
}
.footer-logo:hover {
  color: var(--accent);
}
.footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent) 0%, #c9942e 100%);
  border-radius: 8px;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L15 8L22 9L17 14L18 21L12 18L6 21L7 14L2 9L9 8L12 2Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask-size: 20px;
  -webkit-mask-size: 20px;
}
.footer-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 1rem;
  color: var(--text);
}
.footer-legal {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 0.25rem;
}
.footer-disclaimer {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
  margin: 0;
}

/* ===== Modals ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
}
.modal.is-open .modal-box {
  transform: scale(1);
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}
.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}
.modal-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--text);
  padding-right: 2rem;
}
.modal-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.modal-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  display: block;
}
.modal-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease;
}
.modal-input::placeholder {
  color: var(--text-muted);
  opacity: 0.8;
}
.modal-input:focus {
  outline: none;
  border-color: var(--accent);
}
.modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.modal-checkbox input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.modal-checkbox a {
  color: var(--accent);
}
.modal-submit {
  width: 100%;
  margin-top: 0.5rem;
}
.modal-box--success {
  text-align: center;
}
.modal-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: rgba(232, 184, 74, 0.2);
  color: var(--accent);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 56px;
  border-radius: 50%;
}
.modal-close-btn {
  margin-top: 0.5rem;
}
