@font-face { font-family: "Geist"; src: url("../assets/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "trAI Logo"; src: url("../assets/fonts/logo-serif-italic.woff") format("woff"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "trAI Logo"; src: url("../assets/fonts/logo-serif-bold.woff") format("woff"); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  --deep: #0C447C; --mid: #185FA5; --bright: #378ADD; --logo-blue: #5E99FD;
  --paper: #F4F8FD; --paper-2: #E6EEF8; --paper-3: #D5E2F2; --white: #FFFFFF; --ink-soft: #3E5A7A;
  --ok: #2E6E51; --ok-bg: #E1F0E9; --bad: #A2433F; --bad-bg: #F4E3E2;
  --t-xs: 14px; --t-s: 16px; --t-body: 19px; --t-lead: 23px;
  --t-h3: clamp(26px, 2.5vw, 36px);
  --t-h2: clamp(32px, 4.6vw, 68px);
  --t-h1: clamp(34px, 7.4vw, 112px);
  --gutter: clamp(16px, 3vw, 40px);
  --side: clamp(20px, 5.5vw, 112px);   /* margine laterale dei contenuti */
  --inset: clamp(14px, 1.6vw, 28px);  /* distanza della barra dal bordo del pannello */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--deep); font-family: "Geist", system-ui, sans-serif; font-size: var(--t-body); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
p { margin: 0; max-width: 60ch; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; }
:focus-visible { outline: 3px solid var(--bright); outline-offset: 3px; border-radius: 8px; }
.wrap { max-width: 1680px; margin: 0 auto; padding: 0 var(--side); }
.h2 { font-size: var(--t-h2); line-height: 1; letter-spacing: -0.045em; max-width: 20ch; }
.lead { font-size: var(--t-lead); line-height: 1.4; }

/* ---------- Logo trAI Solutions ---------- */
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; }
.logo .lt { font-family: "trAI Logo", Georgia, serif; font-size: 30px; }
.logo .lt i { font-style: italic; font-weight: 400; color: var(--deep); }
.logo .lt b { font-weight: 700; color: var(--logo-blue); }
.logo .ls { font-size: 11px; letter-spacing: .4em; color: #6F86A8; margin-top: 4px; padding-left: 2px; }

/* ---------- Pulsanti e link ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 17px 28px; border-radius: 999px; font: 600 var(--t-s)/1 "Geist", sans-serif; text-decoration: none; border: 0; cursor: pointer; overflow: hidden; isolation: isolate; background: var(--deep); color: var(--paper); transition: transform 300ms var(--ease); }
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--bright); transform: translateY(101%); transition: transform 450ms var(--ease); }
.btn:hover::after { transform: none; }
.btn:active { transform: scale(.97); }
.btn .arr { transition: transform 300ms var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.link { position: relative; font-weight: 600; font-size: var(--t-s); text-decoration: none; padding-bottom: 4px; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(.25); transform-origin: left; transition: transform 450ms var(--ease); }
.link:hover::after { transform: none; }

/* ---------- Barra ---------- */
.bar { position: fixed; top: calc(16px + var(--inset)); left: 0; right: 0; z-index: 30; pointer-events: none; transition: transform 500ms var(--ease); }
.bar.hide { transform: translateY(-130%); }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; max-width: none; padding: 0 calc(var(--gutter) + var(--inset)); }
.pill { pointer-events: auto; display: flex; align-items: center; gap: 4px; background: var(--white); border-radius: 999px; padding: 6px; }
.pill .logo { padding: 4px 16px 4px 14px; }
.bar nav a { display: inline-block; padding: 11px 16px; border-radius: 999px; font-size: var(--t-s); font-weight: 500; text-decoration: none; transition: background 250ms ease; }
.bar nav a:hover { background: var(--paper-2); }
.bar .btn { padding: 14px 20px; }
@media (max-width: 900px) { .bar nav { display: none; } }

