/* ================================================================
   GSE Infissi SRLS — style.css
   Landing page: Infissi a rate in PVC e alluminio nel Lazio
   ================================================================ */

/* ── DESIGN TOKENS ────────────────────────────────────────────── */
:root {
  /* Palette */
  --navy: #14213a;
  --navy-mid: #1a2b48;
  --navy-deep: #0f1b30;
  --teal: #1fa888;
  --teal-hover: #178a70;
  --teal-light: #35bfa4;
  --teal-pale: rgba(31, 168, 136, 0.1);
  --sage-bg: #e6f3f7;
  --sage-accent: #15728a;
  --cream: #f5f7fa;
  --cream-alt: #ebf1f7;
  --white: #ffffff;
  --border: #cdd9e8;
  --text: #14202e;
  --text-mid: #3e5470;
  --text-light: #7090a8;
  --text-on-dark: #ebf2f8;
  --text-on-dark-dim: rgba(235, 242, 248, 0.62);

  /* Typography */
  --font-serif: "Cormorant Garant", Georgia, serif;
  --font-sans: "Outfit", system-ui, sans-serif;

  /* Radii */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(20, 33, 58, 0.07);
  --shadow-md: 0 4px 28px rgba(20, 33, 58, 0.1);
  --shadow-lg: 0 12px 48px rgba(20, 33, 58, 0.14);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t: 0.32s;
}

/* ── RESET & BASE ─────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.68;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* ── SCROLL PROGRESS BAR ──────────────────────────────────────── */
#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  z-index: 1000;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── LAYOUT HELPERS ───────────────────────────────────────────── */
.inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}
@media (max-width: 768px) {
  .inner {
    padding: 0 20px;
  }
}

/* ── TYPOGRAPHY HELPERS ───────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.section-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--teal);
  flex-shrink: 0;
}

h2.display {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}
h2.display em {
  font-style: italic;
  color: var(--teal);
}
h2.display.light {
  color: var(--text-on-dark);
}
h2.display.light em {
  color: var(--teal-light);
}

/* ── BUTTONS ──────────────────────────────────────────────────── */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 15px 34px;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    background var(--t),
    transform var(--t),
    box-shadow var(--t);
  box-shadow: 0 4px 20px rgba(31, 168, 136, 0.32);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    transparent
  );
  transition: left 0.5s ease;
}
.btn-primary:hover::after {
  left: 100%;
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(31, 168, 136, 0.42);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: var(--text-on-dark);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: 100px;
  cursor: pointer;
  transition:
    background var(--t),
    border-color var(--t),
    transform var(--t);
  text-decoration: none;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.38);
  transform: translateY(-1px);
}

.btn-teal-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-pale);
  border: 1.5px solid rgba(31, 168, 136, 0.25);
  color: var(--teal-hover);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition:
    background var(--t),
    transform var(--t);
  text-decoration: none;
}
.btn-teal-outline:hover {
  background: rgba(31, 168, 136, 0.18);
  transform: translateY(-1px);
}

/* ── REVEAL ANIMATIONS ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}
.reveal-left.visible {
  opacity: 1;
  transform: none;
}
.reveal-right {
  opacity: 0;
  transform: translateX(28px);
  transition:
    opacity 0.75s var(--ease-out),
    transform 0.75s var(--ease-out);
}
.reveal-right.visible {
  opacity: 1;
  transform: none;
}
.reveal-clip {
  clip-path: inset(100% 0 0 0);
  opacity: 0;
  transition:
    clip-path 0.85s var(--ease-out),
    opacity 0.85s var(--ease-out);
}
.reveal-clip.visible {
  clip-path: inset(0% 0 0 0);
  opacity: 1;
}

.d1 {
  transition-delay: 0.08s;
}
.d2 {
  transition-delay: 0.16s;
}
.d3 {
  transition-delay: 0.24s;
}
.d4 {
  transition-delay: 0.32s;
}
.d5 {
  transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-clip {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}

/* ── HEADER ───────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 18px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    background 0.4s var(--ease-out),
    padding 0.4s var(--ease-out),
    box-shadow 0.4s;
}
.site-header.scrolled {
  background: rgba(20, 33, 58, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 40px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}
.header-logo img {
  height: 42px;
  width: auto;
  display: block;
}
.header-cta {
  /* desktop only */
}

