/* ============================================
   9HOPE ODV — Foglio di stile
   Palette: verde-teal + salvia + azzurro-ardesia (toni freddi)
   Campioni dalla locandina IV edizione: #7D9B96 #90B18F #638591
   ============================================ */

:root {
  --forest: #3E5A50;       /* teal-verde profondo — primario (titoli, bottoni, logo) */
  --forest-deep: #28403A;  /* petrolio profondo — hero, footer, fondali scuri */
  --moss: #7D9B96;         /* teal-verde medio — campione locandina */
  --light: #90B18F;        /* salvia chiara — campione locandina (accenti su scuro) */
  --slate: #638591;        /* azzurro-ardesia — campione locandina (secondo accento) */
  --sage: #C5D3CB;         /* menta tenue — bordi, icone, badge */
  --cream: #F1EDE1;        /* crema calda (i riquadri della locandina) */
  --paper: #F8F5EC;        /* carta — sfondo pagina */
  --text: #24332F;         /* petrolio carbone — testo */
  --mute: #62716B;         /* verde-grigio — testo secondario */
  --gold: #4F6E7A;         /* ardesia CTA — donazioni/5x1000 (testo bianco, AA) */
  --gold-deep: #3D5862;    /* ardesia profonda — hover / accenti su bianco */
  --white: #FFFFFF;
  --shadow: 0 10px 40px rgba(20, 46, 42, 0.12);
  --shadow-sm: 0 4px 16px rgba(20, 46, 42, 0.09);
  --radius: 18px;
  --maxw: 1180px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; color: var(--forest); }

a { color: var(--forest); text-decoration: none; transition: color .2s; }
a:hover { color: var(--moss); }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 90px 0; }
.section-sm { padding: 60px 0; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--moss);
  margin-bottom: 14px; display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px; border-radius: 100px;
  font-weight: 600; font-size: 16px; cursor: pointer;
  border: none; transition: transform .2s, box-shadow .2s, background .2s;
  font-family: var(--font-body);
}
.btn-primary { background: var(--forest); color: var(--white); }
.btn-primary:hover { background: var(--forest-deep); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-gold { background: var(--gold); color: var(--white); }
.btn-gold:hover { background: var(--gold-deep); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-ghost { background: transparent; color: var(--forest); border: 1.5px solid var(--sage); }
.btn-ghost:hover { background: var(--cream); color: var(--forest); border-color: var(--moss); }

/* ============================================
   HEADER / NAV
   ============================================ */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252, 251, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(197, 211, 203, 0.5);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--forest); }
.logo-mark {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--forest); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-size: 18px;
  font-family: var(--font-display);
}
.logo-img { height: 54px; width: auto; display: block; }
@media (max-width: 560px) { .logo-img { height: 44px; } }
.footer-logo-img { height: 50px; width: auto; display: block; border-radius: 10px; margin-bottom: 18px; box-shadow: 0 3px 14px rgba(0, 0, 0, .22); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; }
.nav-links a { font-size: 15.5px; font-weight: 500; color: var(--text); }
.nav-links a:hover, .nav-links a.active { color: var(--forest); }
.nav-cta { background: var(--gold); color: var(--white) !important; padding: 10px 20px; border-radius: 100px; font-weight: 600; }
.nav-cta:hover { background: var(--gold-deep); color: var(--white) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--forest); border-radius: 2px; transition: .3s; }

/* ============================================
   HERO
   ============================================ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(155deg, var(--forest-deep) 0%, var(--forest) 58%, #5C8079 100%);
  color: var(--white);
  padding: 110px 0 120px;
}
.hero-bg-circle { position: absolute; border-radius: 50%; pointer-events: none; }
.hero-c1 { width: 480px; height: 480px; background: var(--forest); top: -160px; right: -120px; opacity: .85; }
.hero-c2 { width: 320px; height: 320px; background: var(--slate); bottom: -130px; right: 120px; opacity: .45; }
.hero-c3 { width: 280px; height: 280px; background: var(--forest); bottom: -120px; left: -90px; opacity: .7; }
.hero-content { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { color: var(--white); font-size: clamp(38px, 6vw, 68px); font-weight: 600; letter-spacing: -1px; margin-bottom: 22px; }
.hero h1 em { color: var(--light); font-style: italic; }
.hero-lead { font-size: clamp(18px, 2.2vw, 22px); color: var(--sage); margin-bottom: 36px; max-width: 600px; line-height: 1.55; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(144, 177, 143, 0.18); color: var(--light);
  padding: 7px 16px; border-radius: 100px; font-size: 14px; font-weight: 600;
  margin-bottom: 26px; border: 1px solid rgba(144, 177, 143, 0.3);
}

/* ============================================
   GENERIC PAGE HERO (sottopagine)
   ============================================ */
