/* =========================================================
   ADEGUAMENTO CASE GREEN — Design System
   v2.0 — Sleek & Precise
   ========================================================= */

/* ---- Google Fonts — Montserrat ---- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,200;0,300;0,400;0,500;0,700;1,400;1,700&display=swap');

/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* Palette */
  --color-primary:    #2b6b86;
  --color-primary-dk: #184e63;
  --color-cream:      #f2e8cf;
  --color-cream-dk:   #ded2b9;
  --color-dark:       #040404;
  --color-accent:     #cb282b;

  /* Tipografia fluida */
  --text-h1:     clamp(1.9rem,  1.3rem + 2.5vw,  3rem);
  --text-h2:     clamp(1.4rem,  1rem   + 1.5vw,  2rem);
  --text-h3:     clamp(1.15rem, 1rem   + 0.6vw,  1.35rem);
  --text-body:   clamp(0.95rem, 0.85rem + 0.35vw, 1.15rem);
  --text-small:  clamp(0.78rem, 0.72rem + 0.2vw,  0.9rem);
  --text-number: clamp(2.5rem,  1.5rem + 4vw,     4.5rem);

  /* Spaziatura sistematica */
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  3.5rem;
  --space-xl:  5rem;

  /* Layout */
  --pad-x:       clamp(1.5rem, 7vw, 7rem);   /* padding orizzontale globale */
  --section-gap: clamp(5rem, 8vh, 9rem);       /* respiro tra sezioni — vh non flickera */
  --cream-pad:   clamp(2.5rem, 4vh, 5rem) clamp(2rem, 5vw, 6rem); /* padding uniforme blocchi crema */

  /* Componenti */
  --nav-height:   3.75rem;
  --radius-sm:    0.2rem;
  --radius-md:    0.6rem;
  --radius-lg:    1rem;
  --radius-pill:  99px;

  /* Transizioni */
  --ease: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip; /* clip non crea un nuovo scroll container → non rompe position:sticky */
  overscroll-behavior-y: none; /* disabilita il rubber-band che espone il bg dietro il nav */
}

body {
  background-color: var(--color-primary);
  color: var(--color-cream);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.45;
  overflow-x: clip;
}

h1 { font-size: var(--text-h1); font-weight: 400; line-height: 1.1; }
h2 { font-size: var(--text-h2); font-weight: 400; line-height: 1.15; }
h3 { font-size: var(--text-h3); font-weight: 400; line-height: 1.2; }

p { line-height: 1.6; }

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

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

ul, ol { list-style: none; }

strong { font-weight: 700; }

/* =========================================================
   BACKGROUND FISSO
   ========================================================= */
