/* ============================================================
   Gianluca Giannetto — Private Insurance Advisory
   Palette: inchiostro caldo + rosso Generali. Caslon + Hanken.
   ============================================================ */

:root {
  --ink: oklch(22% 0.012 25);
  --ink-2: oklch(26% 0.014 25);
  --ink-3: oklch(31% 0.015 25);
  --bg: oklch(98.4% 0.003 25);
  --surface: oklch(95.6% 0.005 25);
  --line: oklch(88% 0.008 25);
  --line-dark: oklch(36% 0.012 25);
  --body-ink: oklch(30% 0.012 25);
  --muted: oklch(43% 0.014 25);
  --red: oklch(52% 0.2 27);
  --red-deep: oklch(45% 0.175 27);
  --red-bright: oklch(58% 0.21 30);
  --on-dark: oklch(95% 0.005 25);
  --on-dark-muted: oklch(76% 0.01 25);
  --serif: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif-text: "Libre Caslon Text", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.19, 1, .22, 1);
  --z-header: 50;
  --z-menu: 60;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body-ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3 { text-wrap: balance; }

p { text-wrap: pretty; }

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---------- Typography ---------- */

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5.6vw, 4.35rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2.title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.9rem);
  line-height: 1.14;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.dark h2.title, .dark .display { color: var(--on-dark); }

.lead {
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  max-width: 62ch;
}

.small { font-size: 0.9rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .01em;
  text-decoration: none;
  padding: .95rem 1.9rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); transform: translateY(-1px); }

.btn-ghost-light { border-color: oklch(70% 0.01 25 / .55); color: var(--on-dark); }
.btn-ghost-light:hover { border-color: var(--on-dark); background: oklch(100% 0 0 / .06); }

.btn-ghost-dark { border-color: oklch(60% 0.012 25 / .6); color: var(--ink); }
.btn-ghost-dark:hover { border-color: var(--ink); background: oklch(0% 0 0 / .04); }

.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--ink);
  border-bottom: 1px solid oklch(100% 0 0 / .08);
}

.nav {
  max-width: 1200px;
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  color: var(--on-dark);
}

.brand img { height: 40px; width: auto; }

.brand-name {
  font-family: var(--serif-text);
  font-size: 1.06rem;
  line-height: 1.25;
  letter-spacing: .01em;
}

.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--on-dark-muted);
  font-weight: 500;
  font-size: .98rem;
  transition: color .2s var(--ease);
}

.nav-links a:hover { color: var(--on-dark); }

.nav-links a.active { color: var(--on-dark); }

.nav-links a.nav-cta {
  color: #fff;
  background: var(--red);
  padding: .62rem 1.25rem;
  border-radius: 2px;
  font-weight: 600;
}

.nav-links a.nav-cta:hover { background: var(--red-deep); }

.burger {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--on-dark);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  padding-top: clamp(4rem, 8vw, 6.5rem);
}

.hero-copy { padding-bottom: clamp(4rem, 8vw, 6.5rem); }

.hero-eyebrow {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--on-dark-muted);
  margin-bottom: 1.6rem;
}

.hero-eyebrow strong { color: var(--on-dark); font-weight: 600; }

.hero .display em {
  font-style: italic;
  font-family: var(--serif-text);
  color: var(--red-bright);
}

.hero-sub {
  margin-top: 1.8rem;
  font-size: clamp(1.08rem, 1.4vw, 1.2rem);
  color: var(--on-dark-muted);
  line-height: 1.75;
  max-width: 56ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.4rem;
}

.hero-cred {
  margin-top: 3.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 2.2rem;
  font-size: .88rem;
  color: var(--on-dark-muted);
  letter-spacing: .01em;
}

.hero-portrait {
  align-self: end;
  position: relative;
}

.hero-portrait img {
  width: 100%;
  max-width: 430px;
  margin-inline: auto;
  filter: drop-shadow(0 30px 60px oklch(0% 0 0 / .45));
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }

