/* =====================================================================
   CERT.O — Landing page ads
   File: css/style.css
   Versione: 2026-07-24.a
   ===================================================================== */

/* ------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------ */
:root {
  --navy: #0e2e4f;
  --navy-deep: #08233d;
  --navy-soft: #193b60;
  --teal: #0196ad;
  --teal-light: #59b8c6;
  --pink: #ec0a7e;
  --ice: #eef5f6;
  --paper: #fbfcfc;
  --white: #fff;
  --ink: #13314f;
  --muted: #607184;
  --line: #dce6e8;
  --danger: #c0392b;
  --success: #1b8a5a;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 18px 50px rgba(8, 35, 61, .11);
  --shadow-soft: 0 8px 24px rgba(8, 35, 61, .08);

  --max: 1180px;
  --gutter: 24px;

  --font-display: "Montserrat", system-ui, sans-serif;
  --font-body: "Open Sans", system-ui, sans-serif;

  --t-fast: .2s ease;
  --t-base: .3s ease;
}

/* ------------------------------------------------------------
   2. Reset / base
   ------------------------------------------------------------ */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Compensa l'header sticky (80px) per i salti ad ancore interne */
section[id] { scroll-margin-top: 90px; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font: inherit; color: inherit; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--teal); }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink);
}

h1 {
  font-size: clamp(40px, 5.2vw, 70px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -.035em;
}

h2 {
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 300;
  line-height: 1.13;
  letter-spacing: -.03em;
}

h3 {
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
}

p { margin: 0 0 1em; line-height: 1.7; }
p:last-child { margin-bottom: 0; }

/* Skip link accessibilità */
.skip {
  position: fixed;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip:focus { top: 12px; }

/* Focus visibile per accessibilità tastiera */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   3. Layout helpers
   ------------------------------------------------------------ */
.wrap {
  width: min(calc(100% - 48px), var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: currentColor;
}

.text-link {
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  transition: gap var(--t-fast);
}
.text-link:hover { color: var(--navy); }

/* ------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------ */
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 23px;
  border: 0;
  border-radius: 7px;
  color: var(--white);
  background: var(--pink);
  box-shadow: 0 10px 24px rgba(236, 10, 126, .2);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(236, 10, 126, .28);
  color: var(--white);
}
.button:active { transform: translateY(0); }
.button:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.button--light {
  color: var(--navy);
  background: var(--white);
  box-shadow: none;
}
.button--light:hover { box-shadow: var(--shadow-soft); color: var(--navy); }

.button--outline {
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: none;
}
.button--outline:hover {
  background: rgba(255, 255, 255, .1);
  color: var(--white);
  box-shadow: none;
}

.button--navy {
  background: var(--navy);
  box-shadow: 0 10px 24px rgba(14, 46, 79, .2);
}
.button--navy:hover {
  box-shadow: 0 14px 28px rgba(14, 46, 79, .28);
  background: var(--navy-deep);
}

.button--full { width: 100%; }
.button--sm { min-height: 38px; padding: 0 16px; font-size: 11px; }

/* ------------------------------------------------------------
   5. Header / navigazione
   ------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid rgba(14, 46, 79, .08);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
}

.nav {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand img {
  width: 112px;
  height: 50px;
  object-fit: contain;
  object-position: left center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 27px;
}
.nav-links a {
  position: relative;
  font-size: 14px;
  text-decoration: none;
  padding: 4px 2px;
  transition: color var(--t-fast);
}
.nav-links a:hover { color: var(--teal); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 0;
  height: 2px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-fast);
}
.nav-links a:hover::after,
.nav-links a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile drawer */
.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.nav-mobile.is-open { display: flex; }
.nav-mobile a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.nav-mobile a:last-of-type { border-bottom: 0; }
.nav-mobile .button { margin-top: 8px; }

/* ------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(115deg, #47a8b9 0%, #14798f 43%, #0e2e4f 100%);
}
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 620px;
  height: 620px;
  right: -210px;
  top: -240px;
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    0 0 0 100px rgba(255, 255, 255, .035),
    0 0 0 200px rgba(255, 255, 255, .025);
}
.hero::after {
  width: 280px;
  height: 280px;
  right: 12%;
  bottom: -215px;
  background: var(--pink);
  opacity: .82;
  filter: blur(1px);
}

.hero-grid {
  position: relative;
  z-index: 2;
  min-height: 700px;
  /* Layout a due colonne via flexbox (non grid): evita l'uso di display:grid */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 72px;
  padding-block: 78px 86px;
}
.hero-grid > .hero-copy     { flex: 1.12 1 0; min-width: 320px; }
.hero-grid > .proof-card    { flex: 0.72 1 0; min-width: 320px; }

.hero .eyebrow { color: rgba(255, 255, 255, .82); }
.hero h1 { max-width: 850px; color: var(--white); }

.hero-copy > p {
  max-width: 720px;
  margin: 28px 0 34px;
  color: rgba(255, 255, 255, .84);
  font-size: 18px;
}

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

.proof-card {
  align-self: end;
  margin-bottom: -34px;
  padding: 32px;
  border-radius: var(--radius);
  color: var(--navy);
  background: var(--white);
  box-shadow: var(--shadow);
}
.proof-card strong {
  display: block;
  margin-bottom: 9px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--navy);
}
.proof-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 14px;
}
.proof-card a { color: var(--teal); font-weight: 700; text-decoration: none; }
.proof-card a:hover { color: var(--navy); }