.bg-fixed {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  /* Force GPU layer — riduce il flicker orizzontale su iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

/* =========================================================
   PAGE WRAPPER
   ========================================================= */
.page-wrapper {
  position: relative;
  z-index: 1;
  /* Stabilizza il layer di compositing rispetto al bg fisso */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* =========================================================
   NAVIGAZIONE
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 1.25rem var(--pad-x);
  pointer-events: none;
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand / Logo */
.nav__brand { pointer-events: auto; }

.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
}

.nav__logo-icon {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid rgba(242, 232, 207, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-cream);
}

/* Logo SVG */
.nav__logo-img {
  height: 2rem;
  width: auto;
  display: block;
  transition: filter 0.3s ease;
}

/* Logo diventa scuro quando il nav sovrasta una sezione chiara */
.nav--on-light .nav__logo-img {
  filter: brightness(0);
}

.nav--on-light .nav__logo-icon {
  border-color: rgba(4, 4, 4, 0.5);
  color: var(--color-dark);
}

/* Page pill (inner pages) */
.nav__page-pill {
  pointer-events: auto;
  background-color: rgba(43, 107, 134, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-cream);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: var(--text-small);
  border: 1px solid rgba(242, 232, 207, 0.2);
}

/* Menu pill wrapper — trasparente, il burger è il proprio elemento */
.nav__menu-wrap {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 0;
  position: relative;
}

/* Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  color: var(--color-primary-dk);
  font-size: var(--text-small);
  white-space: nowrap;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  transition: border-color var(--ease), background-color var(--ease);
  display: flex;
  align-items: center;
  line-height: 1;
}

.nav__link:hover { border-color: rgba(24, 78, 99, 0.35); text-decoration: none; }
.nav__link.is-active {
  border-color: var(--color-primary-dk);
  text-decoration: none;
}

/* CTA button */
.nav__cta {
  background-color: var(--color-primary);
  color: var(--color-cream);
  border-radius: var(--radius-pill);
  padding: 6px 18px;
  font-size: var(--text-small);
  white-space: nowrap;
  transition: background-color var(--ease);
  line-height: 1;
  display: flex;
  align-items: center;
}

.nav__cta:hover { background-color: var(--color-primary-dk); text-decoration: none; }

.nav__cta--ghost {
  background-color: transparent;
  border: 1.5px solid rgba(24, 78, 99, 0.45);
  color: var(--color-primary-dk);
}
.nav__cta--ghost:hover { background-color: rgba(24, 78, 99, 0.08); text-decoration: none; }

/* Hamburger — sempre visibile, glass pill su tutti i dispositivi */
.nav__burger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  pointer-events: auto;
  background-color: rgba(0, 0, 0, 0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 232, 207, 0.25);
  color: var(--color-cream);
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border-radius: var(--radius-pill);
}

.nav__burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--color-cream);
  transform-origin: center;
  transition: transform var(--ease), opacity var(--ease);
}

/* Nascondi i link desktop — il menu è sempre a burger */
.nav__links,
.nav__menu-wrap > .nav__link,
.nav__menu-wrap > .nav__cta {
  display: none;
}

.nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Menu dropdown */
.nav__mobile-menu {
  display: none;
  pointer-events: auto;
  position: fixed;
  top: calc(var(--nav-height) + 0.5rem);
  right: var(--pad-x);
  inset-inline-start: unset;
  bottom: unset;
  left: unset;
  width: auto;
  min-width: 220px;
  background-color: rgba(24, 78, 99, 0.55);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(242, 232, 207, 0.15);
  border-radius: var(--radius-lg);
  z-index: 999;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: var(--space-sm);
}

.nav__mobile-menu.is-open { display: flex; }

.nav__mobile-link {
  font-size: var(--text-body);
  color: var(--color-cream);
  font-weight: 400;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  width: 100%;
  transition: background-color var(--ease), opacity var(--ease);
}
.nav__mobile-link:hover {
  background-color: rgba(242, 232, 207, 0.1);
  opacity: 1;
  text-decoration: none;
}

.nav__mobile-cta {
  margin-top: var(--space-xs);
  font-size: var(--text-body);
  color: var(--color-cream);
  border: 1px solid rgba(242, 232, 207, 0.4);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  width: 100%;
  text-align: center;
  transition: border-color var(--ease), background-color var(--ease);
}
.nav__mobile-cta:hover {
  border-color: var(--color-cream);
  background-color: rgba(242, 232, 207, 0.08);
  text-decoration: none;
}

/* =========================================================
   SEZIONI
   ========================================================= */
.section {
  padding: var(--section-gap) var(--pad-x);
}

.section--hero {
  min-height: var(--real-vh, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--nav-height) + 3rem);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  display: flex;
  align-items: center;
  min-height: calc(var(--real-vh, 100svh) - var(--nav-height) - 3rem);
}

