/* =========================
   BASE RESET & FOUNDATION
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* =========================
   DESIGN SYSTEM – COLORS
   ========================= */
:root {
  --color-primary: #36454f;   /* blu logo */
  --color-secondary: #fdd8b9; /* pesca */
  --color-accent: #bfdaa8;   /* verde */
  --color-highlight: #fff897;/* giallo */

  --bg-white: #ffffff;
  --bg-soft: #b3dee4;
  --bg-dark: var(--color-primary);

  --text-main: #36454f;
  --text-muted: #5f6b7a;
  --text-invert: #ffffff;

  --border-soft: rgba(54, 69, 79, 0.15);
}


html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-white);
}

/* =========================
   BASIC ELEMENTS
   ========================= */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em 0;
  font-weight: 600;
}

p {
  margin: 0 0 1em 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* =========================
   LAYOUT HELPERS
   ========================= */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================
   HEADER STRUCTURE
   ========================= */

.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 0;
}

.site-header a {
  color: var(--text-main);
  text-decoration: none;
}


.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}


.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.site-logo a {
  font-weight: 600;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.95rem;
  color: var(--text-main);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
  font-weight: 600;
}

/* =========================
   HOME – HERO
========================= */

.hero {
  padding: 96px 0 80px;
  background: var(--bg-white);
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 16px;
}

.hero .lead {
  font-size: 1.2rem;
  max-width: 640px;
  margin-bottom: 32px;
}

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

/* =========================
   HOME – HERO (v5)
   ========================= */

.hero.hero--image{
  position: relative;
  padding: 80px 0;
  overflow: hidden;
}

/* immagine di sfondo */
.hero.hero--image .hero-bg{
  position: absolute;
  inset: 0;
  background-image: url("../img/hero-willartstyle.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.02);
  z-index: 0;
}

/* overlay azzurro trasparente */
.hero.hero--image .hero-overlay{
  position: absolute;
  inset: 0;
  background: rgba(179, 222, 228, 0.72); /* #b3dee4 */
  z-index: 1;
}

.hero.hero--image .hero-inner{
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero.hero--image h1{
  margin: 0 0 18px 0;
  font-size: 64px;
  line-height: 1.05;
  color: var(--text-main);
}

.hero.hero--image .hero-subtitle{
  margin: 0 0 18px 0;
  font-size: 28px;
  line-height: 1.25;
  color: var(--text-main);
}

.hero.hero--image .hero-text{
  margin: 0 auto 28px auto;
  max-width: 900px;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-main);
}

/* bottoni */
.hero-actions{
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
}


.btn-primary{
  background: var(--color-primary);
  color: var(--text-invert);
  border-color: var(--color-primary);
  box-shadow: 0 10px 24px rgba(54, 69, 79, 0.22);
}

.btn-secondary {
  background: #ffffff;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.14);
}

.btn:active {
  transform: translateY(-1px);
}

.btn-primary:hover {
  filter: brightness(0.95);
}

.btn-secondary:hover {
  background: var(--color-highlight); /* giallo palette */
  color: var(--color-primary);
  border-color: var(--color-highlight);
}


/* responsive */
@media (max-width: 900px){
  .hero.hero--image{ padding: 64px 0; }
  .hero.hero--image h1{ font-size: 44px; }
  .hero.hero--image .hero-subtitle{ font-size: 22px; }
  .hero.hero--image .hero-text{ font-size: 18px; }
}

/* HERO – content card (sfondo separato dal testo) */
.hero .container{
  position: relative;
  padding: 56px 32px;
}

/* lo sfondo “vetro” sta QUI (dietro al testo) */
.hero .container::before{
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 24px;
  border: 1px solid rgba(54, 69, 79, 0.10);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* tutto ciò che sta dentro al container va SOPRA allo sfondo */
.hero .container > *{
  position: relative;
  z-index: 1;
}

/* sicurezza: testo sempre ben leggibile in hero */
.hero h1,
.hero p{
  color: var(--text-main);
}

/* =========================
   HOME — SEZIONE A: AMBITI
   ========================= */

.section-ambiti{
  padding: 72px 0;
}

.section-ambiti .section__header{
  max-width: 70ch;
  margin: 0 auto 36px;
  text-align: center;
}

.section-ambiti .section__header p{
  margin: 0 0 14px;
  font-size: clamp(1.08rem, 0.55vw + 0.95rem, 1.25rem);
  line-height: 1.75;
  color: var(--text-main);
}

.section-ambiti .section__header p:last-of-type{
  margin-bottom: 0;
}

.ambiti-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0 0 44px;
}

@media (min-width: 900px){
  .ambiti-grid{
    grid-template-columns: repeat(3, 1fr);
  }
}

.section-ambiti .ambito-card{
  height: 100%;
  padding: 22px;
  border-radius: 22px;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}

.section-ambiti .ambito-card__title{
  margin: 0 0 10px;
  font-size: clamp(1.2rem, 0.6vw + 1rem, 1.45rem);
  color: var(--color-highlight);
}

.section-ambiti .ambito-card__text{
  margin: 0;
  font-size: clamp(1.02rem, 0.4vw + 0.95rem, 1.15rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.84);
}

.section-ambiti .section__cta{
  display: flex;
  justify-content: center;
}

/* Titolo sezione Ambiti: proporzioni coerenti con hero */
.section-ambiti h2{
  font-size: clamp(2rem, 2.1vw + 1.2rem, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* Card: micro-interazione (desktop) */
@media (hover: hover) and (pointer: fine){
  .section-ambiti .ambito-card{
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  }

  .section-ambiti .ambito-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.20);
    border-color: rgba(255, 248, 151, 0.35); /* giallo leggero sul bordo */
  }
}

/* Dettaglio visivo: barra top gialla */
.section-ambiti .ambito-card{
  position: relative;
  overflow: hidden;
}

.section-ambiti .ambito-card::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--color-highlight);
  opacity: 0.9;
}