@media (max-width: 768px) {
  .site-header {
    padding: 14px 20px;
  }
  .site-header.scrolled {
    padding: 10px 20px;
  }
  .header-cta {
    display: none;
  }
}

/* ── HERO ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}
.hero-bg {
  position: absolute;
  inset: -15%;
  background-image: url("../assets/hero.png");
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-overlay-1 {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 33, 58, 0.62) 0%,
    rgba(20, 33, 58, 0.28) 45%,
    rgba(20, 33, 58, 0.76) 100%
  );
}
.hero-overlay-2 {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 70% 50% at 50% 20%,
    rgba(31, 168, 136, 0.06) 0%,
    transparent 60%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 130px 32px 52px;
  max-width: 780px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 168, 136, 0.15);
  border: 1px solid rgba(31, 168, 136, 0.4);
  color: var(--teal-light);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 30px;
  opacity: 0;
  transform: translateY(-10px);
  animation: fadeDown 0.8s 0.15s var(--ease-out) forwards;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 300;
  color: var(--text-on-dark);
  letter-spacing: -0.022em;
  line-height: 1.13;
  margin-bottom: 22px;
  opacity: 0;
  transform: translateY(28px);
  animation: fadeUp 0.9s 0.3s var(--ease-out) forwards;
}
.hero h1 em {
  font-style: italic;
  color: var(--teal-light);
}
.hero-sub {
  font-size: clamp(1rem, 1.75vw, 1.1rem);
  font-weight: 400;
  color: rgba(235, 242, 248, 0.86);
  max-width: 590px;
  margin: 0 auto 40px;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.46s var(--ease-out) forwards;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.9s 0.6s var(--ease-out) forwards;
}

/* Trust bar sotto gli action */
.hero-trust {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 27, 48, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 11px 20px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(235, 242, 248, 0.7);
  white-space: nowrap;
}
.trust-item:last-child {
  border-right: none;
}
.trust-item-icon {
  color: var(--teal-light);
  font-size: 0.82rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeUp 0.7s 1.1s ease forwards;
}
.hero-scroll span {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(235, 242, 248, 0.3);
}
.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(31, 168, 136, 0.6), transparent);
  animation: scrollPulse 2.2s ease infinite;
}

/* ── SEZIONE PROBLEMA ─────────────────────────────────────────── */
.section-problema {
  background: var(--white);
  padding: 100px 40px;
}
.problema-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.problema-label {
}
.problema-text {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.8vw, 2.4rem);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  line-height: 1.4;
  letter-spacing: -0.015em;
}
.problema-text strong {
  font-style: normal;
  font-weight: 600;
}
.problema-aside p {
  font-size: 0.97rem;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 28px;
}

/* ── SEZIONE RATEALE ──────────────────────────────────────────── */
.section-rateale {
  background: var(--navy);
  padding: 88px 40px;
  position: relative;
  overflow: hidden;
}
.section-rateale::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -180px;
  width: 560px;
  height: 560px;
  background: radial-gradient(
    circle,
    rgba(31, 168, 136, 0.06),
    transparent 70%
  );
  pointer-events: none;
}
.rateale-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.rateale-icon {
  width: 64px;
  height: 64px;
  background: rgba(31, 168, 136, 0.12);
  border: 1px solid rgba(31, 168, 136, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 1.5rem;
}
.rateale-inner p {
  font-size: 1.02rem;
  color: var(--text-on-dark-dim);
  line-height: 1.85;
  margin-bottom: 14px;
}
.rateale-nota {
  font-size: 0.8rem !important;
  color: rgba(235, 242, 248, 0.35) !important;
  font-style: italic;
  margin-bottom: 36px !important;
}

/* ── BENEFICI ─────────────────────────────────────────────────── */
.section-benefici {
  background: var(--cream-alt);
  padding: 100px 40px;
}
.benefici-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 52px;
}
.benefit-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s;
  border-top: 3px solid transparent;
}
.benefit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--teal);
}
.benefit-icon {
  font-size: 1.8rem;
  margin-bottom: 18px;
}
.benefit-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.25;
}
.benefit-card p {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ── SEZIONE PERCHÉ ORA ───────────────────────────────────────── */
.section-perche {
  background: var(--cream);
  padding: 88px 40px;
}
.perche-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.perche-inner h2 {
  margin-bottom: 36px;
}
.perche-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 44px;
  text-align: left;
}
.perche-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--white);
  border-radius: var(--r-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.perche-item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--teal-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 0.85rem;
  margin-top: 1px;
}

