/* ==========================================================================
   GiacApp International — international.giacapp.com
   Dark-first. Palette from the GiacApp logo (Logo 2018):
     cyan #1FA6C0 · lime #CFEC43 · red #D5193D · deep teal #103641
   Motion is CSS-only and progressively enhanced: scroll-driven animations run
   where supported, cross-document view transitions where supported, and the
   page is fully readable and usable where neither is.
   ========================================================================== */

/* --- Theme --------------------------------------------------------------
   Dark is the brand default. [data-theme="light"] on <html> flips it; the
   inline script in <head> applies the stored choice before first paint.
   ------------------------------------------------------------------------ */
:root { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

:root {
  --brand-cyan: #1FA6C0;
  --brand-lime: #CFEC43;
  --brand-red:  #D5193D;
  --brand-deep: #103641;

  --ink-light:     #142128;
  --ink-dark:      #EAF3F5;
  --muted-light:   #55676E;
  --muted-dark:    #9FB8C0;
  --bg-light:      #FBFCFC;
  --bg-dark:       #081920;
  --surface-light: #F1F5F6;
  --surface-dark:  #102831;
  --line-light:    #DFE7E9;
  --line-dark:     #1E3F4A;
  --accent-light:  #0D6A7D;
  --accent-dark:   #4FC7DE;

  --ink:     light-dark(var(--ink-light), var(--ink-dark));
  --muted:   light-dark(var(--muted-light), var(--muted-dark));
  --bg:      light-dark(var(--bg-light), var(--bg-dark));
  --surface: light-dark(var(--surface-light), var(--surface-dark));
  --line:    light-dark(var(--line-light), var(--line-dark));
  --accent:  light-dark(var(--accent-light), var(--accent-dark));
  /* Il rosso del brand su fondo scuro sta a 2.9:1, sotto la soglia AA:
     nel tema scuro il testo d'errore usa una versione schiarita (6.8:1).
     Sul chiaro il rosso pieno passa (4.7:1) e resta quello. */
  --danger:  light-dark(var(--brand-red), #FF8A9C);

  --accent-solid: var(--brand-cyan);
  --on-accent: #04222A;

  --measure: 66ch;
  --wrap: 1220px;
  --r: 16px;
  --step: clamp(1rem, 0.6rem + 1.6vw, 1.6rem);
  --ease: cubic-bezier(.22,.68,.32,1);

  accent-color: var(--accent-solid);
  scrollbar-color: light-dark(#B9C9CE, #2A4E59) transparent;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  text-underline-offset: 0.22em; overflow-x: hidden;
}

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

h1, h2, h3, h4 { line-height: 1.02; letter-spacing: -0.03em; text-wrap: balance; margin: 0; font-weight: 680; }
h1 { font-size: clamp(2.9rem, 1.5rem + 6.2vw, 7rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); letter-spacing: -0.037em; }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); letter-spacing: -0.02em; }
p  { margin: 0; text-wrap: pretty; }
a { color: inherit; }
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--accent-solid); outline-offset: 3px; border-radius: 6px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.stack > * + * { margin-top: var(--step); }

.eyebrow {
  font-size: 0.75rem; font-weight: 680; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--accent); margin: 0;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent-solid); border-radius: 2px;
}
.lede { font-size: clamp(1.1rem, 1rem + 0.62vw, 1.42rem); color: var(--muted); line-height: 1.48; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 100;
  background: var(--accent-solid); color: var(--on-accent);
  padding: 0.7rem 1.1rem; border-radius: 8px; font-weight: 600;
  text-decoration: none; transition: top .16s;
}
.skip:focus { top: 0.75rem; }