.section-soft { background: var(--surface); }

.dark {
  background: var(--ink);
  color: var(--on-dark);
}

.dark p { color: var(--on-dark-muted); }

.section-head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.section-head .lead { margin-top: 1.2rem; color: var(--muted); }

.dark .section-head .lead { color: var(--on-dark-muted); }

.rule-red {
  width: 56px;
  height: 2px;
  background: var(--red);
  border: 0;
  margin-bottom: 1.6rem;
}

/* ---------- Clientela (ruled list) ---------- */

.client-list { border-top: 1px solid var(--line); }

.client-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1rem 3rem;
  padding-block: 2.2rem;
  border-bottom: 1px solid var(--line);
}

.client-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
  color: var(--ink);
  line-height: 1.2;
}

.client-row p { color: var(--muted); max-width: 58ch; }

.client-note {
  margin-top: 2.6rem;
  font-family: var(--serif-text);
  font-style: italic;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  color: var(--ink);
  max-width: 46ch;
  line-height: 1.5;
}

/* ---------- Metodo (sequenza numerata reale) ---------- */

.method-list {
  counter-reset: step;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-dark);
}

.method-step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 90px minmax(0, 4fr) minmax(0, 7fr);
  gap: 1rem 2.5rem;
  align-items: baseline;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line-dark);
}

.method-step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--red-bright);
  line-height: 1;
}

.method-step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--on-dark);
  line-height: 1.25;
}

.method-step p { font-size: 1rem; max-width: 52ch; }

/* ---------- Aree di intervento ---------- */

.areas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2.5rem, 5vw, 4.5rem);
}

.areas-2x2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }

.area { border-top: 2px solid var(--ink); padding-top: 1.4rem; }

.area h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.55rem;
  color: var(--ink);
  margin-bottom: .8rem;
  line-height: 1.22;
}

.area .for-whom {
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--red-deep);
  margin-bottom: .9rem;
}

.area p { color: var(--muted); font-size: 1rem; }

.area ul {
  list-style: none;
  margin-top: 1rem;
}

.area li {
  padding: .45rem 0 .45rem 1.35rem;
  position: relative;
  font-size: .98rem;
  color: var(--body-ink);
  border-bottom: 1px solid var(--line);
}

.area li:last-child { border-bottom: 0; }

.area li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 14px;
  height: 1px;
  background: var(--red);
}

/* ---------- Contesto / numeri ---------- */

.context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: 1rem;
}

.context-item { border-left: 0; }

.context-item .figure {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  line-height: 1.05;
  color: var(--ink);
}

.dark .context-item .figure { color: var(--on-dark); }

.context-item .figure em { color: var(--red-bright); font-style: normal; }

.context-item h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: .9rem;
  color: var(--ink);
}

.dark .context-item h3 { color: var(--on-dark); }

.context-item p { font-size: .95rem; margin-top: .5rem; color: var(--muted); max-width: 40ch; }

.dark .context-item p { color: var(--on-dark-muted); }

.context-source {
  margin-top: 2.6rem;
  font-size: .82rem;
  color: var(--muted);
  max-width: 70ch;
}

.dark .context-source { color: oklch(62% 0.01 25); }

/* ---------- Testimonianze ---------- */

.quote-featured {
  font-family: var(--serif-text);
  font-style: italic;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.5;
  color: var(--ink);
  max-width: 30ch;
  text-wrap: pretty;
}

.quote-featured + figcaption { margin-top: 1.6rem; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
}

.quote-grid blockquote {
  font-size: .99rem;
  line-height: 1.7;
  color: var(--body-ink);
}

.quote-grid figcaption, .quote-featured-wrap figcaption {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: .01em;
}

.quote-grid figcaption { margin-top: 1.1rem; }

figcaption .role { display: block; font-weight: 400; color: var(--muted); }

