/* =========================================================
   Davide Coccia, consulente finanziario
   Design tokens · layout · componenti · motion
   Le animazioni allo scroll leggono --p (0 → 1), scritta da main.js.
   Senza JS o con "riduci movimento" --p vale 1: tutto è visibile.
   ========================================================= */

:root {
  --navy: #0E1F3D;
  --navy-2: #16294D;
  --navy-deep: #0A1830;
  --line-dark: #22385F;
  --line-dark-2: #2A4677;
  --line-dark-3: #34507F;
  --accent: #1F4FD1;
  --accent-soft: #9DB8FF;
  --accent-tint: #E3EBFB;
  --ink: #0E1F3D;
  --muted: #4A5A75;
  --bg: #F5F7FA;
  --white: #FFFFFF;
  --line: #E3E8F0;
  --on-dark: #D3DDEE;
  --on-dark-2: #B7C6E0;
  --green: #128C4A;
  --sun: #F2B640;
  --paper: #FBF8F2;
  --paper-line: #E9E1D2;

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Print', cursive;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 24px);
  --section-y: clamp(84px, 11vw, 136px);
  --radius-lg: 28px;
  --radius: 20px;
  --header-h: 72px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { overflow-x: clip; }
@supports not (overflow: clip) { main { overflow-x: hidden; } }

img, svg { display: block; }
[hidden] { display: none !important; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--white); color: var(--ink);
  padding: 12px 18px; border-radius: 10px; font-weight: 700;
  transition: top .2s var(--ease);
}
.skip:focus { top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--white { background: var(--white); }
.section--soft { background: var(--bg); }
.section--dark { background: var(--navy); color: var(--white); }

.stack { display: flex; flex-direction: column; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-48 { gap: clamp(36px, 5vw, 56px); } .gap-64 { gap: clamp(44px, 6vw, 72px); }

.split-row { display: flex; flex-wrap: wrap; gap: clamp(36px, 5vw, 64px); }
.split-row > .col-a { flex: 1 1 340px; min-width: 0; }
.split-row > .col-b { flex: 999 1 540px; min-width: 0; }

@media (min-width: 960px) {
  .is-sticky { position: sticky; top: calc(var(--header-h) + 40px); align-self: flex-start; }
}

/* ---------- Tipografia ---------- */

.eyebrow {
  font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.section--dark .eyebrow { color: var(--accent-soft); }

.h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px, 4.6vw, 62px); line-height: 1.05; letter-spacing: -.03em;
  text-wrap: balance;
}
.h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.2; }
.lead { font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.muted { color: var(--muted); }
.section--dark .lead { color: var(--on-dark); }

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 15px 26px; border-radius: 12px;
  font-family: var(--font-body); font-weight: 700; font-size: 17px; line-height: 1.2;
  text-decoration: none; color: var(--white); border: 1.5px solid transparent;
  transition: translate .25s var(--ease), box-shadow .25s ease, background-color .2s ease;
}
.btn:hover { color: var(--white); translate: 0 -3px; box-shadow: 0 14px 30px rgba(14, 31, 61, .28); }
.btn:active { translate: 0 0; }
.btn--primary { background: var(--accent); }
.btn--primary:hover { background: #1A45BB; }
.btn--ghost { border-color: #5D77A3; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.btn--wa { background: var(--green); }
.btn--lg { min-height: 60px; padding: 19px 30px; font-size: 18px; border-radius: 14px; }
.btn svg { flex: none; }

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

.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60;
  background: var(--accent-soft); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 31, 61, .9);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line-dark); background: rgba(14, 31, 61, .96); }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: var(--header-h); padding-top: 12px; padding-bottom: 12px;
  transition: min-height .3s var(--ease), padding .3s var(--ease);
}
.site-header.scrolled .nav { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.01em; white-space: nowrap; }
.brand-role { font-size: 12px; font-weight: 600; color: var(--on-dark-2); }

.menu { display: flex; align-items: center; gap: 26px; }
.menu a:not(.btn) {
  position: relative; color: #DCE5F3; text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 0;
}
.menu > a, .dd-btn { white-space: nowrap; }
.menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--accent-soft); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .35s var(--ease);
}
.menu a:not(.btn):hover { color: var(--white); }
.menu a:not(.btn):hover::after, .menu a.active::after { transform: scaleX(1); }
.menu a.active { color: var(--white); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-cta { min-height: 44px; padding: 10px 18px; font-size: 15px; border-radius: 10px; white-space: nowrap; }

.menu-btn {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-dark-3);
  background: transparent; color: var(--white); cursor: pointer; place-items: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .3s var(--ease), opacity .2s ease;
}
.menu-btn span { position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.site-header.open .menu-btn span { background: transparent; }
.site-header.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.site-header.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 959px) {
  .menu-btn { display: grid; }
  .js .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 22px; background: var(--navy);
    border-bottom: 1px solid var(--line-dark);
    max-height: calc(100svh - 64px); overflow-y: auto; overscroll-behavior: contain;
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .45s var(--ease), visibility 0s linear .45s;
  }
  .js .site-header.open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .45s var(--ease); }
  .menu a:not(.btn) { font-size: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-dark); }
  .menu a:not(.btn)::after { display: none; }
  .no-js .menu { flex-wrap: wrap; }
}
@media (max-width: 420px) {
  .brand-role { display: none; }
  .brand-name { font-size: 16px; }
  .brand { gap: 10px; }
  .nav { gap: 10px; }
  .nav-cta { padding: 10px 14px; }
  .hide-xs { display: none; }
}

/* ---------- Menu "Strumenti" ---------- */
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; background: none; border: 0; cursor: pointer;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; color: #DCE5F3; position: relative;
}
.dd-btn::after {
  content: ""; position: absolute; left: 0; right: 20px; bottom: 4px; height: 2px; border-radius: 2px;
  background: var(--accent-soft); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease);
}
.dd-btn:hover, .dd-btn.active { color: var(--white); }
.dd-btn.active::after, .dd-btn:hover::after { transform: scaleX(1); }
.dd-btn svg { transition: transform .3s var(--ease); }
.dd.open .dd-btn svg { transform: rotate(180deg); }