/* ---------- Hero ---------- */
/* Titolo a tutta larghezza in alto; sotto, a sinistra la promessa e l'azione, a destra la demo grande come una vera app */
.hero { padding: 16px var(--gutter) 0; }
.stage { --pad: calc(var(--inset) + 20px); /* = bordo del testo del logo nella barra */ position: relative; min-height: min(1080px, 100svh); border-radius: 32px; overflow: hidden; background: #DCE9F7; display: flex; flex-direction: column; padding: clamp(108px, 13vh, 150px) var(--pad) var(--pad); }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage > *:not(canvas) { position: relative; }
.hero h1 { font-size: clamp(34px, 5.8vw, 112px); line-height: .94; letter-spacing: -0.052em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.hero h1 .line > span { display: inline-block; transform: translateY(105%); transition: transform 1100ms var(--ease); }
.loaded .hero h1 .line > span { transform: none; }
.loaded .hero h1 .line:nth-child(2) > span { transition-delay: 110ms; }
.hero-grid { flex: 1; margin-top: clamp(28px, 4vh, 56px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 4vw, 72px); align-items: start; }
.intro { padding-top: 6px; }
.hero .lead { font-size: clamp(20px, 1.6vw, 28px); line-height: 1.35; letter-spacing: -0.015em; max-width: 30ch; color: var(--deep); text-wrap: balance; }
.hero .ctas { margin-top: clamp(28px, 3.4vh, 44px); display: flex; gap: 14px 28px; align-items: center; flex-wrap: wrap; }
.hero .ctas .btn { padding: 20px 30px; font-size: 17px; }
.hero .ctas .link { font-size: 17px; }
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
.loaded .fade-in { opacity: 1; transform: none; }
.loaded .f1 { transition-delay: 350ms; } .loaded .f2 { transition-delay: 480ms; } .loaded .f3 { transition-delay: 600ms; }

/* Demo: finestra con l'elenco dei casi a sinistra (come le conversazioni di una chat) e il lavoro a destra */
.app { background: var(--white); border-radius: 28px; overflow: hidden; text-align: left; }
.pick { background: var(--paper); padding: 8px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.case { display: grid; gap: 3px; min-width: 0; text-align: left; padding: 12px 16px; border: 0; border-radius: 20px; background: var(--white); color: var(--deep); cursor: pointer; font-family: inherit; transition: background 300ms var(--ease), color 300ms var(--ease), transform 250ms var(--ease); }
.case b { font-size: clamp(16px, 1.15vw, 19px); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.case .short { display: none; }
.case small { font-size: var(--t-xs); color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 300ms ease; }
.case:hover { background: var(--paper-2); }
.case:active { transform: scale(.98); }
.case[aria-pressed="true"] { background: var(--deep); color: var(--paper); }
.case[aria-pressed="true"] small { color: #A9C8EC; }
.demo-work { padding: clamp(16px, 1.5vw, 28px); display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.box-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.box-top .note { font-size: var(--t-xs); color: var(--ink-soft); text-align: right; }
.box { display: grid; gap: 12px; }
.attach { flex: none; max-width: 60%; display: inline-flex; align-items: center; gap: 12px; background: var(--paper); border-radius: 14px; padding: 8px 16px 8px 8px; font-size: var(--t-s); }
.attach .ico { flex: none; width: 32px; height: 38px; border-radius: 6px; background: var(--bad-bg); color: var(--bad); font: 700 13px/38px "Geist", sans-serif; text-align: center; letter-spacing: -.02em; }
.attach .ico.alt { background: var(--paper-2); color: var(--mid); }
.attach b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask { display: flex; align-items: center; gap: 14px; font-size: clamp(19px, 1.35vw, 24px); min-height: 2.7em; }
.ask .txt { flex: 1; line-height: 1.35; letter-spacing: -0.012em; }
@media (max-width: 1499px) { .case small { display: none; } }
@media (max-width: 1100px) { .ask { align-items: flex-end; } }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--deep); vertical-align: -3px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.send { flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--deep); display: grid; place-items: center; border: 0; cursor: pointer; transition: transform 250ms var(--ease), background 250ms ease; }
.send:hover { background: var(--bright); }
.send:active { transform: scale(.9); }
.answer { background: var(--paper); border-radius: 20px; padding: clamp(16px, 1.4vw, 24px); display: grid; gap: 10px; align-content: start; min-height: 260px; transition: opacity 500ms var(--ease), transform 600ms var(--ease); }
.answer.off { opacity: 0; transform: translateY(-10px) scale(.98); }
.answer .head { display: flex; gap: 12px; align-items: center; font-size: clamp(17px, 1.2vw, 20px); font-weight: 500; line-height: 1.3; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.b-ai { background: var(--deep); color: var(--white); flex: none; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.cells { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cell { background: var(--paper); border-radius: 12px; padding: 10px 12px; opacity: 0; transform: translateY(8px); animation: up 500ms var(--ease) forwards; }
.cell small { display: block; font-size: 13px; color: var(--ink-soft); }
.cell b { font-size: var(--t-xs); font-weight: 600; }
.app .cells { grid-template-columns: 1fr 1fr; gap: 10px; }
.app .cell { background: var(--white); border-radius: 14px; padding: 10px 16px 12px; }
.app .cell small { font-size: var(--t-xs); margin-bottom: 2px; }
.app .cell b { display: block; font-size: clamp(18px, 1.15vw, 20px); line-height: 1.25; letter-spacing: -0.01em; }
.app .draft { background: var(--white); border-radius: 14px; padding: 16px 18px; font-size: clamp(16px, 1.15vw, 19px); line-height: 1.5; opacity: 0; animation: up 500ms var(--ease) forwards; }
@keyframes up { to { opacity: 1; transform: none; } }
.answer .foot { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; font-size: var(--t-s); color: var(--ink-soft); }
.answer .foot .btn { padding: 12px 18px; font-size: var(--t-xs); }
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .lead { max-width: 30ch; }
}
@media (max-width: 640px) {
  /* Su telefono la barra si accosta al bordo, così il testo del logo resta allineato al titolo */
  .stage { --pad: 16px; padding-top: 108px; border-radius: 24px; }
  .bar .wrap { padding: 0 var(--gutter); }
  .pill .logo { padding-left: 10px; }
  .hero h1 { font-size: 34px; }
  .hero-grid { margin-top: 22px; gap: 32px; }
  .hero .ctas { flex-direction: column; align-items: flex-start; gap: 18px; }
  .hero .ctas .btn { padding: 18px 22px; font-size: var(--t-s); white-space: nowrap; }
  .bar .btn { padding: 12px 16px; font-size: 15px; white-space: nowrap; }
  .app { border-radius: 22px; }
  .pick { gap: 4px; padding: 6px; }
  .case { padding: 12px 6px; border-radius: 16px; text-align: center; }
  .case b { font-size: 15px; }
  .case .full, .case small { display: none; }
  .case .short { display: inline; }
  .box-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .attach { max-width: 100%; }
  .box-top .note { text-align: left; }
  .answer { min-height: 0; }
  .app .cell { padding: 10px 12px 12px; }
  .app .cell b { font-size: 16px; }
}

/* ---------- Sezioni ---------- */
section { padding: clamp(110px, 13vw, 190px) 0; position: relative; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 900ms var(--ease); transition-delay: calc(var(--i) * 45ms); }
.split.in .w > span { transform: none; }
.rise { opacity: 0; transform: translateY(32px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); transition-delay: var(--d, 0ms); }
.rise.in { opacity: 1; transform: none; }
.head-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; }
@media (max-width: 900px) { .head-row { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Archivio: il lavoro che si ripete da cent'anni ---------- */
.archive { padding-bottom: 0; overflow: hidden; }
.strip { display: flex; gap: 16px; margin-top: clamp(48px, 6vw, 80px); will-change: transform; }
.strip figure { margin: 0; flex: none; width: clamp(260px, 30vw, 440px); }
.strip .ph { aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: var(--deep); }
.strip img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(1) contrast(1.08) brightness(1.05); mix-blend-mode: luminosity; opacity: .92; transform: scale(1.08); transition: transform 1200ms var(--ease), opacity 600ms ease; }
.strip figure:hover img { transform: scale(1.02); opacity: 1; }
.strip figcaption { margin-top: 10px; font-size: var(--t-xs); color: var(--ink-soft); }

/* ---------- Servizi ---------- */
.svc-list { margin-top: clamp(56px, 7vw, 96px); display: grid; gap: 14px; }
.svc { text-decoration: none; color: var(--deep); position: relative; display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 40px; align-items: center; padding: clamp(24px, 3vw, 40px); border-radius: 28px; background: var(--white); overflow: hidden; isolation: isolate; transition: color 500ms ease; }
.svc::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--deep); clip-path: circle(0% at var(--mx, 90%) var(--my, 50%)); transition: clip-path 800ms var(--ease-io); }
.svc:hover { color: var(--paper); }
.svc:hover::before { clip-path: circle(150% at var(--mx, 90%) var(--my, 50%)); }
.svc h3 { font-size: var(--t-h3); line-height: 1.05; letter-spacing: -0.035em; }
.svc .sub { margin-top: 8px; font-size: var(--t-s); font-weight: 500; color: var(--mid); transition: color 400ms ease; }
.svc:hover .sub { color: #9CC3F0; }
.svc p.desc { font-size: var(--t-s); line-height: 1.55; }
.svc .go { width: 60px; height: 60px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; transition: transform 500ms var(--ease), background 400ms ease; }
.svc:hover .go { transform: rotate(-45deg); background: var(--bright); }
.svc .go path { stroke: var(--deep); transition: stroke 300ms ease; }
.svc:hover .go path { stroke: var(--white); }
.ico-svc { width: 104px; height: 104px; border-radius: 26px; background: var(--paper); display: grid; place-items: center; transition: background 500ms ease, transform 600ms var(--ease); }
.ico-svc svg { width: 80px; height: 80px; fill: none; stroke: var(--deep); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke 400ms ease; }
.ico-svc .acc { stroke: var(--bright); }
.ico-svc path, .ico-svc rect, .ico-svc circle { stroke-dasharray: 170; stroke-dashoffset: 170; transition: stroke-dashoffset 1400ms var(--ease), stroke 400ms ease; }
.svc.in .ico-svc path, .svc.in .ico-svc rect, .svc.in .ico-svc circle { stroke-dashoffset: 0; }
.svc:hover .ico-svc { background: rgba(244, 248, 253, .1); transform: rotate(-4deg) scale(1.04); }
.svc:hover .ico-svc svg { stroke: var(--paper); }
.ico-svc .tape { transform-origin: 32px 48px; transition: transform 700ms var(--ease); }
.svc:hover .tape { transform: rotate(-7deg); }
.ico-svc .lift { transition: transform 600ms var(--ease); }
.svc:hover .lift { transform: translateY(-7px); }
.ico-svc .lens { transition: transform 700ms var(--ease); }
.svc:hover .lens { transform: translate(-7px, -4px); }
@media (max-width: 900px) { .svc { grid-template-columns: 1fr; gap: 14px; } .svc .go, .ico-svc { display: none; } }

/* ---------- Generico vs su misura ---------- */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(56px, 7vw, 96px); }
.vs { border-radius: 28px; padding: clamp(24px, 3vw, 44px); min-height: 440px; display: flex; flex-direction: column; gap: 18px; }
.vs-old { background: var(--paper-2); color: var(--ink-soft); }
.vs-new { background: var(--deep); color: var(--paper); }
.vs .top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--t-lead); font-weight: 600; letter-spacing: -0.02em; }
.slide-gen { background: #CCD5E0; border-radius: 16px; aspect-ratio: 16 / 8; padding: 26px; display: flex; flex-direction: column; justify-content: flex-end; color: #3F4A59; }
.slide-gen b { font-size: var(--t-lead); } .slide-gen span { font-size: var(--t-xs); }
.msg { border-radius: 18px; padding: 13px 16px; font-size: var(--t-s); line-height: 1.45; max-width: 90%; opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.in .msg { opacity: 1; transform: none; }
.in .msg + .msg { transition-delay: 600ms; }
.msg.u { align-self: flex-end; background: var(--mid); color: var(--paper); border-bottom-right-radius: 6px; }
.msg.a { background: var(--paper); color: var(--deep); border-bottom-left-radius: 6px; }
.vs-foot { margin-top: auto; font-size: var(--t-s); }
.provoke { margin: clamp(80px, 10vw, 140px) auto 0; text-align: center; max-width: 780px; }
.provoke blockquote { margin: 0; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.25; letter-spacing: -0.025em; font-weight: 600; }
.provoke blockquote .hl { color: var(--bright); }
.provoke p { margin: 18px auto 0; color: var(--ink-soft); font-size: var(--t-s); }
@media (max-width: 900px) { .versus { grid-template-columns: 1fr; } }

/* ---------- Prodotti ---------- */
.products { background: var(--deep); color: var(--paper); border-radius: 40px; margin: 0 var(--gutter); }
.products .lead { color: #C9DAEF; }
.p-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 5vw, 80px); margin-top: clamp(56px, 7vw, 88px); }
.tabs { display: flex; flex-direction: column; gap: 6px; }
.tab { position: relative; text-align: left; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 24px 26px 28px; border-radius: 22px; transition: background 400ms ease; }
.tab:hover { background: rgba(244, 248, 253, .06); }
.tab[aria-selected="true"] { background: rgba(244, 248, 253, .1); }
.tab h3 { font-size: var(--t-h3); letter-spacing: -0.03em; line-height: 1.1; }
.tab p { font-size: var(--t-s); line-height: 1.55; color: #C9DAEF; max-height: 0; overflow: hidden; transition: max-height 600ms var(--ease), margin 600ms var(--ease); }
.tab[aria-selected="true"] p { max-height: 160px; margin-top: 12px; }
.tab .prog { position: absolute; left: 26px; right: 26px; bottom: 12px; height: 2px; background: rgba(244, 248, 253, .15); border-radius: 2px; overflow: hidden; opacity: 0; }
.tab[aria-selected="true"] .prog { opacity: 1; }
.tab .prog i { position: absolute; inset: 0; background: var(--bright); transform-origin: left; transform: scaleX(0); }
.screen { position: relative; background: #0A3A6B; border-radius: 28px; min-height: 540px; overflow: hidden; }
.pane { position: absolute; inset: clamp(18px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 14px; opacity: 0; visibility: hidden; transform: translateY(20px) scale(.98); transition: opacity 600ms var(--ease), transform 700ms var(--ease), visibility 0s linear 700ms; }
.pane.on { opacity: 1; visibility: visible; transform: none; transition: opacity 600ms var(--ease), transform 700ms var(--ease); }
.ui { background: var(--white); color: var(--deep); border-radius: 18px; overflow: hidden; }
.ui-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--paper-2); font-size: var(--t-xs); font-weight: 600; color: var(--ink-soft); }
.ui-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.pane .msg { opacity: 1; transform: none; font-size: var(--t-xs); }
.src { display: inline-block; margin: 8px 6px 0 0; padding: 3px 10px; border-radius: 999px; background: var(--white); color: var(--mid); font-size: 13px; font-weight: 600; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 10px; align-items: center; }
.node { background: var(--white); color: var(--deep); border-radius: 16px; padding: 16px; font-size: var(--t-xs); }
.node b { display: block; font-size: var(--t-s); }
.node span { color: var(--ink-soft); }
.wire { width: 44px; height: 2px; background: rgba(244, 248, 253, .25); position: relative; overflow: hidden; border-radius: 2px; }
.wire::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--bright); animation: run 1.6s linear infinite; }
@keyframes run { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.stat { display: flex; align-items: baseline; gap: 16px; margin-top: auto; }
.stat .num { font-size: var(--t-h2); font-weight: 600; letter-spacing: -0.05em; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; }
.stat span { font-size: var(--t-s); color: #C9DAEF; max-width: 24ch; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--paper); font-size: var(--t-xs); }
.check .dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); } .dot.wait { background: var(--bright); }
.check b { display: block; font-size: var(--t-s); }
.pane .note { font-size: var(--t-xs); color: #C9DAEF; }
.p-note { margin-top: 40px; font-size: var(--t-xs); color: #A9C0DC; }
@media (max-width: 960px) { .p-grid { grid-template-columns: 1fr; } .screen { min-height: 600px; } .flow { grid-template-columns: 1fr; } .wire { width: 2px; height: 24px; justify-self: center; } .wire::after { width: 100%; height: 40%; animation-name: runv; } }
@keyframes runv { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

/* ---------- Metodo ---------- */
.method .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.field { position: relative; aspect-ratio: 1; width: 100%; max-width: 600px; justify-self: end; background: var(--deep); border-radius: 36px; overflow: hidden; }
.field canvas { width: 100%; height: 100%; display: block; }
.agents { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.agents span { padding: 10px 16px; border-radius: 999px; background: var(--white); font-size: var(--t-xs); font-weight: 500; transition: background 300ms ease, color 300ms ease, transform 300ms var(--ease); }
.agents span:hover { background: var(--deep); color: var(--paper); transform: translateY(-2px); }
@media (max-width: 900px) { .method .wrap { grid-template-columns: 1fr; } .field { justify-self: center; } }

/* ---------- Conformità ---------- */
.law-rows { margin-top: clamp(48px, 6vw, 80px); }
.law-row { display: grid; grid-template-columns: 280px 1fr; gap: 32px; padding: 28px 0; align-items: baseline; position: relative; }
.law-row::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--paper-3); transform-origin: left; transform: scaleX(0); transition: transform 1100ms var(--ease); }
.law-row.in::before { transform: none; }
.law-row h3 { font-size: var(--t-lead); letter-spacing: -0.02em; line-height: 1.2; }
.law-row p { font-size: var(--t-body); }
.law .note { margin-top: 32px; font-size: var(--t-xs); color: var(--ink-soft); }
@media (max-width: 760px) { .law-row { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- Contatto ---------- */
.contact .panel { position: relative; border-radius: 40px; overflow: hidden; background: #DCE9F7; padding: clamp(28px, 5vw, 80px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.contact canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact .panel > *:not(canvas) { position: relative; }
.contact ul { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; font-size: var(--t-body); }
.contact li { display: flex; gap: 14px; }
.contact li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--deep); margin-top: 11px; }
form { background: var(--white); border-radius: 28px; padding: clamp(22px, 3vw, 36px); display: grid; gap: 16px; }
label { display: grid; gap: 7px; font-size: var(--t-xs); font-weight: 500; color: var(--ink-soft); }
input, textarea { font: 400 var(--t-s)/1.4 "Geist", sans-serif; color: var(--deep); background: var(--paper); border: 2px solid transparent; border-radius: 14px; padding: 14px 16px; transition: border-color 250ms ease, background 250ms ease; }
input:focus, textarea:focus { outline: none; border-color: var(--bright); background: var(--white); }
textarea { min-height: 104px; resize: vertical; }
.r2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.consent { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 400; line-height: 1.45; }
.consent input { width: 18px; height: 18px; padding: 0; margin-top: 2px; accent-color: var(--deep); }
.need { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.need legend { font-size: var(--t-xs); font-weight: 500; color: var(--ink-soft); margin-bottom: 8px; padding: 0; }
.need label { display: inline-flex; cursor: pointer; }
.need input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.need span { padding: 10px 16px; border-radius: 999px; background: var(--paper); font-size: var(--t-xs); font-weight: 500; color: var(--deep); transition: background 250ms ease, color 250ms ease, transform 250ms var(--ease); }
.need label:hover span { background: var(--paper-2); }
.need input:checked + span { background: var(--deep); color: var(--paper); }
.need input:focus-visible + span { outline: 3px solid var(--bright); outline-offset: 2px; }
.need label:active span { transform: scale(.96); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: campo trappola nascosto, non è un divisore */
.form-error { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bad-bg); color: var(--bad); font-size: var(--t-xs); max-width: none; }
.consent a { color: var(--deep); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--bad); }
.btn[disabled] { opacity: .6; cursor: wait; }
form .after { font-size: var(--t-xs); color: var(--ink-soft); text-align: center; margin: 0 auto; }
@media (max-width: 900px) { .contact .panel { grid-template-columns: 1fr; border-radius: 28px; } .r2 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer { padding: clamp(28px, 2.6vw, 40px) 0 32px; }
.contact { padding-bottom: clamp(20px, 2vw, 28px); } /* modulo e footer più vicini */
footer .top { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
footer .logo .lt { font-size: 52px; } footer .logo .ls { font-size: 13px; }
footer .cols { display: flex; gap: 56px; flex-wrap: wrap; font-size: var(--t-s); }
footer a { text-decoration: none; } footer a:hover { color: var(--bright); }
footer .fine { margin-top: 32px; padding-top: 0; font-size: 13px; color: var(--ink-soft); display: grid; gap: 6px; max-width: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
  .split .w > span, .hero h1 .line > span, .fade-in, .rise, .msg { transform: none !important; opacity: 1 !important; }
  .ico-svc path, .ico-svc rect, .ico-svc circle { stroke-dashoffset: 0 !important; }
}

/* ---------- Pagine interne ---------- */
.doc-page { padding: 170px 0 80px; min-height: 70vh; }
.doc-page .lead { margin-top: 24px; }
.doc-meta { margin-top: 16px; font-size: var(--t-xs); color: var(--ink-soft); }
.doc-body { margin-top: 48px; max-width: 72ch; }
.doc-body h2 { font-size: var(--t-lead); letter-spacing: -0.02em; margin: 40px 0 10px; }
.doc-body p { font-size: var(--t-s); line-height: 1.65; margin-top: 10px; }
.doc-body a { color: var(--mid); }
.grazie-cta { margin-top: 40px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }

.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } /* taste-skill-ignore: testo per screen reader */
.contact > .wrap { max-width: none; padding: 0 var(--gutter); } /* il pannello allinea i bordi con hero e prodotti */