.page-hero {
  background: linear-gradient(155deg, var(--forest-deep) 0%, var(--forest) 75%, #5C8079 110%);
  color: var(--white);
  padding: 70px 0 64px; position: relative; overflow: hidden;
}
.page-hero h1 { color: var(--white); font-size: clamp(32px, 5vw, 52px); margin-bottom: 14px; }
.page-hero p { color: var(--sage); font-size: 18px; max-width: 620px; }
.page-hero .hero-bg-circle { opacity: .5; }

/* ============================================
   STAT STRIP
   ============================================ */
.stats { background: var(--cream); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { text-align: center; padding: 16px; }
.stat-num { font-family: var(--font-display); font-size: 48px; font-weight: 600; color: var(--forest); line-height: 1; }
.stat-label { font-size: 14.5px; color: var(--mute); margin-top: 8px; font-weight: 500; }

/* ============================================
   SECTION HEADINGS
   ============================================ */
.section-head { max-width: 680px; margin-bottom: 50px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 16px; letter-spacing: -0.5px; }
.section-head p { color: var(--mute); font-size: 18px; }

/* ============================================
   CARDS GRID
   ============================================ */
.cards { display: grid; gap: 24px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(197, 211, 203, 0.4);
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--sage); color: var(--forest);
  display: grid; place-items: center; margin-bottom: 20px;
  font-size: 26px; font-weight: 700; font-family: var(--font-display);
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--mute); font-size: 15.5px; line-height: 1.6; }

/* ---------- Lab cards (colored top) ---------- */
.lab-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid rgba(197,211,203,.4); transition: transform .25s, box-shadow .25s; }
.lab-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.lab-top { height: 8px; background: var(--moss); }
.lab-body { padding: 28px; }
.lab-body h3 { font-size: 19px; margin-bottom: 8px; }
.lab-body p { color: var(--mute); font-size: 14.5px; }

/* ============================================
   STORY / FEATURE SPLIT
   ============================================ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split-visual {
  background: var(--forest); border-radius: var(--radius); padding: 48px;
  color: var(--white); min-height: 340px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.split-visual .big-quote { font-family: var(--font-display); font-size: 30px; line-height: 1.3; color: var(--white); font-style: italic; position: relative; z-index: 2; }
.split-visual .quote-mark { font-family: var(--font-display); font-size: 120px; color: var(--moss); position: absolute; top: 10px; left: 24px; opacity: .4; line-height: 1; }
.split-text h2 { font-size: clamp(26px, 3.5vw, 36px); margin-bottom: 18px; }
.split-text p { color: var(--text); margin-bottom: 16px; }
.split-text p.muted { color: var(--mute); }

/* ============================================
   MISSION / VALUES
   ============================================ */
.value-row { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(197,211,203,.5); }
.value-row:last-child { border-bottom: none; }
.value-num { font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--gold-deep); min-width: 44px; }
.value-text h3 { font-size: 19px; margin-bottom: 4px; }
.value-text p { color: var(--mute); font-size: 15.5px; }

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
  background: linear-gradient(135deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--white); border-radius: 28px; padding: 64px 56px;
  text-align: center; position: relative; overflow: hidden;
}
.cta-band h2 { color: var(--white); font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.cta-band p { color: var(--sage); font-size: 18px; max-width: 540px; margin: 0 auto 30px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============================================
   COMUNI LIST
   ============================================ */
.comuni-list { display: flex; flex-direction: column; gap: 14px; }
.comune {
  display: flex; align-items: center; gap: 18px;
  background: var(--white); border-radius: 14px; padding: 18px 22px;
  border: 1px solid rgba(197,211,203,.5); box-shadow: var(--shadow-sm);
}
.comune-badge {
  width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: var(--white);
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-display); flex-shrink: 0;
}
.comune-badge.alt { background: var(--slate); }
.comune-info h3 { font-size: 17px; margin-bottom: 2px; }
.comune-info p { font-size: 14px; color: var(--mute); }

/* ============================================
   TIMELINE
   ============================================ */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tl-step { text-align: center; }
.tl-dot { width: 52px; height: 52px; border-radius: 50%; background: var(--forest); color: var(--white); display: grid; place-items: center; margin: 0 auto 16px; font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.tl-period { font-size: 13px; font-weight: 700; color: var(--gold-deep); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.tl-step h3 { font-size: 19px; margin-bottom: 8px; }
.tl-step p { font-size: 14.5px; color: var(--mute); }

/* ============================================
   FORM
   ============================================ */
.form-card { background: var(--white); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); border: 1px solid rgba(197,211,203,.4); }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; color: var(--text); }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--sage); border-radius: 12px;
  font-family: var(--font-body); font-size: 15.5px; color: var(--text); background: var(--paper); transition: border .2s;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { outline: none; border-color: var(--moss); }
