/* Inflow Studio v2: un unico viaggio dentro una scena 3D.
   .fx = animazioni attive (GSAP presente e movimento non ridotto). Senza .fx tutto resta leggibile in colonna. */

:root {
  --ink: #0D1016;
  --panel: rgba(17, 22, 33, .78);
  --panel-solid: #121722;
  --blue: #4D7CFF;
  --blue-deep: #2D57D8;
  --mist: #EEF0F3;
  --white: #FFFFFF;
  --muted: rgba(238, 240, 243, .66);
  --faint: rgba(238, 240, 243, .32);
  --line: rgba(238, 240, 243, .14);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --dim: 1;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; overflow-x: clip; }
body { min-height: 100vh; overflow-x: clip; background: var(--ink); color: var(--mist); font: 400 1rem/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue); color: var(--ink); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--mist); color: var(--ink); transform: translateY(-160%); }
.skip:focus { transform: none; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Scena ---------- */
.stage { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.stage__gl { width: 100%; height: 100%; opacity: var(--dim); transition: opacity .2s linear; }
.stage__still { position: absolute; inset: 0; width: 100%; height: 100%; display: none; opacity: calc(.55 * var(--dim)); }
@media (max-width: 760px) { .stage__still { inset: 14% 0 auto; height: 42%; } }
.stage__still path { fill: none; stroke: var(--blue); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0 19; }
.stage__veil { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, transparent 45%, rgba(13, 16, 22, .75) 100%); }
.no-gl .stage__gl { display: none; }
.no-gl .stage__still { display: block; }
.no-gl .stage { background: radial-gradient(60% 50% at 70% 30%, rgba(77, 124, 255, .16), transparent 70%); }
main, .footer { position: relative; z-index: 1; }

/* ---------- Comuni ---------- */
.h-chapter { font-size: clamp(2.6rem, 7vw, 6.5rem); font-weight: 400; line-height: .95; letter-spacing: -.05em; text-wrap: balance; }
.lead { max-width: 36em; color: var(--muted); font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.5; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 1px solid transparent; border-radius: 999px; font-weight: 500; transition: background-color .3s, border-color .3s, color .3s, transform .5s var(--ease); }
.btn--blue { background: var(--blue); color: var(--ink); }
.btn--blue:hover { background: #6A92FF; }
.btn--ghost { border-color: var(--line); color: var(--mist); background: rgba(13, 16, 22, .35); }
.btn--ghost:hover { border-color: var(--mist); }
.btn--ink { background: var(--ink); color: var(--white); }
.btn--wide { width: 100%; }
.btn:active { transform: scale(.97); }
.link-line { position: relative; display: inline-block; padding-block: 4px; font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .5s var(--ease); }
.link-line:hover { background-size: 0 1px; background-position: 100% 100%; }
.dot-live { position: relative; display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(77, 124, 255, .6); animation: live 2.4s infinite; }
@keyframes live { 70% { box-shadow: 0 0 0 9px rgba(77, 124, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(77, 124, 255, 0); } }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .8125rem; }

/* ---------- Header, menu, indice ---------- */
.progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 2px; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--blue); transform: scaleX(0); transform-origin: 0 50%; }
.header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 24px; padding: 14px var(--gutter); transition: transform .6s var(--ease), background-color .4s; }
.header.is-scrolled { background: rgba(13, 16, 22, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.header.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; }
.header__nav { display: flex; gap: 28px; margin-left: auto; font-size: .9375rem; }
.header__nav a { color: var(--muted); transition: color .3s; }
.header__nav a:hover, .header__nav a[aria-current] { color: var(--mist); }
.header__cta { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: rgba(13, 16, 22, .4); font-size: .9375rem; font-weight: 500; transition: border-color .3s; }
.header__cta:hover { border-color: var(--blue); }
.menu-toggle { display: none; align-items: center; gap: 12px; min-height: 44px; margin-left: auto; padding: 0 4px 0 14px; border: 0; background: none; font-weight: 500; }
.menu-toggle__lines { position: relative; width: 22px; height: 10px; }
.menu-toggle__lines i { position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.menu-toggle__lines i:first-child { top: 0; }
.menu-toggle__lines i:last-child { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines i:first-child { top: 4px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines i:last-child { top: 4px; transform: rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; justify-content: space-between; padding: 100px var(--gutter) 32px; background: var(--ink); opacity: 0; transition: opacity .5s var(--ease); }
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu nav { display: grid; gap: 4px; }
.menu nav a { font-size: clamp(2rem, 9vw, 3rem); font-weight: 400; letter-spacing: -.04em; line-height: 1.2; }
.menu__foot { display: grid; gap: 6px; color: var(--muted); }
.rail { position: fixed; top: 50%; right: 22px; z-index: 40; display: none; flex-direction: column; align-items: flex-end; gap: 6px; transform: translateY(-50%); }
.rail a { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-height: 24px; padding-left: 12px; }
.rail a::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); transition: background-color .3s, transform .4s var(--ease); }
.rail a span { font: 500 .75rem/1 var(--mono); color: var(--mist); opacity: 0; transform: translateX(6px); transition: opacity .3s, transform .4s var(--ease); }
.rail a:hover span, .rail a:focus-visible span { opacity: 1; transform: none; }
.rail a span { padding: 4px 8px; border-radius: 6px; background: rgba(13, 16, 22, .85); }
.rail a.is-active::after { background: var(--blue); transform: scale(1.6); }
@media (min-width: 1100px) { .rail { display: flex; } }
@media (max-width: 1100px) { .header__nav { display: none; } .menu-toggle { display: inline-flex; } .header__cta { margin-left: auto; } .menu-toggle { margin-left: 0; } }
@media (max-width: 560px) { .header__cta { display: none; } .menu-toggle { margin-left: auto; } }

/* ---------- 00 Hero ---------- */
.chapter { position: relative; }
.hero { display: grid; align-content: end; gap: clamp(24px, 3vw, 40px); min-height: 100svh; padding: 120px var(--gutter) clamp(28px, 5vh, 56px); }
.hero__where { position: absolute; top: 96px; left: var(--gutter); font: 500 .8125rem/1 var(--mono); color: var(--muted); }
.hero__title { font-size: clamp(3.3rem, 11.4vw, 12.5rem); font-weight: 500; line-height: .88; letter-spacing: -.062em; }
.hero__title .line { display: block; }
.hero__foot { display: grid; grid-template-columns: minmax(0, 34rem) auto; justify-content: space-between; align-items: end; gap: 24px 48px; }
.hero__lead { color: var(--muted); font-size: clamp(1rem, 1.2vw, 1.1875rem); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__scroll { position: absolute; right: var(--gutter); top: 96px; display: flex; align-items: center; gap: 12px; font: 500 .8125rem/1 var(--mono); color: var(--muted); }
.hero__scroll i { position: relative; width: 1px; height: 36px; overflow: hidden; background: var(--line); }
.hero__scroll i::after { content: ""; position: absolute; inset: 0; background: var(--blue); animation: drip 2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-100%); } to { transform: translateY(100%); } }
.motion [data-intro] { opacity: 0; animation: introSafe 0s 3.4s forwards; }
@keyframes introSafe { to { opacity: 1; } }
@media (max-width: 760px) {
  .hero__foot { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .hero__ctas .btn { flex: 1 1 auto; }
}

/* ---------- 01 Dal caos al flusso ---------- */
.flow { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.flow__stage { display: grid; gap: 48px; max-width: 1440px; margin-inline: auto; }
.flow__copy { display: grid; gap: 28px; }
.flow__say { max-width: 22em; font-size: clamp(1.5rem, 3.4vw, 3.1rem); font-weight: 400; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.task { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.task s { color: var(--faint); font-size: .875rem; }
.task b { font-weight: 500; }
.task span { color: var(--muted); font-size: .875rem; line-height: 1.45; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9375rem; }
.facts strong { display: block; color: var(--mist); font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 400; letter-spacing: -.03em; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

.fx .flow { padding: 0; }
.fx .flow__stage { position: relative; height: 100svh; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 20px 56px; padding: 104px var(--gutter) 32px; }
.fx .flow__copy { grid-area: 1 / 1; align-self: center; display: grid; }
.fx .flow__say { grid-area: 1 / 1; }
.fx .flow__say--b { visibility: hidden; }
.fx .tasks { grid-area: 1 / 2; align-self: center; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fx .task { position: relative; grid-template-areas: "t" "d"; align-content: start; gap: 0; padding: 12px 14px; will-change: transform; }
.fx .task s, .fx .task b { grid-area: t; }
.fx .task span { grid-area: d; height: 0; overflow: hidden; }
.fx .task b, .fx .task span { opacity: 0; }
.fx .task s { text-decoration: none; color: var(--mist); font-size: .9375rem; }
.fx .facts { grid-area: 2 / 1 / 3 / 3; opacity: 0; }
@media (max-width: 760px) {
  .fx .flow__stage { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; padding: 84px 16px 18px; }
  .fx .flow__copy { grid-area: 1 / 1; align-self: start; }
  .fx .flow__say { font-size: clamp(1.3rem, 5.6vw, 1.6rem); }
  .fx .tasks { grid-area: 2 / 1; align-self: center; }
  .fx .task { padding: 9px 11px; }
  .fx .task s, .fx .task b { font-size: .8125rem; line-height: 1.3; }
  .fx .task span { display: none; }
  .fx .facts { grid-area: 3 / 1; gap: 6px; padding-top: 12px; font-size: .8125rem; }
  .fx .facts strong { display: inline; font-size: .9375rem; }
}

/* ---------- 02 Servizi: la rete ---------- */
.services { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.services__stage { display: grid; gap: 40px; max-width: 1440px; margin-inline: auto; }
.services__head { display: grid; gap: 20px; }
.stations { display: grid; gap: 28px; max-width: 46rem; }
.station h3 { font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 400; line-height: 1.05; letter-spacing: -.04em; }
.station__more { display: grid; grid-template-rows: 1fr; }
.station__more > div { display: grid; gap: 14px; min-height: 0; overflow: hidden; padding-top: 12px; }
.station p { max-width: 34em; color: var(--muted); }

.fx .services { padding: 0; }
.fx .services__stage { height: 100svh; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-content: center; gap: 36px; padding: 100px var(--gutter) 40px; }
.fx .services__head, .fx .stations { grid-column: 1; }
.fx .services__head .h-chapter { font-size: clamp(2.4rem, 5vw, 4.75rem); }
.fx .stations { gap: 4px; }
.fx .station { position: relative; padding: 10px 0 10px 28px; }
.fx .station::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 10px; height: 10px; border: 1px solid var(--faint); border-radius: 50%; transition: background-color .4s, border-color .4s, transform .5s var(--ease); }
.fx .station h3 { color: var(--faint); transition: color .5s; }
.fx .station__more { grid-template-rows: 0fr; transition: grid-template-rows .7s var(--ease); }
.fx .station__more > div { opacity: 0; transition: opacity .4s; }
.fx .station.is-active::before { background: var(--blue); border-color: var(--blue); transform: scale(1.3); }
.fx .station.is-active h3 { color: var(--mist); }
.fx .station.is-active .station__more { grid-template-rows: 1fr; }
.fx .station.is-active .station__more > div { opacity: 1; transition-delay: .15s; }
@media (max-width: 760px) {
  .fx .services__stage { grid-template-columns: 1fr; align-content: end; gap: 18px; padding: 0 16px 24px; }
  .fx .services__head .lead { display: none; }
  .fx .services__head .h-chapter { font-size: 2.25rem; }
  .fx .station { padding: 7px 0 7px 24px; }
  .fx .station h3 { font-size: 1.375rem; }
  .fx .station p { font-size: .9375rem; }
}

/* ---------- 03 Demo ---------- */
.demo { padding: clamp(100px, 14vw, 180px) 0; }
.demo__grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.demo__in { display: grid; gap: 22px; }
.demo__in .h-chapter { font-size: clamp(2.4rem, 5.4vw, 5rem); }
.console { display: grid; gap: 14px; margin-top: 8px; }
.console__label { font: 500 .8125rem/1 var(--mono); color: var(--muted); }
.console textarea { width: 100%; min-height: 108px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--mist); font-size: 1.0625rem; line-height: 1.45; resize: vertical; }
.console textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77, 124, 255, .25); }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(13, 16, 22, .5); color: var(--muted); font-size: .875rem; transition: color .3s, border-color .3s; }
.presets button:hover { color: var(--mist); border-color: var(--mist); }
.console__go { justify-self: start; }
.console__go:disabled { opacity: .55; cursor: progress; }
.console__note { color: var(--muted); font-size: .8125rem; }
.run { border: 1px solid var(--line); border-radius: 22px; background: var(--panel); overflow: hidden; }
@media (min-width: 761px) { .run { -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); background: rgba(17, 22, 33, .62); } }
.run__bar { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.run__dots { display: flex; gap: 6px; }
.run__dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.run__title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .8125rem/1.2 var(--mono); color: var(--muted); }
.run__state { padding: 5px 10px; border-radius: 999px; background: rgba(238, 240, 243, .07); font: 500 .75rem/1 var(--mono); color: var(--muted); }
.run.is-running .run__state { background: rgba(77, 124, 255, .18); color: var(--mist); }
.run__steps { display: grid; gap: 2px; padding: 14px 18px; counter-reset: s; }
.run__steps li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 36px; color: var(--faint); transition: color .4s; }
.run__steps i { width: 12px; height: 12px; border: 1.5px solid var(--faint); border-radius: 50%; transition: background-color .3s, border-color .3s; }
.run__steps time { font: 500 .75rem/1 var(--mono); color: var(--muted); }
.run__steps li.is-run { color: var(--mist); }
.run__steps li.is-run i { border-color: var(--blue); animation: blink .7s infinite alternate; }
.run__steps li.is-done { color: var(--mist); }
.run__steps li.is-done i { border-color: var(--blue); background: var(--blue); }
@keyframes blink { to { background: rgba(77, 124, 255, .6); } }
.run__result { display: grid; gap: 16px; padding: 18px; border-top: 1px solid var(--line); min-height: 140px; }
.run__empty { color: var(--muted); font-size: .9375rem; }
.run__facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: .9375rem; }
.run__facts dt { font: 500 .75rem/1.9 var(--mono); color: var(--muted); }
.run__facts dd.is-high { color: #FFB27A; }
.slot { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border: 1px solid rgba(77, 124, 255, .45); border-radius: 14px; background: rgba(77, 124, 255, .1); }
.slot strong { font-size: 1.375rem; font-weight: 500; letter-spacing: -.02em; }
.slot span { color: var(--muted); font-size: .875rem; }
.draft { display: grid; gap: 6px; max-width: 34em; padding: 14px 16px; border-radius: 16px 16px 16px 4px; background: rgba(238, 240, 243, .08); }
.draft small { font: 500 .75rem/1 var(--mono); color: var(--muted); }
.run__approve { justify-self: start; min-height: 44px; }
.run__ok { color: var(--muted); font-size: .875rem; }
.demo__in, .demo__out { min-width: 0; }
@media (max-width: 900px) { .demo__grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 04 Metodo: il tunnel ---------- */
.method { padding: clamp(80px, 12vw, 160px) var(--gutter); }
.method__stage { display: grid; gap: 40px; max-width: 1440px; margin-inline: auto; }
.method__head { display: grid; gap: 20px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 32px; }
.step { display: grid; align-content: start; gap: 12px; }
.step__n { font: 500 .875rem/1 var(--mono); color: var(--blue); }
.step h3 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-weight: 400; line-height: 1.05; letter-spacing: -.04em; }
.step p { color: var(--muted); }
.step__time { justify-self: start; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; font: 500 .8125rem/1.2 var(--mono); }

.fx .method { padding: 0; }
.fx .method__stage { position: relative; height: 100svh; place-items: center; padding: 100px var(--gutter) 40px; }
.fx .method__head { position: absolute; top: 100px; left: var(--gutter); max-width: 26rem; gap: 12px; }
.fx .method__head .h-chapter { font-size: clamp(2rem, 3.6vw, 3.25rem); }
.fx .method__head .lead { font-size: 1rem; }
.fx .steps { display: grid; grid-template-columns: 1fr; place-items: center; text-align: center; }
.fx .step { grid-area: 1 / 1; justify-items: center; max-width: 42rem; opacity: 0; transform: translateY(40px) scale(.96); filter: blur(8px); transition: opacity .6s, transform .9s var(--ease), filter .6s; text-shadow: 0 0 30px var(--ink); }
.fx .step.is-active { opacity: 1; transform: none; filter: none; }
.fx .step h3 { font-size: clamp(2.6rem, 7vw, 6rem); }
.fx .step p { max-width: 30em; font-size: clamp(1rem, 1.3vw, 1.25rem); color: var(--mist); }
.fx .step__time { justify-self: center; background: rgba(13, 16, 22, .6); }
@media (max-width: 760px) {
  .fx .method__head { top: 84px; left: 16px; right: 16px; }
  .fx .method__head .lead { display: none; }
  .fx .step { padding-top: 40px; }
}

/* ---------- 05 Progetti ---------- */
.work { padding: clamp(100px, 14vw, 180px) 0; }
.work__head { display: grid; gap: 20px; margin-bottom: clamp(48px, 7vw, 96px); }
.work__list { display: grid; gap: clamp(56px, 8vw, 120px); }
.project { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.project:nth-child(even) .project__media { order: 2; }
.project__media { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); }
.project__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 1.2s var(--ease); }
.project:hover .project__media img { transform: scale(1.03); }
.project__text { display: grid; gap: 14px; justify-items: start; }
.project__meta { font: 500 .8125rem/1.3 var(--mono); color: var(--blue); }
.project h3 { font-size: clamp(1.75rem, 3.2vw, 2.9rem); font-weight: 400; line-height: 1.02; letter-spacing: -.04em; }
.project p:not(.project__meta) { color: var(--muted); }
.link-out { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; transition: border-color .3s, background-color .3s; }
.link-out::after { content: "\2197"; font-size: .9em; }
.link-out:hover { border-color: var(--blue); background: rgba(77, 124, 255, .12); }
.work__more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: clamp(56px, 8vw, 112px); padding-top: 28px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 860px) { .project { grid-template-columns: 1fr; } .project:nth-child(even) .project__media { order: 0; } }