.dd-panel {
  position: absolute; left: 50%; top: calc(100% + 14px); width: 400px; z-index: 5;
  background: var(--white); color: var(--ink); border-radius: 20px; padding: 10px;
  box-shadow: 0 30px 60px rgba(10, 24, 48, .35), 0 0 0 1px rgba(14, 31, 61, .06);
  opacity: 0; visibility: hidden; transform: translate3d(-50%, 8px, 0) scale(.98); transform-origin: 50% 0;
  transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s;
}
.dd-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.dd.open .dd-panel {
  opacity: 1; visibility: visible; transform: translate3d(-50%, 0, 0);
  transition: opacity .25s ease, transform .3s var(--ease);
}
@media (hover: hover) and (min-width: 960px) {
  .dd:hover .dd-panel { opacity: 1; visibility: visible; transform: translate3d(-50%, 0, 0); transition: opacity .25s ease, transform .3s var(--ease); }
  .dd:hover .dd-btn svg { transform: rotate(180deg); }
}
.menu .dd-panel a.dd-item, .menu .dd-panel a.dd-all { border-bottom: 0; }
.menu .dd-panel a::after { display: none; }
.menu .dd-panel a.dd-item { color: var(--ink); padding: 10px 12px; font-size: inherit; }
.menu .dd-panel a.dd-all { color: var(--accent); }
.dd-item { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); }
.dd-item:hover { background: var(--bg); color: var(--ink); }
.dd-ico { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; transition: background-color .2s ease, color .2s ease; }
.dd-item:hover .dd-ico { background: var(--accent); color: var(--white); }
.dd-k { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dd-t { display: block; font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.3; }
.dd-all {
  display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 14px 14px 10px;
  border-top: 1px solid var(--line); font-weight: 700; font-size: 15px; color: var(--accent); text-decoration: none;
}
.dd-all:hover { color: var(--ink); }

@media (max-width: 959px) {
  .dd-btn { display: none; }
  .dd-panel, .dd.open .dd-panel {
    position: static; width: auto; transform: none; opacity: 1; visibility: inherit; transition: none;
    background: transparent; box-shadow: none; padding: 6px 0 10px; border-bottom: 1px solid var(--line-dark); border-radius: 0;
  }
  .dd-panel::before { display: none; }
  .menu .dd-panel a.dd-item { color: var(--white); padding: 8px 0; }
  .menu .dd-panel a.dd-all { color: var(--sun); }
  .dd-item:hover { background: transparent; color: var(--white); }
  .dd-ico { width: 38px; height: 38px; background: var(--line-dark); color: var(--accent-soft); }
  .dd-k { color: var(--on-dark-2); }
  .dd-t { font-size: 16px; }
  .dd-all { border-top: 0; color: var(--sun); padding: 8px 0; justify-content: flex-start; gap: 8px; }
}

/* ---------- Bottoni extra ---------- */
.btn--light { background: var(--white); color: var(--accent); }
.btn--light:hover { color: var(--accent); background: #EEF3FD; }
.btn--outline { color: var(--ink); border-color: #C9D3E3; background: var(--white); }
.btn--outline:hover { color: var(--ink); border-color: var(--accent); }
.btn--text { color: var(--muted); background: none; padding-left: 4px; padding-right: 4px; border: 0; cursor: pointer; }
.btn--text:hover { color: var(--accent); translate: 0; box-shadow: none; }

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

.hero { position: relative; background: var(--navy); color: var(--white); overflow: hidden; }
.hero-orbits {
  position: absolute; right: -180px; top: -120px; width: 760px; height: 760px; pointer-events: none;
  transform: translate3d(0, calc(var(--p) * 200px), 0) rotate(calc(var(--p) * 35deg)) scale(calc(1 + var(--p) * .2));
}
.hero-orbits svg { position: absolute; inset: 0; }
@media (max-width: 700px) { .hero-orbits { right: -420px; top: -260px; opacity: .7; } }

.hero-inner {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 3vw, 34px);
  min-height: min(calc(100svh - var(--header-h)), 860px);
  padding-top: clamp(72px, 9vw, 120px); padding-bottom: clamp(72px, 9vw, 110px);
  opacity: calc(1 - var(--p) * 1.3);
  transform: translate3d(0, calc(var(--p) * 140px), 0) scale(calc(1 - var(--p) * .06));
  transform-origin: 30% 0;
}
.hero-badge {
  align-self: flex-start; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-soft); border: 1px solid var(--line-dark-3); padding: 9px 16px; border-radius: 999px;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(44px, 7.4vw, 104px); line-height: 1; letter-spacing: -.035em; max-width: 1000px;
}
.hero h1 .hl { color: var(--accent-soft); }
.hero-lead { font-size: clamp(18px, 1.7vw, 23px); line-height: 1.6; color: var(--on-dark); max-width: 640px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.ticks { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 16px; font-weight: 600; color: #DCE5F3; list-style: none; margin: 0; padding: 0; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.scroll-hint { display: flex; align-items: center; gap: 10px; color: var(--accent-soft); font-size: 14px; font-weight: 600; margin-top: 12px; }

/* Ingresso al caricamento (titolo parola per parola) */
@keyframes up { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .5); } 80%, 100% { box-shadow: 0 0 0 26px rgba(255, 255, 255, 0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 140, 74, .55); } 70%, 100% { box-shadow: 0 0 0 18px rgba(18, 140, 74, 0); } }

.w { display: inline-block; opacity: 0; animation: up .9s var(--ease) forwards; }
.w1 { animation-delay: .05s; } .w2 { animation-delay: .15s; } .w3 { animation-delay: .25s; }
.w4 { animation-delay: .35s; } .w5 { animation-delay: .45s; } .w6 { animation-delay: .55s; }
.w7 { animation-delay: .75s; } .w8 { animation-delay: .9s; } .w9 { animation-delay: 1.05s; }
.fadein { opacity: 0; animation: fade 1.2s ease .3s forwards; }
.orbit { animation: spin 60s linear infinite; transform-origin: 50% 50%; }
.orbit2 { animation: spin 90s linear infinite reverse; transform-origin: 50% 50%; }
.bob { animation: bob 2s ease-in-out infinite; }

/* =========================================================
   MOTORE SCROLL — preset di composizione
   ========================================================= */

[data-sc] { --p: 1; }
.js [data-sc] { --p: 0; }

/* Sale, si mette a fuoco e si "posa" */
.rv {
  opacity: var(--p);
  transform: translate3d(0, calc((1 - var(--p)) * 70px), 0) scale(calc(.965 + var(--p) * .035));
}
/* Entra da sinistra / destra */
.from-left { opacity: var(--p); transform: translate3d(calc((1 - var(--p)) * -90px), 0, 0); }
.from-right {
  opacity: var(--p);
  transform: translate3d(calc((1 - var(--p)) * 90px), calc((1 - var(--p)) * 24px), 0) rotate(calc((1 - var(--p)) * 2deg));
}
/* Si alza ruotando in prospettiva */
.tilt {
  opacity: var(--p);
  transform: perspective(1200px) translate3d(0, calc((1 - var(--p)) * 90px), 0) rotateX(calc((1 - var(--p)) * 22deg));
  transform-origin: 50% 100%;
}
/* Si espande da piccolo */
.pop { opacity: var(--p); transform: scale(calc(.4 + var(--p) * .6)) rotate(calc((1 - var(--p)) * -60deg)); }

/* Titoli che si compongono parola per parola (scrub) */
.split .wd {
  --wp: clamp(0, calc((var(--p) * (var(--n) + 3) - var(--i)) / 3), 1);
  display: inline-block;
  opacity: calc(.12 + var(--wp) * .88);
  transform: translate3d(0, calc((1 - var(--wp)) * .42em), 0);
}

/* Icone che si disegnano */
[data-draw] :is(path, circle, rect, line, ellipse) {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p));
}

/* Linee che crescono */
.grow-x { transform: scaleX(var(--p)); transform-origin: 0 50%; }
.grow-y { transform: scaleY(var(--p)); transform-origin: 50% 0; }

/* ---------- Storia ---------- */

.video {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 640px; overflow: hidden;
  background: var(--navy); color: var(--white);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; text-align: center;
  border-radius: calc(var(--radius-lg) + (1 - var(--p)) * 60px);
  transform: scale(calc(.84 + var(--p) * .16));
  opacity: calc(.3 + var(--p) * .7);
}
.video-bg { position: absolute; inset: 0; width: 100%; height: 100%; transform: scale(calc(1.25 - var(--p) * .25)); }
.play {
  position: relative; width: clamp(76px, 8vw, 104px); height: clamp(76px, 8vw, 104px); border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  animation: ring 2s ease-out infinite;
}
.video-title { position: relative; font-family: var(--font-display); font-weight: 700; font-size: clamp(22px, 2.4vw, 32px); padding: 0 24px; }
.video-note { position: relative; font-size: 15px; font-weight: 700; letter-spacing: .08em; color: var(--accent-soft); }