/* ---------- Credenziali strip ---------- */

.cred-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem 3rem;
  padding-block: 2.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cred-strip .item { max-width: 240px; }

.cred-strip .item strong {
  display: block;
  font-family: var(--serif-text);
  font-weight: 400;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: .2rem;
}

.cred-strip .item span { font-size: .86rem; color: var(--muted); line-height: 1.5; display: block; }

/* ---------- CTA finale ---------- */

.cta-final { text-align: left; }

.cta-final .display { font-size: clamp(2.2rem, 4.5vw, 3.6rem); max-width: 18ch; }

.cta-final .lead { color: var(--on-dark-muted); margin-top: 1.4rem; }

.cta-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  margin-top: 3rem;
}

.cta-channel {
  background: var(--ink);
  padding: 1.6rem 1.5rem;
  text-decoration: none;
  color: var(--on-dark);
  transition: background-color .25s var(--ease);
}

.cta-channel:hover { background: var(--ink-2); }

.cta-channel strong { display: block; font-weight: 600; margin-bottom: .25rem; }

.cta-channel span { font-size: .9rem; color: var(--on-dark-muted); }

/* ---------- Pagina: intestazione interna ---------- */

.page-head {
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.page-head .display { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }

.page-head .lead { color: var(--on-dark-muted); margin-top: 1.3rem; }

/* ---------- Chi sono ---------- */

.bio-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.bio-portrait {
  background: var(--ink);
  padding: 0;
  overflow: hidden;
}

.bio-portrait img { width: 100%; }

.bio-copy h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  color: var(--ink);
  margin-bottom: 1.4rem;
  line-height: 1.18;
}

.bio-copy p + p { margin-top: 1.1rem; }

.bio-facts {
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
}

.bio-facts div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 1.5rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .97rem;
}

.bio-facts dt { font-weight: 600; color: var(--ink); }

.bio-facts dd { color: var(--muted); }

/* ---------- Contatti ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact-info h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.7rem;
  color: var(--ink);
  margin-bottom: 1.6rem;
}

.contact-lines { list-style: none; border-top: 1px solid var(--line); }

.contact-lines li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.2rem;
  padding-block: 1.05rem;
  border-bottom: 1px solid var(--line);
  font-size: .98rem;
}

.contact-lines .label { font-weight: 600; color: var(--ink); }

.contact-lines a { color: var(--body-ink); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .2s, color .2s; overflow-wrap: anywhere; }

.contact-lines a:hover { color: var(--red-deep); border-color: var(--red-deep); }

.contact-form-wrap {
  background: var(--surface);
  padding: clamp(1.8rem, 4vw, 3rem);
  border: 1px solid var(--line);
}

.contact-form-wrap h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--ink);
  margin-bottom: .6rem;
}

.contact-form-wrap > p { font-size: .95rem; color: var(--muted); margin-bottom: 1.8rem; }

.field { margin-bottom: 1.2rem; }

.field label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: .45rem;
}

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: .8rem .95rem;
  transition: border-color .2s var(--ease);
}

.field input::placeholder, .field textarea::placeholder { color: oklch(52% 0.01 25); }

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
}

.field textarea { min-height: 110px; resize: vertical; }

.consent {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.consent input { margin-top: .3rem; accent-color: var(--red); width: 16px; height: 16px; flex-shrink: 0; }

.form-note { font-size: .84rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: oklch(17% 0.01 25);
  color: var(--on-dark-muted);
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  font-size: .95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr 1.4fr;
  gap: clamp(2rem, 5vw, 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid oklch(30% 0.01 25);
}

.footer-brand { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; }

.footer-brand img { height: 46px; }

.footer-brand-name {
  font-family: var(--serif-text);
  color: var(--on-dark);
  font-size: 1.05rem;
  line-height: 1.3;
}

.footer-brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.site-footer h4 {
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 1.1rem;
}

.site-footer ul { list-style: none; }

.site-footer li { margin-bottom: .55rem; }

.site-footer a { color: var(--on-dark-muted); text-decoration: none; transition: color .2s; overflow-wrap: anywhere; }

.site-footer a:hover { color: #fff; }

.footer-bottom {
  padding-top: 1.8rem;
  font-size: .82rem;
  color: oklch(60% 0.008 25);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 2rem;
  justify-content: space-between;
}

/* ---------- Grafici ---------- */

