/* ---- Font in locale (nessuna richiesta a Google) ---- */
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:300 700;font-display:swap;src:url(../assets/fonts/space-grotesk-latin-ext-wght-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Space Grotesk";font-style:normal;font-weight:300 700;font-display:swap;src:url(../assets/fonts/space-grotesk-latin-wght-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/jetbrains-mono-latin-ext-400-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:400;font-display:swap;src:url(../assets/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/jetbrains-mono-latin-ext-500-normal.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:500;font-display:swap;src:url(../assets/fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ==========================================================================
   Francesca Predieri — Portfolio
   ========================================================================== */

:root {
  /* ---- Palette: blu, azzurro, bianco, grigio, grigio scuro (niente nero) ---- */
  --blue: #2433d6;          /* blu del portfolio Framer */
  --light-blue: #8fa2ff;    /* azzurro: linee e punti secondari */
  --light-blue-soft: #e8ecff; /* azzurro tenue: sfondi */
  --white: #ffffff;
  --grey: #f3f4f6;          /* superfici */
  --grey-mid: #8b8d96;      /* testo secondario */
  --grey-line: #e4e5ea;     /* filetti */
  --dark-grey: #2b2d33;     /* al posto del nero */

  /* ruoli */
  --bg: var(--white);
  --fg: var(--blue);
  --text: var(--blue);      /* tutti i testi: blu su bianco 8,33:1 (WCAG AAA) */
  --muted: var(--blue);
  --line: var(--grey-line);
  --surface: var(--grey);
  --dark: var(--dark-grey);
  --accent: var(--blue);
  --accent-soft: var(--light-blue-soft);

  --col: 680px;
  --wide: 1080px;
  --radius: 18px;
  --gutter: 24px;

  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--dark);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.6;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
}
/* Space Grotesk: titoli 500–600, testo 400, intro 300 */
h1, h2, h3, h4 { font-family: var(--font); }
button { font-family: var(--font); }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
figure { margin: 0; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: var(--dark); color: #fff;
  display: grid; place-items: center; padding: 24px;
  transition: opacity .8s var(--ease), visibility .8s;
}
.intro.is-done { opacity: 0; visibility: hidden; }
.intro__text { font-size: 18px; min-height: 1.6em; }
.intro__text::after {
  content: ""; display: inline-block; width: 1px; height: 1.1em;
  margin-left: 2px; vertical-align: -3px; background: #fff;
  animation: blink 1s steps(1) infinite;
}
.intro__sub { margin-top: 8px; font: 12px var(--mono); color: var(--light-blue); }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- Pagina sopra il footer ---------- */
.page {
  position: relative; z-index: 2;
  background: var(--bg);
  border-radius: 0 0 40px 40px;
  min-height: 100vh;
  padding-bottom: 140px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px;
  padding: 20px 28px;
  font-size: 17px;
  /* bianco pieno dietro ai testi: il contrasto resta valido anche sopra le immagini */
  background: linear-gradient(var(--bg) 80%, rgba(255,255,255,0));
}
.nav a { color: var(--blue); }
.nav__right > a:hover, .nav__right > a.is-active { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }
.nav__brand { font-weight: 600; }
.nav__right { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 24px; }
.lang { display: inline-flex; padding: 3px; border: 1px solid var(--blue); border-radius: 99px; background: var(--white); }
.lang__link { min-width: 34px; padding: 4px 8px; border-radius: 99px; text-align: center; font: 500 14px/1.4 var(--mono); }
.lang__link:hover { background: var(--light-blue-soft); }
.nav .lang__link.is-on { background: var(--blue); color: var(--white); }
.nav a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: min(var(--col), 100% - var(--gutter) * 2); margin-inline: auto; }
.container--wide { width: min(var(--wide), 100% - var(--gutter) * 2); margin-inline: auto; }
.container--xl { width: min(1280px, 100% - var(--gutter) * 2); margin-inline: auto; } /* immagini di prodotto */
.stack > * + * { margin-top: 16px !important; }
.section > * + * { margin-top: 32px; }

/* ---------- Tipografia ---------- */
.section__label {
  font: 500 15px/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
  margin: 0 0 12px; padding-bottom: 8px;
}
.section__title {
  font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em;
  margin: 0; color: var(--blue);
}
.lead { font-size: 19px; line-height: 1.5; font-weight: 300; color: var(--text); margin: 0; }
.lead + .lead { margin-top: 12px; }
.section p { margin: 0; color: var(--text); }
.text-link { color: var(--accent); border-bottom: 1px solid currentColor; font-weight: 500; }

/* ---------- Testata progetto ---------- */
.project-head { padding-top: 140px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; }
.tags li {
  font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  padding: 4px 9px; border-radius: 99px;
}
.project-head__title {
  font-size: clamp(32px, 4vw, 48px); line-height: 1.05; font-weight: 500; letter-spacing: -.035em;
  margin: 0 0 18px; color: var(--blue);
}
.meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin: 40px 0 0; padding-top: 22px; border-top: 1px solid var(--line);
}
.meta h4 { margin: 0 0 6px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.meta p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg); }