.timeline { position: relative; }
.timeline-track { position: absolute; left: 0; right: 0; top: 30px; height: 3px; background: var(--line); border-radius: 3px; }
.timeline-track .grow-x { position: absolute; inset: 0; background: var(--accent); border-radius: 3px; }
.timeline-grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 36px; }
.step-icon {
  width: 60px; height: 60px; border-radius: 50%; background: var(--navy); color: var(--white);
  display: grid; place-items: center; box-shadow: 0 0 0 8px var(--white);
}
.step-icon--accent { background: var(--accent); }
.step-tag { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 580px) { .timeline-track { display: none; } }

.quote { margin: 0; max-width: 940px; display: flex; flex-direction: column; gap: 18px; }
.quote p { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 40px); line-height: 1.28; letter-spacing: -.015em; }
.quote cite { font-style: normal; font-size: 16px; font-weight: 700; color: var(--accent); }

/* ---------- Promesse ---------- */

.promises { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.promise {
  display: flex; gap: clamp(16px, 2vw, 22px); align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 26px) clamp(20px, 2.4vw, 28px);
}
.promise--dark { background: var(--navy); color: var(--white); border-color: var(--navy); }
.promise-num { flex: none; width: 60px; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3vw, 40px); color: var(--accent); }
.promise--dark .promise-num { color: var(--accent-soft); }
.promise-title { display: block; font-family: var(--font-display); font-weight: 700; font-size: clamp(18px, 1.8vw, 22px); line-height: 1.3; }
.promise-text { display: block; font-size: 16px; line-height: 1.55; color: var(--muted); margin-top: 4px; }
.promise--dark .promise-text { color: var(--on-dark); }

.card { transition: translate .4s var(--ease), box-shadow .4s ease; }
.card:hover { translate: 0 -8px; box-shadow: 0 24px 48px rgba(14, 31, 61, .14); }

/* ---------- Fascia cinetica ---------- */

.band { background: var(--navy); color: var(--white); overflow: hidden; padding: clamp(56px, 8vw, 96px) 0; }
.band-row {
  display: flex; gap: .5em; width: max-content; white-space: nowrap;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(52px, 9vw, 140px); line-height: 1.05; letter-spacing: -.035em;
}
.band-row--a { transform: translate3d(calc(var(--p) * -28%), 0, 0); }
.band-row--b { transform: translate3d(calc(-30% + var(--p) * 26%), 0, 0); }
.band-row .o { color: transparent; -webkit-text-stroke: 1.5px var(--line-dark-3); }
.band-row .dot { color: var(--accent); }

/* ---------- Servizi ---------- */

.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 22px; }
.service {
  background: var(--bg); border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 3vw, 36px);
  display: flex; flex-direction: column; gap: 18px; min-height: 320px;
}
.service--dark { background: var(--navy); color: var(--white); border-color: var(--navy); }
.service-icon { width: 64px; height: 64px; border-radius: 16px; background: var(--accent-tint); color: var(--accent); display: grid; place-items: center; }
.service--dark .service-icon { background: var(--accent); color: var(--white); }
.service-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pill { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); background: var(--accent-soft); padding: 6px 11px; border-radius: 999px; }
.service p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.service--dark p { color: var(--on-dark); }

/* ---------- Simulatore ---------- */

.sim-form {
  background: var(--bg); border-radius: var(--radius-lg); padding: clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; align-items: end;
}
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-weight: 700; font-size: 17px; }
.field-box {
  display: flex; align-items: center; background: var(--white); border: 2px solid #C9D3E3; border-radius: 14px; padding: 0 18px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 79, 209, .15); }
.field-box input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent; padding: 16px 0;
  font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--ink);
}
.field-box span { font-size: 16px; font-weight: 600; color: var(--muted); }
.field-info { display: flex; flex-direction: column; gap: 6px; background: var(--white); border-radius: 14px; padding: 16px 20px; border: 2px solid var(--line); }
.field-info .k { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.field-info .v { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.field-info .s { font-size: 14px; color: var(--muted); }

.note { display: flex; gap: 16px; align-items: flex-start; background: #EEF3FD; border-radius: var(--radius); padding: 22px 26px; }
.note-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--white); display: grid; place-items: center; }
.note h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.note p { font-size: 16px; line-height: 1.6; color: #2B3A55; margin-top: 6px; }

.result { background: var(--navy); color: var(--white); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 40px); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stat { background: var(--navy-2); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.stat--accent { background: var(--accent); }
.stat-k { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--on-dark); }
.stat--accent .stat-k { color: var(--white); }
.stat-v { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 2.8vw, 38px); font-variant-numeric: tabular-nums; }
.swatch { width: 14px; height: 4px; border-radius: 2px; }

.chart { --axis: 96px; display: flex; flex-direction: column; gap: 10px; margin-top: 32px; }
.chart-row { display: flex; gap: 12px; }
.y-axis { position: relative; width: var(--axis); height: 300px; flex: none; font-size: 13px; font-weight: 600; color: var(--on-dark-2); font-variant-numeric: tabular-nums; }
.y-axis span { position: absolute; right: 0; transform: translateY(-50%); white-space: nowrap; }
.plot { position: relative; flex: 1; min-width: 0; height: 300px; }
.gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--line-dark); }
.gridline--base { background: var(--line-dark-3); }
.plot svg { position: absolute; inset: 0; overflow: visible; clip-path: inset(-10px calc((1 - var(--p)) * 100%) -10px 0); }
.x-axis { margin-left: calc(var(--axis) + 12px); display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--on-dark-2); }
@media (max-width: 560px) {
  .chart { --axis: 62px; }
  .y-axis, .x-axis { font-size: 11px; }
  .y-axis, .plot { height: 240px; }
}
.result-foot { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; margin-top: 32px; }
.result-foot > span { font-size: 16px; line-height: 1.55; color: var(--on-dark); max-width: 560px; }
.result-foot strong { color: var(--white); }
.result-msg { display: flex; flex-direction: column; gap: 16px; padding: 20px 0; max-width: 720px; }
.result-msg h3 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; }
.result-msg p { font-size: 18px; line-height: 1.65; color: var(--on-dark); }
.result-msg .btn { align-self: flex-start; }
.disclaimer { font-size: 14px; line-height: 1.65; color: var(--muted); max-width: 1000px; }

/* ---------- Metodo ---------- */

.method { position: relative; display: flex; flex-direction: column; gap: 48px; padding-left: 48px; }
.method-track { position: absolute; left: 11px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: #D5DDEA; }
.method-track .grow-y { position: absolute; inset: 0; border-radius: 3px; background: var(--accent); }
.method-step { position: relative; display: flex; flex-direction: column; gap: 10px; }
.method-dot {
  position: absolute; left: -48px; top: 4px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--bg); border: 4px solid var(--accent);
  transform: scale(calc(.6 + var(--p) * .4));
  box-shadow: inset 0 0 0 calc(var(--p) * 13px) var(--accent);
}
.method-num { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--accent); }
.method-step p { font-size: 18px; line-height: 1.65; color: var(--muted); max-width: 560px; }

/* ---------- FAQ ---------- */

.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .3s ease, background-color .3s ease; }
.faq-item.open { background: var(--white); border-color: #C9D3E3; }
.faq-item h3 { margin: 0; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left; cursor: pointer;
  background: transparent; border: 0; padding: 22px 24px; min-height: 64px;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 1.8vw, 20px); color: var(--ink);
}
.faq-icon {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #E3E9F3; color: var(--ink);
  transition: transform .35s var(--ease), background-color .3s ease, color .3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--accent); color: var(--white); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 24px 24px; font-size: 17px; line-height: 1.65; color: var(--muted); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.no-js .faq-a { grid-template-rows: 1fr; }

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