.chart-block {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  padding-top: 2.2rem;
}

.chart-block > h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--ink);
  margin-bottom: .4rem;
  line-height: 1.2;
}

.chart-sub { font-size: .95rem; color: var(--muted); margin-bottom: 1.8rem; max-width: 62ch; }

.chart-figure { margin: 0; }

.chart-svg { width: 100%; height: auto; display: block; }

.chart-svg .axis-label { font-family: var(--sans); font-size: 13px; fill: var(--muted); }
.chart-svg .val-label { font-family: var(--sans); font-size: 14px; font-weight: 600; fill: var(--ink); }
.chart-svg .end-label { font-family: var(--sans); font-size: 13px; font-weight: 600; fill: var(--ink); }
.chart-svg .grid { stroke: var(--line); stroke-width: 1; }
.chart-svg .baseline { stroke: oklch(70% 0.01 25); stroke-width: 1; }

.chart-note { font-size: .78rem; color: var(--muted); margin-top: 1.3rem; max-width: 78ch; }

.chart-take {
  font-family: var(--serif-text);
  font-style: italic;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--ink);
  margin-top: 1.5rem;
  max-width: 54ch;
}

.legend-row { display: flex; gap: 1.8rem; flex-wrap: wrap; font-size: .85rem; color: var(--body-ink); margin-bottom: 1.1rem; }
.legend-row .key { display: inline-block; width: 20px; height: 0; border-top: 3px solid; margin-right: .5rem; vertical-align: middle; }
.legend-row .key.dashed { border-top-style: dashed; }

/* ---------- Guide ---------- */

.guide-list { border-top: 1px solid var(--line-dark); }

.guide-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto;
  gap: 1rem 3rem;
  align-items: center;
  padding-block: 2.1rem;
  border-bottom: 1px solid var(--line-dark);
}

.guide-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  color: var(--on-dark);
  line-height: 1.25;
}

.guide-row p { font-size: .98rem; max-width: 54ch; }

.guide-note { margin-top: 1.6rem; font-size: .78rem; color: oklch(62% 0.01 25); max-width: 78ch; }

/* ---------- Reveal (progressive enhancement) ---------- */

html.jsr .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}

html.jsr .reveal.in { opacity: 1; transform: none; }

/* stagger: gli elementi della stessa griglia entrano in sequenza */
html.jsr .areas .reveal:nth-child(2), html.jsr .quote-grid .reveal:nth-child(2),
html.jsr .context-grid .reveal:nth-child(2), html.jsr .method-list .reveal:nth-child(2),
html.jsr .client-list .reveal:nth-child(2), html.jsr .guide-list .reveal:nth-child(2) { transition-delay: .1s; }
html.jsr .areas .reveal:nth-child(3), html.jsr .quote-grid .reveal:nth-child(3),
html.jsr .context-grid .reveal:nth-child(3), html.jsr .method-list .reveal:nth-child(3),
html.jsr .client-list .reveal:nth-child(3), html.jsr .guide-list .reveal:nth-child(3) { transition-delay: .2s; }
html.jsr .areas .reveal:nth-child(4), html.jsr .method-list .reveal:nth-child(4) { transition-delay: .3s; }

/* la riga rossa si disegna da sinistra */
html.jsr .reveal .rule-red {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .9s var(--ease) .2s;
}

html.jsr .reveal.in .rule-red { transform: scaleX(1); }