/* ---------- Immagini ---------- */
.figure { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.figure { display: grid; place-items: center; }
.figure img { width: auto; max-width: 100%; max-height: 88vh; }
.figure--hero img { max-height: 80vh; }

/* Infografiche: larghe come prima (1080px), senza riquadro grigio, direttamente sullo sfondo */
.figure--info { background: none; border-radius: 0; }
.figure--info img { width: 100%; height: auto; max-height: none; }
.figure--stack { display: grid; gap: 16px; }
.carousel--info .carousel__item { background: none; border-radius: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Carosello a scorrimento orizzontale */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 4px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__item {
  flex: 0 0 auto; scroll-snap-align: start;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.carousel__item img { height: clamp(240px, 42vw, 520px); width: auto; max-width: none; }
.carousel__ctrl { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.carousel__ctrl button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg); color: var(--fg);
  font-size: 14px; cursor: pointer; transition: background .2s, border-color .2s;
}
.carousel__ctrl button:hover { border-color: var(--fg); }

/* ---------- Sezioni ---------- */
.section { padding-top: 104px; scroll-margin-top: 70px; }

.divider {
  display: flex; align-items: center; gap: 20px;
  margin: 120px auto 0;
  font: 500 14px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--blue);
}
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--blue); }
.divider span { padding: 9px 18px; border-radius: 99px; background: var(--light-blue-soft); white-space: nowrap; }

.quote {
  margin-top: 20px !important;
  font-size: 19px; line-height: 1.55; color: var(--fg) !important;
  padding-left: 18px; border-left: 2px solid var(--accent);
}