/* ---------- 06 Listino ---------- */
.plans { padding: clamp(100px, 14vw, 180px) 0; }
.plans__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.plans__head .h-chapter { font-size: clamp(3.4rem, 11vw, 10rem); }
.plans__promo { display: inline-flex; align-items: center; gap: 12px; margin-top: 22px; padding: 10px 18px; border: 1px solid rgba(77, 124, 255, .5); border-radius: 999px; background: rgba(77, 124, 255, .1); font-size: .9375rem; font-weight: 500; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filters button { min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--muted); transition: background-color .4s var(--ease), color .3s, border-color .3s; }
.filters button:hover { color: var(--mist); border-color: var(--mist); }
.filters button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--ink); }
.plans__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 20px); perspective: 1400px; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
  padding: clamp(22px, 2.2vw, 30px); border: 1px solid var(--line); border-radius: 22px;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(77, 124, 255, .17), transparent 60%), linear-gradient(180deg, #151B28, #10141E);
  transform-style: preserve-3d; transition: border-color .4s;
}
.plan[hidden] { display: none; }
.plan:hover { border-color: rgba(77, 124, 255, .6); }
.plan h3 { font-size: clamp(1.375rem, 1.7vw, 1.625rem); font-weight: 500; line-height: 1.1; letter-spacing: -.03em; }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-block: 6px 4px; }
.plan__price strong { font-size: clamp(2.25rem, 3.2vw, 3rem); font-weight: 300; line-height: 1; letter-spacing: -.05em; }
.plan__from { flex-basis: 100%; font-size: .8125rem; color: var(--muted); }
.plan__price s { color: var(--muted); font-size: 1.0625rem; }
.plan__price small { flex-basis: 100%; font-size: .875rem; color: var(--muted); }
.plan__desc { color: var(--muted); font-size: .9688rem; }
.plan .tags { margin-top: auto; padding-top: 6px; }
.plan__badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--blue); color: var(--ink); font-size: .8125rem; font-weight: 600; }
.plan--feature, .plan--free { border-color: rgba(77, 124, 255, .5); }
.plan--free .plan__price strong { color: var(--blue); }
.plan__play { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; padding: 6px 0; border: 0; background: none; font-weight: 500; }
.plan__play::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }
.plan__play-icon { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); transition: transform .5s var(--ease); }
.plan__play-icon::before { content: ""; margin-left: 3px; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent var(--ink); }
.plan:hover .plan__play-icon { transform: scale(1.12); }
.plan__links { position: relative; z-index: 2; display: grid; gap: 6px; justify-items: start; }
.plans__cta { display: flex; justify-content: center; margin-top: clamp(48px, 6vw, 80px); }
.phone-peek { display: none; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .phone-peek {
    display: block; position: fixed; top: 0; left: 0; z-index: 45; width: 176px; aspect-ratio: 9 / 16;
    padding: 6px; border-radius: 30px; background: #05070A; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12), 0 0 60px -10px rgba(77, 124, 255, .45);
    pointer-events: none; visibility: hidden; opacity: 0;
  }
  .phone-peek video { width: 100%; height: 100%; border-radius: 24px; object-fit: cover; background: var(--ink); }
}
@media (max-width: 1100px) { .plans__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .plans__head { grid-template-columns: 1fr; } }
@media (max-width: 680px) { .plans__grid { grid-template-columns: 1fr; } }

