/* BRAIN v5 - stile corporate: Inter, wordmark monospace, rete di particelle, team con co-founder */
:root {
  --ground: #F5F6F7;
  --surface: #FFFFFF;
  --ink: #121416;
  --muted: #5A6269;
  --line: #DFE3E6;
  --soft: #E6E9EC;
  --brain: #F0412E;
  --brain-btn: #DC3320;
  --brain-deep: #C22D1D;
  --check: #E39B2D;
  --check-soft: #FCF1DC;
  --night: #0D0E10;
  --night-2: #1A1C1F;
  --on-night: #F5F6F7;
  --on-night-muted: #AEB5BB;
  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 30px;
  --pill: 999px;
  --gutter: 24px;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .manifesto, .tile-number .big { font-family: var(--display); }
section[id] { scroll-margin-top: 96px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.wrap { width: 100%; max-width: 1248px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--surface); color: var(--ink); padding: 12px 18px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 16px; }

/* Pulsanti */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 700; line-height: 1.2;
  padding: 17px 30px; border: 0; border-radius: var(--pill);
  background: var(--brain-btn); color: #fff; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--brain-deep); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 11px 20px; font-size: .95rem; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-dark { background: var(--ink); padding: 13px 22px; font-size: .98rem; }
.btn-dark:hover { background: #2A2E32; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #B9C0C6; padding: 13px 22px; font-size: .98rem; }
.btn-line:hover { background: var(--surface); }

/* Barra sospesa */
.top { position: fixed; inset: 14px 0 auto; z-index: 50; padding-inline: 16px; pointer-events: none; }
.top-inner {
  pointer-events: auto;
  max-width: 1120px; margin-inline: auto;
  display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 22px; border-radius: var(--pill);
  background: rgba(18, 20, 22, .9);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 34px -18px rgba(0, 0, 0, .6);
  color: #fff;
}
.top nav { display: flex; gap: 28px; margin-left: auto; }
.top nav a { color: #D9DDE0; text-decoration: none; font-size: .95rem; font-weight: 500; }
.top nav a:hover { color: #fff; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; font-size: 1.4rem; letter-spacing: .01em; line-height: 1; }
.logo img { width: 34px; }
.logo b { color: var(--brain); font-weight: inherit; }

/* Testata */
.hero { position: relative; isolation: isolate; background: var(--night); color: var(--on-night); min-height: 100svh; padding-top: 150px; text-align: left; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(78% 52% at 50% 100%, rgba(240, 65, 46, .92), rgba(240, 65, 46, .3) 52%, rgba(240, 65, 46, 0) 78%),
    radial-gradient(38% 30% at 8% 4%, rgba(240, 65, 46, .2), rgba(240, 65, 46, 0) 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .2; mix-blend-mode: overlay;
}
.hero-net { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.14) 0%, #000 55%); mask-image: linear-gradient(90deg, rgba(0,0,0,.14) 0%, #000 55%); }
.hero-copy { position: relative; }
.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 4.7rem); font-weight: 700; line-height: 1.02; letter-spacing: -.04em;
  max-width: 16ch; text-wrap: balance;
}
.hero h1 b, .audit h2 span, .chi-ai b, .title b { color: var(--brain); font-weight: inherit; }
.type .ch { opacity: 0; }
.type .ch.on { opacity: 1; }
.js .after-type { opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.js.typed .after-type { opacity: 1; transform: none; }
.lead { max-width: 46ch; margin: 26px 0 0; font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: #D3D7DB; text-wrap: pretty; }
.hero-stats { list-style: none; padding: 0; margin: 56px 0 0; display: flex; justify-content: flex-start; gap: clamp(20px, 5vw, 64px); color: var(--on-night-muted); font-size: .95rem; }
.hero-stats strong { display: block; color: #fff; font-size: clamp(1.9rem, 3.4vw, 2.9rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; margin-top: 38px; }

/* Pannello della squadra */
.board-wrap { position: relative; margin-top: 120px; margin-bottom: -210px; }
.board-mascot { position: absolute; z-index: 0; right: calc(var(--gutter) + 64px); bottom: calc(100% - 30px); width: 214px; animation: peek 6s ease-in-out infinite; }
.lid { position: absolute; top: 45.2%; width: 7.4%; height: 23.4%; border-radius: 999px; background: #F5412F; transform: scaleY(0); transform-origin: 50% 0; animation: blink 5.5s infinite; }
.lid-a { left: 58.8%; }
.lid-b { left: 72.1%; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(0); } 95.5%, 97% { transform: scaleY(1); } }
@keyframes peek { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

.board {
  position: relative; z-index: 1; text-align: left;
  background: var(--surface); color: var(--ink);
  border-radius: var(--r-lg); padding: 28px;
  box-shadow: 0 40px 80px -44px rgba(0, 0, 0, .5);
}
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.board-title strong { display: block; font-size: 1.55rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.15; }
.live { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; color: var(--muted); font-size: .93rem; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 20, 22, .35); } 100% { box-shadow: 0 0 0 9px rgba(18, 20, 22, 0); } }
.board-stats { display: flex; gap: 8px; margin: 0; }
.board-stats div { min-width: 118px; padding: 10px 16px; border-radius: 14px; background: var(--ground); transition: background-color .3s ease; }
.board-stats dt { font-size: .8rem; color: var(--muted); }
.board-stats dd { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.board-stats .is-check { background: var(--check-soft); }

.board-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; padding-top: 16px; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: start; }
.agent {
  display: grid; grid-template-columns: 48px 148px minmax(0, 1fr) auto; align-items: center; column-gap: 14px;
  min-height: 78px; padding: 11px 14px 8px; border-radius: 16px;
  transition: background-color .3s ease;
}
.agent.is-open { background: var(--check-soft); }
.avatar { width: 48px; height: 48px; border-radius: 14px; background: var(--ground); display: grid; place-items: center; }
.agent.is-open .avatar { background: var(--surface); }
.avatar img { width: 36px; }
.agent-dept { display: flex; flex-direction: column; font-weight: 700; line-height: 1.25; }
.agent-dept em { font-style: normal; font-weight: 500; font-size: .82rem; color: var(--muted); }
.agent-task { line-height: 1.35; transition: opacity .3s ease, transform .3s ease; }
.agent.is-changing .agent-task { opacity: 0; transform: translateY(6px); }
.state { justify-self: end; min-width: 124px; text-align: center; white-space: nowrap; padding: 7px 12px; border-radius: var(--pill); font-size: .84rem; font-weight: 600; line-height: 1.2; }
.state-done { background: var(--ground); color: var(--muted); }
.state-working { background: var(--ink); color: #fff; }
.state-check { background: var(--check); color: var(--ink); }
.state-handed { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px #B9C0C6; }
.bar { grid-column: 2 / -1; height: 3px; margin-top: 7px; border-radius: 3px; background: var(--line); overflow: hidden; opacity: 0; transition: opacity .25s ease; }
.bar::after { content: ""; display: block; height: 100%; width: 100%; background: var(--ink); border-radius: inherit; transform: scaleX(0); transform-origin: 0 50%; }
.agent.is-working .bar { opacity: 1; }
.agent.is-working .bar::after { animation: fill 2.6s linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

.decision { display: flex; flex-direction: column; background: var(--ground); border-radius: var(--r-md); padding: 22px; min-height: 320px; }
.decision-label { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; font-size: .86rem; font-weight: 700; }
.decision-label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--check); }
.decision.is-clear .decision-label::before { background: #B9C0C6; }
#decision-card { display: flex; flex-direction: column; flex: 1; }
#decision-card[hidden] { display: none; }
.decision-from { font-size: .9rem; color: var(--muted); }
.decision-title { font-size: 1.32rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 3px 0 8px; }
.decision-fact { color: var(--muted); font-size: .98rem; }
.decision-plan { margin: 14px 0 18px; padding: 12px 14px; border-radius: 14px; background: var(--surface); font-size: .98rem; line-height: 1.35; }
.decision-plan span { display: block; font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.decision-plan b { font-weight: 600; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.decision-empty { margin: auto 0; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; max-width: 18ch; }
.decision-empty:focus { outline: none; }
.board-foot { padding-top: 18px; font-size: .9rem; color: var(--muted); }
.board-foot span { display: inline-block; margin-right: 10px; padding: 3px 10px; border-radius: var(--pill); background: var(--ground); font-weight: 600; font-size: .8rem; color: var(--ink); }

/* Sezioni */
.section { padding-block: 112px; }
.section + .section { padding-top: 0; }
.after-hero { padding-top: calc(210px + 112px); }
.title { font-size: clamp(2.2rem, 5.2vw, 4.2rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; margin-bottom: 40px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; }
.head .title { margin-bottom: 0; }
.head p { color: var(--muted); max-width: 30ch; text-align: right; }

/* Mosaico */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 290px; padding: 32px; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none; }
.tile h3 { font-size: clamp(1.7rem, 2.7vw, 2.5rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.05; margin-bottom: 10px; }
.tile p { color: var(--muted); max-width: 28ch; }
.tag { align-self: flex-start; margin-bottom: 22px; padding: 5px 12px; border-radius: var(--pill); font-size: .84rem; font-weight: 600; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .8; }
.tile-agents { grid-column: span 7; min-height: 470px; background: var(--night); color: var(--on-night); }
.tile-agents::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 88% 100%, rgba(240, 65, 46, .5), rgba(240, 65, 46, 0) 70%); }
.tile-agents > * { position: relative; }
.tile-agents h3 { font-size: clamp(2.3rem, 4.6vw, 4.1rem); }
.tile-agents p { color: #C9CED3; }
.tile-agents img { position: absolute; right: 3%; bottom: -7%; width: 56%; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.tile-agents:hover img { transform: translate(-2%, -3%) rotate(-2deg); }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 320px; }
.chips li { padding: 7px 14px; border-radius: var(--pill); background: rgba(255, 255, 255, .1); font-size: .9rem; font-weight: 500; }
.tile-academy { grid-column: span 5; min-height: 470px; }
.classroom { margin-top: auto; display: flex; align-items: flex-end; gap: 4%; padding-top: 28px; }
.classroom img { width: 30%; }
.classroom img:nth-child(2) { width: 22%; }
.classroom img:nth-child(3) { width: 26%; transform: scaleX(-1); }
.tile-number { grid-column: span 6; justify-content: space-between; }
.tile-number .big { max-width: none; font-size: clamp(5.4rem, 10vw, 8.6rem); font-weight: 800; letter-spacing: -.07em; line-height: .82; color: var(--brain); }
.tile-number p:last-child { font-size: 1.2rem; line-height: 1.3; color: var(--muted); max-width: 16ch; }
.tile-number strong { color: var(--ink); }
.tile-data { grid-column: span 6; background: var(--soft); }
.tile-data h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.swap { margin-top: auto; padding-top: 26px; display: flex; align-items: center; gap: 10px; max-width: none; font-weight: 600; font-size: .98rem; }
.swap span { padding: 9px 16px; border-radius: var(--pill); background: var(--surface); color: var(--ink); white-space: nowrap; }
.swap span:last-child { background: var(--ink); color: #fff; }
.swap i { position: relative; flex: 1; max-width: 46px; height: 2px; background: var(--ink); }
.swap i::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border-top: 2px solid var(--ink); border-right: 2px solid var(--ink); transform: rotate(45deg); }

/* Agenti pronti */
.roster { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.roster li { display: flex; flex-direction: column; min-height: 210px; padding: 24px; border-radius: var(--r-md); background: var(--surface); }
.roster svg { width: 32px; height: 32px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: auto; }
.roster h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 24px 0 6px; }
.roster p { color: var(--muted); font-size: .98rem; line-height: 1.4; }
.roster .roster-custom { grid-column: span 3; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 28px; background: var(--ink); color: #fff; }
.roster-custom h3 { margin: 0; }
.roster-custom p { margin-right: auto; }
.roster-custom p { color: #C9CED3; }
.roster-custom .btn { margin: 0; }

/* Come lavoriamo */
.method { position: relative; overflow: hidden; isolation: isolate; padding: clamp(28px, 5.5vw, 72px); border-radius: clamp(28px, 4vw, 44px); background: var(--night); color: var(--on-night); }
.method::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(46% 60% at 100% 0%, rgba(240, 65, 46, .42), rgba(240, 65, 46, 0) 72%); }
.method .title { font-size: 1.05rem; font-weight: 600; letter-spacing: 0; line-height: 1.4; color: var(--on-night-muted); margin-bottom: 16px; }
.manifesto { font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 800; letter-spacing: -.05em; line-height: .96; margin-bottom: clamp(36px, 6vw, 72px); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.steps li { padding: 22px; border-radius: var(--r-md); background: rgba(255, 255, 255, .07); }
.steps span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--ink); font-weight: 700; font-size: .95rem; }
.steps h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.2; margin: 26px 0 6px; }
.steps p { color: #C9CED3; font-size: .98rem; line-height: 1.4; }

/* Chi siamo */
.founders { list-style: none; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.founders li { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; min-height: 420px; border-radius: var(--r-lg); background: var(--night); color: var(--on-night); }
.founders li::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 0% 100%, rgba(240, 65, 46, .22), rgba(240, 65, 46, 0) 70%); }
.founder-copy { padding: 32px; align-self: end; }
.founder-copy p { display: inline-block; margin-bottom: 14px; padding: 5px 12px; border-radius: var(--pill); font-size: .84rem; font-weight: 600; color: var(--on-night-muted); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .25); }
.founder-copy h3 { font-size: clamp(1.8rem, 3vw, 2.7rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; }
.founders img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; object-position: 50% 0; justify-self: end; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 38%); mask-image: linear-gradient(90deg, transparent 0, #000 38%); }
.team { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--r-md); background: var(--night); }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.team h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; margin-top: 14px; }
.team p { color: var(--muted); font-size: .92rem; line-height: 1.35; }
.trust { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 16px; margin-top: 48px; }
.trust-iso, .trust-logos { padding: 26px; border-radius: var(--r-md); background: var(--surface); }
.trust-iso { display: flex; align-items: center; gap: 18px; }
.trust-iso img { width: 76px; flex: none; }
.trust-iso p { color: var(--muted); font-size: .92rem; line-height: 1.4; }
.trust-iso strong { display: block; color: var(--ink); font-size: 1.12rem; letter-spacing: -.01em; margin-bottom: 4px; }
.trust-logos > p { color: var(--muted); font-size: .92rem; margin-bottom: 18px; }
.trust-logos ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 26px 40px; align-items: center; }
.trust-logos img { width: auto; max-height: 36px; object-fit: contain; filter: grayscale(1); opacity: .78; }

/* Audit */
.audit { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(80px, 11vw, 136px); background: var(--night); color: var(--on-night); }
.audit::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(52% 80% at 0% 100%, rgba(240, 65, 46, .7), rgba(240, 65, 46, 0) 72%); }
.audit-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.audit h2 { font-size: clamp(2.6rem, 6.6vw, 5.8rem); font-weight: 800; letter-spacing: -.05em; line-height: .94; margin-bottom: 22px; }
.audit-copy > p { max-width: 34ch; font-size: 1.18rem; color: #D3D7DB; }
.audit-copy .agency { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 1rem; max-width: 44ch; }
.agency a { color: #fff; font-weight: 700; text-underline-offset: 3px; }
.audit-form { display: grid; gap: 14px; padding: 28px; border-radius: var(--r-lg); background: var(--surface); color: var(--ink); }
.audit-form label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
.audit-form input, .audit-form select { width: 100%; font: inherit; font-weight: 400; color: var(--ink); padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--ground); }
.audit-form input:focus-visible, .audit-form select:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.audit-form [aria-invalid="true"] { border-color: var(--brain-deep); }
.audit-form .btn { margin-top: 6px; }
.form-msg { font-size: .95rem; color: var(--ink); }

/* Piè di pagina */
.footer { background: #08090A; color: var(--on-night-muted); padding-block: 56px; font-size: .95rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1.3fr; gap: 32px; align-items: start; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer address { font-style: normal; line-height: 1.6; }
.footer address strong { display: block; color: #fff; }
.footer-contact { display: grid; gap: 6px; }
.footer-contact a { color: inherit; text-decoration: none; }
.footer-contact a:hover { color: #fff; }
.footer-iso { display: flex; align-items: center; gap: 14px; font-size: .86rem; line-height: 1.45; }
.footer-iso img { width: 50px; flex: none; padding: 4px; border-radius: 8px; background: #fff; }

/* Schermi medi */
@media (max-width: 1040px) {
  .top nav { display: none; }
  .top-inner { justify-content: space-between; }
  .board-head { flex-direction: column; align-items: stretch; }
  .board-stats div { flex: 1; min-width: 0; }
  .board-body { grid-template-columns: minmax(0, 1fr); }
  .decision { min-height: 0; }
  .decision-empty { max-width: none; padding-block: 12px; }
  .tile-agents, .tile-academy { grid-column: span 12; }
  .tile-academy { min-height: 340px; }
  .classroom { max-width: 420px; }
  .tile-number, .tile-data { grid-column: span 6; }
  .roster { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roster .roster-custom { grid-column: span 1; min-height: 210px; flex-direction: column; align-items: flex-start; justify-content: flex-end; flex-wrap: nowrap; gap: 0; }
  .roster-custom p { margin: 6px 0 0; }
  .roster-custom .btn { margin-top: 18px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
  .founders { grid-template-columns: minmax(0, 1fr); }
  .trust { grid-template-columns: minmax(0, 1fr); }
  .audit-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Telefono */
@media (max-width: 640px) {
  :root { --gutter: 16px; --r-lg: 24px; }
  .hero { padding-top: 110px; }
  .founders li { min-height: 340px; }
  .founder-copy { padding: 22px; }
  .hero-stats { font-size: .82rem; line-height: 1.3; }
  .hero-actions .btn { width: 100%; }
  .board-wrap { margin-top: 92px; margin-bottom: -120px; }
  .board-mascot { width: 132px; right: 34px; bottom: calc(100% - 19px); }
  .board { padding: 18px; }
  .board-title strong { font-size: 1.35rem; }
  .board-stats div { padding: 9px 11px; }
  .board-stats dt { font-size: .72rem; white-space: nowrap; }
  .board-stats dd { font-size: 1.35rem; }
  .agent { grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 12px; padding: 12px 10px 8px; }
  .avatar { width: 44px; height: 44px; grid-row: 1 / span 2; align-self: start; }
  .avatar img { width: 32px; }
  .agent-task { grid-column: 2 / -1; grid-row: 2; font-size: .96rem; margin-top: 4px; }
  .state { grid-column: 3; grid-row: 1; min-width: 0; padding: 6px 11px; font-size: .78rem; }
  .decision { padding: 18px; }
  .decision-actions .btn { flex: 1; padding-inline: 14px; }
  .after-hero { padding-top: calc(120px + 80px); }
  .section { padding-block: 80px; }
  .title { margin-bottom: 28px; }
  .head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 28px; }
  .head p { text-align: left; }
  .tile { padding: 24px; min-height: 0; }
  .tile-agents { min-height: 480px; }
  .tile-agents img { width: 82%; right: -8%; }
  .tile-academy { min-height: 320px; }
  .tile-number, .tile-data { grid-column: span 12; }
  .tile-number .big { margin-bottom: 20px; }
  .roster { gap: 10px; }
  .roster li { padding: 18px; min-height: 190px; }
  .roster h3 { font-size: 1.08rem; }
  .roster p { font-size: .92rem; }
  .roster .roster-custom { min-height: 190px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .steps li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; padding: 18px; }
  .steps span { grid-row: 1 / span 2; }
  .steps h3 { margin-top: 5px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust-logos ul { gap: 22px 28px; }
  .audit-form { padding: 20px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .agent.is-working .bar::after { transform: scaleX(.6); }
  .js .after-type { opacity: 1; transform: none; }
  .type .ch { opacity: 1; }
}