/* ------------------------------------------------------------
   7. Trust bar
   ------------------------------------------------------------ */
.trust-bar { color: var(--white); background: var(--navy); }
.trust-grid {
  min-height: 108px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
}
.trust-item {
  padding: 10px 26px;
  border-left: 1px solid rgba(255, 255, 255, .13);
}
.trust-item:first-child { padding-left: 0; border-left: 0; }
.trust-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-light);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.trust-item strong { font-size: 14px; font-weight: 500; }

/* ------------------------------------------------------------
   8. Intro / Why Cert.O
   ------------------------------------------------------------ */
.intro { padding: 120px 0 110px; }
.intro-grid {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 100px;
  align-items: start;
}
.intro h2 { color: var(--navy); }
.intro-copy { padding-top: 42px; }
.intro-copy p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 17px;
}

/* ------------------------------------------------------------
   9. Obiettivi / cards
   ------------------------------------------------------------ */
.objectives { padding: 110px 0; background: var(--ice); }
.section-head { max-width: 770px; margin-bottom: 54px; }
.section-head h2 { color: var(--navy); }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  padding: 34px 30px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}
.card-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 62px;
  border-radius: 50%;
  color: var(--teal);
  background: #e8f6f7;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.card h3 { margin-bottom: 14px; color: var(--navy); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------
   10. Evento / form-newsletter split
   ------------------------------------------------------------ */
.event { color: var(--white); background: var(--navy); }
.event-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 64px;
  padding-block: 110px;
}
.event-copy { padding-block: 10px; }
.event-copy .eyebrow { color: var(--teal-light); }
.event-copy h2 { max-width: 650px; color: var(--white); }
.event-copy p {
  max-width: 610px;
  margin: 25px 0 34px;
  color: rgba(255, 255, 255, .72);
}

/* Wrapper boxed per la colonna newsletter (allineato al max-width) */
.event-newsletter {
  background: transparent;
}
.event-newsletter .newsletter {
  max-width: 100%;
  margin: 0;
}

.event-art {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  background: linear-gradient(135deg, #51adbc, #0e6078 58%, #0a2945);
}
.event-art::before {
  content: "Cert.O";
  position: absolute;
  left: 11%;
  top: 42%;
  color: rgba(255, 255, 255, .95);
  font-family: var(--font-display);
  font-size: clamp(56px, 8vw, 120px);
  font-weight: 300;
  letter-spacing: -.06em;
}
.event-art::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -70px;
  bottom: -70px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow:
    0 0 0 75px rgba(255, 255, 255, .06),
    0 0 0 150px rgba(255, 255, 255, .035);
}
.event-tag {
  position: absolute;
  z-index: 2;
  left: 11%;
  top: 21%;
  color: rgba(255, 255, 255, .82);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------
   11. Criteri
   ------------------------------------------------------------ */
.criteria { padding: 120px 0; }
.criteria-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 92px;
}
.criteria h2 { color: var(--navy); }
.criteria-list { border-top: 1px solid var(--line); }
.criterion {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 27px 0;
  border-bottom: 1px solid var(--line);
}
.criterion b {
  color: var(--teal);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}
