/* Devit IT Solution · sito pubblico
   Sistema grafico sopra Bootstrap 5.3 (solo griglia e utilità). Colori del logo: navy #0F2747, turchese #12B5C2, grigio #5B6B7F.
   Il turchese ha poco contrasto su bianco: sul chiaro i testi usano --teal-700; sui pulsanti il testo è navy. */

@import url("fonts.css");

:root {
  --navy-950: #050F1F;
  --navy-900: #071628;
  --navy-850: #0A1D35;
  --navy: #0F2747;
  --navy-700: #183A66;
  --teal: #12B5C2;
  --teal-300: #6FDCE5;
  --teal-700: #0A7480;
  --teal-rgb: 18, 181, 194;
  --grey: #5B6B7F;
  --grey-300: #A9B6C6;
  --grey-200: #C9D3E0;
  --paper: #F4F7FA;
  --paper-2: #E9EFF5;
  --white: #FFFFFF;
  --ink: #0B1B30;
  --line: rgba(15, 39, 71, 0.1);
  --line-strong: rgba(15, 39, 71, 0.18);
  --line-light: rgba(255, 255, 255, 0.12);
  --accent: var(--teal);

  --display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius-sm: 0.6rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --header-h: 5rem;
  --wrap: 1280px;
  --shadow: 0 24px 60px -30px rgba(7, 22, 40, 0.45);
  --shadow-lg: 0 50px 100px -40px rgba(5, 15, 31, 0.75);

  --bs-body-font-family: var(--sans);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.7;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--white);
  --bs-link-color: var(--teal-700);
  --bs-link-color-rgb: 10, 116, 128;
  --bs-link-hover-color: var(--navy);
  --bs-gutter-x: 2rem;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body { background: var(--white); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
body.menu-open { overflow: hidden; }
::selection { background: rgba(var(--teal-rgb), 0.3); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; color: inherit; }
h1 { font-weight: 700; font-size: clamp(2.5rem, 5.2vw, 4.4rem); line-height: 1.07; margin: 0; }
h2 { font-weight: 700; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.14; margin-bottom: 1rem; }
h3 { font-weight: 600; font-size: 1.3rem; line-height: 1.3; }
h1 em, h2 em { font-style: normal; color: var(--teal); }
.section:not(.why-section):not(.stack-section) h2 em { color: var(--teal-700); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); position: relative; }
.narrow { max-width: 860px; }
.d-contents { display: contents; }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 2000; background: var(--teal); color: var(--navy); padding: .6rem 1rem; border-radius: var(--radius-sm); font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 1rem; }

/* Etichette */
.kicker { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.1rem; }
.kicker::before { content: ">"; font-weight: 500; }
.kicker--dark { color: var(--teal-700); }
.kicker--pulse::after { content: ""; width: .5rem; height: .95rem; background: var(--teal); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.lead { font-size: clamp(1.08rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--grey-200); max-width: 46rem; margin: 1.25rem 0 0; }
.lead--dark { color: var(--grey); margin-top: 0; }

/* Pulsanti e link */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; padding: .95rem 1.6rem; border-radius: 999px; font-family: var(--display); font-weight: 600; font-size: .98rem; line-height: 1.2; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s, border-color .25s; }
.btn .bi { transition: transform .25s var(--ease); }
.btn:hover .bi { transform: translateX(3px); }
.btn--primary { background: var(--teal); color: var(--navy-900); box-shadow: 0 12px 30px -12px rgba(var(--teal-rgb), .7); }
.btn--primary:hover { background: var(--teal-300); color: var(--navy-900); transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(var(--teal-rgb), .85); }
.btn--ghost { background: rgba(255, 255, 255, .06); color: var(--white); border-color: var(--line-light); backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(255, 255, 255, .14); color: var(--white); transform: translateY(-2px); }
.btn--sm { padding: .62rem 1.15rem; font-size: .9rem; }
.btn--block { width: 100%; }
.btn[data-loading] { opacity: .7; pointer-events: none; }
.btn[data-loading] .bi { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--teal); text-decoration: none; }
.link-arrow .bi { transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--teal-300); }
a:hover > .link-arrow .bi, .link-arrow:hover .bi { transform: translateX(4px); }
.link-arrow--dark { color: var(--teal-700); }
.link-arrow--dark:hover { color: var(--navy); }

