:root{
  --navy:#0e1b40;
  --navy-light:#1c2c5c;
  --cream:#f4f0e6;
  --red:#d81f26;
  --red-dark:#b91820;
  --text:#1a1a1a;
  --muted:#5a5a5a;
  --white:#ffffff;
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--text);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.container{max-width:1120px;margin:0 auto;padding:0 24px}
h1,h2{font-weight:600;letter-spacing:-0.01em}
/* A capo ordinato: titoli e testi centrati bilanciati, paragrafi senza parole sole in fondo */
h1,h2,.section-lead,.testimonial-card blockquote{text-wrap:balance}
p,li,figcaption{text-wrap:pretty}
.center{text-align:center}

/* Header */
.site-header{background:var(--navy);position:sticky;top:0;z-index:50}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:72px}
.logo{display:flex;align-items:center}
.logo img{height:28px;width:auto}
.nav{display:flex;align-items:center;gap:32px}
.nav a{color:var(--white);font-size:15px;opacity:.9}
.nav a:hover{opacity:1}
.nav-cta{border-bottom:1px solid rgba(255,255,255,.4)}
.nav-toggle{display:none;background:none;border:0;color:var(--white);font-size:22px;cursor:pointer}

/* Hero */
.hero{position:relative;min-height:88vh;display:flex;align-items:flex-end;overflow:hidden}
.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(10,16,40,.35) 0%,rgba(10,16,40,.15) 40%,rgba(10,16,40,.75) 100%)}
.hero-content{position:relative;width:100%;color:var(--white);padding:48px 24px 56px}
.hero h1{font-size:clamp(2.2rem,6vw,4rem);line-height:1.05;margin-bottom:24px}
.hero-lead{max-width:520px;font-size:1.15rem;margin-bottom:32px}
.hero-bottom{display:flex;flex-wrap:wrap;gap:40px;justify-content:space-between;align-items:flex-end;border-top:1px solid rgba(255,255,255,.25);padding-top:24px}
.hero-note{font-size:.95rem;max-width:360px;opacity:.95}
.hero-byline{font-size:.9rem;line-height:1.6}
.hero-byline strong{display:block;font-size:1rem;margin-bottom:2px}
.hero-byline span{display:block;opacity:.85;letter-spacing:.02em}

/* Hero: unica sequenza all'apertura della pagina */
@keyframes rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:none}}
@keyframes settle{from{transform:scale(1.08)}to{transform:scale(1)}}
.hero-img{animation:settle 2.8s cubic-bezier(.2,.6,.2,1) both}
.hero h1{animation:rise .9s .15s cubic-bezier(.2,.7,.2,1) both}
.hero-lead{animation:rise .9s .35s cubic-bezier(.2,.7,.2,1) both}
.hero-bottom{animation:rise .9s .55s cubic-bezier(.2,.7,.2,1) both}

:focus-visible{outline:2px solid var(--red);outline-offset:3px}

/* Buttons */
.btn{display:inline-block;padding:14px 28px;border-radius:30px;font-size:1rem;font-weight:500;cursor:pointer;border:none;transition:background .2s ease,transform .15s ease}
.btn-primary{background:var(--red);color:var(--white)}
.btn-primary:hover{background:var(--red-dark);transform:translateY(-1px)}

/* About */
/* La foto poggia sul bordo inferiore della sezione: il taglio coincide con l'inizio della sezione successiva */
.about{background:var(--cream);padding:100px 0 0;overflow:hidden}
.about-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:64px;align-items:stretch}
.about-text{align-self:center;padding-bottom:100px}
.about-text h2{font-size:1.9rem;margin-bottom:16px}
.about-lead{font-weight:500;margin-bottom:20px}
.about-text p{color:var(--muted);margin-bottom:16px;max-width:46ch}
.about-text .btn{margin-top:8px}
.about-photo{align-self:end}
.about-photo img{display:block;margin:0 auto}