/* --- Header -------------------------------------------------------------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.2rem; min-height: 70px; flex-wrap: wrap; }
.brand {
  font-weight: 740; font-size: 1.15rem; letter-spacing: -0.035em;
  text-decoration: none; margin-right: auto; display: inline-flex; align-items: baseline;
}
.brand span { color: var(--accent); }
.brand small {
  margin-left: 0.55rem; font-size: 0.64rem; font-weight: 620;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.nav { display: flex; gap: 1.35rem; align-items: center; flex-wrap: wrap; }
.nav a {
  text-decoration: none; font-size: 0.92rem; font-weight: 560; color: var(--muted);
  padding-block: 0.3rem; border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-solid); }

/* Theme toggle */
.theme-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: transparent;
  color: var(--muted); cursor: pointer; transition: color .18s, border-color .18s, transform .18s var(--ease);
}
.theme-btn:hover { color: var(--accent); border-color: var(--accent-solid); transform: rotate(-18deg); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.6rem; border-radius: 999px; font-weight: 640; font-size: 0.98rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer; overflow: hidden;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--accent-solid); color: var(--on-accent); }
.btn-primary::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background: var(--brand-lime);
  transform: translateY(101%); transition: transform .32s var(--ease);
}
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary:hover { color: var(--brand-deep); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-solid); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.btn .arw { transition: transform .28s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

/* --- Sections ------------------------------------------------------------ */
section { padding-block: clamp(4rem, 2rem + 7vw, 8.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 54rem; margin-bottom: clamp(2.2rem, 1.2rem + 2.6vw, 3.8rem); }
.section-head .lede, .section-head p:not(.eyebrow) { max-width: 52ch; margin-top: 1rem; }
/* The ch unit resolves against the element's OWN font size, so this cap has to
   live on the h2 itself: on .section-head it would use body text and collapse
   a 4rem headline into a two-words-per-line column. */
.section-head h2 { margin-top: 0.9rem; max-width: 18ch; }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding-block: clamp(4.5rem, 2rem + 10vw, 10rem); position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none; z-index: -1;
  filter: blur(60px);
}
.hero::before {
  width: 46vw; height: 46vw; left: -8vw; top: -14vw;
  background: color-mix(in oklab, var(--brand-cyan) 38%, transparent);
}
.hero::after {
  width: 34vw; height: 34vw; right: -6vw; top: -10vw;
  background: color-mix(in oklab, var(--brand-lime) 26%, transparent);
}
.hero h1 { margin-block: 1.2rem 0; max-width: 17ch; }
.hero .lede { margin-top: 1.8rem; max-width: 54ch; }
.hero .btn-row { margin-top: 2.6rem; }

/* Word-by-word headline reveal (time-based, runs once on load) */
.word { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word > span { display: inline-block; }

/* --- Proof strip --------------------------------------------------------- */
.proof {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 1.4rem + 2vw, 3rem);
  margin-top: clamp(3.5rem, 2rem + 4vw, 5.5rem);
}
.proof > div > strong { display: block; font-size: 1.08rem; letter-spacing: -0.018em; margin-bottom: 0.45rem; }
.proof p { color: var(--muted); font-size: 0.945rem; }

/* --- Client marquee ------------------------------------------------------ */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 0; }
.clients {
  display: flex; gap: 0 2.6rem; list-style: none; padding: 0 1.3rem 0 0; margin: 0;
  font-weight: 640; font-size: clamp(1rem, 0.9rem + 0.5vw, 1.35rem);
  color: var(--muted); letter-spacing: -0.02em; white-space: nowrap;
}
.clients li { transition: color .2s; }
.clients li:hover { color: var(--accent); }