/* Header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 1000; height: var(--header-h); transition: background .3s, box-shadow .3s, height .3s; }
.site-header.is-scrolled { background: rgba(7, 22, 40, .82); backdrop-filter: blur(16px) saturate(1.3); box-shadow: 0 1px 0 var(--line-light); height: 4.25rem; }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: 100%; }
.brand { flex: none; display: block; line-height: 0; }
.brand img { width: auto; height: 3.1rem; }
.nav-main { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0 auto; padding: 0; }
.nav-main > li { position: relative; }
.nav-main > li > a, .nav-main > li > button { display: inline-flex; align-items: center; gap: .35rem; padding: .55rem .85rem; border: 0; background: none; border-radius: 999px; color: var(--grey-200); font-family: var(--display); font-weight: 500; font-size: .95rem; text-decoration: none; cursor: pointer; transition: color .2s, background .2s; }
.nav-main > li > a:hover, .nav-main > li > button:hover, .nav-main > li.open > button, .nav-main > li:hover > button { color: var(--white); background: rgba(255, 255, 255, .07); }
.nav-main > li.active > a, .nav-main > li.active > button { color: var(--teal); }
.nav-main .bi-chevron-down { font-size: .7rem; transition: transform .25s; }
.nav-main > li.open .bi-chevron-down, .nav-main > li:hover .bi-chevron-down { transform: rotate(180deg); }
.nav-panel { position: absolute; top: 100%; left: 50%; width: 22rem; padding: .6rem; margin-top: .45rem; background: rgba(10, 29, 53, .97); backdrop-filter: blur(18px); border: 1px solid var(--line-light); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s var(--ease), visibility .2s; }
.nav-panel::before { content: ""; position: absolute; inset: -.6rem 0 auto; height: .6rem; }
.nav-main > li:hover .nav-panel, .nav-main > li.open .nav-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-panel a { display: flex; align-items: center; gap: .8rem; padding: .55rem .65rem; border-radius: var(--radius-sm); color: var(--grey-200); text-decoration: none; font-size: .92rem; line-height: 1.3; transition: background .2s, color .2s; }
.nav-panel a:hover { background: rgba(var(--teal-rgb), .12); color: var(--white); }
.nav-panel__icon { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .55rem; background: rgba(var(--teal-rgb), .14); color: var(--teal); }
.nav-panel a.nav-panel__all { justify-content: flex-end; color: var(--teal); font-family: var(--display); font-weight: 600; font-size: .85rem; margin-top: .2rem; border-top: 1px solid var(--line-light); border-radius: 0; }
.nav-panel a.nav-panel__all:hover { background: none; }
.header-actions { display: flex; align-items: center; gap: .9rem; margin-left: auto; }
.nav-main + .header-actions { margin-left: 0; }
.lang-switch { display: inline-flex; padding: .2rem; border: 1px solid var(--line-light); border-radius: 999px; }
.lang-switch a { padding: .22rem .6rem; border-radius: 999px; font-family: var(--mono); font-size: .75rem; color: var(--grey-200); text-decoration: none; transition: background .2s, color .2s; }
.lang-switch a:hover { color: var(--white); }
.lang-switch a.active { background: var(--teal); color: var(--navy-900); font-weight: 500; }
.burger { display: none; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-light); background: rgba(255,255,255,.05); border-radius: 50%; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 30%; right: 30%; height: 2px; background: var(--white); border-radius: 2px; }
.burger span:first-child { top: 41%; }
.burger span:last-child { bottom: 41%; }

.mobile-menu { position: fixed; inset: 0; z-index: 1500; display: flex; flex-direction: column; gap: 1.5rem; padding: 1.1rem clamp(1.25rem, 4vw, 2.5rem) 2rem; background: var(--navy-900); overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(-12px); transition: opacity .25s, transform .3s var(--ease), visibility .25s; }
.mobile-menu.open { visibility: visible; opacity: 1; transform: none; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu__top img { height: 2.9rem; width: auto; }
.mobile-menu__close { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line-light); background: none; color: var(--white); }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu li a { display: flex; align-items: center; justify-content: space-between; padding: .95rem 0; border-bottom: 1px solid var(--line-light); color: var(--white); font-family: var(--display); font-weight: 600; font-size: 1.45rem; text-decoration: none; }
.mobile-menu li .bi { color: var(--teal); font-size: 1.1rem; }
.mobile-menu__footer { display: flex; flex-direction: column; align-items: flex-start; gap: 1.1rem; margin-top: auto; }
.mobile-menu__footer .btn { width: 100%; }

/* Sfondi dinamici */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.aurora span:nth-child(1) { width: 46vw; height: 46vw; top: -18vw; right: -8vw; background: rgba(var(--teal-rgb), .28); animation: drift 22s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { width: 38vw; height: 38vw; bottom: -20vw; left: -10vw; background: rgba(36, 92, 168, .4); animation: drift 28s ease-in-out infinite alternate-reverse; }
.aurora--soft span:nth-child(1) { background: rgba(var(--teal-rgb), .14); }
.aurora--accent span:nth-child(1) { background: color-mix(in srgb, var(--accent) 45%, transparent); }
@keyframes drift { to { transform: translate3d(-6vw, 5vw, 0) scale(1.12); } }
.grid-lines { position: absolute; inset: 0; pointer-events: none; opacity: .5; background-image: linear-gradient(var(--line-light) 1px, transparent 1px), linear-gradient(90deg, var(--line-light) 1px, transparent 1px); background-size: 64px 64px; -webkit-mask-image: radial-gradient(ellipse 80% 90% at 70% 10%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 80% 90% at 70% 10%, #000 10%, transparent 75%); }

/* Apertura */
.hero { position: relative; background: radial-gradient(120% 90% at 80% 0%, var(--navy-700) 0%, var(--navy) 32%, var(--navy-900) 72%, var(--navy-950) 100%); color: var(--white); overflow: hidden; padding-top: calc(var(--header-h) + clamp(2rem, 6vh, 4.5rem)); isolation: isolate; }
.hero__network { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .75; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; padding-bottom: clamp(3rem, 7vh, 5.5rem); }
.hero h1 { font-size: clamp(2.2rem, 4.1vw, 3.55rem); line-height: 1.12; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero h1 .line > span { display: block; animation: rise .95s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .14s; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.hero__sub { font-family: var(--display); font-weight: 500; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--white); margin: 1.5rem 0 .7rem; max-width: 38rem; animation: fade .9s .3s var(--ease) both; }
.hero__text { color: var(--grey-200); max-width: 38rem; margin: 0; animation: fade .9s .4s var(--ease) both; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; animation: fade .9s .5s var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.console { background: rgba(5, 15, 31, .72); border: 1px solid var(--line-light); border-radius: var(--radius); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--teal-rgb), .1), 0 0 80px -30px rgba(var(--teal-rgb), .6); backdrop-filter: blur(14px); overflow: hidden; animation: fade 1s .35s var(--ease) both; font-family: var(--mono); }
.console__bar { display: flex; align-items: center; gap: .4rem; padding: .7rem .95rem; border-bottom: 1px solid var(--line-light); }
.console__bar span { width: .62rem; height: .62rem; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.console__bar span:first-child { background: var(--teal); }
.console__bar em { margin-left: .6rem; font-style: normal; font-size: .72rem; color: var(--grey-300); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__body { padding: 1.1rem 1.2rem 1.3rem; min-height: 17.5rem; font-size: .84rem; line-height: 1.5; }
.console__body p { margin: 0 0 .3rem; color: var(--white); overflow-wrap: anywhere; }
.console__body b { color: var(--teal); font-weight: 500; }
.console__body p[data-line="out"] { color: var(--grey-300); margin-bottom: .8rem; }
.console__body p[data-line="ok"] { color: var(--teal-300); }
.console__body i { display: inline-block; width: .5em; height: 1em; vertical-align: text-bottom; background: var(--teal); animation: blink 1.1s steps(2) infinite; }
.console.is-typing p { visibility: hidden; }
.console.is-typing p.is-shown { visibility: visible; }

.marquee { position: relative; border-top: 1px solid var(--line-light); padding-block: 1.05rem; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; width: max-content; animation: scroll 60s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: .6rem; margin-inline: .4rem; padding: .45rem .95rem; border-radius: 999px; background: var(--white); color: var(--navy); font-family: var(--display); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.marquee__item img { height: 1.3rem; width: auto; max-width: 5.5rem; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Numeri */
.stats { background: var(--navy-900); color: var(--white); border-top: 1px solid var(--line-light); }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(1.6rem, 3vw, 2.4rem) clamp(1rem, 2vw, 1.75rem); border-left: 1px solid var(--line-light); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat strong { display: block; font-family: var(--display); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.3rem); line-height: 1; color: var(--teal); margin-bottom: .55rem; }
.stat > span { font-size: .94rem; color: var(--grey-200); line-height: 1.4; display: block; }

/* Sezioni */
.section { position: relative; padding-block: clamp(4rem, 8vw, 7rem); }
.section--tint { background: var(--paper); }
.section--contact { background: var(--paper); }
.section-head { max-width: 50rem; margin-bottom: clamp(2.2rem, 4vw, 3.5rem); }
.section-head--row { max-width: none; display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem clamp(2rem, 5vw, 5rem); align-items: end; }
.section-head h2 { margin-bottom: 0; }

/* I due mondi */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.world { position: relative; display: flex; flex-direction: column; padding: clamp(1.8rem, 3.2vw, 3rem); border-radius: var(--radius-xl); text-decoration: none; overflow: hidden; transition: transform .4s var(--ease), box-shadow .4s var(--ease); min-height: 32rem; }
.world:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.world::after { content: ""; position: absolute; width: 22rem; height: 22rem; right: -7rem; top: -7rem; border-radius: 50%; background: radial-gradient(circle, rgba(var(--teal-rgb), .35), transparent 68%); transition: transform .6s var(--ease); pointer-events: none; }
.world:hover::after { transform: scale(1.35); }
.world--dark { background: linear-gradient(155deg, var(--navy-700), var(--navy-900) 70%); color: var(--white); }
.world--light { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.world__icon { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 1rem; font-size: 1.5rem; margin-bottom: 1.5rem; background: rgba(var(--teal-rgb), .16); color: var(--teal); }
.world--light .world__icon { color: var(--teal-700); }
.world h3 { font-size: clamp(1.45rem, 2.2vw, 1.95rem); font-weight: 700; margin-bottom: .8rem; }
.world p { margin-bottom: 1.5rem; color: var(--grey-200); }
.world--light p { color: var(--grey); }
.world ul { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: .55rem; }
.world li { display: flex; align-items: center; gap: .7rem; font-size: .96rem; font-weight: 500; }
.world li .bi { color: var(--teal); }
.world--light li .bi, .world--light .link-arrow { color: var(--teal-700); }
.world .link-arrow { margin-top: auto; }
.world--photo { padding-top: 11rem; }
.world--photo > :not(.world__photo) { position: relative; }
.world__photo { position: absolute; inset: 0 0 auto; width: 100%; height: 17rem; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); transition: transform .7s var(--ease); }
.world:hover .world__photo { transform: scale(1.05); }

/* Lo stack */
.stack-section { background: var(--navy-900); color: var(--white); overflow: hidden; }
.stack-section__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.stack-visual { display: grid; place-items: center; min-height: 34rem; perspective: 1400px; }
.stack3d { position: relative; width: min(21rem, 72vw); aspect-ratio: 1; transform-style: preserve-3d; transform: rotateX(58deg) rotateZ(-42deg); margin-top: 4rem; }
.stack3d__layer { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.1rem; border-radius: 1.3rem; transform: translateZ(calc(var(--i) * 4.6rem)); background: linear-gradient(135deg, rgba(24, 58, 102, .92), rgba(10, 29, 53, .92)); border: 1px solid rgba(var(--teal-rgb), .28); box-shadow: 0 0 40px -14px rgba(var(--teal-rgb), .3); transition: transform .55s var(--ease), background .4s, box-shadow .4s, border-color .4s; }
.stack3d__layer span { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--mono); font-size: .82rem; color: var(--grey-200); }
.stack3d__layer.is-active { transform: translateZ(calc(var(--i) * 4.6rem + 1.6rem)); background: linear-gradient(135deg, rgba(var(--teal-rgb), .95), rgba(10, 116, 128, .92)); border-color: var(--teal-300); box-shadow: 0 0 80px -6px rgba(var(--teal-rgb), .85); }
.stack3d__layer.is-active span { color: var(--navy-950); font-weight: 500; }
.stack-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.stack-steps a { display: flex; gap: 1rem; padding: 1rem 1.1rem; border-radius: var(--radius); border: 1px solid transparent; color: var(--grey-200); text-decoration: none; transition: background .3s, border-color .3s, color .3s; }
.stack-steps__icon { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .7rem; background: rgba(255, 255, 255, .06); color: var(--grey-200); transition: background .3s, color .3s; }
.stack-steps strong { display: block; font-family: var(--display); font-weight: 600; color: var(--white); margin-bottom: .15rem; }
.stack-steps a > span:last-child > span { font-size: .94rem; line-height: 1.5; display: block; }
.stack-steps li.is-active a, .stack-steps a:hover { background: rgba(var(--teal-rgb), .08); border-color: rgba(var(--teal-rgb), .3); }
.stack-steps li.is-active .stack-steps__icon { background: var(--teal); color: var(--navy-900); }

/* Progetti */
.projects-section { background: var(--paper); }
.cases { display: grid; gap: 1.6rem; }
.case { --tint: color-mix(in srgb, var(--accent) 34%, var(--navy-900)); position: sticky; top: calc(var(--header-h) + .5rem); display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.6rem, 3.5vw, 3.25rem); border-radius: var(--radius-xl); color: var(--white); background: linear-gradient(135deg, var(--tint), var(--navy-900) 75%); box-shadow: var(--shadow-lg); overflow: hidden; min-height: 28rem; }
.cases--flat .case { position: relative; top: auto; }
.case[hidden] { display: none; }
.case__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-family: var(--mono); font-size: .78rem; color: var(--grey-200); margin-bottom: 1rem; }
.case h3 { font-size: clamp(1.75rem, 3vw, 2.6rem); font-weight: 700; margin-bottom: .4rem; }
.case h3 a { color: inherit; text-decoration: none; }
.case__type { font-family: var(--display); font-weight: 500; color: color-mix(in srgb, var(--accent) 45%, white); margin-bottom: .9rem; }
.case__text > p:not(.case__type) { color: var(--grey-200); margin-bottom: 1.2rem; }
.case .link-arrow { color: var(--white); }
.case__visual { display: block; text-decoration: none; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0 0 1.4rem; }
.tags li { font-family: var(--mono); font-size: .72rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(255, 255, 255, .09); color: var(--grey-200); }
.tags--dark li { background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); }

.case__meta span.label-pwa, .label-pwa { display: inline-flex; align-items: center; gap: .3rem; padding: .08rem .55rem; border-radius: 999px; background: var(--teal); color: var(--navy-900); font-family: var(--mono); font-size: .72rem; font-weight: 500; }
.label-beta { display: inline-block; vertical-align: middle; margin-left: .7rem; padding: .16rem .6rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .55); color: var(--white); font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .02em; line-height: 1.4; }
.project-hero__pwa { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .9rem 0 0; font-size: .95rem; color: var(--grey-200); }

.pwa-band { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem); padding: clamp(1.8rem, 4vw, 3.25rem); border-radius: var(--radius-xl); background: var(--white); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.pwa-band .kicker { color: var(--teal-700); }
.pwa-band h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); color: var(--navy); }
.pwa-band__text > p { color: var(--grey); }
.pwa-band__projects { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.2rem; }
.pwa-band__projects > span { font-family: var(--mono); font-size: .78rem; color: var(--grey); margin-right: .2rem; }
.pwa-band__projects a { padding: .3rem .85rem; border-radius: 999px; color: var(--white); background: color-mix(in srgb, var(--accent) 80%, var(--navy-900)); font-family: var(--display); font-weight: 600; font-size: .88rem; text-decoration: none; transition: transform .25s var(--ease); }
.pwa-band__projects a:hover { color: var(--white); transform: translateY(-2px); }
.pwa-band__points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.pwa-band__points li { display: flex; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--paper); }
.pwa-band__points .bi { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: .7rem; background: var(--navy); color: var(--teal); font-size: 1.1rem; }
.pwa-band__points strong { display: block; font-family: var(--display); font-weight: 600; color: var(--navy); }
.pwa-band__points span { font-size: .93rem; line-height: 1.45; color: var(--grey); }
@media (max-width: 991.98px) { .pwa-band { grid-template-columns: minmax(0, 1fr); } }