/* Scheda pacchetto */
.sheet {
  width: min(980px, calc(100% - 24px)); max-height: min(92svh, 860px); margin: auto; padding: 0; border: 0; border-radius: 28px;
  display: none; grid-template-columns: minmax(0, 340px) 1fr; overflow: hidden; background: var(--white); color: var(--ink);
}
.sheet[open] { display: grid; height: min(92svh, 760px); animation: sheetIn .6s var(--ease); }
.sheet::backdrop { background: rgba(13, 16, 22, .72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(40px) scale(.97); } }
.sheet__media { position: relative; display: grid; place-items: center; background: var(--ink); }
.sheet__video { width: 100%; height: 100%; max-height: min(92svh, 860px); aspect-ratio: 9 / 16; object-fit: contain; background: var(--ink); }
.sheet__novideo { position: absolute; inset: auto 20px 20px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: var(--mist); font-size: .875rem; }
.sheet__novideo[hidden] { display: none; }
.sheet__inner { position: relative; display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 4vw, 48px); overflow-y: auto; overscroll-behavior: contain; }
.sheet__body { display: contents; }
.sheet__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid rgba(13, 16, 22, .12); border-radius: 50%; background: var(--mist); color: var(--ink); font-size: 1.5rem; line-height: 1; }
.sheet__title { padding-right: 52px; font-size: clamp(1.75rem, 3.4vw, 2.75rem); font-weight: 400; line-height: 1.02; letter-spacing: -.045em; }
.sheet .plan__price small, .sheet .plan__price s, .sheet .plan__from, .sheet__lead, .sheet__steps { color: #4A5262; }
.sheet h4 { margin-top: 6px; font-size: .9375rem; font-weight: 600; }
.sheet__list { display: grid; gap: 8px; }
.sheet__list li { position: relative; padding-left: 26px; }
.sheet__list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 12px; height: 7px; border-left: 2px solid var(--blue-deep); border-bottom: 2px solid var(--blue-deep); transform: rotate(-45deg); }
.sheet__steps { display: grid; gap: 6px; padding-left: 20px; list-style: decimal; }
.sheet__promo { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 14px; background: rgba(77, 124, 255, .12); font-size: .875rem; }
.sheet__promo[hidden] { display: none; }
.sheet .btn { align-self: flex-start; margin-top: 6px; }
.sheet :focus-visible { outline-color: var(--blue-deep); }
@media (max-width: 760px) {
  .sheet { grid-template-columns: 1fr; overflow-y: auto; }
  .sheet[open] { display: block; height: auto; }
  .sheet__media { height: min(62svh, 520px); }
  .sheet__video { max-height: none; }
  .sheet__inner { overflow: visible; }
}

