/* ============================================================
   energia-sostenibile — "Solar-Tech" dark design system
   Carbone profondo + ambra elettrica. Tipografia grotesque + mono.
   Le variabili e i nomi delle classi sono invariati: tutte le
   pagine (header/footer/index/tariffe/chi-siamo/contatti) restano
   funzionanti, cambia solo il linguaggio visivo.
   ============================================================ */

:root {
  /* Accento solare (ex "primary/accent" verdi) */
  --primary: #ffb020;          /* ambra — colore identità/evidenza */
  --primary-rgb: 255, 176, 32; /* usato per le ombre/focus ring */
  --accent: #ffb020;
  --accent-hover: #ffc24d;
  --accent-bg: rgba(255, 176, 32, 0.12); /* chip/tag tenui */

  /* Superfici scure */
  --bg-page: #0b0b0d;          /* carbone profondo */
  --bg-cream: #131317;         /* superficie elevata (sezioni alterne, card) */
  --secondary: #0e0e12;        /* pannelli molto scuri (footer / how-it-works) */
  --panel: #16161b;

  /* Testo caldo su scuro */
  --text-dark: #ece8e1;        /* testo/titoli principali (off-white caldo) */
  --text-secondary: #9c958a;
  --text-muted: #6f6a62;
  --text-label: #c4bdb2;
  --border: #26262e;
  --grid: rgba(255, 255, 255, 0.035);

  /* Gradienti ambra (ex verdi) */
  --grad-yellow: linear-gradient(135deg, #ffc24d 0%, #f5921e 100%);
  --grad-magenta: linear-gradient(135deg, #ffb020 0%, #e0760a 100%);
  --grad-blue: linear-gradient(135deg, #2a2a33 0%, #131317 100%);

  --glow: 0 0 0 1px rgba(255, 176, 32, 0.35), 0 12px 40px -8px rgba(255, 176, 32, 0.35);

  --font-h: 'Bricolage Grotesque', sans-serif;
  --font-main: 'Hanken Grotesk', sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-pill: 8px; /* angoli netti, non pillola: divergenza dall'originale */
  --gutter: 24px;
  --section-padding: 96px;
}

* { box-sizing: border-box; }

body {
  font-size: 18px;
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  /* Atmosfera: leggerissima aurora ambra in alto */
  background-image:
    radial-gradient(1200px 600px at 75% -10%, rgba(255, 176, 32, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(255, 176, 32, 0.05), transparent 55%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-h);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-dark);
}

a { color: var(--accent); }

::selection { background: rgba(255, 176, 32, 0.25); color: #fff; }

/* Utility: etichetta mono "eyebrow" (riusata in più punti) */
.section-sub, .hero-tag, .offer-card-ribbon, .nav-link, .offer-provider {
  font-family: var(--font-main);
}

/* ─── Header ─── */
.main-header {
  background: rgba(11, 11, 13, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  max-height: 46px;
  width: auto;
}

/* Logo scuro reso visibile sull'header scuro */
.main-header .logo-img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
  position: relative;
  padding: 4px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 176, 32, 0.8);
  transition: width 0.25s ease;
}

.nav-link:hover { color: var(--text-dark); }
.nav-link:hover::after { width: 100%; }

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  padding: 0;
  border-bottom: 1px solid var(--border);
}

/* Velo scuro + tinta ambra sopra la foto */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11,11,13,0.92) 0%, rgba(11,11,13,0.62) 45%, rgba(11,11,13,0.25) 100%),
    radial-gradient(80% 120% at 80% 50%, rgba(255,176,32,0.18), transparent 60%);
  z-index: 1;
}

/* Griglia tecnica + dissolvenza verso il fondo pagina (sostituisce l'onda) */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: linear-gradient(180deg, transparent, var(--bg-page));
  z-index: 3;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 10;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

.hero-content { max-width: 720px; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 176, 32, 0.10);
  border: 1px solid rgba(255, 176, 32, 0.35);
  color: var(--accent);
  padding: 7px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 28px;
  letter-spacing: 2px;
}

.hero-tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px 1px var(--accent);
}