.devices { position: relative; }
.devices--phone { padding-right: 12%; padding-bottom: 6%; }
.browser { border-radius: .85rem; overflow: hidden; background: var(--navy-950); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .1); transition: transform .5s var(--ease); }
.case:hover .browser { transform: translateY(-5px); }
.browser__bar { display: flex; align-items: center; gap: .32rem; height: 1.9rem; padding-inline: .7rem; background: #0C1F38; }
.browser__bar span { width: .48rem; height: .48rem; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.browser__bar em { margin: 0 auto; font-style: normal; font-family: var(--mono); font-size: .68rem; color: var(--grey-300); padding-right: 1.5rem; }
.browser__screen { aspect-ratio: 16 / 10; overflow: hidden; background: var(--white); }
.browser__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.browser__screen--auto { aspect-ratio: auto; }
.browser__screen--auto img { height: auto; }
.browser--wide { box-shadow: var(--shadow); }
.phone { position: absolute; right: 0; bottom: 0; width: 25%; padding: .35rem; border-radius: 1.3rem; background: var(--navy-950); box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .14); transition: transform .5s var(--ease); }
.case:hover .phone { transform: translateY(-12px); }
.phone__screen { border-radius: 1rem; overflow: hidden; aspect-ratio: 9 / 19; background: var(--white); }
.phone__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.2rem; }
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.05rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--white); color: var(--navy); font-family: var(--display); font-weight: 500; font-size: .92rem; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.chip span { font-family: var(--mono); font-size: .75rem; color: var(--grey); }
.chip:hover { border-color: var(--teal-700); color: var(--teal-700); }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip.active span { color: var(--teal); }