html.js .page-head .rule-red {
  transform-origin: left center;
  animation: rule-in .9s var(--ease) .15s both;
}

@keyframes rule-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* barre dei grafici: crescono dalla base al reveal */
html.jsr .chart-svg .bar {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 1s var(--ease);
}

html.jsr .chart-svg .bar:nth-of-type(2) { transition-delay: .08s; }
html.jsr .chart-svg .bar:nth-of-type(3) { transition-delay: .16s; }
html.jsr .chart-svg .bar:nth-of-type(4) { transition-delay: .24s; }
html.jsr .chart-svg .bar:nth-of-type(5) { transition-delay: .32s; }
html.jsr .chart-svg .bar:nth-of-type(6) { transition-delay: .4s; }

html.jsr .reveal.in .chart-svg .bar { transform: none; }

/* linee dei grafici: si tracciano da sinistra */
html.jsr .chart-svg .line-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.5s var(--ease) .2s;
}

html.jsr .reveal.in .chart-svg .line-path { stroke-dashoffset: 0; }

html.jsr .chart-svg .pt, html.jsr .chart-svg .end-label {
  opacity: 0;
  transition: opacity .5s var(--ease) 1.3s;
}

html.jsr .reveal.in .chart-svg .pt, html.jsr .reveal.in .chart-svg .end-label { opacity: 1; }

/* header: ombra discreta allo scroll */
.site-header { transition: box-shadow .35s var(--ease); }
.site-header.scrolled { box-shadow: 0 10px 34px oklch(0% 0 0 / .35); }

html.js .hero-copy > * {
  opacity: 0;
  transform: translateY(26px);
  animation: rise .95s var(--ease) forwards;
}

html.js .hero-copy > *:nth-child(1) { animation-delay: .05s; }
html.js .hero-copy > *:nth-child(2) { animation-delay: .16s; }
html.js .hero-copy > *:nth-child(3) { animation-delay: .28s; }
html.js .hero-copy > *:nth-child(4) { animation-delay: .4s; }
html.js .hero-copy > *:nth-child(5) { animation-delay: .52s; }

html.js .hero-portrait {
  opacity: 0;
  animation: fade 1.3s var(--ease) .45s forwards;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.jsr .reveal { opacity: 1; transform: none; transition: none; }
  html.js .hero-copy > *, html.js .hero-portrait { opacity: 1; transform: none; animation: none; }
  html.jsr .reveal .rule-red, html.js .page-head .rule-red { transform: none; transition: none; animation: none; }
  html.jsr .chart-svg .bar { transform: none; transition: none; }
  html.jsr .chart-svg .line-path { stroke-dasharray: none; stroke-dashoffset: 0; transition: none; }
  html.jsr .chart-svg .pt, html.jsr .chart-svg .end-label { opacity: 1; transition: none; }
  .btn, .cta-channel, .site-header { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-portrait { display: none; }
  .hero-copy { padding-bottom: clamp(3.5rem, 7vw, 5rem); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 76px 0 auto 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border-bottom: 1px solid oklch(100% 0 0 / .1);
    padding: .5rem 1.4rem 1.4rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid oklch(100% 0 0 / .07); }
  .nav-links li:last-child { border-bottom: 0; padding-top: 1rem; }
  .nav-links a { display: block; padding: .95rem 0; font-size: 1.05rem; }
  .nav-links a.nav-cta { text-align: center; }
  .burger { display: flex; }
  .burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .client-row, .bio-grid, .contact-grid { grid-template-columns: 1fr; }
  .guide-row { grid-template-columns: 1fr; gap: .8rem; align-items: start; }
  .guide-row .btn { justify-self: start; }
  .method-step { grid-template-columns: 56px 1fr; }
  .method-step p { grid-column: 2; }
  .bio-facts div, .contact-lines li { grid-template-columns: 1fr; gap: .2rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cred-strip { flex-direction: column; align-items: flex-start; }
}