.hero h1 {
  font-size: clamp(44px, 6.5vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: #fff;
}

.hero h1 span { color: var(--accent); text-shadow: 0 0 28px rgba(255, 176, 32, 0.55); }

.hero p {
  font-size: 20px;
  line-height: 1.55;
  color: rgba(236, 232, 225, 0.82);
  margin-bottom: 40px;
  max-width: 560px;
}

/* Onda rimossa dal DOM; la regola resta neutralizzata per sicurezza */
.hero-wave { display: none; }

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn-primary {
  padding: 15px 34px;
  background: var(--grad-yellow);
  color: #16100a;
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: center;
  box-shadow: 0 8px 24px -8px rgba(255, 176, 32, 0.55);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -8px rgba(255, 176, 32, 0.7);
  filter: brightness(1.05);
}

.btn-secondary {
  padding: 15px 30px;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.4);
}

/* ─── Features ─── */
.features-section {
  padding: var(--section-padding) 20px;
  background: var(--bg-page);
}

.features-container {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.trust-card {
  background: var(--bg-cream);
  padding: 38px 30px;
  border-radius: var(--radius-lg);
  text-align: left;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Riga d'accento luminosa in alto, rivelata all'hover */
.trust-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad-yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.trust-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 176, 32, 0.4);
  box-shadow: 0 18px 50px -20px rgba(255, 176, 32, 0.45);
}

.trust-card:hover::before { transform: scaleX(1); }

.trust-mascot {
  height: 56px; width: 56px; margin-bottom: 22px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(74%) sepia(64%) saturate(1100%) hue-rotate(343deg) brightness(101%) contrast(101%);
}

.trust-card h4 {
  margin: 0 0 12px; font-size: 21px;
  color: var(--text-dark); font-weight: 700;
}

.trust-card p {
  margin: 0; font-size: 16px; line-height: 1.65; color: var(--text-secondary);
}