/* Chi sono e metodo */
.about-band__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.method-title { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 700; margin-bottom: 1.5rem; color: var(--navy); }
.method { list-style: none; margin: 0; padding: 0; position: relative; }
.method::before { content: ""; position: absolute; left: 1.45rem; top: 1rem; bottom: 1rem; width: 2px; background: linear-gradient(var(--teal), rgba(var(--teal-rgb), .1)); }
.method__step { position: relative; padding: 0 0 1.8rem 4.2rem; }
.method__step:last-child { padding-bottom: 0; }
.method__n { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--navy); color: var(--teal); font-family: var(--mono); font-size: .85rem; font-weight: 500; box-shadow: 0 0 0 5px var(--white); }
.method__step h3 { font-size: 1.15rem; margin-bottom: .3rem; padding-top: .55rem; color: var(--navy); }
.method__step p { margin: 0; color: var(--grey); font-size: .98rem; }

/* Perché */
.why-section { background: var(--navy-900); color: var(--white); overflow: hidden; isolation: isolate; }
.why-section .aurora { z-index: -1; }
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.reason { --x: 50%; --y: 0%; position: relative; padding: clamp(1.6rem, 2.6vw, 2.3rem); border-radius: var(--radius-lg); background: radial-gradient(420px circle at var(--x) var(--y), rgba(var(--teal-rgb), .16), transparent 60%), rgba(255, 255, 255, .035); border: 1px solid var(--line-light); transition: border-color .3s, transform .4s var(--ease); }
.reason:hover { border-color: rgba(var(--teal-rgb), .5); transform: translateY(-4px); }
.reason__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .85rem; background: rgba(var(--teal-rgb), .14); color: var(--teal); font-size: 1.3rem; margin-bottom: 1.25rem; }
.reason h3 { margin-bottom: .6rem; }
.reason p { margin: 0; color: var(--grey-200); font-size: .98rem; }

