/* ==========================================================================
   Teksoft — foglio di stile unico
   Struttura: token → base → layout (sidebar/main) → componenti → pagine → motion
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face { /* russo: scaricato solo se nella pagina c'è testo cirillico */
  font-family: "Inter";
  src: url("../fonts/inter-cyrillic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face { /* arabo: scaricato solo nelle pagine in arabo */
  font-family: "Noto Sans Arabic";
  src: url("../fonts/noto-arabic-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

:root {
  --bg: #000;
  --surface: #0e0e11;
  --surface-2: #17171b;
  --line: rgba(255, 255, 255, .09);
  --text: #fff;
  --soft: #d6d6db;
  --muted: #8f8f98;
  --red: #ef3a3a;
  --blue: #51b7cd;
  --grad: linear-gradient(90deg, var(--red), var(--blue));
  --sidebar: clamp(220px, 21vw, 340px);
  --gutter: clamp(16px, 4vw, 60px);
  --maxw: 1180px;
  /* distanza tra il bordo destro del contenuto centrato e il bordo dello schermo:
     serve alle foto e al nastro che arrivano fino al margine */
  --bleed: max(var(--gutter), calc((100vw - var(--sidebar) - var(--gutter) - var(--maxw)) / 2 + var(--gutter)));
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 "Inter", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.15; letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.ico { width: 1.25em; height: 1.25em; flex: none; }
.muted { color: var(--muted); }
.accent { color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #fff; color: #000; padding: 8px 14px; border-radius: 4px;
}
.skip:focus { top: 12px; }

/* ---------- glow che segue il cursore (solo desktop) ---------- */
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(520px circle at var(--mx, 70%) var(--my, 10%), rgba(239, 58, 58, .09), transparent 60%),
    radial-gradient(700px circle at calc(var(--mx, 70%) + 160px) calc(var(--my, 10%) + 120px), rgba(81, 183, 205, .07), transparent 60%);
  opacity: 0;
  transition: opacity .8s;
}
.has-pointer .glow { opacity: 1; }

/* ==========================================================================
   Layout: sidebar fissa a sinistra (fedele all'originale)
   ========================================================================== */

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30;
  width: var(--sidebar);
  padding: 60px 0 40px var(--gutter);
}
.brand img { width: 128px; height: auto; transition: transform .5s var(--ease-out); }
.brand:hover img { transform: translateX(4px); }

.nav { margin-top: 44px; }
.nav > ul:first-child li + li { margin-top: 4px; }
.nav > ul:first-child a {
  position: relative; display: inline-block;
  font-size: 1.32rem; font-weight: 400; color: var(--muted);
  padding: 2px 0;
  transition: color .3s, transform .4s var(--ease-out);
}
.nav > ul:first-child a::after {
  content: ""; position: absolute; left: 0; bottom: 2px; height: 1px; width: 100%;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav > ul:first-child a:hover { color: #fff; transform: translateX(6px); }
.nav > ul:first-child a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { color: #fff !important; }

.social { display: flex; gap: 6px; margin-top: 36px; }
.social a {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 3px;
  background: var(--surface-2); color: var(--soft); font-size: 12px;
  transition: background .3s, color .3s, transform .3s var(--ease-out);
}
.social a:hover { background: #fff; color: #000; transform: translateY(-3px); }
.social .ico { width: 14px; height: 14px; }

.nav-toggle { display: none; }

.main {
  position: relative; z-index: 1;
  margin-left: var(--sidebar);
  padding: 0 var(--gutter) 0 0;
  min-height: 80vh;
}
.wrap { max-width: var(--maxw); }
/* specificità maggiore: le sezioni dichiarano margin verticali con lo shorthand, che azzererebbe il centraggio */
.main .wrap { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 72px 0 56px;
  isolation: isolate;
}
.hero::before { /* trama halftone dell'originale, con lieve deriva */
  content: ""; position: absolute; z-index: -1;
  top: -40px; right: calc(var(--bleed) * -1); width: min(780px, 70vw); aspect-ratio: 5 / 4;
  background: url("../img/halftone.webp") right top / contain no-repeat;
  opacity: .35;
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 30%, transparent 70%);
          mask-image: radial-gradient(circle at 70% 30%, #000 30%, transparent 70%);
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: drift 24s ease-in-out infinite alternate; }
}
@keyframes drift { to { transform: translate3d(-40px, 30px, 0) rotate(-2deg); } }

.hero__row { display: flex; justify-content: space-between; gap: 32px; align-items: flex-start; }
.eyebrow { font-size: clamp(1.1rem, 1.6vw, 1.45rem); color: var(--muted); font-weight: 400; }
.typed { color: var(--blue); white-space: nowrap; }
.typed::after {
  content: ""; display: inline-block; width: 2px; height: .95em; margin-inline-start: 3px;
  background: var(--blue); vertical-align: -0.1em;
  animation: caret 1s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

.hero h1 {
  margin-top: 14px;
  font-size: clamp(2.1rem, 4.3vw, 3.6rem);
  font-weight: 400; letter-spacing: -.03em;
  max-width: 14ch;
}
.hero h1 .amp { color: var(--muted); }
.hero__lead { margin-top: 26px; max-width: 46ch; font-size: clamp(1.02rem, 1.25vw, 1.15rem); color: var(--soft); }

.hero__since { text-align: end; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.7; padding-top: 6px; }
.hero__since .year { display: inline-block; margin-top: 10px; text-transform: none; letter-spacing: 0; font-weight: 400; color: #fff; position: relative; }
.hero__since .year b { font-weight: 700; }
.hero__since svg { position: absolute; left: -8px; right: -6px; bottom: -9px; width: calc(100% + 14px); height: 10px; overflow: visible; }
.hero__since path { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw 1.2s .9s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .hero__since path { animation: none; stroke-dashoffset: 0; } }

/* ==========================================================================
   Split: immagine + card nera sovrapposta (pattern firma dell'originale)
   ========================================================================== */

.split {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: center;
  margin: 40px 0 120px;
}
.split .media { grid-column: 1 / span 8; grid-row: 1; }
.split .card  { grid-column: 8 / span 5; grid-row: 1; margin-top: 80px; }
.split--rev .media { grid-column: 5 / span 8; }
.split--rev .card  { grid-column: 1 / span 5; margin-top: 0; margin-bottom: -10px; z-index: 2; }
.split--bleed .media { margin-right: calc(var(--bleed) * -1); }

.media {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 11.8;
  background: var(--surface);
}
.media img { width: 100%; height: 100%; object-fit: cover; scale: 1.12; }
.media::after { /* leggera vignettatura per fondere con lo sfondo nero */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 55%, rgba(0, 0, 0, .35));
  pointer-events: none;
}

.card {
  position: relative; z-index: 2;
  background: #000;
  padding: clamp(26px, 3.4vw, 50px);
}
.card__kicker { font-size: .95rem; color: #fff; }
.card__kicker .accent { color: var(--muted); }
.card__lead { margin-top: 22px; font-size: clamp(1.08rem, 1.45vw, 1.3rem); line-height: 1.5; color: #fff; }
.card__text { margin-top: 14px; color: var(--muted); }
.card .btn { margin-top: 32px; }
.card .ico-top { color: var(--red); font-size: 1.15rem; margin-bottom: 18px; }
.card h3 { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; }

/* ==========================================================================
   Componenti
   ========================================================================== */

.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border: 1px solid rgba(255, 255, 255, .55);
  color: #fff; font: inherit; font-size: .98rem; cursor: pointer; background: transparent;
  transition: color .45s var(--ease-out), border-color .45s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: #fff; transform: scaleX(0); transform-origin: right;
  transition: transform .55s var(--ease-out);
}
.btn:hover, .btn:focus-visible { color: #000; border-color: #fff; }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.btn .ico { width: 1.05em; transition: transform .45s var(--ease-out); }
.btn:hover .ico { transform: translateX(4px); }
.btn--solid { background: #fff; color: #000; border-color: #fff; }
.btn--solid::before { background: var(--grad); }
.btn--solid:hover { color: #fff; }

.section { margin: 0 0 120px; }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); font-weight: 400; }
.section__head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; }
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--grad); }

/* intro + statistiche */
.intro { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; margin: 0 0 120px; }
.intro h2 { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.intro p { margin-top: 18px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 1180px) and (min-width: 901px) { .intro .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: start; }
.stat .ico { width: 34px; height: 34px; color: #55555d; margin-bottom: 10px; }
.stat__n { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 300; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__l { margin-top: 8px; font-size: .86rem; color: var(--muted); line-height: 1.4; }
.stats--center .stat { text-align: center; }
.stats--center .stat .ico { margin-inline: auto; }

/* griglia servizi con icona quadrata */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px clamp(32px, 5vw, 72px); }
.feature { display: grid; grid-template-columns: 52px 1fr; gap: 20px; align-items: start; }
.feature__ico {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 4px;
  background: var(--surface-2); color: #fff; position: relative; overflow: hidden;
  transition: transform .5s var(--ease-out);
}
.feature__ico::before { content: ""; position: absolute; inset: 0; background: var(--grad); opacity: 0; transition: opacity .5s; }
.feature__ico .ico { position: relative; width: 22px; height: 22px; }
.feature:hover .feature__ico { transform: rotate(-6deg) scale(1.06); }
.feature:hover .feature__ico::before { opacity: 1; }
.feature h3 { font-size: 1.02rem; font-weight: 500; letter-spacing: -.01em; }
.feature p { margin-top: 8px; color: var(--muted); font-size: .97rem; }
.feature .tag { display: inline-block; margin-left: 8px; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: rgba(81, 183, 205, .14); color: var(--blue); vertical-align: 2px; }

/* marquee tecnologie */
.marquee {
  position: relative; overflow: hidden; margin: 0 calc(var(--gutter) * -1) 120px 0;
  padding: 26px 0; border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; gap: 56px; }
.marquee__track span { font-size: clamp(1.15rem, 2vw, 1.6rem); font-weight: 300; color: #6d6d75; white-space: nowrap; transition: color .3s; }
.marquee__track span:hover { color: #fff; }
.marquee__track span::before { content: "</"; color: var(--red); opacity: .6; margin-right: 2px; font-size: .8em; }
.marquee__track span::after { content: ">"; color: var(--blue); opacity: .6; margin-left: 2px; font-size: .8em; }
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track { flex-wrap: wrap; width: auto; gap: 14px 32px; padding-left: 4px; }
  .marquee__track [aria-hidden="true"] { display: none; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* processo in 4 step */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--line); }
.steps::after { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease-out) .2s; }
.steps.is-in::after, html:not(.js) .steps::after { transform: scaleX(1); }
.step { position: relative; padding-top: 0; }
.step__n { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #000; border: 1px solid var(--line); font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--soft); margin-bottom: 22px; transition: border-color .4s, color .4s; }
.step:hover .step__n { border-color: var(--red); color: #fff; }
.step h3 { font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.step p { margin-top: 8px; color: var(--muted); font-size: .94rem; }

/* liste con freccia (servizi e timeline) */
.arrow-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 40px; }
.arrow-list li { position: relative; padding-left: 34px; color: #fff; line-height: 1.45; }
.arrow-list li::before { content: "⟶"; position: absolute; left: 0; top: -1px; color: var(--muted); transition: color .3s, transform .4s var(--ease-out); }
.arrow-list li:hover::before { color: var(--red); transform: translateX(4px); }

/* CTA finale */
.cta-text { margin: 0 0 120px; }
.cta-text > * { max-width: 640px; }
.cta-text h2 { font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.cta-text p { margin-top: 26px; font-size: clamp(1.1rem, 1.6vw, 1.32rem); line-height: 1.55; }
.cta-text .btn { margin-top: 40px; }

/* ==========================================================================
   Chi siamo
   ========================================================================== */

.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 70px); margin: 0 0 110px; }
.about__text p { color: var(--muted); }
.about__text p + p { margin-top: 26px; }
.about__text strong { color: #fff; font-weight: 600; font-style: italic; }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.timeline::after { content: ""; position: absolute; left: 10px; top: 8px; bottom: 8px; width: 1px; background: linear-gradient(var(--red), var(--blue)); transform: scaleY(0); transform-origin: top; transition: transform 2.2s var(--ease-out); }
.timeline.is-in::after, html:not(.js) .timeline::after { transform: scaleY(1); }
.timeline li { position: relative; padding-left: 40px; }
.timeline li + li { margin-top: 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: #000; border: 1px solid var(--muted); transition: background .3s, border-color .3s; }
.timeline li:hover::before { background: var(--red); border-color: var(--red); }
.timeline h3 { font-size: .98rem; font-weight: 500; letter-spacing: 0; }
.timeline p { margin-top: 4px; color: var(--muted); font-size: .94rem; }
.timeline li.is-now::before { background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 6px rgba(81, 183, 205, .15); }
@media (prefers-reduced-motion: no-preference) {
  .timeline li.is-now::before { animation: pulse 2.4s ease-out infinite; }
}
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(81, 183, 205, 0); } 100% { box-shadow: 0 0 0 0 rgba(81, 183, 205, 0); } }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.value { background: #000; padding: 30px 26px; transition: background .4s; }
.value:hover { background: var(--surface); }
.value .ico { width: 26px; height: 26px; color: var(--red); }
.value h3 { margin-top: 18px; font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.value p { margin-top: 8px; font-size: .92rem; color: var(--muted); }

/* ==========================================================================
   Servizi: pannelli "mock" animati per i servizi senza foto
   ========================================================================== */

.mock {
  position: relative; overflow: hidden;
  aspect-ratio: 16 / 11.8;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(81, 183, 205, .16), transparent 55%),
    radial-gradient(90% 80% at 0% 100%, rgba(239, 58, 58, .14), transparent 55%),
    #0b0b0e;
  border: 1px solid var(--line);
  padding: clamp(18px, 3vw, 40px);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(.68rem, 1vw, .86rem);
}
.mock__win { width: 100%; max-width: 520px; background: rgba(18, 18, 22, .9); border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; }
.mock__bar { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.mock__bar i { width: 9px; height: 9px; border-radius: 50%; background: #2a2a30; }
.mock__bar i:first-child { background: var(--red); opacity: .8; }
.mock__bar i:nth-child(3) { background: var(--blue); opacity: .8; }
.mock__bar b { margin-inline-start: auto; font-weight: 400; color: #5d5d66; font-size: .9em; }
.mock__body { padding: 16px; }

/* SaaS: piani + grafico */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.plan { border: 1px solid rgba(255, 255, 255, .08); border-radius: 7px; padding: 10px; }
.plan small { color: var(--muted); display: block; }
.plan strong { display: block; font-size: 1.35em; font-weight: 500; margin-top: 2px; }
.plan.is-pop { border-color: var(--blue); background: rgba(81, 183, 205, .08); }
.chart { margin-top: 14px; height: 90px; border-radius: 7px; background: rgba(255, 255, 255, .02); position: relative; }
.chart svg { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); overflow: visible; }
.chart path.l { fill: none; stroke: url(#g); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset 2s var(--ease-out) .3s; }
.chart path.a { fill: url(#ga); opacity: 0; transition: opacity 1s 1.4s; }
.is-in .chart path.l, html:not(.js) .chart path.l { stroke-dashoffset: 0; }
.is-in .chart path.a, html:not(.js) .chart path.a { opacity: 1; }
.kpis { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); }
.kpis b { color: #fff; font-weight: 500; }

/* AI: conversazione con agente */
.chat-line { display: flex; gap: 10px; margin-top: 10px; opacity: 0; translate: 0 8px; transition: opacity .6s var(--ease-out), translate .6s var(--ease-out); }
.chat-line:first-child { margin-top: 0; }
.is-in .chat-line, html:not(.js) .chat-line { opacity: 1; translate: 0 0; }
.is-in .chat-line:nth-child(2) { transition-delay: .7s; }
.is-in .chat-line:nth-child(3) { transition-delay: 1.5s; }
.is-in .chat-line:nth-child(4) { transition-delay: 2.3s; }
.chat-line .who { flex: none; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font-size: .8em; font-weight: 700; background: #24242a; }
.chat-line.ai .who { background: var(--grad); }
.chat-line p { background: rgba(255, 255, 255, .04); border-radius: 8px; padding: 8px 10px; line-height: 1.45; color: var(--soft); }
.chat-line code { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--blue); font-size: .95em; }
.chat-line .ok { color: #5fd38d; }

/* DevOps: pipeline */
.pipe { display: grid; gap: 9px; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pipe li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 7px; background: rgba(255, 255, 255, .03); color: var(--soft); }
.pipe li span { margin-left: auto; color: var(--muted); }
.pipe .dot { width: 9px; height: 9px; border-radius: 50%; background: #3a3a42; flex: none; transition: background .3s, box-shadow .3s; }
.is-in .pipe li .dot, html:not(.js) .pipe li .dot { background: #5fd38d; box-shadow: 0 0 0 4px rgba(95, 211, 141, .15); }
.is-in .pipe li:nth-child(1) .dot { transition-delay: .3s; }
.is-in .pipe li:nth-child(2) .dot { transition-delay: .9s; }
.is-in .pipe li:nth-child(3) .dot { transition-delay: 1.5s; }
.is-in .pipe li:nth-child(4) .dot { transition-delay: 2.1s; }
.is-in .pipe li:nth-child(5) .dot { transition-delay: 2.7s; }
.pipe .live { color: #5fd38d; }

/* ==========================================================================
   Contatti
   ========================================================================== */

.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; margin: 10px 0 90px; }
.cblock .ico { width: 24px; height: 24px; color: var(--muted); }
.cblock h2 { margin-top: 12px; font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.cblock .rows { margin-top: 26px; display: grid; gap: 22px; }
.cblock small { display: block; color: var(--muted); font-size: .84rem; }
.cblock .big { display: inline-block; margin-top: 4px; font-size: 1.12rem; position: relative; }
.cblock .big::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
.cblock .big:hover::after { transform: scaleX(1); }
.cblock address { font-style: normal; color: var(--muted); }
.btn--xs { padding: 7px 12px; font-size: .8rem; margin-top: 14px; }

.contact-form-wrap { display: grid; grid-template-columns: 2.2fr 1fr; gap: clamp(32px, 5vw, 70px); margin: 0 0 120px; }
.form { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.field { display: grid; gap: 7px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: .86rem; color: var(--muted); }
.field label .req { color: var(--red); }
.field input, .field textarea {
  width: 100%; font: inherit; color: #fff;
  background: var(--surface); border: 1px solid var(--line); border-radius: 3px;
  padding: 12px 14px;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #121216; box-shadow: 0 0 0 4px rgba(81, 183, 205, .12); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--red); }
.check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.check input { margin-top: 4px; accent-color: var(--red); width: 16px; height: 16px; flex: none; }
.check a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.form__msg { font-size: .94rem; }
.form__msg.ok { color: #5fd38d; }
.form__msg.err { color: #ff7b7b; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .6; }

.social-list { margin-top: 32px; display: grid; gap: 20px; }
.social-list a { display: flex; align-items: center; gap: 16px; }
.social-list .sq { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 4px; background: var(--surface-2); transition: background .3s, color .3s, transform .4s var(--ease-out); }
.social-list .sq .ico { width: 20px; height: 20px; }
.social-list a:hover .sq { background: #fff; color: #000; transform: rotate(-6deg); }
.social-list small { display: block; color: var(--muted); font-size: .82rem; }

/* ==========================================================================
   Pagine testuali (privacy, 404)
   ========================================================================== */

.prose { margin: 0 0 120px; }
.prose > * { max-width: 720px; }
.prose h2 { font-size: 1.15rem; margin: 42px 0 12px; }
.prose p, .prose li { color: var(--soft); }
.prose p + p { margin-top: 14px; }
.prose ul { list-style: disc; padding-left: 20px; margin-top: 10px; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.notfound { min-height: 60vh; display: grid; align-content: center; }
.notfound .big404 { font-size: clamp(6rem, 18vw, 14rem); font-weight: 200; line-height: .9; letter-spacing: -.06em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.footer { position: relative; z-index: 1; margin-left: var(--sidebar); padding: 30px var(--gutter) 46px 0; }
.footer__in { max-width: var(--maxw); margin-inline: auto; display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); }
.footer__in a { color: #fff; transition: color .3s; }
.footer__in a:hover { color: var(--blue); }
.footer__logo img { width: 32px; }
.footer__legal { margin-inline-start: auto; }

/* ==========================================================================
   Motion: reveal allo scroll, wipe immagini, parallax, view transitions
   ========================================================================== */

/* Reveal: gestito da IntersectionObserver (funziona su tutti i browser).
   Senza JS il contenuto resta sempre visibile. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] {
    opacity: 0; translate: 0 28px;
    transition: opacity .9s var(--ease-out), translate 1.1s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  html.js [data-reveal].is-in { opacity: 1; translate: 0 0; }

  /* wipe a tendina delle immagini */
  html.js .media { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s var(--ease-out); }
  html.js .split--rev .media { clip-path: inset(0 0 0 100%); }
  html.js .media.is-in { clip-path: inset(0 0 0 0); }
  html.js .media img { transition: scale 2.2s var(--ease-out); scale: 1.3; }
  html.js .media.is-in img { scale: 1.12; }

  /* parole del titolo che salgono una alla volta */
  html.js .split-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
  html.js .split-words .w > span { display: inline-block; translate: 0 105%; transition: translate 1s var(--ease-out); transition-delay: calc(var(--wi) * 70ms + 150ms); }
  html.js .split-words.is-in .w > span { translate: 0 0; }
}

/* Parallax delle foto: animazione legata allo scroll, solo dove supportata (decorativa, nessun fallback) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .media.is-in img {
      animation: parallax linear both;
      animation-timeline: view();
      animation-range: cover;
    }
    @keyframes parallax {
      from { translate: 0 -5%; }
      to   { translate: 0 5%; }
    }
  }
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1180px) {
  .arrow-list { grid-template-columns: repeat(2, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar: 0px; }

  .sidebar {
    position: fixed; inset: 0 0 auto 0; width: auto; height: 64px;
    padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--line);
  }
  /* il blur sta su uno pseudo-elemento: su .sidebar creerebbe un contenitore per il menu fixed */
  .sidebar::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: rgba(0, 0, 0, .78);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  }
  .brand img { width: 108px; }

  .nav-toggle {
    display: grid; place-content: center; gap: 7px;
    width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; cursor: pointer; position: relative; z-index: 2;
  }
  .nav-toggle span { display: block; width: 24px; height: 1.5px; background: #fff; transition: transform .45s var(--ease-out); }
  .nav-open .nav-toggle span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 64px 0 0 0; margin: 0;
    padding: 40px 16px; background: #000;
    display: flex; flex-direction: column;
    visibility: hidden; opacity: 0; translate: 0 -10px;
    transition: opacity .4s var(--ease-out), translate .5s var(--ease-out), visibility 0s .5s;
  }
  .nav-open .nav { visibility: visible; opacity: 1; translate: 0 0; transition-delay: 0s; }
  .nav > ul:first-child a { font-size: 2rem; }
  .nav-open { overflow: hidden; }

  .main { padding: 64px 16px 0; }
  .footer { padding: 30px 16px 40px; }
  .footer__legal { margin-inline-start: 0; width: 100%; }

  .hero { padding: 48px 0 40px; }
  .hero__row { flex-direction: column-reverse; gap: 18px; }
  .hero__since { text-align: start; }
  .hero__since br { display: none; }
  .hero::before { right: -16px; width: 100vw; }

  .split, .split--rev { display: block; margin: 20px 0 80px; }
  .split .media, .split--rev .media { margin-right: -16px; margin-left: -16px; }
  .split .card, .split--rev .card { margin: -60px 16px 0 0; }
  .split--rev .card { margin: -60px 0 0 16px; }

  .intro, .about, .contact-form-wrap { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .steps::before, .steps::after { display: none; }
  .marquee { margin-right: -16px; margin-left: -16px; }
  .section, .intro, .cta-text, .about, .contact-form-wrap { margin-bottom: 80px; }
  .form { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .arrow-list, .values, .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: 1fr 1fr; }
  .plans .plan:last-child { display: none; }
}

/* i pannelli mock occupano lo stesso posto delle foto nello split */
.split .mock { grid-column: 1 / span 8; grid-row: 1; }
.split--rev .mock { grid-column: 5 / span 8; }
@media (prefers-reduced-motion: no-preference) {
  html.js .split .mock { opacity: 0; scale: .96; transition: opacity 1s var(--ease-out), scale 1.2s var(--ease-out); }
  html.js .split .mock.is-in { opacity: 1; scale: 1; }
}
@media (max-width: 900px) {
  .split .mock { margin: 0 -16px; }
}
.page-services .hero h1, .page-contact .hero h1, .page-privacy .hero h1, .page-notfound .hero h1 { max-width: 22ch; }
@media (max-width: 900px) {
  .mock { aspect-ratio: auto; padding: 28px 16px; }
  .split .mock ~ .card { margin-top: 0; }
}


/* ==========================================================================
   Selettore lingua
   ========================================================================== */
.lang { position: relative; margin-top: 22px; }
.lang summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 99px;
  color: var(--muted); font-size: .86rem; user-select: none;
  transition: color .3s, border-color .3s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary .ico { width: 15px; height: 15px; }
.lang summary:hover, .lang[open] summary { color: #fff; border-color: rgba(255, 255, 255, .3); }
.lang ul {
  position: absolute; inset-inline-start: 0; top: calc(100% + 8px); z-index: 40;
  min-width: 190px; padding: 6px; display: grid; gap: 2px;
  background: #0e0e11; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
@media (prefers-reduced-motion: no-preference) {
  .lang[open] ul { animation: pop .28s var(--ease-out); }
}
@keyframes pop { from { opacity: 0; translate: 0 -6px; } }
.lang a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--soft); font-size: .93rem; transition: background .2s, color .2s; }
.lang a:hover { background: var(--surface-2); color: #fff; }
.lang a[aria-current] { color: #fff; background: rgba(81, 183, 205, .12); }
@media (max-width: 900px) {
  .lang { margin-top: 28px; }
  .lang ul { position: static; margin-top: 12px; grid-template-columns: 1fr 1fr; box-shadow: none; }
}

/* ==========================================================================
   Tipografia per lingua
   ========================================================================== */
:lang(ar) body { font-family: "Inter", "Noto Sans Arabic", Tahoma, sans-serif; line-height: 1.85; }
:lang(zh) body { font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", sans-serif; line-height: 1.8; }
:lang(ja) body { font-family: "Inter", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans CJK JP", sans-serif; line-height: 1.8; }
/* la spaziatura negativa spezza le legature arabe e stringe troppo i caratteri CJK */
:is(:lang(ar), :lang(zh), :lang(ja)) :is(h1, h2, h3, h4, .eyebrow, .hero__since, .kicker) { letter-spacing: 0; }
:is(:lang(ar), :lang(zh), :lang(ja)) .hero h1 { line-height: 1.35; }
:lang(ru) .hero h1, :lang(de) .hero h1 { max-width: 18ch; }

/* ==========================================================================
   RTL (arabo): sidebar a destra e direzioni specchiate
   ========================================================================== */
[dir="rtl"] .marquee__track span { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .flip-rtl { scale: -1 1; }
[dir="rtl"] .btn:hover .ico { transform: translateX(-4px); }
[dir="rtl"] .btn::before { transform-origin: left; }
[dir="rtl"] .btn:hover::before, [dir="rtl"] .btn:focus-visible::before { transform-origin: right; }
[dir="rtl"] .nav > ul:first-child a::after { transform-origin: left; }
[dir="rtl"] .nav > ul:first-child a:hover { transform: translateX(-6px); }
[dir="rtl"] .nav > ul:first-child a:hover::after { transform-origin: right; }
[dir="rtl"] .media::after { background: linear-gradient(240deg, transparent 55%, rgba(0, 0, 0, .35)); }
[dir="rtl"] .hero::before { right: auto; left: calc(var(--bleed) * -1); scale: -1 1; }
[dir="rtl"] .split--bleed .media { margin-right: 0; margin-left: calc(var(--bleed) * -1); }
[dir="rtl"] .marquee { margin: 0 0 120px calc(var(--gutter) * -1); }
[dir="rtl"] .arrow-list li { padding-left: 0; padding-right: 34px; }
[dir="rtl"] .arrow-list li::before { left: auto; right: 0; content: "⟵"; }
[dir="rtl"] .arrow-list li:hover::before { transform: translateX(-4px); }
[dir="rtl"] .timeline::before, [dir="rtl"] .timeline::after { left: auto; right: 10px; }
[dir="rtl"] .timeline li { padding-left: 0; padding-right: 40px; }
[dir="rtl"] .timeline li::before { left: auto; right: 6px; }
[dir="rtl"] .steps::after { transform-origin: right; }
[dir="rtl"] .cblock .big::after { transform-origin: right; }
[dir="rtl"] .field input[type="email"], [dir="rtl"] .field input[type="tel"] { direction: ltr; text-align: right; }

@media (min-width: 901px) {
  [dir="rtl"] .sidebar { inset: 0 0 0 auto; padding: 60px var(--gutter) 40px 0; }
  [dir="rtl"] .main { margin-left: 0; margin-right: var(--sidebar); padding: 0 0 0 var(--gutter); }
  [dir="rtl"] .footer { margin-left: 0; margin-right: var(--sidebar); padding: 30px 0 46px var(--gutter); }
}
@media (prefers-reduced-motion: no-preference) {
  [dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
  html[dir="rtl"].js .split .media { clip-path: inset(0 0 0 100%); }
  html[dir="rtl"].js .split.split--rev .media { clip-path: inset(0 100% 0 0); }
  html[dir="rtl"].js .split .media.is-in, html[dir="rtl"].js .split.split--rev .media.is-in { clip-path: inset(0 0 0 0); }
}
@keyframes marquee-rtl { to { transform: translateX(50%); } }
@media (max-width: 900px) {
  [dir="rtl"] .nav-toggle { margin-right: 0; margin-left: -8px; }
  [dir="rtl"] .split .card { margin: -60px 0 0 16px; }
  [dir="rtl"] .split--rev .card { margin: -60px 16px 0 0; }
  [dir="rtl"] .split .mock ~ .card { margin-top: 0; }
  [dir="rtl"] .marquee { margin-right: -16px; margin-left: -16px; }
  [dir="rtl"] .hero::before { left: -16px; }
}
