/*
Theme Name: Metodo CARB Landing
Theme URI: https://metodocarb.it/
Author: Fabio De Stefano
Author URI: https://metodocarb.it/
Description: Custom Landing Page per il Metodo C.A.R.B.
Version: 1.0
*/

:root {
  --bg: #FFFFFF;
  --bg-soft: #F8F9FB;
  --brand: #3A82C4; /* Logo celeste */
  --brand-deep: #2A649E;
  --brand-soft: rgba(58, 130, 196, 0.08);
  --navy: #112340; /* Dark Navy for text and dark backgrounds */
  --navy-deep: #0B172B;
  --navy-soft: rgba(17, 35, 64, 0.06);
  --ink-1: #112340;
  --ink-2: #334155;
  --ink-3: #64748B;
  --ink-4: #94A3B8;
  --line: rgba(17, 35, 64, 0.10);
  --line-soft: rgba(17, 35, 64, 0.06);
  --shadow-sm: 0 2px 8px rgba(17, 35, 64, 0.04), 0 1px 2px rgba(17, 35, 64, 0.06);
  --shadow-md: 0 8px 24px rgba(17, 35, 64, 0.06), 0 2px 6px rgba(17, 35, 64, 0.04);
  --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink-1);
  font-family: var(--font-display);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--navy);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Base Typo */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ''; width: 28px; height: 1.5px; background: var(--brand); }

.brand { color: var(--brand); font-style: italic; font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 30px;
  font-size: 15px; font-weight: 600;
  border-radius: 9999px; border: none;
  transition: all .25s;
  cursor: pointer;
}
.btn-brand { background: var(--brand); color: white; }
.btn-brand:hover { background: var(--brand-deep); box-shadow: 0 10px 30px rgba(58, 130, 196, 0.3); transform: translateY(-2px); }

/* Navbar */
.nav-shell {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  pointer-events: none; padding: 16px 24px;
  display: flex; justify-content: center;
  transition: padding .4s cubic-bezier(.4,0,.2,1);
}
.nav-bar {
  pointer-events: auto;
  width: 100%; max-width: 1280px;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px;
  padding: 12px 18px 12px 24px;
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent;
  border-radius: 9999px;
  transition: all .4s cubic-bezier(.65,0,.35,1);
}
.nav-bar.morphed {
  background: rgba(255,255,255,0.96);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
  padding: 10px 18px 10px 24px;
}
.nav-logo-text { font-weight: 800; font-size: 18px; color: var(--navy); letter-spacing: -0.02em; }
.nav-logo-text em { font-style: normal; color: var(--brand); }
.nav-logo-payoff {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-4); font-weight: 600; margin-top: 2px;
}
.nav-links { display: flex; justify-content: center; gap: 6px; }
.nav-link {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  padding: 8px 16px; border-radius: 9999px; transition: all .2s;
}
.nav-link:hover { color: var(--navy); background: var(--bg-soft); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; background: var(--navy); color: white;
  border-radius: 9999px; font-size: 14px; font-weight: 600;
  transition: all .25s;
}
.nav-cta:hover { background: var(--brand); gap: 12px; }
.arrow-svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Hero Image Background */
.hero-bg {
  position: relative;
  height: 100vh;
  min-height: 700px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 35, 64, 0.95) 0%, rgba(17, 35, 64, 0.6) 50%, rgba(17, 35, 64, 0.2) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}