/* Testo */
.prose { color: var(--ink); }
.prose p { margin-bottom: 1.1rem; }
.prose--lead { font-size: 1.1rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.2rem; color: var(--navy); }
.prose h3 { margin-top: 1.6rem; color: var(--navy); }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose a { color: var(--teal-700); }
.check-list { list-style: none; padding: 0 !important; display: grid; gap: .55rem; }
.check-list li { display: flex; gap: .65rem; }
.check-list .bi { color: var(--teal-700); margin-top: .1rem; flex: none; }

/* Pagine interne */
.page-hero, .project-hero, .error-page { position: relative; background: radial-gradient(110% 110% at 85% 0%, var(--navy-700) 0%, var(--navy) 40%, var(--navy-900) 80%); color: var(--white); overflow: hidden; isolation: isolate; }
.page-hero .aurora, .project-hero .aurora, .error-page .aurora, .page-hero .grid-lines, .error-page .grid-lines { z-index: -1; }
.page-hero { padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(3rem, 6vw, 5rem); }
.page-hero h1 { font-size: clamp(2.2rem, 4.4vw, 3.7rem); max-width: 56rem; }
.page-hero--photo { background: var(--navy-950); }
.page-hero--photo::before { content: ""; position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(5, 15, 31, .95) 0%, rgba(5, 15, 31, .82) 45%, rgba(5, 15, 31, .12) 88%); }
.page-hero__photo { position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 767.98px) { .page-hero--photo::before { background: rgba(5, 15, 31, .84); } }