.nutshell { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.nutshell__card { background: var(--surface); border-radius: var(--radius); padding: 26px; }
.nutshell__card h3 { margin: 0 0 12px; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.nutshell__card p, .nutshell__card li { font-size: 14px; line-height: 1.6; color: var(--text); }

.bullets { margin: 0; padding-left: 18px; }
.bullets li + li { margin-top: 6px; }

.defs { margin: 8px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.defs > div { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.defs dt { font-weight: 600; font-size: 14px; }
.defs dd { margin: 0; color: var(--text); font-size: 14px; }

/* Schede (ricerca) */
.tabs__list { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--line); margin-top: 8px; }
.tabs__btn {
  appearance: none; background: none; border: 0; padding: 10px 0; margin-bottom: -1px;
  font: inherit; font-size: 13px; color: var(--muted); cursor: pointer;
  border-bottom: 1px solid transparent; transition: color .2s;
}
.tabs__btn:hover { color: var(--fg); }
.tabs__btn[aria-selected="true"] { color: var(--accent); border-color: var(--accent); }
.tabs__panel { padding-top: 22px; }
.tabs__panel[hidden] { display: none; }
.tabs__panel .figure { margin-top: 20px; }

/* Flusso a passi */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.step { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.step .figure { margin: -24px -24px 18px; border-radius: 0; }
.step__num { display: block; font: 500 12px var(--mono); color: var(--accent); margin-bottom: 36px; }
.step h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.step p { font-size: 14px; }

.insights { margin-top: 32px !important; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.insight { background: var(--surface); border-radius: var(--radius); padding: 22px; }
.insight__icon { width: 36px; height: 36px; margin-bottom: 12px; }
.insight p { font-size: 14px; }

/* ---------- Visualizzazioni animate ---------- */
.viz {
  --viz-alt: var(--light-blue);
  /* nessun riquadro grigio: il grafico sta direttamente sullo sfondo */
  background: none; padding: 0;
}
.viz__svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.viz figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }

.viz-grid { stroke: var(--grey-line); stroke-width: 1; }
.viz-rule { stroke: var(--grey-line); stroke-width: 1; }
.viz-ring { fill: none; stroke: var(--grey-line); stroke-width: 1; }
.viz-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz-line--alt { stroke: var(--viz-alt); }
.viz-curve { fill: none; stroke: var(--grey-mid); stroke-opacity: .45; stroke-width: 1.25; }
.viz-curve--strong { stroke: var(--accent); stroke-opacity: .45; stroke-width: 1.5; }
.viz-node { fill: var(--accent); }
.viz-node--alt { fill: var(--viz-alt); }
.viz-box { fill: var(--white); stroke: var(--grey-line); }
.viz-box--strong { stroke: var(--accent); stroke-opacity: .35; }
.viz-hub { fill: var(--accent); }
.viz-halo { fill: var(--accent); opacity: .1; }
.viz-hub__text { fill: var(--white); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.viz-area { fill-opacity: .14; stroke-width: 1.5; }

.viz-kicker { font: 500 11px var(--mono); letter-spacing: .08em; fill: var(--accent); }
.viz-kicker--alt { fill: var(--blue); }
.viz-label { font-size: 13px; fill: var(--muted); }
.viz-label--dark { fill: var(--fg); }
.viz-label--bold { font-weight: 600; font-size: 14px; }
.viz-note { font-size: 13px; fill: var(--fg); }
.viz-mono { font: 11px var(--mono); fill: var(--muted); }

/* diagramma di Venn (Avrora) */
.venn-line { fill: none; stroke-width: 2.5; }
.venn-line--a { stroke: var(--blue); }
.venn-line--b { stroke: var(--light-blue); }
.venn-fill--a { fill: var(--blue); fill-opacity: .05; }
.venn-fill--b { fill: var(--light-blue); fill-opacity: .12; }
.venn-lens { fill: var(--blue); fill-opacity: .16; }
.venn-text { font-size: 17px; fill: var(--blue); }
.venn-strong { font-weight: 600; fill: var(--blue); }
.venn-pill text { font-size: 13px; font-weight: 500; }
.venn-pill--a rect { fill: var(--blue); }
.venn-pill--a text { fill: var(--white); }
.venn-pill--b rect { fill: var(--light-blue-soft); stroke: var(--light-blue); }
.venn-pill--b text { fill: var(--blue); }

/* percorso d'acquisto: prima / dopo */
.viz-kicker--grey { fill: var(--blue); }
.pp-line { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.pp-line--old { stroke: var(--grey-mid); }
.pp-line--new { stroke: var(--blue); }
.pp-ghost { fill: none; stroke: var(--light-blue); stroke-width: 1.5; stroke-dasharray: 4 6; }
.pp-dead { fill: none; stroke: var(--grey-mid); stroke-width: 1.5; }
.pp-x { stroke: var(--dark-grey); stroke-width: 2; stroke-linecap: round; }
.pp-node { stroke: var(--white); stroke-width: 3; }
.pp-node--old { fill: var(--dark-grey); }
.pp-node--new { fill: var(--blue); }
.pp-click { fill: var(--light-blue-soft); stroke: var(--light-blue); stroke-width: 1; }
.pp-click__n { font: 500 10px var(--mono); fill: var(--blue); }
.pp-stat { font-size: 15px; fill: var(--text); }
.pp-stat__num { font-size: 30px; font-weight: 600; fill: var(--blue); }
.pp-stat__num--grey { fill: var(--blue); }

/* radar interattivo */
.viz-axis-num { fill: var(--accent); }
.radar-series .viz-area, .radar-series circle { transition: fill-opacity .7s var(--ease), stroke-opacity .7s var(--ease), opacity .7s var(--ease); }
.viz.has-focus .radar-series:not(.is-focus) .viz-area { fill-opacity: .03; stroke-opacity: .15; }
.viz.has-focus .radar-series:not(.is-focus) circle { opacity: .15; }
.viz.has-focus .radar-series.is-focus .viz-area { fill-opacity: .35; stroke-width: 2; }
.radar-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-top: 20px; }
.radar-key {
  appearance: none; text-align: left; cursor: pointer; font: inherit; color: var(--blue);
  display: grid; gap: 4px; padding: 14px 16px;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .5s, box-shadow .5s;
}
.radar-key:hover, .radar-key.is-hover { border-color: var(--c); }
.radar-key[aria-pressed="true"] { border-color: var(--c); box-shadow: 0 0 0 1px var(--c); }
.radar-key__name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.radar-key__name i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.radar-key__note { font-size: 12.5px; color: var(--text); }
.radar-key__note--con { color: var(--muted); }

/* architettura dell'informazione: vecchia → nuova */
.ia__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.ia__stats { display: flex; gap: clamp(20px, 4vw, 48px); }
.ia-stat { display: grid; gap: 2px; }
.ia-stat__num { font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.ia-stat__label { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.ia__toggle { display: inline-flex; padding: 4px; gap: 4px; background: var(--white); border: 1px solid var(--grey-line); border-radius: 99px; }
.ia__toggle button {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: 13px;
  padding: 8px 14px; border-radius: 99px; background: transparent; color: var(--blue);
  transition: background .25s, color .25s;
}
.ia__toggle button[aria-pressed="true"] { background: var(--blue); color: var(--white); }
.ia__scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.ia__svg { display: block; width: 100%; min-width: 860px; height: auto; font-family: var(--font); }

.ia-node { transition: transform 1.7s cubic-bezier(.65, 0, .25, 1), opacity 1.3s var(--ease); }
.ia-node rect { stroke-width: 1; transition: width 1.7s cubic-bezier(.65, 0, .25, 1), fill .9s, stroke .9s; }
.ia-node text { font-size: 11.5px; transition: opacity .8s, fill .9s; }
.ia-la { opacity: 0; }
.ia-home rect { fill: var(--dark-grey); stroke: var(--dark-grey); }
.ia-home text { fill: var(--white); font-weight: 500; }
.ia-t0 rect { fill: var(--blue); stroke: var(--blue); }
.ia-t0 text { fill: var(--white); font-weight: 500; }
.ia-t1 rect { fill: var(--light-blue-soft); stroke: var(--light-blue); }
.ia-t1 text { fill: var(--blue); }
.ia-t2 rect { fill: var(--white); stroke: var(--grey-line); }
.ia-t2 text { fill: var(--blue); }
.ia-key rect { fill: var(--white); stroke: var(--blue); stroke-width: 1.5; }
.ia-key text { fill: var(--blue); font-weight: 600; }
.ia-new { fill: var(--light-blue); stroke: var(--white); stroke-width: 2; }

.ia-edges { transition: opacity .8s var(--ease); }
.ia-edges path { fill: none; stroke: var(--grey-mid); stroke-opacity: .55; stroke-width: 1; }
.ia-edges .ia-cross { stroke-opacity: .3; }
.ia-edges .ia-search { stroke: var(--blue); stroke-opacity: .55; stroke-width: 1.5; }
.ia-dot { fill: var(--blue); opacity: 0; transition: opacity .4s; }
.ia-dot.is-moving { opacity: 1; }

.ia__legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; font-size: 12.5px; color: var(--text); }
.ia__legend span { display: inline-flex; align-items: center; gap: 8px; }
.ia-sw { width: 22px; height: 12px; border-radius: 99px; border: 1px solid; }
.ia-sw--t0 { background: var(--blue); border-color: var(--blue); }
.ia-sw--t1 { background: var(--light-blue-soft); border-color: var(--light-blue); }
.ia-sw--t2 { background: var(--white); border-color: var(--grey-line); }
.ia-sw--key { background: var(--white); border: 1.5px solid var(--blue); }
.ia-sw--new { width: 10px; height: 10px; background: var(--light-blue); border-color: var(--light-blue); }

@media (prefers-reduced-motion: reduce) {
  .ia-node, .ia-node rect, .ia-edges { transition: none !important; }
}

/* stato iniziale */
.viz__svg { transition: opacity 1s var(--ease); }
.viz.is-fading .viz__svg { opacity: 0; }
.viz.no-anim, .viz.no-anim * { transition: none !important; animation: none !important; }
.viz [data-draw] { transition: stroke-dashoffset var(--dur, 2.2s) var(--ease) var(--d, 0s); }
.viz [data-pop] {
  opacity: 0; transform: scale(.5);
  transform-box: fill-box; transform-origin: center;
  transition: opacity .9s var(--ease) var(--d, 0s), transform 1.1s cubic-bezier(.3, 1.4, .5, 1) var(--d, 0s);
}
.viz [data-grow] {
  opacity: 0; transform: scale(0); transform-box: view-box;
  transition: opacity 1s var(--ease) var(--d, 0s), transform 1.8s cubic-bezier(.2, 1.15, .3, 1) var(--d, 0s);
}
.flow-dot { opacity: 0; transition: opacity .4s; }

/* in riproduzione */
.viz.is-playing [data-draw] { stroke-dashoffset: 0 !important; }
.viz.is-playing [data-pop],
.viz.is-playing [data-grow] { opacity: 1; transform: none; }
.flow-dot.is-moving { opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  .viz [data-draw], .viz [data-pop], .viz [data-grow] { transition: none; }
}

/* tecniche di ricerca e tipi di utente (Seafoodie) */
.rp-diamond { fill: none; stroke: var(--grey-line); stroke-width: 2; stroke-linejoin: round; }
.rp-pill rect { fill: var(--white); stroke: var(--grey-line); }
.rp-pill text { font-size: 13.5px; fill: var(--blue); }
.rp-pill--blue rect { fill: var(--blue); stroke: var(--blue); }
.rp-pill--blue text { fill: var(--white); font-weight: 500; }
.methods { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--grey-line); }
.methods li { display: grid; grid-template-columns: 44px 1fr 1.4fr 1.6fr; gap: 8px 28px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--grey-line); }
.methods__n { font: 500 12px var(--mono); color: var(--blue); }
.methods h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.02em; color: var(--blue); }
.methods__how { font-size: 14px; color: var(--text) !important; }
.methods__found { font-size: 15px; font-weight: 500; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.type { background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 26px; }
.type__focus { font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; }
.type h3 { margin: 8px 0 14px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--blue); }
.type__quote { padding-left: 14px; border-left: 2px solid var(--light-blue); font-size: 15px; }
.type ul { margin: 18px 0 0; padding-left: 18px; font-size: 14px; color: var(--text); }
.type li + li { margin-top: 4px; }
@media (max-width: 760px) { .types { grid-template-columns: 1fr; } .methods li { grid-template-columns: 32px 1fr; } .methods p { grid-column: 2; } }

/* confronto dei clic (Milano Sport) */
.cc-bar { fill: none; stroke: var(--grey-mid); stroke-width: 16; }
.cc-bar--range { stroke-opacity: .4; }
.cc-bar--main { stroke: var(--blue); }

/* test di Avrora: grafico, numeri, esiti */
/* foto: una grande e due piccole */
.photos { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.stack > .photos + .viz { margin-top: 56px !important; }
.photos .figure { aspect-ratio: 1; }
.photos .figure:first-child { grid-row: span 2; aspect-ratio: auto; }
.photos img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
@media (max-width: 640px) {
  .photos { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 10px; }
  .photos .figure:first-child { grid-row: auto; grid-column: span 2; aspect-ratio: 1; }
}

/* sottotitoli, elenchi, domande di progetto */
.subhead { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--blue); }
.stack > .subhead:not(:first-child) { margin-top: 32px !important; }
.list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.list li::marker { color: var(--blue); }
.hmw { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hmw__card { display: grid; align-content: start; gap: 14px; padding: 28px; border-radius: var(--radius); background: var(--light-blue-soft); }
.hmw__card h3 { margin: 0; font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; color: var(--blue); }
.hmw__card p { font-size: 15px; }
@media (max-width: 640px) { .hmw { grid-template-columns: 1fr; } }

/* ADAXI Bari Parchi */
.sw text { font-size: 13px; fill: var(--blue); }
.sw rect { fill: var(--white); stroke: var(--grey-line); }
.sw--s rect { fill: var(--blue); stroke: none; }
.sw--s text { fill: var(--white); font-weight: 500; }
.sw--o rect { fill: var(--light-blue-soft); stroke: var(--light-blue); }
.sw--w rect { fill: var(--grey); stroke: none; }
.sw--t rect { stroke: var(--grey-mid); }
.pp-dia { fill: var(--light-blue-soft); stroke: var(--blue); stroke-width: 1.5; }
.pp-dia__name { font-size: 17px; font-weight: 600; fill: var(--blue); }
.pp-dia__dot { fill: var(--blue); }

/* Clarity */
.cs-app { fill: var(--light-blue-soft); }
.cs-actor { fill: var(--white); font-size: 15px; font-weight: 600; }
.ew-pair { display: grid; grid-template-columns: 1fr 1fr; }
.cs-scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .ew-pair { grid-template-columns: 1fr; gap: 24px; }
  .cs-scroll .viz__svg { width: 760px; max-width: none; }
}
.ew-ring { fill: none; stroke: var(--grey-line); stroke-width: 1; }
.ew-axis { fill: none; stroke: var(--grey-mid); stroke-width: 1.25; }
.ew--before .ew-dot { fill: var(--grey-mid); fill-opacity: .8; }
.ew--after .ew-dot { fill: var(--blue); fill-opacity: .8; }
.at--before .at-dot { fill: var(--grey-mid); }
.at--after .at-dot { fill: var(--blue); }
.at-mean { stroke: var(--dark-grey); stroke-width: 1.5; }
.at-label { font-size: 13px; fill: var(--text); }
.at-num { font-size: 24px; font-weight: 600; fill: var(--blue); }
.stats { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 10px; background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 24px; }
.stats dd { margin: 0; font-size: clamp(32px, 4vw, 44px); line-height: 1; font-weight: 500; letter-spacing: -.03em; color: var(--blue); }
.stats dt { font-size: 14px; line-height: 1.5; color: var(--text); }
.findings { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.finding { background: var(--white); border: 1px solid var(--grey-line); border-radius: var(--radius); padding: 24px; }
.finding h3 { margin: 0 0 18px; font-size: 18px; font-weight: 600; color: var(--blue); }
.finding ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.finding li { font-size: 14px; line-height: 1.5; color: var(--text); }
.finding__tag { display: table; margin-bottom: 6px; padding: 3px 9px; border-radius: 99px; font: 500 11px var(--mono); }
.finding__check { display: block; width: 22px; height: 22px; margin-bottom: 8px; }
.finding__check circle { fill: var(--blue); }
.finding__check path { fill: none; stroke: var(--white); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.finding__issue .finding__tag { background: var(--grey); color: var(--blue); box-shadow: inset 0 0 0 1px var(--grey-mid); }
@media (max-width: 760px) { .stats, .findings { grid-template-columns: 1fr; } }

/* ---------- Racconto a fasi ---------- */
.story { --story-time: 6s; }
.story__nav { display: grid; align-items: end; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.story__key {
  appearance: none; border: 0; background: none; padding: 0; cursor: pointer; text-align: left;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  font-size: 15px; font-weight: 400; color: var(--blue);
}
.story__key:hover .story__name { text-decoration: underline; text-underline-offset: 4px; }
.story__key.is-active { font-weight: 600; }
.story__num { font: 500 11px var(--mono); }
.story__bar { flex: 0 0 100%; height: 3px; border-radius: 3px; background: var(--grey-line); overflow: hidden; }
.story__bar i { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: left; }
.story__key.is-active .story__bar i { animation: story-bar var(--story-time) linear forwards; }
.story.is-paused .story__bar i { animation-play-state: paused; }
@keyframes story-bar { to { transform: scaleX(1); } }

.story__track {
  position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain; scrollbar-width: none; border-radius: var(--radius);
}
.story__track::-webkit-scrollbar { display: none; }
.story__slide {
  flex: 0 0 100%; scroll-snap-align: start; min-width: 0;
  display: grid; grid-template-columns: 1.75fr 1fr; background: var(--white);
  border: 1px solid var(--grey-line); border-radius: var(--radius); overflow: hidden;
}
.story__media { aspect-ratio: 16 / 10; background: var(--grey); }
.story__media img { width: 100%; height: 100%; object-fit: cover; }
.story__empty {
  height: 100%; display: grid; place-content: center; justify-items: center; gap: 6px;
  font: 12px var(--mono); color: var(--blue);
}
.story__empty span { font: 500 56px/1 var(--font); }
.story__text { display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(20px, 3vw, 36px); }
.story__text h3 { margin: 0 0 10px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--blue); }
.story__pause {
  appearance: none; margin-top: 14px; padding: 6px 14px; cursor: pointer;
  font: 12px var(--mono); color: var(--text); background: var(--white);
  border: 1px solid var(--grey-line); border-radius: 99px;
}
.story__pause:hover { border-color: var(--blue); color: var(--blue); }
.story__key:focus-visible, .story__pause:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 720px) {
  .story__nav { gap: 10px; }
  .story__key { font-size: 13px; }
  .story__num { display: none; }
  .story__slide { grid-template-columns: 1fr; }
  .story__text { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .story__key.is-active .story__bar i { animation: none; transform: scaleX(1); }
}

/* ---------- Indice laterale ---------- */
.toc {
  position: fixed; left: 28px; top: 50%; transform: translateY(-50%);
  z-index: 40; font-size: 12px; max-width: 170px;
  opacity: 0; pointer-events: none; transition: opacity .4s var(--ease);
}
.toc.is-shown { opacity: 1; pointer-events: auto; }
.toc.is-shown.is-covered { opacity: 0; pointer-events: none; } /* sopra un'immagine il testo blu non si leggerebbe */
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li + li { margin-top: 6px; }
.toc a { position: relative; color: var(--muted); transition: font-size .25s var(--ease); line-height: 18px; display: block; }
.toc a::before {
  content: ""; position: absolute; left: -18px; top: 8px; width: 10px; height: 2px; border-radius: 2px;
  background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.toc a:hover { text-decoration: underline; text-underline-offset: 3px; }
.toc a.is-active { font-size: 14px; font-weight: 600; }
.toc a.is-active::before { transform: scaleX(1); }

/* ---------- Homepage ---------- */
.home-head { padding-top: 170px; padding-bottom: 96px; }
/* saluto sopra il titolo in home */
.home-head > .section__label:first-child { font-size: 18px; }
.home-head h1 {
  font-size: clamp(48px, 9vw, 120px); line-height: .95; font-weight: 500;
  letter-spacing: -.045em; margin: 0 0 28px; color: var(--accent);
}
.home-head .lead { max-width: 40ch; }
/* frase in evidenza sotto il nome, nella pagina Chi sono */
/* il titolo prende la larghezza del nome: width 0 + min-width 100% non allarga il contenitore */
.about-intro { display: grid; width: max-content; max-width: 100%; }
.about-heading { width: 0; min-width: 100%; margin: 0 0 32px; font-size: clamp(21px, 2.15vw, 30px); line-height: 1.3; font-weight: 600; letter-spacing: -.015em; color: var(--blue); }
.skills { margin-top: 48px; }
.skills ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.skills li { font-size: 13px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px; }

.works { display: grid; grid-template-columns: 1fr 1fr; gap: 72px 24px; }
.work-card { display: block; }
.work-card__media {
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface);
}
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-card:hover .work-card__media img { transform: scale(1.03); }
.work-card__info { display: grid; gap: 4px; margin-top: 20px; }
.work-card__info strong { font-size: clamp(22px, 2vw, 26px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
.work-card__info span { color: var(--muted); font-size: 16px; line-height: 1.4; }
.work-card__lead { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 52ch; }

.about-teaser { display: block; padding: 40px; border-radius: var(--radius); background: var(--accent-soft); }
.about-teaser__text { margin: 0; font-size: clamp(20px, 2.4vw, 28px); line-height: 1.35; letter-spacing: -.01em; color: var(--fg); }
.about-teaser__text span { color: var(--accent); white-space: nowrap; }

/* ---------- About ---------- */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.value { background: var(--surface); border-radius: var(--radius); padding: 28px; }
.value h3 { margin: 0 0 10px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--accent); }
.value p { margin: 0; font-size: 15px; color: var(--text); }
/* icone animate: partono quando la card entra nello schermo */
.value__icon { display: block; width: 72px; height: 72px; margin: -6px 0 14px -6px; overflow: visible; }
.value__icon * { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; animation-play-state: paused !important; }
.value.is-visible .value__icon * { animation-play-state: running !important; }
.vi-heart { fill: var(--light-blue-soft); fill-opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; transform-origin: 48px 50px;
  animation: vi-draw 1.6s var(--ease) .3s forwards, vi-fill .8s ease 1.6s forwards, vi-beat 2.4s ease-in-out 2.4s infinite; }
@keyframes vi-draw { to { stroke-dashoffset: 0; } }
@keyframes vi-fill { to { fill-opacity: 1; } }
@keyframes vi-beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.08); } 30% { transform: scale(.98); } 45% { transform: scale(1.05); } }
.vi-p { fill: var(--blue); stroke: none; animation: vi-gather 4.5s var(--ease) infinite; }
.vi-p1 { --dx: 0px; --dy: -14px; } .vi-p2 { --dx: -12px; --dy: 8px; } .vi-p3 { --dx: 12px; --dy: 8px; }
.vi-p2 { fill: var(--light-blue); } .vi-p3 { fill: var(--grey-mid); }
.vi-links path { stroke: var(--light-blue); stroke-width: 2.5; opacity: 0; animation: vi-links 4.5s var(--ease) infinite; }
@keyframes vi-gather { 0%, 100% { transform: translate(var(--dx), var(--dy)); } 35%, 75% { transform: none; } }
@keyframes vi-links { 0%, 30%, 85%, 100% { opacity: 0; } 42%, 72% { opacity: 1; } }
.vi-steps { stroke: var(--grey-mid); }
.vi-ball { fill: var(--blue); stroke: none; animation: vi-climb 3.6s ease-in-out infinite; }
@keyframes vi-climb {
  0%, 8% { transform: translate(0, 0); } 18% { transform: translate(11px, -30px); } 26%, 32% { transform: translate(22px, -20px); }
  42% { transform: translate(33px, -50px); } 50%, 56% { transform: translate(44px, -40px); } 66% { transform: translate(55px, -70px); } 74%, 88% { transform: translate(66px, -60px); }
  94% { transform: translate(66px, -60px); opacity: 1; } 97% { opacity: 0; transform: translate(0, 0); } 100% { opacity: 1; transform: translate(0, 0); } }
.vi-face { fill: var(--light-blue-soft); }
.vi-eye { fill: var(--blue); stroke: none; }
.vi-wink { transform-origin: 60px 40px; animation: vi-wink 3.2s ease-in-out infinite; }
@keyframes vi-wink { 0%, 58%, 72%, 100% { transform: scaleY(1); } 64%, 66% { transform: scaleY(.15); } }
.vi-smile { stroke-dasharray: 40; stroke-dashoffset: 40; animation: vi-smile 1s var(--ease) .4s forwards; }
@keyframes vi-smile { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .value__icon * { animation: none !important; }
  .vi-heart, .vi-smile { stroke-dashoffset: 0; } .vi-heart { fill-opacity: 1; } .vi-links path { opacity: 1; }
}

/* Cose che amo: elenco numerato su due colonne */
.loves { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; border-top: 1px solid var(--line); }
.loves li { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); font-size: clamp(18px, 1.6vw, 21px); line-height: 1.4; letter-spacing: -.01em; color: var(--blue);
  opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease) calc(.15s + var(--i) * .07s), transform .7s var(--ease) calc(.15s + var(--i) * .07s); }
.reveal.is-visible .loves li { opacity: 1; transform: none; }
.loves__n { font: 500 13px var(--mono); }
@media (max-width: 760px) { .loves { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .loves li { opacity: 1; transform: none; transition: none; } }
.cv-link { margin-top: 32px !important; }

/* CV in sintesi: righe con una barra sulla linea del tempo */
.cv__chart { --text: 340px; --when: 130px; position: relative; margin: 40px 0 36px !important; }
.cv__axis { padding-left: calc(var(--text) + var(--when)); height: 26px; }
.cv__axis > div { position: relative; }
.cv__axis span { position: absolute; transform: translateX(-50%); font: 12px var(--mono); color: var(--blue); }
.cv__axis span:first-child { transform: none; }
.cv__axis span:last-child { display: none; }
.cv__group { border-top: 1px solid var(--line); padding: 18px 0 10px; }
.cv__group h3 { margin: 0 0 6px; font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--blue); }
.cv__group ul { list-style: none; margin: 0; padding: 0; }
.cv__row { display: grid; grid-template-columns: var(--text) var(--when) 1fr; align-items: center; min-height: 58px; }
.cv__text { padding-right: 20px; }
.cv__text strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--blue); }
.cv__text span, .cv__when { font-size: 14px; line-height: 1.4; color: var(--text); }
.cv__text span, .cv__when { color: var(--blue); }
.cv__when { font-family: var(--mono); font-size: 13px; }
.cv__track { position: relative; height: 22px; border-radius: 11px; background: var(--grey); }
.cv__bar, .cv__dot { position: absolute; top: 0; height: 22px; border-radius: 11px; background: var(--blue); }
.cv__bar { min-width: 22px; transform-origin: left; transform: scaleX(0); transition: transform .9s var(--ease) calc(.25s + var(--i) * .1s); }
.cv__bar--now { border-radius: 11px 0 0 11px; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
.cv__dot { width: 22px; margin-left: -11px; transform: scale(0); transition: transform .6s var(--ease) calc(.25s + var(--i) * .1s); }
.cv.is-visible .cv__bar, .cv.is-visible .cv__dot { transform: none; }
.cv__row--study .cv__bar { background: var(--light-blue); }
.cv__row--event .cv__dot { background: var(--dark-grey); }
.cv__row--more .cv__bar { background: var(--grey-mid); }
.button { display: inline-block; padding: 14px 26px; border-radius: 99px; background: var(--blue); color: var(--white); font-size: 17px; font-weight: 500; transition: background .2s, color .2s, box-shadow .2s; box-shadow: inset 0 0 0 1.5px var(--blue); }
.button:hover { background: var(--white); color: var(--blue); }
.button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 900px) {
  .cv__axis { display: none; }
  .cv__row { grid-template-columns: 1fr auto; row-gap: 8px; padding: 10px 0; }
  .cv__track { grid-column: 1 / -1; height: 10px; }
  .cv__bar, .cv__dot { height: 10px; min-width: 10px; }
  .cv__dot { width: 10px; margin-left: -5px; }
}
@media (prefers-reduced-motion: reduce) { .cv__bar, .cv__dot { transform: none; transition: none; } }