/* Testimonials */
.testimonials{padding:100px 0;text-align:center}
.testimonials h2{font-size:1.8rem;max-width:620px;margin:0 auto 16px}
.section-lead{color:var(--muted);max-width:560px;margin:0 auto 40px}
.testimonial-card{background:#f6f5f2;border-radius:16px;padding:48px 40px 36px;max-width:720px;margin:0 auto 48px}
/* Tutte le recensioni sono sovrapposte nella stessa cella: l'altezza resta quella della più lunga, senza scatti */
.testi-stage{display:grid;margin-bottom:28px}
.testi-slide{grid-area:1/1;align-self:center;margin:0;opacity:0;visibility:hidden;transition:opacity .7s ease,visibility 0s .7s}
.testi-slide.is-active{opacity:1;visibility:visible;transition:opacity .7s ease}
.stars{color:#e0a528;letter-spacing:.2em;font-size:1.05rem;margin-bottom:18px}
.testimonial-card blockquote{font-size:1.1rem;line-height:1.6;margin-bottom:24px}
.testi-slide figcaption{display:flex;flex-direction:column;gap:2px}
.testi-author{font-weight:600}
.testi-source{color:var(--muted);font-size:.9rem}
.testi-nav{display:flex;align-items:center;justify-content:center;gap:16px}
.testi-nav button{background:none;border:none;font-size:1.2rem;cursor:pointer;color:var(--text);padding:6px 10px}
.testi-dots{display:flex;gap:8px;flex-wrap:wrap;justify-content:center;max-width:220px}
.testi-dots span{width:8px;height:8px;border-radius:50%;background:#cfcac0;display:inline-block;cursor:pointer;transition:background .3s ease,transform .3s ease}
.testi-dots span.active{background:var(--text);transform:scale(1.25)}

/* Full image sections */
.full-image img{width:100%;height:520px;object-fit:cover}
.full-image--detail img{height:420px}

/* Form */
.form-section{background:var(--navy);padding:80px 0}
.form-card{background:var(--white);border-radius:20px;padding:48px;max-width:860px;margin:0 auto}
.form-card h2{font-size:1.6rem;margin-bottom:8px}
.form-intro{color:var(--muted);margin-bottom:28px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px 24px;margin-bottom:28px}
.field-full{grid-column:1 / -1}
.field label{display:block;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin-bottom:6px}
.field input,.field select{width:100%;padding:12px 14px;border:1px solid #d8d4c8;border-radius:8px;font-family:inherit;font-size:.95rem;background:#fafaf8}
.field input:focus,.field select:focus{outline:2px solid var(--navy-light);outline-offset:1px}
.btn-submit{width:100%;border-radius:10px;padding:16px}
.form-status{margin-top:14px;font-size:.9rem;text-align:center}

/* Privacy consent */
.privacy-check{display:flex;align-items:flex-start;gap:12px;background:#fdf6f6;border:1.5px solid #e3b5b7;border-radius:10px;padding:16px 18px;margin-bottom:22px;cursor:pointer}
.privacy-check input{margin-top:3px;width:18px;height:18px;flex-shrink:0;accent-color:var(--red)}
.privacy-check span{font-size:.85rem;line-height:1.5;color:#3a3a3a}
.privacy-check a{color:var(--red);text-decoration:underline}

/* Certifications */
.certifications{background:var(--navy);color:var(--white);padding:96px 0 104px}
.cert-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:48px}
.cert-head h2{font-size:1.9rem;margin-bottom:16px}
.cert-head p{color:rgba(255,255,255,.72);max-width:52ch}
.cert-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:40px;align-items:start}
.cert-card{margin:0}
.cert-open{position:relative;display:block;width:100%;padding:0;border:1px solid rgba(201,164,92,.6);border-radius:6px;background:#fff;overflow:hidden;cursor:zoom-in;box-shadow:0 20px 44px rgba(0,0,0,.35);transition:transform .35s ease,box-shadow .35s ease}
.cert-open img{width:100%;height:auto}
.cert-open:hover,.cert-open:focus-visible{transform:translateY(-6px);box-shadow:0 28px 56px rgba(0,0,0,.45)}
.cert-zoom{position:absolute;left:50%;bottom:14px;transform:translate(-50%,8px);background:rgba(14,27,64,.92);color:#fff;font-size:.8rem;padding:6px 14px;border-radius:20px;opacity:0;transition:opacity .25s ease,transform .25s ease}
.cert-open:hover .cert-zoom,.cert-open:focus-visible .cert-zoom{opacity:1;transform:translate(-50%,0)}
/* riflesso dorato che attraversa il certificato una sola volta, quando compare */
.cert-open::after{content:"";position:absolute;inset:0;background:linear-gradient(105deg,transparent 38%,rgba(255,236,190,.55) 50%,transparent 62%);transform:translateX(-130%);pointer-events:none}
.cert-card.in .cert-open::after{animation:sheen 1.5s calc(var(--d,0ms) + .6s) ease-out 1 both}
@keyframes sheen{to{transform:translateX(130%)}}
.cert-card figcaption{margin-top:16px;display:flex;flex-direction:column;gap:2px;font-size:.9rem;color:rgba(255,255,255,.72)}
.cert-card figcaption strong{color:#fff;font-weight:600;font-size:.98rem;margin-bottom:2px}

/* Certificato ingrandito */
.cert-dialog{border:0;background:transparent;padding:0;margin:auto;max-width:min(92vw,880px);max-height:92vh;overflow:visible}
.cert-dialog::backdrop{background:rgba(6,12,30,.84)}
.cert-dialog[open]{animation:dlg .25s ease both}
@keyframes dlg{from{opacity:0;transform:scale(.97)}to{opacity:1;transform:none}}
.cert-dialog img{max-height:88vh;max-width:100%;width:auto;margin:0 auto;border-radius:6px}
.cert-close{position:absolute;top:-14px;right:-14px;width:38px;height:38px;border-radius:50%;border:0;background:#fff;color:var(--navy);font-size:1.5rem;line-height:1;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.35)}

/* Footer */
.site-footer{background:var(--cream);padding:56px 0 28px}
.footer-grid{display:grid;grid-template-columns:1.2fr 1fr 1.4fr 1fr;gap:24px;margin-bottom:40px}
.footer-logo{display:flex;align-items:center}
.footer-logo img{height:34px;width:auto}
.footer-contact p,.footer-address p,.footer-social p{margin-bottom:6px;font-size:.92rem}
.footer-social a{text-decoration:underline}
.footer-bottom{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;border-top:1px solid #e2ddd0;padding-top:20px;font-size:.85rem;color:var(--muted)}

/* Responsive */
@media (max-width:860px){
  .nav{display:none}
  .nav-toggle{display:block}
  .about{padding-top:72px}
  .about-grid{grid-template-columns:1fr;gap:40px}
  .about-text{padding-bottom:0}
  .about-photo img{max-width:340px;width:100%}
  .cert-layout{gap:40px}
  .cert-head p{max-width:none}
  .form-grid{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr 1fr}
  .form-card{padding:32px 24px}
}
@media (max-width:560px){
  .cert-grid{grid-template-columns:minmax(0,1fr);gap:40px}
}
@media (max-width:480px){
  .footer-grid{grid-template-columns:1fr}
  .testimonial-card{padding:32px 24px 28px}
}

/* Comparsa all'ingresso nello schermo (attiva solo se JavaScript è disponibile) */
.js [data-reveal="card"]{opacity:0;transform:translateY(32px);transition:opacity .9s ease var(--d,0ms),transform .9s cubic-bezier(.2,.7,.2,1) var(--d,0ms)}
.js [data-reveal="card"].in{opacity:1;transform:none}
.js [data-reveal="rise"]{opacity:0;transform:translateY(64px);transition:opacity 1s ease,transform 1.2s cubic-bezier(.2,.7,.2,1)}
.js [data-reveal="rise"].in{opacity:1;transform:none}
.full-image{overflow:hidden}
.js [data-reveal="zoom"] img{transform:scale(1.07);transition:transform 2s cubic-bezier(.2,.6,.2,1)}
.js [data-reveal="zoom"].in img{transform:none}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .js [data-reveal]{opacity:1!important;transform:none!important}
  .js [data-reveal="zoom"] img{transform:none!important}
}

/* Mobile nav open state */
.nav.open{
  display:flex;flex-direction:column;position:absolute;top:72px;left:0;right:0;
  background:var(--navy);padding:16px 24px;gap:16px;
}