/* Loghi delle tecnologie: sempre su fondo bianco e nei colori originali. */
.tech-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .9rem; }
.tech-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; min-height: 9.5rem; padding: 1.4rem 1rem; text-align: center; border-radius: var(--radius); background: var(--white); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.tech-tile:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow); }
.tech-tile img { height: 3rem; width: auto; max-width: 9rem; object-fit: contain; }
.tech-tile span { font-family: var(--display); font-weight: 600; font-size: .92rem; line-height: 1.3; color: var(--navy); }
@media (max-width: 575.98px) {
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .tech-tile { min-height: 7.5rem; padding: 1rem .6rem; gap: .65rem; }
  .tech-tile img { height: 2.2rem; max-width: 100%; }
  .tech-tile span { font-size: .8rem; }
}
.footer-note { margin: 2rem 0 0; font-size: .78rem; line-height: 1.5; color: var(--grey-300); }

/* Fascia fotografica */
.photo-band { position: relative; display: flex; align-items: flex-end; margin: clamp(2rem, 4vw, 3.5rem) 0 0; min-height: clamp(18rem, 36vw, 30rem); border-radius: var(--radius-xl); overflow: hidden; color: var(--white); isolation: isolate; }
.photo-band img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(5, 15, 31, .9), rgba(5, 15, 31, .08) 65%); }
.photo-band figcaption { max-width: 44rem; padding: clamp(1.4rem, 3.5vw, 2.75rem); font-family: var(--display); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 2rem); line-height: 1.25; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .35rem .6rem; list-style: none; padding: 0; margin: 0 0 1.6rem; font-family: var(--mono); font-size: .76rem; color: var(--grey-300); }
.breadcrumbs li + li::before { content: "/"; margin-right: .6rem; color: var(--teal); }
.breadcrumbs a { color: var(--grey-200); text-decoration: none; }
.breadcrumbs a:hover { color: var(--white); }

.service-nav { position: sticky; top: 4.25rem; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.service-nav .wrap { display: flex; gap: .4rem; overflow-x: auto; padding-block: .6rem; scrollbar-width: none; }
.service-nav a { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px; font-family: var(--display); font-weight: 500; font-size: .87rem; color: var(--navy); text-decoration: none; transition: background .2s; }
.service-nav a:hover { background: var(--paper-2); }
.service-nav .bi { color: var(--teal-700); }
@media (min-width: 1200px) { .service-nav .wrap { flex-wrap: wrap; justify-content: center; } }

.services { display: grid; gap: 1.2rem; }
.service { display: grid; grid-template-columns: 7rem minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--radius-lg); background: var(--paper); transition: background .3s, box-shadow .3s; scroll-margin-top: 8rem; }
.service:hover, .service:target { background: var(--white); box-shadow: inset 0 0 0 1px rgba(var(--teal-rgb), .55), var(--shadow); }
.service__n { display: block; font-family: var(--mono); font-size: .82rem; color: var(--teal-700); margin-bottom: .7rem; }
.service__icon { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: .95rem; background: var(--navy); color: var(--teal); font-size: 1.4rem; }
.service h2 { font-size: clamp(1.3rem, 2vw, 1.65rem); color: var(--navy); margin-bottom: .6rem; }
.service__summary { color: var(--grey); margin: 0; }
.service__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; align-content: start; }
.service__list li { display: flex; gap: .55rem; font-size: .96rem; line-height: 1.5; }
.service__list .bi { color: var(--teal-700); font-size: .8rem; margin-top: .3rem; flex: none; }