.hero-text {
  max-width: 680px;
  color: white;
}
.eyebrow-light {
  color: rgba(255, 255, 255, 0.8) !important;
}
.eyebrow-light::before {
  display: none !important; /* override the global ::before */
}
.eyebrow-line-light {
  width: 28px;
  height: 1.5px;
  background: rgba(255, 255, 255, 0.8);
  display: inline-block;
  margin-right: 12px;
}
.hero-text h1 {
  font-size: clamp(38px, 8vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 24px 0 24px;
  color: white;
}
.hero-text p {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-ghost-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  background: transparent;
  color: white;
  font-size: 15px;
  font-weight: 600;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all .25s;
  cursor: pointer;
}
.btn-ghost-light:hover {
  border-color: white;
  background: rgba(255, 255, 255, 0.1);
  gap: 12px;
}

@media (max-width: 900px) {
  .hero-bg { height: auto; min-height: 80vh; padding: 160px 0 80px; }
  .hero-overlay { background: linear-gradient(180deg, rgba(17, 35, 64, 0.9) 0%, rgba(17, 35, 64, 0.7) 100%); }
  .nav-links { display: none; }
}

/* Sections */
.section { padding: 120px 0; background: var(--bg); }
.section-soft { background: var(--bg-soft); }
.section-brand { background: var(--brand); color: white; }
.section-brand h2, .section-brand p, .section-brand .card h3, .section-brand .card p { color: white; }
.section-brand .card { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.2); }
.section-brand .card:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.15); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.section-brand .eyebrow { color: rgba(255, 255, 255, 0.8); }
.section-brand .eyebrow::before { background: rgba(255, 255, 255, 0.8); }
.section-brand .card-num { color: rgba(255, 255, 255, 0.8); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-head h2 { font-size: clamp(30px, 7vw, 56px); margin: 24px 0; }
.section-head p { font-size: 18px; line-height: 1.65; color: var(--ink-3); }

/* About Grid */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text-col h2 { font-size: clamp(32px, 8vw, 64px); margin: 24px 0; line-height: 1.1; }
.about-lead { font-size: 20px; line-height: 1.6; color: var(--ink-2); margin-bottom: 32px; }
.about-lead strong { color: var(--navy); font-weight: 700; }
.about-checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.about-checklist li { display: flex; gap: 16px; align-items: center; font-size: 18px; font-weight: 600; color: var(--navy); }
.about-checklist svg { width: 24px; height: 24px; color: var(--brand); flex-shrink: 0; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* Stats Grid (Numeri) */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.stat-item strong { font-size: clamp(36px, 10vw, 80px); font-weight: 800; color: var(--brand); line-height: 1; letter-spacing: -0.04em; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.stat-item .stat-num { font-size: inherit; color: inherit; }
.stat-item .stat-label { font-size: 16px; font-weight: 600; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr; gap: 40px; } }

/* Carousels */
.carousel-wrapper { position: relative; }
.features-carousel {
  display: flex; gap: 30px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 20px calc(50vw - 50%) 40px; margin: 0 calc(50% - 50vw);
  -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap;
}
.features-carousel::-webkit-scrollbar { display: none; }
.features-carousel .card { flex: 0 0 340px; scroll-snap-align: center; min-width: 340px; }

/* Locked Carousel */
/* Locked Carousel */
.locked-carousel-wrapper { position: relative; overflow: hidden; margin: 0 calc(50% - 50vw); padding: 0 calc(50vw - 50%); }
.locked-carousel { margin: 0; padding: 20px 0 40px; }
.locked-card { position: relative; display: flex; flex-direction: column; }
.locked-card .card-content { flex-grow: 1; }
.locked-icon { position: absolute; top: 32px; right: 32px; color: var(--brand); width: 24px; height: 24px; opacity: 0.5; }
.locked-btn { margin-top: 24px; width: 100%; justify-content: center; }

/* Card Grid */
.card-grid { display: grid; gap: 20px; }
.card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: 40px 32px; background: var(--bg);
  border: 1px solid var(--line-soft); border-radius: 20px;
  transition: all .35s cubic-bezier(.34,1.56,.64,1);
}
.card:hover { border-color: var(--line); transform: translateY(-8px); box-shadow: var(--shadow-md); }
.card-num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--brand); margin-bottom: 24px; font-weight: 600; }
.card h3 { font-size: 24px; margin-bottom: 16px; }
.card p { font-size: 15px; line-height: 1.65; color: var(--ink-3); }

/* Pilastri Alternati */
#pilastri .card:nth-child(even) { background: var(--brand); border-color: rgba(255,255,255,0.2); }
#pilastri .card:nth-child(even) h3, #pilastri .card:nth-child(even) p { color: white; }
#pilastri .card:nth-child(even) .card-num { color: rgba(255,255,255,0.8); }

@media (max-width: 900px) {
  .card-grid.cols-3, .card-grid.cols-4 { grid-template-columns: 1fr; }
}