.hero__content {
  max-width: 42svw;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hero__content--centered {
  max-width: 60ch;
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

/* =========================================================
   PULSANTI
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  padding: 11px 28px;
  font-family: inherit;
  font-size: var(--text-small);
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
  text-decoration: none;
  align-self: flex-start;
  line-height: 1;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
}

.btn--outline {
  border-color: var(--color-cream);
  color: var(--color-cream);
  background-color: transparent;
}
.btn--outline:hover { background-color: rgba(242,232,207,0.1); text-decoration: none; }

.btn--on-pale {
  border-color: var(--color-dark);
  background-color: var(--color-dark);
  color: var(--color-cream);
}
.btn--on-pale:hover { background-color: #1e1e1e; border-color: #1e1e1e; text-decoration: none; }

.btn--primary {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-cream);
}
.btn--primary:hover { background-color: var(--color-primary-dk); border-color: var(--color-primary-dk); text-decoration: none; }

/* =========================================================
   BLOCCHI CREMA (pale section)
   ========================================================= */
.pale-block {
  background-color: var(--color-cream);
  color: var(--color-dark);
  border-radius: var(--radius-lg);
  padding: var(--cream-pad);
  overflow: hidden; /* prevent children from bleeding outside */
}

.pale-block--bg {
  background-image: url('../img/placeholder-cg.avif');
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.divider {
  border: none;
  border-top: 1px dashed var(--color-cream-dk);
  margin-block: var(--space-lg);
}

/* =========================================================
   UTILITIES FLEX
   ========================================================= */
.vstack       { display: flex; flex-direction: column; }
.vstack--xs   { gap: var(--space-xs); }
.vstack--sm   { gap: var(--space-sm); }
.vstack--md   { gap: var(--space-md); }
.vstack--lg   { gap: var(--space-lg); }

.hstack       { display: flex; flex-direction: row; }
.hstack--sm   { gap: var(--space-sm); }
.hstack--md   { gap: var(--space-md); }
.hstack--between { justify-content: space-between; }

/* =========================================================
   ICONE SVG (wrapper)
   ========================================================= */
.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}

.icon-wrap--sm {
  width: 1.7rem;
  height: 1.7rem;
}

/* =========================================================
   FEATURE CARDS (home — sfondo scuro con blur)
   ========================================================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background-color: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(242, 232, 207, 0.14);
  border-radius: var(--radius-md);
  transition: background-color var(--ease);
}

.feature-card:hover {
  background-color: rgba(0, 0, 0, 0.28);
}

/* =========================================================
   URGENCY BADGE
   ========================================================= */
.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background-color: var(--color-accent);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  font-size: var(--text-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  align-self: flex-start;
}

/* =========================================================
   URGENCY / SCADENZA BLOCK (home page strip)
   ========================================================= */
.scadenza-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-lg);
  align-items: center;
  padding: var(--cream-pad);
  background-color: var(--color-cream);
  border-radius: var(--radius-lg);
  color: var(--color-dark);
}

.scadenza-block__date {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-right: 1px solid var(--color-cream-dk);
  padding-right: var(--space-lg);
}

.scadenza-block__year {
  font-size: var(--text-number);
  font-weight: 200;
  line-height: 1;
  color: var(--color-accent);
}

.scadenza-block__label {
  font-size: var(--text-small);
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.scadenza-block__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* =========================================================
   CTA BLOCK (unificato su tutte le pagine)
   ========================================================= */
.cta-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.cta-block__content {
  padding: var(--cream-pad);
  background-color: var(--color-cream);
  color: var(--color-dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
  align-items: flex-start;
}

.cta-block__label {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.cta-block__image {
  overflow: hidden;
  position: relative;
  background-color: var(--color-cream-dk);
}

/* Image is absolutely positioned so it fills the column
   without contributing any height — content side drives the block height */
.cta-block__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease);
}

.cta-block:hover .cta-block__image img {
  transform: scale(1.03);
}

/* =========================================================
   TIMELINE (Home — 5 Step)
   ========================================================= */
.timeline-section {
  display: flex;
  position: relative;
  padding-right: var(--pad-x); /* rispetta il padding laterale come tutte le sezioni */
}

/* Colonna sinistra – sticky */
.timeline-nav {
  width: 26svw;
  flex-shrink: 0;
}

.timeline-nav__sticky {
  position: sticky;
  top: 0;
  height: var(--real-vh, 100svh);
  padding: var(--section-gap) var(--space-md) var(--section-gap) var(--pad-x);
  display: flex;
  flex-direction: column;
}

.timeline-track {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  height: 100%;
  padding-block: calc(var(--real-vh, 100svh) * 0.1);
}

.timeline-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2xs);
}

.timeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-cream);
  flex-shrink: 0;
  opacity: 0.5;
}

.timeline-bar {
  border: 1px solid rgba(242, 232, 207, 0.3);
  border-radius: var(--radius-pill);
  flex: 1;
  width: 6px;
  overflow: hidden;
}

.timeline-progress {
  background-color: var(--color-cream);
  border-radius: var(--radius-pill);
  width: 100%;
  height: 0%;
  transition: height 0.15s linear;
}

.timeline-labels {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding-block: 1rem;
}

.timeline-label {
  color: var(--color-cream);
  font-size: var(--text-small);
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: transform var(--ease), opacity var(--ease);
  opacity: 0.45;
  text-decoration: none;
}

.timeline-label:hover,
.timeline-label.is-active {
  transform: translateX(6px);
  opacity: 1;
  text-decoration: none;
}

.timeline-label__num {
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
}

/* Colonna destra — pale section scrollabile */
.timeline-content-wrap {
  flex: 1;
  background-color: var(--color-cream);
  color: var(--color-dark);
  border-radius: var(--radius-lg);
}

.step-card {
  min-height: calc(var(--real-vh, 100svh) * 0.9);
  padding: calc(var(--real-vh, 100svh) * 0.1) var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Preambolo (step 0) — solo testo, niente immagine: altezza naturale */
.step-card[data-step-card="0"] {
  min-height: auto;
  padding-block: var(--space-xl);
}

.step-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg); /* gap between number/image and body text */
}

.step-card__num {
  font-size: var(--text-number);
  line-height: 1;
  font-weight: 200;
  color: var(--color-dark);
}

.step-card__img {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  max-height: calc(var(--real-vh, 100svh) * 0.4); /* usa la variabile stabile, non svh diretto */
  width: auto;
}

.step-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* =========================================================
   PLACEHOLDER IMMAGINI
   ========================================================= */
.img-placeholder {
  background-color: rgba(222, 210, 185, 0.45);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

.img-placeholder--aspect-16-9 {
  aspect-ratio: 16 / 9;
  min-height: 200px;
}

.img-placeholder--aspect-4-3 {
  aspect-ratio: 4 / 3;
}

.img-placeholder--tall {
  min-height: 300px;
}

/* Square placeholder — 1:1, si adatta alla larghezza del parent */
.img-placeholder--square {
  aspect-ratio: 1 / 1;
  min-height: unset;
  width: 100%;
}

/* Real image — same geometry as square placeholder, capped at 60vh on sub-pages */
.img-real {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-md);
  max-width: 100%;
  max-height: calc(var(--real-vh, 100svh) * 0.6);
}

/* =========================================================
   HIGHLIGHT / STAT BOX (dark on page bg)
   ========================================================= */