.project-hero { padding: calc(var(--header-h) + clamp(2.5rem, 5vw, 4rem)) 0 clamp(3rem, 6vw, 5rem); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 40%, var(--navy-900)), var(--navy-900) 72%); }
.project-hero__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.project-hero h1 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); }
.project-hero .kicker { color: color-mix(in srgb, var(--accent) 45%, white); }
.project-hero__type { font-family: var(--display); font-weight: 500; font-size: 1.1rem; color: color-mix(in srgb, var(--accent) 45%, white); margin: .6rem 0 0; }
.project-hero .lead { margin-bottom: 1.8rem; }
.project-hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.project-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.project-side { position: sticky; top: 6rem; display: grid; gap: 1.5rem; padding: 1.8rem; border-radius: var(--radius-lg); background: var(--paper); }
.project-side > div > span { display: block; font-family: var(--mono); font-size: .74rem; letter-spacing: .05em; text-transform: uppercase; color: var(--grey); margin-bottom: .4rem; }
.project-side strong { font-family: var(--display); font-weight: 600; color: var(--navy); }
.project-side .tags { margin: 0; }
.next-project { display: block; padding-block: clamp(2.5rem, 5vw, 4rem); background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 35%, var(--navy-900)), var(--navy-900) 70%); color: var(--white); text-decoration: none; }
.next-project span { display: block; font-family: var(--mono); font-size: .8rem; color: var(--grey-200); margin-bottom: .4rem; }
.next-project strong { font-family: var(--display); font-weight: 700; font-size: clamp(1.7rem, 3.5vw, 3rem); letter-spacing: -.02em; }
.next-project .bi { transition: transform .3s var(--ease); display: inline-block; }
.next-project:hover .bi { transform: translateX(8px); }

/* Contatti */
.contact-details { background: var(--navy-900); padding-block: 0 clamp(2rem, 4vw, 3rem); }
.contact-details__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.detail { display: block; padding: 1.3rem 1.4rem; border-radius: var(--radius); border: 1px solid var(--line-light); background: rgba(255, 255, 255, .04); color: var(--white); text-decoration: none; transition: border-color .25s; }
.detail:hover { color: var(--white); border-color: rgba(var(--teal-rgb), .6); }
.detail .bi { display: block; font-size: 1.3rem; color: var(--teal); margin-bottom: .6rem; }
.detail span { display: block; font-family: var(--mono); font-size: .74rem; color: var(--grey-300); }
.detail strong { font-family: var(--display); font-weight: 600; font-size: .98rem; overflow-wrap: anywhere; }

.contact-panel { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow); background: var(--white); scroll-margin-top: 6rem; }
.contact-panel__intro { position: relative; padding: clamp(2rem, 4vw, 3.5rem); color: var(--white); background: radial-gradient(120% 90% at 100% 0%, var(--navy-700), var(--navy) 45%, var(--navy-900)); }
.contact-panel__intro h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.contact-panel__intro p { color: var(--grey-200); }
.contact-panel__links { display: grid; gap: .6rem; margin-top: 1.5rem; }
.contact-panel__links a { display: inline-flex; align-items: center; gap: .65rem; color: var(--white); text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.contact-panel__links .bi { color: var(--teal); }
.contact-form { padding: clamp(1.6rem, 3.5vw, 3rem); }
.type-choice { border: 0; padding: 0; margin: 0 0 1.3rem; }
.type-choice legend { font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: .55rem; float: none; }
.type-choice__grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.type-card { position: relative; display: block; cursor: pointer; margin: 0; }
.type-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.type-card__body { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.05rem; border-radius: var(--radius); border: 1.5px solid var(--line-strong); color: var(--navy); line-height: 1.25; transition: border-color .2s, background .2s; }
.type-card__body .bi { font-size: 1.25rem; color: var(--teal-700); }
.type-card__body strong { font-family: var(--display); font-weight: 600; font-size: .95rem; }
.type-card:hover .type-card__body { border-color: var(--teal-700); }
.type-card input:checked + .type-card__body { border-color: var(--teal); background: rgba(var(--teal-rgb), .1); box-shadow: inset 0 0 0 1px var(--teal); }
.type-card input:focus-visible + .type-card__body { outline: 2px solid var(--teal); outline-offset: 2px; }
.field { position: relative; }
.field label { display: block; font-size: .9rem; font-weight: 600; color: var(--navy); margin-bottom: .35rem; }
.field input, .field textarea { display: block; width: 100%; padding: .78rem .95rem; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid transparent; border-radius: var(--radius-sm); transition: border-color .2s, background .2s; }
.field input:focus, .field textarea:focus { outline: 0; background: var(--white); border-color: var(--teal); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #C6324A; }
.field textarea { resize: vertical; min-height: 8rem; }
.counter { position: absolute; right: .8rem; bottom: .55rem; font-family: var(--mono); font-size: .7rem; color: var(--grey); }
.field-error { display: block; color: #B3243A; font-size: .86rem; font-weight: 500; margin-top: .3rem; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.consent { display: flex; gap: .65rem; margin: 1.2rem 0; font-size: .9rem; line-height: 1.5; color: var(--grey); cursor: pointer; }
.consent input { flex: none; width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--teal-700); }
.sent-card { max-width: 40rem; margin-inline: auto; text-align: center; padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); border-radius: var(--radius-xl); color: var(--white); background: radial-gradient(120% 90% at 100% 0%, var(--navy-700), var(--navy) 45%, var(--navy-900)); box-shadow: var(--shadow); }
.sent-card__icon { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--teal); color: var(--navy-900); font-size: 1.9rem; margin-bottom: 1.2rem; }
.sent-card p { color: var(--grey-200); }