/* ZigZag Phases (Moduli) */
.metodo-phases { padding: 80px 0; position: relative; }
.metodo-phases > .container { display: flex; flex-direction: column; gap: 140px; }
.phase {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center;
}
.phase-photo-col { position: relative; }
.phase-photo {
  position: relative; z-index: 1; aspect-ratio: 4 / 3; border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(17,35,64,0.2);
}
.phase-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s; }
.phase:hover .phase-photo img { transform: scale(1.05); }
.phase-photo-overlay { position: absolute; inset: 0; mix-blend-mode: multiply; pointer-events: none; }
.phase-overlay-brand { background: linear-gradient(165deg, rgba(58,130,196,0.15) 0%, rgba(58,130,196,0.02) 60%); }
.phase-overlay-navy { background: linear-gradient(165deg, rgba(17,35,64,0.15) 0%, rgba(17,35,64,0.04) 60%); }

.phase-content-col { position: relative; }
.phase-num {
  position: absolute; top: -60px; font-family: var(--font-display);
  font-size: clamp(140px, 20vw, 240px); font-weight: 800; letter-spacing: -0.06em; line-height: 0.9;
  color: var(--brand); opacity: 0.05; pointer-events: none; z-index: 0;
}
.phase-odd .phase-num { right: -20px; }
.phase-even .phase-num { left: -20px; }
.phase-content { position: relative; z-index: 1; }
.phase-eyebrow {
  display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; color: var(--brand); margin-bottom: 24px;
}
.phase-eyebrow-line { width: 32px; height: 1.5px; background: var(--brand); display: inline-block; }
.phase-content h2 { font-size: clamp(28px, 7vw, 48px); margin: 0 0 24px; }
.phase-lead { font-size: 18px; line-height: 1.65; color: var(--ink-2); margin: 0 0 32px; max-width: 540px; }

.phase-output {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center;
  padding: 20px 24px; background: var(--brand-soft); border-left: 4px solid var(--brand);
  border-radius: 4px 16px 16px 4px;
}
.phase-output-icon svg { width: 24px; height: 24px; color: var(--brand); }
.phase-output strong { display: block; font-size: 14px; font-weight: 700; color: var(--brand-deep); margin-bottom: 2px; }
.phase-output span { font-size: 16px; font-weight: 600; color: var(--navy); }

@media (max-width: 900px) {
  .phase { grid-template-columns: 1fr; gap: 40px; }
  .phase-odd .phase-content-col { grid-row: 1; }
  .phase-odd .phase-photo-col { grid-row: 2; }
}

/* CTA Strip */
.cta-strip { padding: 140px 0; background: var(--brand); color: white; text-align: center; }
.cta-strip h2 { font-size: clamp(32px, 8vw, 64px); color: white; margin-bottom: 24px; }
.cta-strip p { font-size: 18px; line-height: 1.65; color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 40px; }

/* Footer Grid */
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 60px; text-align: left; }
.footer-col a:hover { color: white !important; }
.footer-form button:hover { background: var(--navy-deep) !important; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; text-align: center; justify-content: center; }
  
  /* Mobile UI Fixes */
  .nav-bar { padding: 12px 16px; gap: 12px; }
  .nav-logo-text { font-size: 16px; }
  .nav-cta { padding: 10px 16px; font-size: 13px; }
  .section { padding: 60px 0; }
  .metodo-phases { padding: 40px 0; }
  .metodo-phases > .container { gap: 60px; }
  .phase-odd .phase-num, .phase-even .phase-num { left: -10px; right: auto; font-size: 160px; top: -40px; }
  
  #pilastri .card-grid, .section-brand .card-grid {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(50% - 50vw); padding: 20px calc(50vw - 50%) 40px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap;
  }
  #pilastri .card-grid::-webkit-scrollbar, .section-brand .card-grid::-webkit-scrollbar { display: none; }
  #pilastri .card, .section-brand .card { flex: 0 0 300px; scroll-snap-align: center; }

  /* Normalizza i titoli e testi per tutte le sezioni su mobile */
  .section-head h2, .about-text-col h2, .phase-content h2, .cta-strip h2 {
    font-size: 32px !important; line-height: 1.2 !important;
  }
  .section-head p, .about-lead, .phase-lead, .cta-strip p {
    font-size: 16px !important; line-height: 1.5 !important;
  }
  .card h3 { font-size: 20px !important; }
  .card p { font-size: 15px !important; }
}