/* ---------- 07 Contatti ---------- */
.contact { padding: clamp(110px, 14vw, 180px) 0 clamp(64px, 8vw, 110px); }
.contact__title { max-width: 11em; margin-bottom: clamp(40px, 6vw, 80px); font-size: clamp(2.8rem, 8vw, 7.5rem); font-weight: 500; line-height: .92; letter-spacing: -.058em; text-wrap: balance; }
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__info { display: grid; gap: 28px; }
.checks { display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; color: var(--muted); }
.checks li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(-45deg); }
.checks a { color: var(--mist); text-decoration: underline; text-underline-offset: 3px; }
.direct { display: grid; gap: 10px; }
.direct a { display: grid; gap: 2px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .3s; }
.direct a:hover { border-color: var(--blue); }
.direct span { color: var(--muted); font-size: .875rem; }
.direct strong { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.team__label { margin-bottom: 12px; font: 500 .8125rem/1.3 var(--mono); color: var(--muted); }
.team__list { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.team__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.team__avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: var(--ink); font-size: .875rem; font-weight: 600; }
.form { display: grid; gap: 14px; padding: clamp(20px, 3vw, 36px); border: 1px solid var(--line); border-radius: 24px; background: var(--panel); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; }
.field input, .field textarea, .field select { width: 100%; padding: 26px 16px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(238, 240, 243, .04); color: var(--mist); font-size: 1rem; transition: border-color .3s; }
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%); background-position: calc(100% - 22px) 55%, calc(100% - 16px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--ink); color: var(--mist); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77, 124, 255, .25); }
.field label { position: absolute; left: 17px; top: 18px; color: var(--muted); pointer-events: none; transition: top .25s var(--ease), font-size .25s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label, .field--select label { top: 8px; font-size: .75rem; }
.field [aria-invalid="true"] { border-color: #FF8A8A; }
.field__error { margin-top: 6px; color: #FF9C9C; font-size: .8125rem; }
.form__alert { padding: 12px 16px; border-radius: 12px; background: rgba(255, 138, 138, .12); color: #FFC1C1; font-size: .9375rem; }
.form__alert.is-success { background: rgba(77, 124, 255, .14); color: var(--mist); }
.form__note { color: var(--muted); font-size: .8125rem; }
.form__note a { color: var(--mist); text-decoration: underline; text-underline-offset: 3px; }
.faq { display: grid; grid-template-columns: minmax(0, .5fr) minmax(0, 1fr); gap: 24px 48px; margin-top: clamp(80px, 10vw, 140px); padding-top: 32px; border-top: 1px solid var(--line); }
.faq__title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 400; letter-spacing: -.04em; }
.faq__list details { border-bottom: 1px solid var(--line); }
.faq__list summary { position: relative; display: block; padding: 18px 44px 18px 0; font-size: 1.0625rem; font-weight: 500; cursor: pointer; list-style: none; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; position: absolute; right: 6px; top: 50%; font-size: 1.5rem; font-weight: 300; color: var(--blue); transform: translateY(-50%); transition: transform .4s var(--ease); }
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__list details p { max-width: 42em; padding-bottom: 20px; color: var(--muted); }
@media (max-width: 860px) { .contact__grid, .faq { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form__row { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--ink); }
.footer__inner { display: grid; grid-template-columns: auto 1fr; gap: 20px 40px; padding-block: 40px; }
.footer__claim { align-self: center; color: var(--muted); }
.footer__nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: .9375rem; }
.footer__nav a { color: var(--muted); }
.footer__nav a:hover { color: var(--mist); }
.footer__copy { grid-column: 1 / -1; color: var(--faint); font-size: .8125rem; }
@media (max-width: 560px) { .footer__inner { grid-template-columns: 1fr; } }

/* ---------- Titoli che salgono (solo con .fx) ---------- */
.fx [data-reveal] .split-line { overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