.contact { position: relative; overflow: hidden; }
.contact-rings {
  position: absolute; left: -260px; bottom: -320px; width: 720px; height: 720px; pointer-events: none;
  transform: rotate(calc(var(--p) * 90deg)) scale(calc(.85 + var(--p) * .3));
}
.contact-inner { position: relative; display: flex; flex-wrap: wrap; gap: clamp(36px, 5vw, 56px); align-items: center; }
.contact h2 { font-size: clamp(40px, 5.6vw, 80px); line-height: 1; letter-spacing: -.035em; }
.contact-card {
  flex: 1 1 340px; min-width: 0; background: var(--navy-2); border: 1px solid var(--line-dark-2); border-radius: 24px;
  padding: clamp(24px, 3vw, 34px); display: flex; flex-direction: column; gap: 24px;
}
.contact-row { display: flex; gap: 16px; align-items: center; }
.contact-ico { flex: none; width: 48px; height: 48px; border-radius: 12px; background: var(--line-dark); color: var(--accent-soft); display: grid; place-items: center; }
.contact-row .k { display: block; font-size: 13px; color: var(--on-dark-2); font-weight: 600; }
.contact-row .v { display: block; font-size: 17px; font-weight: 600; color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.contact-row a.v:hover { color: var(--accent-soft); }

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

.footer { background: var(--navy-deep); color: var(--on-dark-2); font-size: 14px; line-height: 1.6; }
.footer .wrap { padding-top: 44px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 14px; }
.footer a { color: var(--on-dark-2); }
.footer a:hover { color: var(--white); }
.footer-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--white); }
.footer-legal { border-top: 1px solid var(--line-dark); padding-top: 16px; margin-top: 4px; display: flex; flex-direction: column; gap: 10px; }
.footer-legal h2 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--white); }

/* ---------- WhatsApp flottante ---------- */