.form-row textarea { resize: vertical; min-height: 120px; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ============================================
   INFO BLOCKS / CONTACT
   ============================================ */
.info-block { display: flex; gap: 16px; margin-bottom: 26px; }
.info-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--sage); color: var(--forest); display: grid; place-items: center; flex-shrink: 0; font-size: 20px; }
.info-block h3 { font-size: 16px; margin-bottom: 3px; }
.info-block p, .info-block a { font-size: 15px; color: var(--mute); }
.info-block a:hover { color: var(--forest); }

/* ============================================
   DONATE BOX
   ============================================ */
.donate-box { background: var(--cream); border-radius: var(--radius); padding: 36px; border: 2px dashed var(--gold); text-align: center; }
.donate-box .cf { font-family: var(--font-display); font-size: 30px; color: var(--forest); font-weight: 600; letter-spacing: 1px; margin: 14px 0; }
.donate-box .cf-label { font-size: 14px; color: var(--mute); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }

/* ============================================
   FOOTER
   ============================================ */
footer { background: var(--forest-deep); color: var(--sage); padding: 60px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand .logo { color: var(--white); margin-bottom: 16px; }
.footer-brand p { color: var(--sage); font-size: 15px; max-width: 320px; }
footer h4 { color: var(--white); font-family: var(--font-body); font-size: 15px; font-weight: 700; margin-bottom: 16px; letter-spacing: .5px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--sage); font-size: 15px; }
.footer-links a:hover { color: var(--light); }
.footer-bottom { border-top: 1px solid rgba(144,177,143,.2); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: var(--mute); }
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(144,177,143,.15); display: grid; place-items: center; color: var(--light); font-size: 16px; }
.footer-social a:hover { background: var(--moss); color: var(--white); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .nav-links { position: fixed; top: 74px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: 24px; gap: 18px; box-shadow: var(--shadow); transform: translateY(-150%); transition: transform .3s; border-bottom: 1px solid var(--sage); }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cards-3, .cards-4 { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .timeline { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .form-grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .cards-3, .cards-4, .cards-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .cta-band { padding: 44px 26px; }
  .hero { padding: 70px 0 80px; }
  .split-visual { padding: 32px; min-height: auto; }
  .form-card { padding: 26px; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ============================================
   PAGINE LEGALI (privacy / cookie)
   ============================================ */
.legal h2 { font-size: 23px; margin: 34px 0 12px; color: var(--forest); }
.legal h3 { font-size: 18px; margin: 22px 0 8px; color: var(--text); }
.legal p { margin-bottom: 14px; color: var(--text); }
.legal p.muted { color: var(--mute); font-size: 15px; }
.legal ul { margin: 0 0 16px 22px; color: var(--text); }
.legal li { margin-bottom: 8px; }
.legal a { text-decoration: underline; }

/* ============================================
   TRASPARENZA — elenco dati ente
   ============================================ */
.data-list { margin: 0; }
.data-list > div { display: grid; grid-template-columns: 200px 1fr; gap: 12px 24px; padding: 14px 0; border-bottom: 1px solid var(--cream); }
.data-list > div:last-child { border-bottom: none; }
.data-list dt { font-weight: 700; color: var(--mute); font-size: 14px; text-transform: uppercase; letter-spacing: .5px; margin: 0; }
.data-list dd { margin: 0; color: var(--text); }
.data-list dd a { text-decoration: underline; }
@media (max-width: 640px) {
  .data-list > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ============================================
   CONSENSO PRIVACY NEL FORM
   ============================================ */
.form-consent { display: flex; align-items: flex-start; gap: 10px; }
.form-consent input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; accent-color: var(--forest); }
.form-consent label { font-weight: 400; font-size: 14px; color: var(--mute); margin: 0; line-height: 1.5; }
.form-consent a { color: var(--forest); text-decoration: underline; }

/* ============================================
   BANNER COOKIE
   ============================================ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  max-width: 640px; margin: 0 auto;
  background: var(--forest-deep); color: var(--sage);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: 20px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cookie-banner p { font-size: 14px; line-height: 1.5; margin: 0; flex: 1 1 280px; }
.cookie-banner a { color: var(--light); text-decoration: underline; }
.cookie-banner .btn { padding: 10px 22px; font-size: 14px; }
@media (max-width: 480px) {
  .cookie-banner { padding: 18px; }
  .cookie-banner .btn { width: 100%; justify-content: center; }
}