/* News */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1.4rem; }
.post-card { display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; transition: transform .35s var(--ease), box-shadow .35s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.post-card__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__placeholder { height: 100%; display: grid; place-items: center; }
.post-card__placeholder img { width: 4rem; height: 4rem; object-fit: contain; }
.post-card__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card .link-arrow { margin-top: auto; color: var(--teal-700); }
.post-meta { display: flex; flex-wrap: wrap; gap: .8rem; font-family: var(--mono); font-size: .75rem; color: var(--grey); margin-bottom: .7rem; }
.post-meta span { color: var(--teal-700); }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 2rem; }
.pager { display: flex; justify-content: center; gap: .4rem; margin-top: 2.5rem; }
.pager a, .pager span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; color: var(--navy); text-decoration: none; font-family: var(--mono); font-size: .85rem; box-shadow: inset 0 0 0 1px var(--line-strong); }
.pager .current { background: var(--navy); color: var(--white); }

/* Pagine legali */
.legal-layout { display: grid; grid-template-columns: 15rem minmax(0, 46rem); gap: clamp(2rem, 5vw, 4.5rem); }
.toc { position: sticky; top: 6rem; align-self: start; font-size: .9rem; }
.toc p { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; color: var(--grey); margin-bottom: .6rem; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.toc a { color: var(--navy); text-decoration: none; line-height: 1.35; display: block; }
.toc a:hover { color: var(--teal-700); }

/* Errore */
.error-page { min-height: 78vh; display: flex; align-items: center; padding: calc(var(--header-h) + 3rem) 0 4rem; }
.error-page__code { display: block; font-family: var(--mono); color: var(--teal); font-size: 1.1rem; margin-bottom: 1rem; }

/* Piè di pagina */
.site-footer { background: var(--navy-950); color: var(--grey-200); padding-top: clamp(3.5rem, 7vw, 5.5rem); font-size: .95rem; }
.footer-claim { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding-bottom: clamp(2.5rem, 5vw, 4rem); border-bottom: 1px solid var(--line-light); }
.footer-claim p { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1.1; letter-spacing: -.02em; color: var(--white); }
.footer-claim em { font-style: normal; color: var(--teal); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr .7fr; gap: 2.2rem; padding-block: clamp(2.5rem, 5vw, 3.75rem); }
.footer-brand img { height: 3.6rem; width: auto; margin-bottom: 1rem; }
.footer-contact { display: grid; gap: .5rem; }
.footer-contact > * { display: flex; gap: .6rem; color: var(--grey-200); text-decoration: none; overflow-wrap: anywhere; }
.footer-contact .bi { color: var(--teal); }
.site-footer h4 { font-family: var(--display); font-size: .98rem; font-weight: 600; color: var(--white); margin-bottom: .9rem; letter-spacing: 0; }
.site-footer h4 a { color: inherit; text-decoration: none; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer ul a { color: var(--grey-200); text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--teal); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; padding-block: 1.4rem; border-top: 1px solid var(--line-light); font-size: .85rem; color: var(--grey-300); }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-bottom ul a { color: var(--grey-300); }

.to-top { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 900; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: var(--teal); color: var(--navy-900); box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .25s, transform .25s, visibility .25s; }
.to-top.show { opacity: 1; visibility: visible; transform: none; }

/* Comparsa all'ingresso */
html:not(.no-js) .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease) var(--delay, 0s), transform .8s var(--ease) var(--delay, 0s); }
html:not(.no-js) .reveal.is-visible { opacity: 1; transform: none; }

/* Adattamento */
@media (max-width: 1199.98px) {
  .nav-main, .header-actions .lang-switch, .header-cta { display: none; }
  .header-actions { margin-left: auto !important; }
  .burger { display: block; }
  .brand img { height: 2.8rem; }
}
@media (max-width: 991.98px) {
  .hero__grid, .worlds, .stack-section__grid, .case, .project-hero__grid, .project-body, .about-band__grid, .contact-panel, .section-head--row { grid-template-columns: minmax(0, 1fr); }
  .reasons { grid-template-columns: minmax(0, 1fr); }
  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line-light); }
  .world { min-height: 0; }
  .stack-visual { display: none; }
  .case { position: relative; top: auto; min-height: 0; }
  .service { grid-template-columns: minmax(0, 1fr); }
  .service__head { display: flex; align-items: center; justify-content: space-between; flex-direction: row-reverse; }
  .service__n { margin: 0; }
  .project-side { position: static; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .console__body { min-height: 0; }
}
@media (max-width: 575.98px) {
  .stat strong { font-size: 2.1rem; }
  .type-choice__grid { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero__actions .btn { width: 100%; }
  .console { font-size: .9em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .marquee__track { animation: none; }
  html:not(.no-js) .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .mobile-menu, .site-footer, .to-top, .contact-panel { display: none; }
}