/* ── COME FUNZIONA ────────────────────────────────────────────── */
.section-steps {
  background: var(--navy-mid);
  padding: 100px 40px;
  position: relative;
  overflow: hidden;
}
.section-steps::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(31, 168, 136, 0.05),
    transparent 70%
  );
  pointer-events: none;
}
.steps-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.step-card {
  background: rgba(255, 255, 255, 0.04);
  padding: 48px 40px;
  position: relative;
  transition: background 0.35s;
  border-top: 2px solid transparent;
}
.step-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-top-color: var(--teal);
}
.step-num {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 300;
  color: var(--teal);
  opacity: 0.22;
  line-height: 1;
  margin-bottom: 24px;
  transition: opacity 0.3s;
}
.step-card:hover .step-num {
  opacity: 0.45;
}
.step-card h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  color: var(--text-on-dark);
  margin-bottom: 12px;
  line-height: 1.25;
}
.step-card p {
  font-size: 0.875rem;
  color: var(--text-on-dark-dim);
  line-height: 1.75;
}
.steps-nota {
  margin-top: 28px;
  text-align: center;
  font-size: 0.76rem;
  font-style: italic;
  color: rgba(235, 242, 248, 0.28);
}

/* CTA Intermedia */
.cta-intermedia {
  background: var(--cream);
  padding: 60px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.cta-intermedia h3 {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 24px;
}

/* ── SOLUZIONI ────────────────────────────────────────────────── */
.section-soluzioni {
  background: var(--cream-alt);
  padding: 100px 40px;
}
.soluzioni-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}
.soluzioni-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.soluzione-card {
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.5s var(--ease-out),
    box-shadow 0.5s;
}
.soluzione-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: var(--shadow-lg);
}
.soluzione-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--navy-mid);
}
.soluzione-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out);
}
.soluzione-card:hover .soluzione-img-wrap img {
  transform: scale(1.07);
}
.soluzione-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(20, 33, 58, 0.72);
  backdrop-filter: blur(6px);
  color: rgba(235, 242, 248, 0.9);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
}
.soluzione-info {
  padding: 20px 22px 24px;
}
.soluzione-info h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 6px;
}
.soluzione-info p {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.soluzioni-nota {
  margin-top: 32px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-mid);
}

/* ── FIDUCIA / CHI SIAMO ──────────────────────────────────────── */
.section-fiducia {
  background: var(--navy);
  padding: 100px 40px;
  position: relative;
  overflow: hidden;
}
.fiducia-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.fiducia-img {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  position: relative;
  background: var(--navy-mid);
}
.fiducia-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.fiducia-img-badge {
  position: absolute;
  bottom: 22px;
  left: 22px;
  background: var(--teal);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: var(--r-sm);
}
.fiducia-text p {
  font-size: 0.97rem;
  color: var(--text-on-dark-dim);
  line-height: 1.85;
  margin-bottom: 16px;
}
.fiducia-text p:last-of-type {
  margin-bottom: 36px;
}
.trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark-dim);
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: var(--r-sm);
  transition:
    background 0.3s,
    border-color 0.3s,
    color 0.3s;
}
.trust-chip:hover {
  background: rgba(31, 168, 136, 0.12);
  border-color: rgba(31, 168, 136, 0.32);
  color: var(--teal-light);
}

/* ── AMBIENTE / TREEDOM ───────────────────────────────────────── */
.section-ambiente {
  background: var(--sage-bg);
  padding: 72px 40px;
}
.ambiente-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 44px;
  align-items: center;
  max-width: 780px;
}
.ambiente-icon-wrap {
  width: 72px;
  height: 72px;
  background: rgba(21, 114, 138, 0.1);
  border: 1px solid rgba(21, 114, 138, 0.22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ambiente-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--sage-accent);
  margin-bottom: 12px;
  letter-spacing: -0.015em;
}
.ambiente-content p {
  font-size: 0.95rem;
  color: rgba(21, 114, 138, 0.78);
  line-height: 1.8;
}

/* ── FAQ ──────────────────────────────────────────────────────── */
.section-faq {
  background: var(--white);
  padding: 100px 40px;
}
.faq-layout {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 72px;
  align-items: start;
}
.faq-sticky {
  position: sticky;
  top: 100px;
}
.faq-sticky h2 {
  margin-bottom: 18px;
}
.faq-sticky p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.8;
  margin-bottom: 28px;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item:first-child {
  border-top: 1px solid var(--border);
}
.faq-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--t);
}
.faq-btn:hover {
  color: var(--teal-hover);
}
.faq-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition:
    transform 0.32s var(--ease-spring),
    background 0.28s,
    border-color 0.28s,
    color 0.28s;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