.fab {
  position: fixed; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 45;
  display: flex; align-items: center; gap: 10px; min-height: 56px;
  padding: 14px 20px 14px 16px; border-radius: 999px; background: var(--green); color: var(--white);
  font-weight: 700; font-size: 16px; text-decoration: none;
  box-shadow: 0 10px 30px rgba(10, 24, 48, .3);
  transition: transform .45s var(--ease), opacity .3s ease;
}
.fab:hover { color: var(--white); }
.js .fab { transform: translate3d(0, 140%, 0); opacity: 0; pointer-events: none; }
.js .fab.show { transform: none; opacity: 1; pointer-events: auto; animation: pulse 2.4s ease-out 1s 3; }
@media (max-width: 600px) {
  .fab { padding: 15px; }
  .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* ---------- Riduci movimento ---------- */

/* =========================================================
   STRATO PERSONALE
   ========================================================= */

/* Parola in corsivo serif dentro i titoli */
.ser { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.h2 .ser, .hero h1 .ser { font-size: 1.12em; line-height: .9; }

/* Evidenziatore che si stende con lo scroll */
.mark {
  color: inherit; padding: 0 .08em; margin: 0 -.04em;
  background: linear-gradient(transparent 58%, var(--sun) 58%, var(--sun) 92%, transparent 92%) no-repeat 0 0;
  background-size: calc(var(--p) * 100%) 100%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.section--dark .mark, .hero .mark { background-image: linear-gradient(transparent 62%, rgba(242, 182, 64, .55) 62%, rgba(242, 182, 64, .55) 90%, transparent 90%); }

/* Note scritte a mano */
.hand {
  font-family: var(--font-hand); font-weight: 600; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.1;
  color: var(--accent); transform: rotate(-3deg);
}
.section--dark .hand, .hero .hand { color: var(--sun); }
.note-hand { display: flex; align-items: flex-end; gap: 8px; opacity: var(--p); }
.note-hand svg { flex: none; overflow: visible; }

/* Hero con ritratto */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: clamp(24px, 3vw, 34px); }
.squiggle { display: block; width: 100%; height: .22em; margin-top: -.06em; overflow: visible; }
.squiggle path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawIn 1s var(--ease) 1.1s forwards; }
@keyframes drawIn { to { stroke-dashoffset: 0; } }
.hl-word { display: inline-block; }

.portrait-wrap { position: relative; justify-self: end; width: 100%; max-width: 380px; }
.portrait {
  position: relative; aspect-ratio: 4 / 5; border-radius: 200px 200px 28px 28px; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #22427A 0%, var(--navy-2) 60%);
  border: 1px solid var(--line-dark-2);
  display: grid; place-items: center; text-align: center; color: var(--on-dark-2);
  font-size: 14px; font-weight: 700; letter-spacing: .08em;
  opacity: 0; animation: up 1.1s var(--ease) .5s forwards;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait-ph { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 24px; }
.portrait-note { position: absolute; left: -150px; top: 18%; width: 170px; opacity: 0; animation: fade .8s ease 1.4s forwards; }
.portrait-note .hand { display: block; }
.portrait-note svg path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: drawIn .8s var(--ease) 1.7s forwards; }

@media (max-width: 899px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait-wrap { justify-self: start; max-width: 260px; margin-left: 8px; }
  .portrait-note { left: auto; right: -170px; top: 30%; }
}
@media (max-width: 480px) {
  .portrait-wrap { max-width: 200px; }
  .portrait-note { right: -150px; width: 140px; }
}

/* Terminale: dal codice alla consulenza */
.code-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 899px) { .code-story { grid-template-columns: 1fr; } }
.terminal {
  background: #0B1729; color: #CFE0FF; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 60px rgba(14, 31, 61, .25); border: 1px solid #1C3157;
  transform: perspective(1400px) rotateY(calc((1 - var(--p)) * 14deg)) rotateX(calc((1 - var(--p)) * 6deg));
}
.terminal-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: #0F1F38; border-bottom: 1px solid #1C3157; font-family: var(--font-mono); font-size: 13px; color: #7F95BC; }
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2A4677; }
.terminal-bar i:nth-child(1) { background: #E36A5D; } .terminal-bar i:nth-child(2) { background: #E8B44B; } .terminal-bar i:nth-child(3) { background: #4FB477; }
.terminal-bar span { margin-left: 10px; }
.code { margin: 0; padding: 22px 24px 26px; font-family: var(--font-mono); font-size: clamp(13px, 1.25vw, 16px); line-height: 1.85; overflow-x: auto; }
.code .ln {
  --lp: clamp(0, calc(var(--p) * (var(--n) + 1) - var(--i)), 1);
  display: block; width: max-content; white-space: pre;
  clip-path: inset(0 calc((1 - var(--lp)) * 100%) 0 0);
}
.code .c { color: #6F86AE; font-style: italic; }
.code .k { color: #9DB8FF; }
.code .s { color: var(--sun); }
.code .f { color: #7FE0B0; }
.caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--sun); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.code-story .h3 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; letter-spacing: -.02em; }

/* L'accordo firmato */
.contract {
  position: relative; background: var(--paper); border: 1px solid var(--paper-line); border-radius: 22px;
  padding: clamp(24px, 4vw, 48px); box-shadow: 0 1px 0 var(--paper-line), 0 24px 60px rgba(14, 31, 61, .08);
  background-image: repeating-linear-gradient(transparent 0 39px, rgba(14, 31, 61, .045) 39px 40px);
}
.contract-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 14px; margin-bottom: 8px; }
.contract-head strong { font-family: var(--font-display); font-weight: 800; font-size: 14px; letter-spacing: .14em; text-transform: uppercase; }
.contract-head span { font-family: var(--font-serif); font-style: italic; font-size: 20px; color: var(--muted); }
.contract .promises { gap: 0; }
.contract .promise { background: transparent; border: 0; border-bottom: 1px dashed var(--paper-line); border-radius: 0; padding: 20px 0; align-items: flex-start; }
.contract .promise:last-child { border-bottom: 0; }
.contract .promise-num { width: 48px; font-size: 15px; padding-top: 4px; color: var(--muted); }
.check { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); display: grid; place-items: center; margin-left: auto; }
.signature { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 26px; }
.sign-line { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.sign-name {
  font-family: var(--font-hand); font-weight: 700; font-size: clamp(44px, 5vw, 60px); line-height: 1; color: var(--accent);
  clip-path: inset(-20% calc((1 - var(--p)) * 100%) -20% 0); transform: rotate(-4deg); transform-origin: 0 100%;
}
.sign-rule { height: 2px; background: var(--ink); }
.sign-cap { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.sign-seal { width: 92px; height: 92px; transform: rotate(calc((1 - var(--p)) * -120deg)) scale(calc(.5 + var(--p) * .5)); opacity: var(--p); }

/* Tivoli disegnata */
.tivoli { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.tivoli svg { width: 100%; max-width: 440px; height: auto; color: var(--accent-soft); }
.tivoli figcaption { padding-left: 12px; }

/* Grana leggera sulle sezioni chiare */
.section--soft { background-color: var(--bg); background-image: radial-gradient(rgba(14, 31, 61, .05) 1px, transparent 1px); background-size: 22px 22px; }

@media (prefers-reduced-motion: reduce) {
  .portrait, .portrait-note { opacity: 1 !important; }
  .squiggle path, .portrait-note svg path { stroke-dashoffset: 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-sc], .js [data-sc] { --p: 1 !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .w, .fadein { opacity: 1; }
  .hero-inner, .hero-orbits, .band-row, .contact-rings { transform: none !important; opacity: 1 !important; }
}

/* evidenziatore dentro i titoli spezzati: parte dopo le parole */
.split .mark { background-size: calc(clamp(0, calc((var(--p) - .55) / .45), 1) * 100%) 100%; }
.stack > .contact-card { flex: none; }
@media (max-width: 899px) {
  .portrait-note svg { transform: scaleX(-1); margin-left: 0 !important; }
}
@media (max-width: 480px) {
  .code { font-size: 12px; padding: 18px 16px 20px; }
}

/* ---------- Vengo io da te ---------- */
.section--accent {
  background: var(--accent); color: var(--white);
  background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px;
}
.section--accent .eyebrow { color: var(--sun); }
.section--accent .lead { color: #E3EBFF; }
.section--accent .h2 .ser { color: var(--sun); }

.route { position: relative; margin: 0 -8px; }
.route svg { width: 100%; height: auto; overflow: visible; }
.route-path { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); }
.route { --rs: 1; }
.rs { transform: scale(var(--rs)); }
.route-end { opacity: clamp(0, calc((var(--p) - .8) * 5), 1); transform: scale(calc(var(--rs) * (.6 + clamp(0, calc((var(--p) - .8) * 5), 1) * .4))); }
.route-label { position: absolute; color: var(--sun) !important; font-size: clamp(20px, 2.2vw, 28px); }
.route-label--a { left: 2%; top: 92%; opacity: clamp(0, calc(var(--p) * 4), 1); }
.route-label--b { right: 0; top: 74%; opacity: clamp(0, calc((var(--p) - .85) * 6.6), 1); }
@media (max-width: 640px) {
  .route { --rs: 2.4; margin: 12px 0; }
  .route-label { display: none; }
  .route-path { stroke-width: 9; }
  .route-shadow { stroke-width: 6; }
}

.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.place {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 24px;
  padding: clamp(24px, 3vw, 32px); display: flex; flex-direction: column; gap: 14px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.place-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--white); color: var(--accent); display: grid; place-items: center; }
.place p { color: #E3EBFF; font-size: 17px; line-height: 1.6; }

/* Schede servizi cliccabili */
a.service { text-decoration: none; color: var(--ink); cursor: pointer; }
a.service:hover { color: var(--ink); }
a.service.service--dark, a.service.service--dark:hover { color: var(--white); }
.service-tool {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: auto;
  font-size: 13px; font-weight: 700; padding: 7px 12px; border-radius: 999px;
  background: var(--white); color: var(--accent); border: 1px solid var(--line);
}
.service--dark .service-tool { background: rgba(255, 255, 255, .08); color: var(--sun); border-color: var(--line-dark-2); }
.service-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; color: var(--accent); }
.service--dark .service-go { color: var(--accent-soft); }
.service-go svg { transition: transform .3s var(--ease); }
a.service:hover .service-go svg { transform: translateX(6px); }
a.service:hover { box-shadow: 0 24px 48px rgba(14, 31, 61, .14); }
a.service:not(.service--dark):hover { border-color: var(--accent); }
.service-tool { border-radius: 12px; line-height: 1.35; align-items: flex-start; padding: 9px 12px; }
.service-tool svg { flex: none; margin-top: 1px; }

/* Schede servizi: situazione + due accessi rapidi */
.service-quote { font-family: var(--font-display); font-style: normal; font-weight: 700; font-size: 21px !important; line-height: 1.3 !important; color: var(--accent) !important; }
.service--dark .service-quote { color: var(--sun) !important; }
.service-links { display: flex; flex-direction: column; gap: 12px; margin-top: auto; padding-top: 6px; }
.service-links .service-tool { margin-top: 0; text-decoration: none; transition: border-color .2s ease, background-color .2s ease; }
.service-links .service-tool:hover { border-color: var(--accent); }
.service--dark .service-links .service-tool:hover { background: rgba(255, 255, 255, .14); }
.service-links .service-go { text-decoration: none; }
.service-links .service-go:hover svg { transform: translateX(6px); }

/* Il metodo, dentro "Il mio impegno con te" */
.method-inline { display: flex; flex-direction: column; gap: clamp(32px, 4vw, 48px); margin-top: clamp(72px, 9vw, 120px); padding-top: clamp(48px, 6vw, 72px); border-top: 1px solid var(--line); }
.method-title { font-size: clamp(30px, 3.6vw, 48px); }
.method-inline .step-icon { box-shadow: 0 0 0 8px var(--bg); }
.step-num { font-family: var(--font-display); font-weight: 800; font-size: 18px; }

/* Ritratto scontornato: la figura esce dall'arco */
.portrait.has-photo { overflow: visible; background: none; border: 0; display: block; }
.portrait.has-photo::before {
  content: ""; position: absolute; inset: 0; border-radius: 200px 200px 28px 28px;
  background: radial-gradient(120% 80% at 50% 0%, #2A4F92 0%, var(--navy-2) 62%);
  border: 1px solid var(--line-dark-2);
}
.portrait.has-photo::after {
  content: ""; position: absolute; left: 12%; right: 12%; top: 10%; height: 55%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 182, 64, .35), transparent); filter: blur(10px); pointer-events: none;
}
.portrait.has-photo img {
  position: absolute; left: 50%; bottom: 0; height: 116%; width: auto; max-width: none; inset: auto auto 0 50%;
  translate: -50% 0; object-fit: contain; z-index: 1;
  border-radius: 0 0 28px 28px;
  filter: drop-shadow(0 20px 30px rgba(5, 12, 26, .45));
}

/* Video di presentazione (verticale) */
.video-row { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 760px) { .video-row { grid-template-columns: 1fr; } .vframe { max-width: 340px; margin: 0 auto; width: 100%; } }
.vframe {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--navy);
  border-radius: calc(28px + (1 - var(--p)) * 40px);
  box-shadow: 0 40px 80px rgba(14, 31, 61, .28), 0 0 0 1px rgba(14, 31, 61, .08);
  transform: scale(calc(.86 + var(--p) * .14)) rotate(calc((1 - var(--p)) * -4deg));
  opacity: calc(.3 + var(--p) * .7);
}
.vplayer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--navy); }
.vplay {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 14px;
  padding: 0 0 36px; border: 0; cursor: pointer; color: var(--white);
  background: linear-gradient(180deg, rgba(14, 31, 61, 0) 45%, rgba(14, 31, 61, .75) 100%);
  transition: opacity .3s ease;
}
.vplay .play { width: 84px; height: 84px; }
.vplay-label { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .02em; }
.vplay:hover .play { transform: scale(1.06); }
.vplay .play { transition: transform .3s var(--ease); }
.vframe.playing .vplay { opacity: 0; pointer-events: none; }
.video-side-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
.video-side-title .ser { display: block; color: var(--accent); margin-top: 6px; }