.stat-box {
  background-color: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(242, 232, 207, 0.14);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.stat-box__num {
  font-size: var(--text-number);
  font-weight: 200;
  line-height: 1;
  flex-shrink: 0;
}

/* =========================================================
   FOOTER (high-end minimal)
   ========================================================= */
.site-footer {
  padding: var(--section-gap) var(--pad-x) clamp(2rem, 4svh, 3.5rem);
  position: relative;
  z-index: 1;
  background-color: rgba(0, 0, 0, 0.30);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(242, 232, 207, 0.18);
  align-items: start;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.site-footer__tagline {
  font-size: var(--text-body);
  max-width: 38ch;
  line-height: 1.65;
  color: var(--color-cream);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  align-items: flex-end;
}

.site-footer__link {
  font-size: var(--text-body);
  color: var(--color-cream);
  opacity: 0.75;
  transition: opacity var(--ease);
  text-align: right;
}
.site-footer__link:hover { opacity: 1; text-decoration: none; }

.site-footer__link--cta {
  opacity: 1;
  font-weight: 700;
  color: var(--color-cream);
  border: 1px solid rgba(242, 232, 207, 0.4);
  border-radius: var(--radius-pill);
  padding: 5px 18px;
  transition: border-color var(--ease), opacity var(--ease);
}
.site-footer__link--cta:hover { border-color: var(--color-cream); text-decoration: none; }

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  font-size: var(--text-small);
  color: var(--color-cream);
  opacity: 0.55;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.site-footer__legal {
  display: flex;
  gap: var(--space-md);
}

.site-footer__legal a {
  color: var(--color-cream);
}
.site-footer__legal a:hover { text-decoration: underline; }

/* =========================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

.reveal--left { transform: translateX(-24px); }
.reveal--left.is-visible { transform: translateX(0); }


/* =========================================================
   RESPONSIVE — Above tablet (≥ 992px) — pale sections right offset
   Consistent vw percentage so the exposed background scales
   proportionally on every screen size above mobile/tablet.
   ========================================================= */
@media screen and (min-width: 992px) {
  :root { --pale-right-extra: 15vw; }
  .pale-block,
  .scadenza-block,
  .cta-block {
    margin-right: var(--pale-right-extra);
  }
  .timeline-section {
    padding-right: calc(var(--pad-x) + var(--pale-right-extra));
  }
}

@media screen and (min-width: 1440px) {
  :root { --pale-right-extra: 17vw; }
}

@media screen and (min-width: 1920px) {
  :root { --pale-right-extra: 20.5vw; }
}

/* =========================================================
   RESPONSIVE — Tablet (≤ 991px)
   ========================================================= */
@media screen and (max-width: 991px) {
  :root {
    --pad-x: clamp(1.25rem, 5vw, 3rem);
    --section-gap: clamp(3.5rem, 8svh, 6rem);
  }

  .hero__content     { max-width: 100%; }
  .timeline-nav      { display: none; }

  /* On mobile the sticky nav column is gone — give the section
     the same symmetric padding as every other .section */
  .timeline-section {
    padding: var(--section-gap) var(--pad-x);
  }

  /* Stack number + image vertically so the image fills available width.
     !important needed to override the inline style="flex-direction: row-reverse"
     used on alternating cards for the desktop layout. */
  .step-card__header {
    flex-direction: column !important;
    gap: var(--space-md);
  }

  .step-card__img {
    width: 100%;
    max-height: calc(var(--real-vh, 100svh) * 0.45);
  }

  .timeline-content-wrap {
    border-radius: var(--radius-lg);
    background-image: none;
    background-attachment: scroll;
  }

  .features-grid     { grid-template-columns: 1fr; }

  .cta-block {
    grid-template-columns: 1fr;
  }
  .cta-block__image {
    aspect-ratio: 16 / 9;
    min-height: 240px;
    order: -1;
  }
  .cta-block__image img {
    height: 100%;
  }

  .scadenza-block {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  .scadenza-block__date {
    border-right: none;
    border-bottom: 1px solid var(--color-cream-dk);
    padding-right: 0;
    padding-bottom: var(--space-md);
  }

  .site-footer__top  { grid-template-columns: 1fr; gap: var(--space-lg); }
  .site-footer__nav  { align-items: flex-start; }
  .site-footer__link { text-align: left; }


  /* Stat box → stack vertically on tablet/mobile */
  .stat-box {
    flex-direction: column;
    gap: var(--space-sm);
  }
}

/* =========================================================
   RESPONSIVE — Mobile (≤ 479px)
   ========================================================= */
@media screen and (max-width: 479px) {
  :root {
    --pad-x: 1.25rem;
    --section-gap: clamp(3rem, 7svh, 5rem);
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