.faq-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.42s var(--ease-out);
}
.faq-item.open .faq-body {
  max-height: 320px;
}
.faq-body-inner {
  padding-bottom: 20px;
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.8;
}
.faq-body-inner a {
  color: var(--teal-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── FORM ─────────────────────────────────────────────────────── */
.section-form {
  background: var(--cream-alt);
  padding: 100px 40px 120px;
  scroll-margin-top: 80px;
}
.form-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 72px;
  align-items: start;
}
.form-aside {
  position: sticky;
  top: 100px;
}
.form-aside h2 {
  margin-bottom: 18px;
}
.form-aside p {
  font-size: 0.95rem;
  color: var(--text-mid);
  line-height: 1.85;
  margin-bottom: 32px;
}
.form-contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-mid);
  transition: color var(--t);
}
.form-contact-link:hover {
  color: var(--teal-hover);
}
.form-contact-link-icon {
  width: 36px;
  height: 36px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.form-card {
  background: var(--white);
  border-radius: var(--r-lg);
  padding: 44px;
  box-shadow: var(--shadow-md);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group.full {
  grid-column: 1 / -1;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group textarea,
.form-group select {
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 13px 16px;
  font-family: var(--font-sans);
  font-size: 0.94rem;
  color: var(--text);
  width: 100%;
  outline: none;
  transition:
    border-color var(--t),
    box-shadow var(--t),
    background var(--t);
  appearance: none;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(31, 168, 136, 0.1);
  background: #fff;
}
.form-group input:not([type="checkbox"]):not([type="radio"]):invalid:not(:focus):not(:placeholder-shown),
.form-group select:invalid:not(:focus) {
  border-color: #c0392b;
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* Select arrow */
.select-wrap {
  position: relative;
}
.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-light);
  font-size: 0.8rem;
}

/* Radio tipo */
.tipo-opts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tipo-opt input {
  display: none;
}
.tipo-opt label {
  display: block;
  padding: 8px 18px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all var(--t);
  letter-spacing: 0;
  text-transform: none;
}
.tipo-opt input:checked + label {
  border-color: var(--teal);
  background: var(--teal-pale);
  color: var(--teal-hover);
}
.tipo-opt label:hover {
  border-color: var(--teal);
  color: var(--teal-hover);
}
.tipo-opt input:focus-visible + label {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* Checkboxes */
.check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.check-wrap input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  cursor: pointer;
  flex-shrink: 0;
}
.check-wrap label {
  font-size: 0.875rem;
  color: var(--text-mid);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  line-height: 1.55;
}
.check-wrap label a {
  color: var(--teal-hover);
  text-decoration: underline;
}

/* Honeypot */
.hp-field {
  display: none !important;
}

/* Submit */
.btn-submit {
  width: 100%;
  margin-top: 10px;
  padding: 17px 32px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.97rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition:
    background var(--t),
    transform var(--t),
    box-shadow var(--t);
  box-shadow: 0 4px 20px rgba(31, 168, 136, 0.3);
}
.btn-submit::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}
.btn-submit:hover::after {
  left: 100%;
}
.btn-submit:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(31, 168, 136, 0.38);
}
.form-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 12px;
}

/* ── FOOTER ───────────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep);
  padding: 64px 40px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer-grid {
  max-width: 1180px;
  margin: 0 auto 48px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 52px;
}
/* Logo: box bianco arrotondato per leggibilità su sfondo scuro */
.footer-logo-box {
  display: inline-block;
  background: #ffffff;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
}
.footer-logo-box img {
  height: 34px;
  width: auto;
  display: block;
}
/* Retrocompatibilità con vecchia classe .footer-logo */
.footer-logo {
  margin-bottom: 16px;
}
.footer-logo img {
  height: 38px;
  width: auto;
}