/* Animations */
[data-anim] { opacity: 0; transform: translateY(40px); transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
[data-anim].in-view { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
[data-stagger].in-view > * { opacity: 1; transform: none; }
[data-stagger].in-view > *:nth-child(2) { transition-delay: 0.1s; }
[data-stagger].in-view > *:nth-child(3) { transition-delay: 0.2s; }
[data-stagger].in-view > *:nth-child(4) { transition-delay: 0.3s; }

/* Legal Pages Typography */
.legal-page { background: var(--bg-soft); padding-top: 100px; }
.legal-content { padding: 60px 0; }
.legal-doc { max-width: 800px; margin: 0 auto; background: white; padding: 60px; border-radius: 24px; box-shadow: var(--shadow-sm); border: 1px solid var(--line-soft); }
.legal-doc h1 { font-size: 32px; margin-bottom: 40px; color: var(--navy); border-bottom: 2px solid var(--line-soft); padding-bottom: 20px; }
.legal-doc h3 { font-size: 20px; margin: 32px 0 16px; color: var(--navy); }
.legal-doc p, .legal-doc ul { font-size: 16px; line-height: 1.7; color: var(--ink-2); margin-bottom: 16px; }
.legal-doc ul { padding-left: 24px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc a { color: var(--brand); text-decoration: underline; }
.legal-doc strong { color: var(--navy); }

@media (max-width: 900px) {
  .legal-doc { padding: 32px 24px; }
  .legal-doc h1 { font-size: 24px; }
}

/* Cookie Banner */
.cookie-banner {
  position: fixed; bottom: -100%; left: 0; right: 0; z-index: 9999;
  background: white; box-shadow: 0 -10px 40px rgba(17,35,64,0.1);
  padding: 32px; border-top: 1px solid var(--line-soft);
  transition: bottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
}
.cookie-banner.show { bottom: 0; }
.cookie-banner-text p { font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 800px; margin: 0 auto; }
.cookie-banner-text a { color: var(--brand); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn-cookie-outline {
  padding: 12px 24px; background: transparent; border: 1px solid var(--line); border-radius: 9999px;
  font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; transition: all 0.2s;
}
.btn-cookie-outline:hover { background: var(--bg-soft); border-color: var(--ink-4); }
.btn-cookie-solid {
  padding: 12px 24px; background: var(--brand); border: none; border-radius: 9999px;
  font-size: 14px; font-weight: 600; color: white; cursor: pointer; transition: all 0.2s;
}
.btn-cookie-solid:hover { background: var(--brand-deep); }

/* Lead Generation Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(17, 35, 64, 0.85); backdrop-filter: blur(4px);
  z-index: 99999; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-box {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -40%);
  background: white; width: 100%; max-width: 480px; border-radius: 24px; padding: 48px;
  z-index: 100000; opacity: 0; visibility: hidden; transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 40px 80px -20px rgba(0,0,0,0.3);
}
.modal-box.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%); }
.modal-close {
  position: absolute; top: 24px; right: 24px; background: rgba(17, 35, 64, 0.05); border: none;
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--navy); transition: all 0.2s;
}
.modal-close:hover { background: rgba(17, 35, 64, 0.1); }
.modal-close svg { width: 20px; height: 20px; }

.lead-form { display: flex; flex-direction: column; gap: 16px; }
.form-group input {
  width: 100%; padding: 16px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; color: var(--navy); transition: all 0.2s; outline: none; background: var(--bg-soft);
}
.form-group input:focus { border-color: var(--brand); background: white; box-shadow: 0 0 0 4px rgba(58,130,196,0.1); }
.form-checkbox { display: flex; align-items: flex-start; gap: 12px; margin-top: 8px; }
.form-checkbox input { margin-top: 4px; cursor: pointer; }
.form-checkbox label { font-size: 13px; color: var(--ink-3); line-height: 1.5; cursor: pointer; text-align: left; }
.form-checkbox a { color: var(--brand); text-decoration: underline; }

@media (max-width: 900px) {
  .modal-box { padding: 32px 24px; width: calc(100% - 32px); }
  .modal-close { top: 16px; right: 16px; }
}