/* ---------- Footer ---------- */
.footer {
  position: sticky; bottom: 0; z-index: 1;
  background: var(--dark); color: #fff;
  padding: 120px 28px 120px; overflow: hidden;
  text-align: center;
}
.footer__label { margin: 0 0 16px; font: 12px var(--mono); color: var(--light-blue); text-transform: uppercase; letter-spacing: .06em; }
.footer__mail { font-size: clamp(26px, 4.5vw, 56px); font-weight: 600; letter-spacing: -.03em; border-bottom: 2px solid var(--grey-mid); transition: border-color .2s; overflow-wrap: anywhere; }
.footer__mail:hover { border-color: var(--light-blue); }
.footer__legal { margin: 40px 0 0; font: 12px var(--mono); }
.footer__legal a { color: var(--light-blue); border-bottom: 1px solid transparent; transition: border-color .2s; }
.footer__legal a:hover { border-color: var(--light-blue); }
.footer__legal button { margin-left: 24px; padding: 0; border: 0; background: none; font: inherit; color: var(--light-blue); cursor: pointer; border-bottom: 1px solid transparent; }
.footer__legal button:hover { border-color: var(--light-blue); }

/* ---- Banner consenso cookie ---- */
.consent { position: fixed; left: 24px; bottom: 24px; z-index: 90; width: min(420px, calc(100% - 32px)); padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--white); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(28, 37, 120, .18); color: var(--blue);
  opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.consent.is-open { opacity: 1; transform: none; }