.section-ambiti .ambito-icon{
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
}

.section-ambiti .ambito-icon svg{
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: var(--color-highlight);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

/* =========================
   HOME — SEZIONE B: METODO
   ========================= */

.section-metodo{
  padding: 80px 0;
  background: var(--bg-dark);
}

.section-metodo .metodo-card{
  background: var(--bg-white);
  border-radius: 24px;
  padding: 48px 40px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(54, 69, 79, 0.10);
  max-width: 980px;
  margin: 0 auto;
}

.section-metodo .section__header{
  text-align: center;
  margin-bottom: 26px;
}

.section-metodo h2{
  font-size: clamp(2rem, 2.1vw + 1.2rem, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0;
  color: var(--text-main);
}

/* testo */
.section-metodo .metodo-content{
  max-width: 74ch;
  margin: 0 auto;
}

.section-metodo .metodo-content p{
  margin: 0 0 16px;
  font-size: clamp(1.05rem, 0.5vw + 0.95rem, 1.22rem);
  line-height: 1.75;
  color: var(--text-main);
}

.section-metodo .metodo-content p:last-of-type{
  margin-bottom: 0;
}

/* CTA */
.section-metodo .section__cta{
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* responsive */
@media (max-width: 900px){
  .section-metodo .metodo-card{
    padding: 34px 22px;
    border-radius: 20px;
  }
}

.section-metodo .metodo-head{
  text-align: center;
  margin-bottom: 26px;
}

.section-metodo .metodo-head h2{
  color: var(--bg-soft);
  font-size: clamp(2.1rem, 2.2vw + 1.1rem, 3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

.section-metodo .metodo-head h2::after{
  content: "";
  display: block;
  width: 72px;
  height: 4px;
  margin: 14px auto 0;
  background: var(--color-highlight);
  border-radius: 999px;
  opacity: 0.9;
}

/* =========================
   HOME — SEZIONE C: CTA FINALE
   ========================= */

.section-cta-finale{
  padding: 110px 0 120px;
  background: var(--bg-white);
}

.section-cta-finale .cta-box{
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.section-cta-finale h2{
  font-size: clamp(2.4rem, 2.5vw + 1.2rem, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
}

.section-cta-finale p{
  margin: 0 0 14px;
  font-size: clamp(1.15rem, 0.6vw + 1rem, 1.35rem);
  line-height: 1.8;
  color: var(--text-main);
}

.section-cta-finale .section__cta{
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.section-cta-finale .btn-cta-finale{
  padding: 18px 36px;
  font-size: 1.1rem;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.15);
}

/* =========================
   CTA finale – variante verde
   ========================= */

.btn-cta-finale{
  background: var(--color-accent);
  color: var(--color-primary);
  border: 2px solid var(--color-accent);
  font-weight: 700;
}

.btn-cta-finale:hover{
  background: var(--color-primary);
  color: var(--text-invert);
  border-color: var(--color-primary);
}
.section-cta-finale .cta-bridge{
  margin-top: 26px;
  font-weight: 700;
  color: var(--text-main);
}

/* =========================
   FOOTER
   ========================= */

.site-footer{
  background: var(--color-primary);     /* grigio/blu logo */
  color: var(--text-invert);            /* bianco */
  border-top: 1px solid rgba(255,255,255,0.14);
  margin-top: 64px;
}


/* layout */
.footer-inner{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
  align-items: start;
}

/* brand */

.footer-brand{
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.footer-logo img{
  width: 180px;   /* dimensione corretta per footer */
  height: auto;   /* mantiene le proporzioni del logo */
  display: block;
}

.footer-tagline{
  margin-top: 12px;
  max-width: 44ch;
  line-height: 1.5;
  color: rgba(255,255,255,0.82);
}

/* titoli */
.footer-title{
  margin: 0 0 12px 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-highlight); /* giallo palette */
}

.footer-title-spaced{
  margin-top: 20px;
}

/* liste */
.footer-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-list a{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  text-underline-offset: 4px;
}

.footer-list a:hover,
.footer-list a:focus-visible{
  color: var(--color-highlight);
  text-decoration: underline;
}

/* testi secondari */
.muted{
  color: rgba(255,255,255,0.75);
  font-size: 0.95em;
}

/* area legale */
.footer-legal{
  border-top: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.footer-legal-inner{
  padding: 16px 0;
}

.footer-legal-text{
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.4;
}

.footer-legal-text a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal-sep{
  margin: 0 8px;
  opacity: 0.8;
}

.site-footer a:focus-visible{
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
  border-radius: 8px;
}

.footer-legal-text a:hover{
  color: var(--color-highlight);
}

.footer-icons{
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.footer-icon{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
}

.footer-icon svg{
  width: 20px;
  height: 20px;
  fill: rgba(255,255,255,0.9); /* bianco */
}

.footer-icon:hover,
.footer-icon:focus-visible{
  border-color: rgba(255,255,255,0.36);
  background: rgba(255,248,151,0.14);
}

.footer-icon:hover svg,
.footer-icon:focus-visible svg{
  fill: var(--color-highlight);
}

/* responsive */
@media (max-width: 900px){
  .footer-inner{
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
  }

  .footer-tagline{
    max-width: 60ch;
  }
}