/* --- Cards --------------------------------------------------------------- */
.grid {
  display: grid; gap: clamp(1.2rem, 0.7rem + 1.4vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.card {
  display: flex; flex-direction: column; position: relative;
  background: light-dark(#fff, var(--surface));
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  text-decoration: none;
  transition: border-color .25s, transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.card:hover {
  border-color: color-mix(in oklab, var(--accent-solid) 60%, var(--line));
  transform: translateY(-6px);
  box-shadow: 0 18px 50px light-dark(rgba(16,54,65,.13), rgba(0,0,0,.45));
}
.card-media { aspect-ratio: 16 / 9; background: var(--surface); overflow: hidden; position: relative; }
.card-media::after {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: linear-gradient(140deg, color-mix(in oklab, var(--brand-cyan) 45%, transparent),
                                      color-mix(in oklab, var(--brand-lime) 30%, transparent));
  mix-blend-mode: overlay; transition: opacity .4s var(--ease);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: scale .6s var(--ease), filter .5s var(--ease);
}
a.card:hover .card-media img { scale: 1.07; filter: saturate(1.15) contrast(1.05); }
a.card:hover .card-media::after { opacity: 1; }
.card-body { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; gap: 0.65rem; flex: 1; }
.card-kicker { font-size: 0.72rem; font-weight: 680; letter-spacing: 0.11em; text-transform: uppercase; color: var(--accent); }
.card p { color: var(--muted); font-size: 0.945rem; }
.card-more { margin-top: auto; padding-top: 1rem; font-weight: 640; font-size: 0.92rem; color: var(--accent); display: inline-flex; gap: 0.45rem; }
.card-more .arw { transition: transform .28s var(--ease); }
a.card:hover .card-more .arw { transform: translateX(5px); }

/* --- Big statement ------------------------------------------------------- */
.statement { max-width: 20ch; font-size: clamp(1.95rem, 1rem + 3.9vw, 4.3rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.042em; text-wrap: balance; }
.statement em { font-style: normal; color: var(--accent); }

/* --- Capability list ----------------------------------------------------- */
.caps { list-style: none; padding: 0; margin: 0; }
.caps li {
  border-top: 1px solid var(--line); padding-block: 1.7rem; display: grid; gap: 0.5rem 2.5rem;
  transition: padding-left .3s var(--ease), border-color .3s;
}
.caps li:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 800px) {
  .caps li { grid-template-columns: minmax(230px, 1fr) 2.2fr; }
  .caps li:hover { padding-left: 1.1rem; border-color: color-mix(in oklab, var(--accent-solid) 50%, var(--line)); }
}
.caps h3 { transition: color .25s; }
.caps li:hover h3 { color: var(--accent); }
.caps p { color: var(--muted); font-size: 0.96rem; }

/* --- Steps --------------------------------------------------------------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.steps li { counter-increment: s; position: relative; padding-left: 3.6rem; min-height: 2.4rem; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 0.05rem;
  font-family: var(--mono); font-size: 0.86rem; font-weight: 600; color: var(--accent);
  border: 1.5px solid color-mix(in oklab, var(--accent-solid) 45%, transparent);
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  transition: background-color .3s, color .3s, scale .3s var(--ease);
}
.steps li:hover::before { background: var(--accent-solid); color: var(--on-accent); scale: 1.08; }
.steps strong { display: block; letter-spacing: -0.018em; }
.steps p { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

/* --- Facts --------------------------------------------------------------- */
.facts { display: grid; margin: 0; }
.facts > div { display: grid; gap: 0.15rem 1.5rem; padding-block: 0.95rem; border-top: 1px solid var(--line); font-size: 0.95rem; }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 620px) { .facts > div { grid-template-columns: 190px 1fr; } }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 560; }

/* --- Note / pull --------------------------------------------------------- */
.note {
  border-left: 3px solid var(--brand-red);
  background: color-mix(in oklab, var(--brand-red) 9%, transparent);
  padding: 1.1rem 1.3rem; border-radius: 0 12px 12px 0; font-size: 0.92rem; color: var(--muted);
}
.note strong { color: var(--ink); }
.pull { font-size: clamp(1.5rem, 1rem + 2vw, 2.6rem); line-height: 1.12; letter-spacing: -0.032em; font-weight: 650; text-wrap: balance; max-width: 22ch; }

/* --- Case hero ----------------------------------------------------------- */
.case-hero {
  aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  margin-top: clamp(2rem, 1.4rem + 2vw, 3rem);
}
.case-hero img { width: 100%; height: 100%; object-fit: cover; }

/* --- CTA band ------------------------------------------------------------ */
.cta-band {
  background: var(--brand-deep); color: #E6F1F3;
  border: 1px solid color-mix(in oklab, var(--brand-cyan) 26%, transparent);
  border-radius: var(--r); padding: clamp(2.4rem, 1.5rem + 3.4vw, 4.2rem);
  display: grid; gap: 1.7rem; align-items: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 30rem; height: 30rem; right: -8rem; top: -12rem;
  border-radius: 50%; filter: blur(70px);
  background: color-mix(in oklab, var(--brand-cyan) 30%, transparent);
}
.cta-band > * { position: relative; }
@media (min-width: 880px) { .cta-band { grid-template-columns: 1.5fr auto; gap: 2.6rem; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: #A7C3CB; margin-top: 0.9rem; max-width: 48ch; }
.cta-band .btn-primary { background: var(--brand-lime); color: var(--brand-deep); }
.cta-band .btn-primary::before { background: #fff; }

/* --- Footer -------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--line); padding-block: 3.5rem 4rem; font-size: 0.9rem; color: var(--muted); }
.site-foot .wrap { display: grid; gap: 2rem; }
@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 1.6fr 1fr 1fr; } }
.site-foot h4 { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); margin-bottom: 0.95rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.site-foot a { text-decoration: none; transition: color .2s; }
.site-foot a:hover { color: var(--accent); }
.foot-legal { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line); font-size: 0.84rem; }

/* --- YouTube facade ------------------------------------------------------ */
.video { position: relative; aspect-ratio: 16/9; width: 100%; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; background: var(--surface); display: grid; place-items: center; }
.video-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale .6s var(--ease); }
.video-btn:hover img { scale: 1.05; }
.video-btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(4,26,32,.72)); }
.video-play {
  position: relative; z-index: 1; width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand-cyan); color: var(--on-accent); display: grid; place-items: center;
  box-shadow: 0 8px 30px rgba(4,26,32,.45); transition: transform .25s var(--ease), background-color .25s;
}
.video-btn:hover .video-play { transform: scale(1.12); background: var(--brand-lime); }
.video-play svg { width: 26px; height: 26px; margin-left: 3px; fill: currentColor; }
.video-cap { position: absolute; left: 1.1rem; right: 1.1rem; bottom: 0.95rem; z-index: 1; color: #fff; font-size: 0.87rem; font-weight: 620; text-align: left; text-shadow: 0 1px 8px rgba(0,0,0,.7); }
.video-grid { display: grid; gap: clamp(1.2rem, 0.7rem + 1.4vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.video-note { margin-top: 0.8rem; font-size: 0.85rem; color: var(--muted); }

/* ==========================================================================
   MOTION
   Everything below is progressive enhancement and is switched off entirely
   for visitors who ask for reduced motion.
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {

  /* Cross-document view transitions between the static pages */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .32s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-in .42s var(--ease) both; }

  /* Headline entrance on load */
  .word > span { animation: word-up .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
  .hero .eyebrow, .hero .lede, .hero .btn-row, .hero .proof {
    animation: fade-up .8s var(--ease) both;
  }
  .hero .eyebrow  { animation-delay: .05s; }
  .hero .lede     { animation-delay: .45s; }
  .hero .btn-row  { animation-delay: .58s; }
  .hero .proof    { animation-delay: .7s; }

  /* Slow drift on the hero glow */
  .hero::before { animation: drift-a 19s ease-in-out infinite alternate; }
  .hero::after  { animation: drift-b 23s ease-in-out infinite alternate; }

  /* Infinite client marquee */
  .marquee-track { animation: marquee 34s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }

  /* Scroll-driven reveals — only where the browser really supports them */
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal {
      animation: fade-up .9s var(--ease) both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
    .stagger > *:nth-child(1) { animation-range: entry 8%  cover 26%; }
    .stagger > *:nth-child(2) { animation-range: entry 8%  cover 32%; }
    .stagger > *:nth-child(3) { animation-range: entry 8%  cover 38%; }
    .stagger > * {
      animation: fade-up .9s var(--ease) both;
      animation-timeline: view();
    }
    /* Parallax inside the case hero */
    .case-hero img {
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    /* Progress bar that fills with the page */
    .progress {
      animation: progress linear both;
      animation-timeline: scroll(root block);
    }
  }
}

@keyframes vt-out   { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in    { from { opacity: 0; transform: translateY(18px); } }
@keyframes word-up  { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes fade-up  { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes drift-a  { to { translate: 6vw 4vw; scale: 1.15; } }
@keyframes drift-b  { to { translate: -5vw 6vw; scale: 1.2; } }
@keyframes marquee  { to { transform: translateX(-50%); } }
@keyframes parallax { from { scale: 1.16; translate: 0 -3.2%; } to { scale: 1.16; translate: 0 3.2%; } }
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Scroll progress bar */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: linear-gradient(90deg, var(--brand-cyan), var(--brand-lime));
  transform-origin: 0 50%; transform: scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .progress { display: none; }
}

/* ==========================================================================
   NUOVI COMPONENTI (pillars, chips, model, flow, form)
   ========================================================================== */
.hero-foot {
  margin-top: 2.6rem; font-size: 0.88rem; letter-spacing: 0.04em;
  color: var(--muted); text-transform: uppercase; font-weight: 600;
}
.hero-foot span { color: var(--accent); margin-left: 0.6rem; letter-spacing: 0.12em; }

.pillars { list-style: none; counter-reset: p; padding: 0; margin: 0; display: grid;
  gap: clamp(1.4rem, 0.8rem + 1.8vw, 2.6rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.pillars li { counter-increment: p; position: relative; padding-top: 2.9rem;
  border-top: 2px solid var(--line); transition: border-color .35s; }
.pillars li::before {
  content: "0" counter(p); position: absolute; top: 1rem; left: 0;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.1em; color: var(--accent);
}
.pillars li:hover { border-color: var(--accent-solid); }
.pillars h3 { font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); letter-spacing: -0.03em; }
.pillars p { color: var(--muted); margin-top: 0.8rem; font-size: 0.98rem; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chips li {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.6rem 1.15rem;
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  transition: border-color .25s, color .25s, transform .25s var(--ease);
}
.chips li:hover { border-color: var(--accent-solid); color: var(--accent); transform: translateY(-2px); }

.model { list-style: none; counter-reset: m; padding: 0; margin: 0; display: grid;
  gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.model li {
  counter-increment: m; border-top: 1px solid var(--line); padding: 1.05rem 0 1.05rem 3rem;
  position: relative; font-weight: 560; transition: color .25s, padding-left .3s var(--ease);
}
.model li::before {
  content: counter(m, decimal-leading-zero); position: absolute; left: 0; top: 1.15rem;
  font-family: var(--mono); font-size: 0.78rem; color: var(--accent);
}
.model li:hover { color: var(--accent); padding-left: 3.5rem; }

.flow {
  margin-top: clamp(2.4rem, 1.6rem + 2.4vw, 3.6rem);
  font-family: var(--mono); font-size: clamp(0.66rem, 0.58rem + 0.34vw, 0.82rem);
  letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase;
  display: flex; flex-wrap: wrap; gap: 0.55rem 0.9rem; align-items: center;
  border-top: 1px solid var(--line); padding-top: 1.4rem;
}
.flow span { color: var(--accent-solid); }

/* --- Form ---------------------------------------------------------------- */
.form { display: grid; gap: 1.3rem 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.field { display: grid; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 640; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 0.98rem; color: var(--ink);
  background: light-dark(#fff, var(--surface));
  border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 1rem;
  width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--accent-solid);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent-solid) 26%, transparent);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--brand-red); }
.form-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; align-items: center; margin-top: 0.6rem; }
.form-note { font-size: 0.85rem; color: var(--muted); max-width: 40ch; }

/* Honeypot: fuori dallo schermo, mai raggiungibile da tastiera o screen reader.
   Non uso display:none perche' i bot piu' accorti lo riconoscono e saltano il campo. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Esito dell'invio. Vuoto finche' non si preme invia: il :empty lo tiene
   fuori dal flusso, cosi' non lascia spazio bianco sotto al bottone. */
.form-status {
  margin-top: 0.9rem; padding: 0.85rem 1.05rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 0.92rem; line-height: 1.5; color: var(--ink); max-width: 62ch;
}
.form-status:empty { display: none; }
.form-status[data-state="pending"] { color: var(--muted); }
.form-status[data-state="ok"]      { border-color: var(--accent-solid); color: var(--accent); }
.form-status[data-state="error"]   { border-color: var(--brand-red); color: var(--danger); }

/* Bottone in attesa della risposta del server. */
.btn[disabled] { opacity: .6; pointer-events: none; }
.btn[disabled]:hover { transform: none; }

/* ==========================================================================
   MOTION — livello 2: testi e immagini animati durante lo scroll
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {

    /* Quando i figli hanno una loro animazione, il contenitore non si muove:
       altrimenti l'elemento verrebbe animato due volte. */
    .section-head.reveal, .caps.reveal, .steps.reveal,
    .model.reveal, .facts.reveal { animation: none; }

    /* Testata di sezione: occhiello, titolo e sommario entrano sfalsati */
    .section-head .eyebrow {
      animation: row-in linear both;
      animation-timeline: view(); animation-range: entry 2% cover 18%;
    }
    .section-head .lede {
      animation: fade-up linear both;
      animation-timeline: view(); animation-range: entry 10% cover 30%;
    }

    .section-head h2, .statement, .pillars h3 {
      animation: line-up linear both;
      animation-timeline: view();
      animation-range: entry 4% cover 24%;
    }

    /* Immagini: entrano scoprendosi dal basso e continuano a muoversi */
    .card-media img, .video-btn img {
      animation: img-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 34%;
    }
    .card-media, .video { overflow: clip; }

    /* Parallasse continua sulle immagini dei case study */
    .case-hero img {
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }

    /* Righe di elenco che scorrono dentro una alla volta */
    .caps li, .steps li, .model li, .facts > div {
      animation: row-in linear both;
      animation-timeline: view();
      animation-range: entry 2% cover 20%;
    }

    /* Chip che entrano scalando */
    .chips li {
      animation: chip-in linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 24%;
    }

    /* La fascia CTA si solleva e prende luce entrando */
    .cta-band {
      animation: band-in linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 34%;
    }

    /* L'header si compatta appena si lascia la cima della pagina */
    .site-head {
      animation: head-shrink linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 220px;
    }
  }
}

@keyframes line-up  { from { opacity: 0; transform: translateY(38px) scale(.985); filter: blur(6px); }
                      60%  { filter: blur(0); }
                      to   { opacity: 1; transform: none; filter: blur(0); } }
/* Nessun `scale` qui: resta alla transition del rollover. */
@keyframes img-in   { from { translate: 0 7%; filter: saturate(.45) brightness(.66); clip-path: inset(14% 0 0 0); }
                      to   { translate: 0;    filter: saturate(1) brightness(1);     clip-path: inset(0 0 0 0); } }
@keyframes row-in   { from { opacity: 0; transform: translateX(-26px); }
                      to   { opacity: 1; transform: none; } }
@keyframes chip-in  { from { opacity: 0; scale: .86; } to { opacity: 1; scale: 1; } }
@keyframes band-in  { from { opacity: 0; transform: translateY(46px) scale(.97); }
                      to   { opacity: 1; transform: none; } }
@keyframes head-shrink { to { backdrop-filter: blur(22px) saturate(1.7); } }