.footer-desc {
  font-size: 0.87rem;
  color: rgba(235, 242, 248, 0.55);
  line-height: 1.8;
  max-width: 240px;
}
.footer-col h4 {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(235, 242, 248, 0.45);
  margin-bottom: 16px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col ul li,
.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(235, 242, 248, 0.62);
  transition: color var(--t);
  line-height: 1.55;
}
.footer-col ul li a:hover {
  color: var(--teal-light);
}
.footer-maps-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.84rem;
  color: var(--teal-light) !important;
  margin-top: 4px;
}
.footer-maps-link:hover {
  color: var(--teal-hover) !important;
  text-decoration: underline;
}
.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.76rem;
  color: rgba(235, 242, 248, 0.36);
}
.footer-legal {
  display: flex;
  gap: 18px;
}
.footer-legal a {
  font-size: 0.76rem;
  color: rgba(235, 242, 248, 0.38);
  transition: color var(--t);
}
.footer-legal a:hover {
  color: var(--teal-light);
}

/* ── MOBILE STICKY BAR ────────────────────────────────────────── */
.mobile-sticky {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 600;
  background: rgba(20, 33, 58, 0.97);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
}
.mobile-sticky a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  border-radius: var(--r-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    opacity var(--t),
    transform var(--t);
}
.mobile-sticky a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}
.sticky-prev {
  background: var(--teal);
  color: #fff;
}
.sticky-wa {
  background: #25d366;
  color: #fff;
}

/* ── KEYFRAMES ────────────────────────────────────────────────── */
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes fadeDown {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes scrollPulse {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 1;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
  100% {
    transform: scaleY(1);
    opacity: 0;
  }
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .benefici-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .soluzioni-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1024px) {
  .problema-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .fiducia-layout {
    grid-template-columns: 1fr;
  }
  .fiducia-img {
    aspect-ratio: 16/9;
  }
  .faq-layout {
    grid-template-columns: 1fr;
  }
  .faq-sticky {
    position: static;
  }
  .form-layout {
    grid-template-columns: 1fr;
  }
  .form-aside {
    position: static;
  }
}
@media (max-width: 768px) {
  .section-problema,
  .section-rateale,
  .section-benefici,
  .section-perche,
  .section-steps,
  .section-soluzioni,
  .section-fiducia,
  .section-ambiente,
  .section-faq,
  .section-form {
    padding: 72px 20px;
  }
  .cta-intermedia {
    padding: 48px 20px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
  }
  .benefici-grid {
    grid-template-columns: 1fr 1fr;
  }
  .soluzioni-grid {
    grid-template-columns: 1fr 1fr;
  }
  .perche-list {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer {
    padding: 48px 20px 28px;
  }
  .footer-desc {
    max-width: 100%;
  }
  .form-card {
    padding: 28px 20px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-group.full {
    grid-column: 1;
  }
  .ambiente-layout {
    grid-template-columns: 1fr;
  }
  .ambiente-icon-wrap {
    display: none;
  }
  .mobile-sticky {
    display: flex;
  }
  body {
    padding-bottom: 80px;
  }

  /* Hero mobile */
  .hero-content {
    padding: 100px 20px 44px;
  }
  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 16px;
  }
  .hero-sub {
    font-size: 0.97rem;
    max-width: 100%;
    margin-bottom: 28px;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-scroll {
    display: none;
  }

  /* Trust bar mobile: orizzontale compatta */
  .hero-trust {
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 12px;
  }
  .trust-item {
    padding: 6px 10px;
    font-size: 0.73rem;
    border-right: none;
  }
  .trust-item {
    border-bottom: none;
  }

  /* Nasconde 2 trust items secondari su mobile */
  .trust-hide-mobile {
    display: none;
  }
}

@media (max-width: 480px) {
  /* Hero: dimensioni ulteriormente ridotte */
  .hero h1 {
    font-size: 2.1rem;
    line-height: 1.18;
  }
  .hero-cta-tel {
    display: none;
  } /* Tel → sticky bar mobile */
  .hero-content {
    padding: 90px 18px 36px;
  }

  /* Griglia colonne → 1 colonna */
  .benefici-grid {
    grid-template-columns: 1fr;
  }
  .soluzioni-grid {
    grid-template-columns: 1fr;
  }
}

/* ── EXTRA SMALL (390px, 375px) ───────────────────────────────── */
@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.9rem;
  }
  .hero-sub {
    font-size: 0.93rem;
  }
  .btn-primary,
  .btn-ghost {
    font-size: 0.85rem;
    padding: 12px 20px;
  }
  .hero-badge {
    font-size: 0.68rem;
    padding: 6px 14px;
  }
}

/* ── FOCUS VISIBLE (accessibilità) ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible {
  border-radius: 4px;
}