.criterion h3 { margin-bottom: 8px; color: var(--navy); }
.criterion p { margin: 0; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------
   12. Final CTA
   ------------------------------------------------------------ */
.final-cta {
  padding: 100px 0;
  text-align: center;
  background: var(--paper);
}
.final-cta .eyebrow { justify-content: center; }
.final-cta h2 {
  max-width: 900px;
  margin: 0 auto 34px;
  color: var(--navy);
}
.final-cta p {
  max-width: 700px;
  margin: -12px auto 32px;
  color: var(--muted);
}
.final-cta .hero-actions { justify-content: center; }

/* ------------------------------------------------------------
   13. Form newsletter (evento / footer)
   ------------------------------------------------------------ */
.newsletter {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.newsletter h3 {
  margin-bottom: 6px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
}
.newsletter p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}
.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.newsletter-form .field-full { grid-column: 1 / -1; }
.newsletter-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(1, 150, 173, .15);
}
.newsletter-form input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .12);
}
.newsletter-form .checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.newsletter-form .checkbox input { width: auto; margin-top: 2px; }
.newsletter-form .checkbox a { color: var(--teal); text-decoration: underline; }
.newsletter-form .checkbox strong { color: var(--ink); font-weight: 700; }
.newsletter-form .button { grid-column: 1 / -1; }

.newsletter-msg {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
}
.newsletter-msg.is-visible { display: block; }
.newsletter-msg--success {
  background: #e8f5ee;
  color: var(--success);
  border: 1px solid #b9e0c8;
}
.newsletter-msg--error {
  background: #fce8e6;
  color: var(--danger);
  border: 1px solid #f1b3ad;
}
.newsletter-msg--loading {
  background: var(--ice);
  color: var(--navy);
  border: 1px solid var(--line);
}

/* Honeypot anti-spam: invisibile all'utente */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* ------------------------------------------------------------
   14. Footer
   ------------------------------------------------------------ */
footer {
  padding: 68px 0 28px;
  color: rgba(255, 255, 255, .76);
  background: var(--navy-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 54px;
}
.footer-brand img { width: 126px; height: auto; }
.footer-brand-link {
  display: inline-block;
  line-height: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.footer-brand-link:hover { opacity: .85; transform: translateY(-1px); }
.footer-brand-link:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 4px;
  border-radius: 2px;
}
.footer-brand p { max-width: 330px; font-size: 13px; padding:30px 0}
footer h4 {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, .46);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
footer ul { margin: 0; padding: 0; list-style: none; }
footer li { margin: 0 0 11px; font-size: 13px; }
footer a { text-decoration: none; transition: color var(--t-fast); }
footer a:hover { color: var(--teal-light); }
.legal {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 56px;
  padding-top: 23px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
}
.legal--sub {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.legal--sub a,
.legal--sub .cookie-settings {
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
.legal--sub a:hover,
.legal--sub .cookie-settings:hover { color: var(--teal-light); }
.legal--sub .cookie-settings:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   15. Reveal-on-scroll
   ------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ------------------------------------------------------------
   16. Responsive — tablet
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-header .button { display: none; }

  .hero-grid { min-height: auto; }
  .event-grid { gap: 48px; padding-block: 90px; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; }
  footer > .wrap > div > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .hero-grid,
  .intro-grid,
  .event-grid,
  .criteria-grid { grid-template-columns: 1fr; }
  /* Hero convertita a flex: in mobile le due colonne vanno in colonna unica */
  .hero-grid { flex-direction: column; min-height: auto; gap: 45px; padding-block: 72px; }
  .hero-grid > .hero-copy,
  .hero-grid > .proof-card { flex: 1 1 auto; width: 100%; }
  .proof-card { max-width: 520px; margin: 0; }
  .trust-grid {
    grid-template-columns: 1fr 1fr;
    padding: 18px 0;
  }
  .trust-item:nth-child(3) { border-left: 0; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .card-number { margin-bottom: 38px; }
  .intro-grid,
  .criteria-grid { gap: 40px; }
  .intro-copy { padding-top: 0; }
  .event-grid { gap: 40px; padding-block: 80px; }
  .event-newsletter { max-width: 520px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------
   17. Responsive — mobile
   ------------------------------------------------------------ */
@media (max-width: 580px) {
  .wrap { width: min(calc(100% - 32px), var(--max)); }
  .brand img { width: 100px; }
  .hero-copy > p { font-size: 16px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .trust-grid { grid-template-columns: 1fr; padding: 12px 0; }
  .trust-item,
  .trust-item:first-child {
    padding: 14px 0;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .11);
  }
  .trust-item:last-child { border: 0; }
  .intro,
  .objectives,
  .criteria { padding: 80px 0; }
  .event-grid { gap: 32px; padding-block: 70px; }
  .newsletter-form { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .legal { flex-direction: column; }
}