@media (max-width: 768px) {
  .hero { height: auto; min-height: 0; padding: 130px 20px 90px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .features-container { grid-template-columns: 1fr; gap: 24px; }
}

/* ─── Trustpilot / Recensioni ─── */
.trustpilot-section {
  padding: var(--section-padding) 20px;
  background: var(--bg-cream);
  color: var(--text-dark);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trustpilot-section .section-title,
.trustpilot-section .section-sub { color: var(--text-dark); }

.trustpilot-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: var(--gutter);
}

.tp-container {
  flex: 0 0 300px;
  background: var(--panel);
  padding: 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tp-stars { color: var(--accent); font-size: 32px; margin-bottom: 18px; letter-spacing: 2px; text-shadow: 0 0 16px rgba(255,176,32,0.5); }
.tp-text { font-size: 20px; margin: 0 0 12px; color: var(--text-dark); }
.tp-logo { font-weight: 700; }
.tp-star-logo { color: var(--accent); }
.tp-subtext { font-size: 14px; color: var(--text-secondary); }

.tp-reviews {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}

.tp-review-card {
  background: var(--panel);
  padding: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.tp-review-card:hover { border-color: rgba(255,176,32,0.35); transform: translateY(-4px); }
.tp-review-stars { color: var(--accent); font-size: 18px; margin-bottom: 14px; letter-spacing: 2px; }
.tp-review-title { margin: 0 0 12px; font-size: 18px; font-weight: 700; font-family: var(--font-h); color: var(--text-dark); }
.tp-review-body { font-size: 15px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 20px; }
.tp-review-author { font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-weight: 700; }

@media (max-width: 900px) {
  .trustpilot-wrapper { flex-direction: column; }
  .tp-reviews { grid-template-columns: 1fr; }
}

/* ─── How it works ─── */
.how-it-works-section {
  position: relative;
  padding: var(--section-padding) 20px;
  background: var(--secondary);
  color: #fff;
  overflow: hidden;
}

/* Griglia tecnica di sfondo */
.how-it-works-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(80% 80% at 50% 0%, #000, transparent 75%);
  mask-image: radial-gradient(80% 80% at 50% 0%, #000, transparent 75%);
}

.how-it-works-section .section-title,
.how-it-works-section .section-sub { color: #fff; position: relative; }
.how-it-works-section .section-sub { color: rgba(255, 255, 255, 0.7); }

.hiw-container { max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.hiw-header { text-align: center; margin-bottom: 52px; }

.hiw-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}

.hiw-step {
  text-align: left;
  padding: 36px 26px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  position: relative;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.hiw-step:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 176, 32, 0.5);
  background: rgba(255, 176, 32, 0.04);
}

.hiw-number {
  background: transparent;
  color: var(--accent);
  width: auto; height: auto;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0 0 18px;
  display: inline-block;
}

.hiw-number::before { content: "0"; }

.hiw-step p { font-size: 16px; line-height: 1.55; color: rgba(236,232,225,0.9); font-weight: 500; margin: 0; }

@media (max-width: 900px) { .hiw-steps { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (max-width: 600px) { .hiw-steps { grid-template-columns: 1fr; } }

/* ─── Layout & Typography ─── */
.container { max-width: 720px; margin: -40px auto 60px; padding: 0 20px; }

.section-title, .step-title {
  font-family: var(--font-h);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  margin: 0 0 14px;
  color: var(--text-dark);
}

.section-title span, .step-title span {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(255, 176, 32, 0.5);
}

.section-sub, .step-sub {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
}

/* ─── Offer cards ─── */
.offer-card, .lead-card { background: var(--bg-cream); border-radius: var(--radius-lg); }

.offer-card {
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.offer-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 60px -24px rgba(255, 176, 32, 0.5);
  border-color: rgba(255, 176, 32, 0.4);
}

/* Offerta in evidenza: bordo ambra luminoso */
.offer-card.exclusive {
  border-color: rgba(255, 176, 32, 0.55);
  box-shadow: var(--glow);
}

.offer-card-ribbon {
  background: var(--grad-blue);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 14px;
  text-align: center;
}

.offer-card-body { padding: 20px; }
.offer-card-header { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.offer-name { color: var(--text-dark); }
.offer-provider { font-family: var(--font-mono); }
.offer-price { font-size: 34px; font-weight: 800; color: var(--accent); font-family: var(--font-h); }
.offer-price-detail { color: var(--text-muted); }

.offer-saving {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 12px 0;
}

.offer-tag {
  font-size: 13px;
  color: var(--text-label);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 10px;
  border-radius: 6px;
  margin-right: 4px;
}

/* ─── Form Elements ─── */
.input, .btn-cta, .btn-submit { font-family: inherit; transition: all .15s; }

.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-dark);
  outline: none;
}

.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 176, 32, 0.18); }

.btn-cta, .btn-submit {
  border: none;
  background: var(--grad-yellow);
  color: #16100a;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}

.btn-cta:hover, .btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px rgba(255, 176, 32, 0.6);
  filter: brightness(1.05);
}

.btn-submit { padding: 16px; border-radius: var(--radius-pill); margin-top: 8px; }
.btn-submit:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; }

.fascia-btn {
  flex: 1; padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-secondary);
  cursor: pointer; font-weight: 600;
}

.fascia-btn.selected { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }

.field-error { font-size: 14px; color: #f87171; min-height: 16px; margin-top: 4px; }

.consent-label {
  display: flex; gap: 8px; font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; cursor: pointer;
}

.price-disclaimer { font-size: 13px; color: var(--text-muted); text-align: center; padding: 20px; }

/* ─── Footer ─── */
.main-footer {
  position: relative;
  background: var(--secondary);
  border-top: 1px solid var(--border);
  padding: 80px 20px 40px;
  margin-top: 100px;
  color: #fff;
  overflow: hidden;
}

.main-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,176,32,0.6), transparent);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  gap: var(--gutter);
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-brand { max-width: 340px; }
.footer-brand .logo { display: block; margin-bottom: 16px; }
.footer-brand .logo-img { filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { color: rgba(236, 232, 225, 0.6); line-height: 1.65; font-size: 16px; margin: 0; }

.footer-links { display: flex; gap: 90px; flex-wrap: wrap; }

.footer-col h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  font-size: 13px;
  margin: 0 0 20px;
}

.footer-col a {
  display: block;
  color: rgba(236, 232, 225, 0.62);
  text-decoration: none;
  margin-bottom: 12px;
  font-size: 16px;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin: 60px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: rgba(236, 232, 225, 0.4);
  font-size: 14px;
}

@media (max-width: 768px) {
  .footer-container { flex-direction: column; gap: 40px; }
  .footer-links { gap: 40px; flex-direction: column; }
}

/* ─── About / misc ─── */
.about-section { padding: 120px 20px; }

.divider {
  width: 60px; height: 2px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 176, 32, 0.6);
  margin: 24px 0;
}

.circular-img {
  width: 400px; height: 400px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--glow);
}

/* Immagine "mask" in chi-siamo: cornice tecnica con bagliore ambra */
.hero-image-mask {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.serif-title { font-family: var(--font-h); }

/* Submit button disabled state (shared visual cue) */
#btnSubmit:disabled,
#btnSubmit[disabled] {
  opacity: 0.5;
  filter: grayscale(60%);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
#btnSubmit:disabled:hover,
#btnSubmit[disabled]:hover {
  opacity: 0.5;
  filter: grayscale(60%);
  transform: none;
  box-shadow: none;
}