/* Pagine legali */
.legal { max-width: 820px; display: flex; flex-direction: column; gap: 14px; }
.legal h2 { font-family: var(--font-display); font-weight: 800; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.01em; margin-top: 28px; }
.legal h3 { font-family: var(--font-display); font-weight: 700; font-size: 18px; margin-top: 10px; }
.legal p, .legal li { font-size: 17px; line-height: 1.7; color: #2B3A55; }
.legal ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.legal a { color: var(--accent); }
.legal code { font-family: var(--font-mono); font-size: 14px; background: var(--accent-tint); padding: 2px 6px; border-radius: 6px; }
.legal-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.legal-table table { width: 100%; border-collapse: collapse; min-width: 560px; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 14px 16px; font-size: 15px; line-height: 1.55; border-bottom: 1px solid var(--line); }
.legal-table th { background: var(--bg); font-weight: 700; }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-date { margin-top: 28px; font-size: 14px !important; color: var(--muted) !important; }
.legal-h1 { font-size: clamp(40px, 5.4vw, 72px); }
.nav-cta { gap: 0; }
@media (max-width: 480px) { .hero-badge { letter-spacing: .08em; font-size: 12px; } }

/* Netlify mostra un'etichetta in basso a destra: il pulsante WhatsApp sta sopra */
.fab { bottom: calc(max(20px, env(safe-area-inset-bottom)) + 52px); }

/* Telefoni e tablet: pulsante in alto accorciato a "Prenota" e niente sbordamenti laterali */
@media (max-width: 959px) {
  .hide-xs { display: none; }
  .hero-badge { max-width: 100%; border-radius: 14px; line-height: 1.5; }
}
body { overflow-x: clip; }
@supports not (overflow: clip) { body { overflow-x: hidden; } }

/* ===== Rifiniture per tutti i telefoni ===== */
@media (max-width: 600px) {
  /* animazioni laterali più contenute */
  .from-left { transform: translate3d(calc((1 - var(--p)) * -32px), 0, 0); }
  .from-right { transform: translate3d(calc((1 - var(--p)) * 32px), calc((1 - var(--p)) * 16px), 0); }
  /* codice: va a capo invece di uscire dallo schermo */
  .code { overflow-x: hidden; }
  .code .ln { width: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
}
@media (max-width: 420px) {
  /* la nota accanto alla foto va sotto la foto */
  .portrait-note { position: static; width: auto; margin: 14px 0 0 8px; }
  .portrait-note svg { display: none; }
  .portrait-wrap { max-width: 220px; }
}
@media (max-width: 899px) {
  /* sui telefoni la foto è in fondo all'apertura: niente dissolvenza in uscita */
  .hero-inner { opacity: 1; transform: none; }
}
.contact-row .v-sub { display: block; font-size: 15px; font-weight: 600; color: var(--accent-soft); margin-top: 2px; }

/* Contatti su computer: più spazio alla scheda, l'email resta su una riga */
@media (min-width: 960px) {
  .contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(460px, 500px); gap: clamp(40px, 5vw, 72px); }
  .contact-inner > .stack { flex: none !important; }
}
/* l'email non si spezza mai a metà parola: se serve va a capo solo prima della @ */
.contact-row a.v-mail { overflow-wrap: normal; word-break: normal; }
@media (max-width: 420px) { .contact-row a.v-mail { font-size: 16px; } }
@media (max-width: 600px) {
  .contact-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .contact-ico { width: 40px; height: 40px; border-radius: 10px; }
  .contact-row a.v-mail { font-size: clamp(14px, 4.15vw, 17px); white-space: nowrap; }
}

/* Home: strumenti in primo piano, schede compatte per tema */
.services--compact .service { min-height: 0; gap: 14px; padding: clamp(22px, 2.6vw, 30px); }
.services--compact .service-quote { font-size: 18px !important; }
.services--compact .service-links { flex-direction: column-reverse; gap: 10px; }
.services--compact .service-tool {
  font-size: 15px; padding: 12px 14px; border-radius: 12px; background: var(--accent); color: var(--white); border-color: var(--accent); width: 100%;
}
.services--compact .service-tool:hover { background: #1A45BB; border-color: #1A45BB; color: var(--white); }
.services--compact .service--dark .service-tool { background: var(--sun); color: var(--navy); border-color: var(--sun); }
.services--compact .service--dark .service-tool:hover { background: #F5C55F; color: var(--navy); }
.services--compact .service-go { font-size: 15px; }
.tools-sub { margin-top: clamp(8px, 2vw, 24px); }
.tools-sub .h3 { font-size: clamp(20px, 2vw, 26px); max-width: 720px; }
.services--compact { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 899px) {
  /* la testa esce dall'arco: spazio sopra la foto perché non copra le scritte */
  .portrait-wrap { margin-top: 56px; }
}

/* Telefono: movimenti d'ingresso più corti, così gli elementi arrivano prima */
@media (max-width: 899px) {
  .rv { transform: translate3d(0, calc((1 - var(--p)) * 26px), 0); }
  .tilt { transform: perspective(1200px) translate3d(0, calc((1 - var(--p)) * 32px), 0) rotateX(calc((1 - var(--p)) * 10deg)); }
  .split .wd { --wp: clamp(0, calc((var(--p) * (var(--n) + 2) - var(--i)) / 2), 1); }
  .vframe { transform: scale(calc(.94 + var(--p) * .06)); }
}

/* ===== Logo personale ===== */
.brand-logo { width: 44px; height: auto; flex: none; transition: width .3s var(--ease); }
.site-header.scrolled .brand-logo { width: 38px; }
@media (max-width: 420px) { .brand-logo { width: 36px; } }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-logo { width: 52px; height: auto; flex: none; }
.contact-mark {
  position: absolute; right: -6%; top: 50%; width: min(720px, 70vw); pointer-events: none; opacity: .07;
  transform: translate3d(0, calc(-50% + (0.5 - var(--p)) * 120px), 0) scale(calc(.92 + var(--p) * .12));
}
.contact-mark img { width: 100%; height: auto; display: block; }
@media (max-width: 899px) { .contact-mark { right: -30%; width: 110vw; opacity: .05; } }
.sign-logo { width: 74px; height: auto; flex: none; opacity: var(--p); transform: rotate(calc((1 - var(--p)) * -20deg)) scale(calc(.6 + var(--p) * .4)); }
@media (max-width: 374px) {
  /* telefoni molto stretti: barra più compatta perché logo, nome, Prenota e menu stiano in riga */
  .nav { gap: 8px; }
  .brand { gap: 8px; }
  .brand-logo, .site-header.scrolled .brand-logo { width: 30px; }
  .brand-name { font-size: 15px; }
  .nav-actions { gap: 6px; }
  .nav-cta { padding: 9px 12px; font-size: 14px; min-height: 42px; }
  .menu-btn { width: 42px; height: 42px; }
}

/* le icone delle schede restano sempre quadrate: l'etichetta accanto va a capo se serve */
.service-icon, .place-icon, .step-icon, .contact-ico { flex: none; }
.service-head { flex-wrap: wrap; gap: 10px; }
.services--compact .pill { font-size: 11px; padding: 5px 9px; }

/* =========================================================
   MODALITÀ NOTTE
   Si attiva con data-theme="dark" su <html> (pulsante luna/sole
   o preferenza del telefono). Le sezioni già scure restano scure.
   ========================================================= */
/* sole | luna accanto a "Prenota": evidenziato quello della modalità in uso */
.theme-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line-dark-3); border-radius: 12px; }
.ts-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 9px; padding: 0; cursor: pointer;
  background: transparent; color: #8FA3C4; transition: background-color .2s ease, color .2s ease;
}
.ts-btn:hover { color: var(--white); }
.ts-sun[aria-pressed="true"] { background: rgba(242, 182, 64, .16); color: var(--sun); }
.ts-moon[aria-pressed="true"] { background: rgba(157, 184, 255, .18); color: var(--accent-soft); }
@media (max-width: 959px) {
  .theme-switch { padding: 2px; border-radius: 10px; }
  .ts-btn { width: 30px; height: 36px; border-radius: 8px; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1628;
  --ink: #E7EDF8;
  --muted: #A9B6CC;
  --line: #22385F;
  --paper: #12223D;
  --paper-line: #2A4677;
  --accent-tint: #1B2E55;
  --surface: #13243F;
}
/* sezioni */
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .section--white { background: #101E36; }
:root[data-theme="dark"] .section--soft { background-color: var(--bg); background-image: radial-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px); }
:root[data-theme="dark"] .hero,
:root[data-theme="dark"] .tool-hero,
:root[data-theme="dark"] .section--dark,
:root[data-theme="dark"] .band { background: #070F1E; }
:root[data-theme="dark"] .footer { background: #050B16; }
:root[data-theme="dark"] .site-header { background: rgba(7, 15, 30, .92); }

/* superfici che erano bianche */
:root[data-theme="dark"] :is(.promise, .field-box, .field-info, .faq-item.open, .tax-cell, .secret-card, .opt, .how-step,
  .tax-pair > div, .rc-compare > div, .hc-area, .hc-card, .tip, .check-row--strong, .ral-box, .bollo-note, .seg,
  .btn--outline, .dd-panel, .legal-table th, .service-tool) { background: var(--surface); }
:root[data-theme="dark"] .services--compact .service:not(.service--dark) .service-tool { background: var(--accent); }
:root[data-theme="dark"] .services--compact .service:not(.service--dark) .service-tool:hover { background: #2C5BE0; }
:root[data-theme="dark"] .dd-item:hover { background: var(--bg); }
:root[data-theme="dark"] .contract { background-image: repeating-linear-gradient(transparent 0 39px, rgba(255, 255, 255, .04) 39px 40px); }
:root[data-theme="dark"] .note { background: #16294D; }
:root[data-theme="dark"] :is(.note p, .legal p, .legal li) { color: #C9D3E6; }

/* bordi grigio chiaro */
:root[data-theme="dark"] :is(.field-box, .seg, .btn--outline, .faq-item.open, .tip, .check-row--strong, .opt) { border-color: #2A4677; }
:root[data-theme="dark"] .tip { border-left-color: var(--accent-soft); }
:root[data-theme="dark"] .field-box:focus-within { border-color: var(--accent-soft); box-shadow: 0 0 0 4px rgba(157, 184, 255, .15); }
:root[data-theme="dark"] input[type="range"]::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--accent-soft) var(--fill), #2A4677 var(--fill)); }
:root[data-theme="dark"] input[type="range"]::-moz-range-track { background: #2A4677; }
:root[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { background: var(--bg); border-color: var(--accent-soft); }

/* testi e dettagli in blu: sul buio diventano azzurri, più leggibili */
:root[data-theme="dark"] :is(.eyebrow, .hand, .service-go, .tool-card-go, .method-num, .promise-num, .q-n, .ral-box-title,
  .range-head output, .reset-link, .teaser-tag, .dd-all, .sign-name, .video-side-title .ser, .legal a, .tax-big,
  .rc-v--accent, .rc-list b, .area a, .infl-src, .sim-panel legend, .hint--good, .quote cite, .opt-k, .service-icon,
  .tool-card-ico, .dd-ico, .faq-q:hover, .checkup-nudge > svg, .step-tag) { color: var(--accent-soft); }
:root[data-theme="dark"] .section--accent .eyebrow, :root[data-theme="dark"] .tool-cta .hand,
:root[data-theme="dark"] .section--dark .hand, :root[data-theme="dark"] .hero .hand, :root[data-theme="dark"] .tool-hero .hand { color: var(--sun); }
:root[data-theme="dark"] .check { border-color: var(--accent-soft); color: var(--accent-soft); }
:root[data-theme="dark"] .method-dot { border-color: var(--accent-soft); box-shadow: inset 0 0 0 calc(var(--p) * 13px) var(--accent-soft); }
:root[data-theme="dark"] .method-track .grow-y, :root[data-theme="dark"] .timeline-track .grow-x { background: var(--accent-soft); }
:root[data-theme="dark"] .step-icon { box-shadow: 0 0 0 8px #101E36; }
:root[data-theme="dark"] .faq-icon { background: #1B2E55; color: var(--ink); }
:root[data-theme="dark"] .mark { background-image: linear-gradient(transparent 62%, rgba(242, 182, 64, .5) 62%, rgba(242, 182, 64, .5) 90%, transparent 90%); }
:root[data-theme="dark"] .tool-card-ico, :root[data-theme="dark"] .service-icon { background: var(--accent-tint); }
:root[data-theme="dark"] .service--dark .service-icon, :root[data-theme="dark"] .tool-card--big .tool-card-ico { background: var(--accent); color: var(--white); }
:root[data-theme="dark"] .service--dark, :root[data-theme="dark"] .tool-card--big, :root[data-theme="dark"] .promise--dark { background: #070F1E; border-color: #22385F; }
:root[data-theme="dark"] .split .wd { color: inherit; }
:root[data-theme="dark"] .services--compact .service--dark .service-tool { background: var(--sun); color: var(--navy); border-color: var(--sun); }
:root[data-theme="dark"] .services--compact .service--dark .service-tool:hover { background: #F5C55F; }
:root[data-theme="dark"] .faq-item.open .faq-icon { background: var(--accent); color: var(--white); }
:root[data-theme="dark"] .service:not(.service--dark) .service-quote { color: var(--accent-soft) !important; }
@media (max-width: 959px) { :root[data-theme="dark"] .dd-panel { background: transparent; } }
@media (min-width: 960px) and (max-width: 1099px) { .menu { gap: 22px; } }
@media (min-width: 960px) and (max-width: 1319px) { .hide-xs { display: none; } }
:root[data-theme="dark"] :is(.hc-start, .fact-n, .dd-all, .tool-card-go) { color: var(--accent-soft); }

/* =========================================================
   Banner cookie
   ========================================================= */
.consent {
  position: fixed; z-index: 200; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 18px 50px rgba(14, 31, 61, .28);
  padding: 20px 20px 18px; display: flex; flex-direction: column; gap: 10px;
}
.consent-title { font-family: var(--font-display); font-weight: 800; font-size: 18px; }
.consent-text { font-size: 15px; line-height: 1.55; color: var(--muted); }
.consent-text a { color: var(--accent); font-weight: 600; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
/* stesso peso visivo per le due scelte, come chiedono le linee guida del Garante */
.consent-btn { justify-content: center; min-height: 48px; background: var(--navy); color: var(--white); border: 0; font-size: 16px; }
.consent-btn:hover { background: var(--accent); color: var(--white); }
.consent-open .fab { opacity: 0 !important; pointer-events: none !important; }
.cookie-prefs { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
:root[data-theme="dark"] .consent { background: var(--surface); border-color: #2A4677; box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] .consent-text a { color: var(--accent-soft); }
:root[data-theme="dark"] .consent-btn { background: var(--accent); }
:root[data-theme="dark"] .consent-btn:hover { background: #2C5BE0; }
.footer .cookie-prefs { color: var(--on-dark-2); text-decoration: none; }
.footer .cookie-prefs:hover { color: var(--white); }
.legal .cookie-prefs--inline { color: var(--accent); font-weight: 600; }
:root[data-theme="dark"] .legal .cookie-prefs--inline { color: var(--accent-soft); }

/* telefoni: logo, nome, sole/luna, Prenota e menu devono stare in una riga */
@media (max-width: 479px) {
  .nav { gap: 6px; }
  .brand { gap: 7px; }
  .brand-logo, .site-header.scrolled .brand-logo { width: 32px; }
  .brand-name { font-size: 15px; }
  .nav-actions { gap: 5px; }
  .ts-btn { width: 28px; }
  .nav-cta { padding: 9px 11px; font-size: 14px; min-height: 42px; }
  .menu-btn { width: 42px; height: 42px; }
}
@media (max-width: 374px) {
  .brand-name { font-size: 14px; }
  .brand-logo, .site-header.scrolled .brand-logo { width: 28px; }
}
/* con "Articoli" nel menu, tra 960 e 1180px le voci si avvicinano per stare su una riga */
@media (min-width: 960px) and (max-width: 1179px) { .menu { gap: 12px; } }
@media (min-width: 960px) and (max-width: 1059px) { .menu { gap: 8px; } }

/* =========================================================
   ICONE MINIMAL (stile Apple)
   Niente riquadri pieni: tratto sottile, contorno leggero, molto spazio.
   ========================================================= */
.service-icon, .tool-card-ico, .place-icon, .contact-ico, .step-icon, .note-icon, .ltv-ico {
  background: transparent !important;
  border: 1px solid var(--line) !important;
  box-shadow: none;
  color: var(--accent) !important;
}
.service-icon, .tool-card-ico { width: 52px !important; height: 52px !important; border-radius: 15px !important; }
.service-icon svg, .tool-card-ico svg { width: 26px; height: 26px; }
.place-icon { width: 48px !important; height: 48px !important; border-radius: 14px !important; }
.place-icon svg { width: 24px; height: 24px; }
.contact-ico { width: 44px !important; height: 44px !important; border-radius: 13px !important; }
.contact-ico svg { width: 22px; height: 22px; }
.step-icon { width: 52px !important; height: 52px !important; }
.step-icon svg { width: 24px; height: 24px; }
.step-icon, .step-icon--accent { background: var(--white) !important; }
.step-icon--accent { border-color: var(--accent) !important; }
.note-icon { color: var(--accent) !important; }

/* su fondi scuri o blu: contorno chiaro e icona chiara */
.service--dark .service-icon, .tool-card--big .tool-card-ico, .contact .contact-ico {
  border-color: rgba(255, 255, 255, .22) !important; color: var(--accent-soft) !important;
}
.section--accent .place-icon { border-color: rgba(255, 255, 255, .4) !important; color: var(--white) !important; }
.ltv-ico { border-color: rgba(255, 255, 255, .45) !important; color: var(--white) !important; }

/* menu Strumenti: solo l'icona, senza riquadro */
.dd-ico { background: transparent !important; color: var(--accent) !important; width: 30px !important; height: 30px !important; border-radius: 0 !important; }
.dd-ico svg { width: 22px; height: 22px; }
.dd-item:hover .dd-ico { background: transparent !important; color: var(--ink) !important; }
@media (max-width: 959px) { .dd-ico { color: var(--accent-soft) !important; } .dd-item:hover .dd-ico { color: var(--white) !important; } }

/* modalità notte */
:root[data-theme="dark"] :is(.service-icon, .tool-card-ico, .step-icon, .note-icon) { border-color: #2A4677 !important; color: var(--accent-soft) !important; }
:root[data-theme="dark"] .step-icon, :root[data-theme="dark"] .step-icon--accent { background: #101E36 !important; }
:root[data-theme="dark"] .step-icon--accent { border-color: var(--accent-soft) !important; }
:root[data-theme="dark"] .dd-ico { color: var(--accent-soft) !important; }


/* =========================================================
   CARTA D'IDENTITÀ PROFESSIONALE (La mia storia)
   ========================================================= */
.idcard-wrap { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 64px); align-items: center; margin-top: clamp(24px, 4vw, 48px); }
@media (max-width: 899px) { .idcard-wrap { grid-template-columns: 1fr; } }
.idcard-intro .h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -.015em; }
.idcard {
  position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(145deg, #16294D 0%, #0E1F3D 55%, #0A1830 100%);
  border-radius: 26px; padding: clamp(22px, 3.4vw, 34px);
  box-shadow: 0 30px 70px rgba(14, 31, 61, .28), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.idcard::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(242, 182, 64, .25); pointer-events: none;
}
.idcard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.idcard-logo { width: 46px; height: auto; }
.idcard-kind { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }
.idcard-data { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; padding: 20px 0; }
.idcard-row { min-width: 0; }
.idcard-row--name, .idcard-row--wide { grid-column: 1 / -1; }
.idcard-row dt { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-2); margin-bottom: 3px; }
.idcard-row dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: var(--white); overflow-wrap: anywhere; }
.idcard-row--name dd { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3vw, 30px); letter-spacing: -.01em; }
@media (max-width: 520px) { .idcard-data { grid-template-columns: 1fr; } }
.idcard-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); }
.idcard-btn { min-height: 48px; padding: 12px 18px; font-size: 15px; border-radius: 12px; }
.idcard-btn--verify { background: var(--sun); color: var(--navy); }
.idcard-btn--verify:hover { background: #F5C55F; color: var(--navy); }
.idcard-btn--wa { background: transparent; border-color: rgba(255, 255, 255, .3); color: var(--white); }
.idcard-btn--wa:hover { background: rgba(255, 255, 255, .08); }
.idcard-note { margin: 12px 0 0; font-size: 13px; color: var(--on-dark-2); }
:root[data-theme="dark"] .idcard { background: linear-gradient(145deg, #1B3058 0%, #13243F 55%, #0E1C33 100%); box-shadow: 0 30px 70px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .1); }
@media (max-width: 374px) {
  /* telefoni molto stretti: il selettore giorno/notte diventa un solo pulsante (mostra la modalità opposta),
     così "Prenota" resta sempre visibile nella barra */
  .theme-switch { padding: 0; border: 0; gap: 0; }
  .theme-switch .ts-btn[aria-pressed="true"] { display: none; }
  .theme-switch .ts-btn { width: 34px; height: 34px; border: 1px solid var(--line-dark-3); }
  .brand-logo, .site-header.scrolled .brand-logo { width: 26px; }
  .brand-name { font-size: 14px; }
  .nav-cta { padding: 8px 10px; font-size: 13px; min-height: 38px; }
  .menu-btn { width: 38px; height: 38px; }
}