.consent__title { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.consent__text { margin: 0; font-size: 14px; line-height: 1.5; }
.consent__text a { text-decoration: underline; text-underline-offset: 3px; }
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.consent__btn { padding: 11px 16px; border-radius: 99px; border: 1.5px solid var(--blue); background: var(--white); color: var(--blue); font: 500 15px var(--font); cursor: pointer; transition: background .2s, color .2s; }
.consent__btn:hover { background: var(--light-blue-soft); }
.consent__btn--yes { background: var(--blue); color: var(--white); }
.consent__btn--yes:hover { background: var(--white); color: var(--blue); }
.consent__btn:focus-visible, .footer__legal button:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
@media (max-width: 640px) { .consent { left: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .consent { transition: none; } }

/* ---- Pagina privacy ---- */
.legal { max-width: 760px; margin-inline: auto; padding-bottom: 80px; }
.legal__item { margin-bottom: 36px; }
.legal__item h2 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; letter-spacing: -.02em; margin: 0 0 10px; }
.legal__item p { margin: 0; line-height: 1.65; }
.legal__item a { border-bottom: 1px solid var(--grey-mid); }
.legal__date { font: 12px var(--mono); color: var(--grey-mid); margin: 48px 0 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) { .toc { display: none; } }
@media (max-width: 860px) {
  .meta { grid-template-columns: 1fr; gap: 16px; }
  .nutshell { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .values { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav { padding: 14px 16px; flex-wrap: wrap; font-size: 15px; }
  .nav__right { gap: 6px 14px; margin-left: auto; }
  .lang__link { min-width: 30px; padding: 4px 6px; font-size: 13px; }
  .grid-2, .works, .insights { grid-template-columns: 1fr; }
  .defs > div { grid-template-columns: 1fr; gap: 4px; }
  .section__title { font-size: 24px; }
  .project-head.section { padding-top: 128px; }
  .page { border-radius: 0 0 24px 24px; }
  .about-teaser { padding: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
