/* =====================================================================
   Vendor Portal — sito vetrina
   Design tokens: primario #0078d4 (standard icone progetto), accent teal
   dal logo prodotto. Stile enterprise pulito, mobile-first.
   ===================================================================== */

:root {
  --primary: #0078d4;
  --primary-dark: #005ea3;
  --primary-soft: #e8f3fc;
  --accent: #2bbfae;
  --ink: #15212e;
  --ink-soft: #45576b;
  --surface: #ffffff;
  --surface-alt: #f4f7fa;
  --border: #dde5ed;
  --dark: #0e1d2b;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(21, 33, 46, .08);
  --shadow-md: 0 8px 28px rgba(21, 33, 46, .12);
  --container: 1140px;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", -apple-system, "Segoe UI", sans-serif;
}

::selection { background: var(--primary); color: #fff; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* le animazioni (marquee, reveal laterali) non devono creare scroll orizzontale */
}

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-family: var(--font-display); }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }

/* parola chiave del titolo: sottolineatura a pennellata che si disegna al load */
.hl {
  position: relative;
  white-space: nowrap;
  color: var(--primary-dark);
}
.hl::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .04em;
  height: .3em;
  z-index: -1;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(0, 120, 212, .25), rgba(43, 191, 174, .35));
  transform-origin: left center;
  animation: hl-draw .7s cubic-bezier(.22, 1, .36, 1) .9s backwards;
}
@keyframes hl-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
p { margin: 0 0 1em; }

.eyebrow {
  display: inline-block;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary);
  margin-bottom: .75rem;
}

.lead { font-size: 1.125rem; color: var(--ink-soft); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 44px;
  padding: .65rem 1.4rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn-lg { min-height: 50px; padding: .8rem 1.8rem; font-size: 1rem; }
.btn { transition: background-color .2s ease, color .2s ease, box-shadow .25s ease, transform .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(0, 120, 212, .35);
}
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--primary-soft); }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover, .btn-light:focus-visible { background: var(--primary-soft); }
.btn:focus-visible { outline: 3px solid rgba(0, 120, 212, .4); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 64px;
}
@media (min-width: 860px) { .header-inner { gap: 1.5rem; } }
/* su schermi stretti resta solo il logo: il nome sborderebbe */
@media (max-width: 479px) { .header-inner .brand-name { display: none; } }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.brand-name strong { color: var(--primary); font-weight: 800; }
.main-nav { display: none; gap: 1.4rem; margin-inline: auto; }
.main-nav a {
  position: relative;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: .9375rem;
  padding: .5rem 0;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--primary); }
.main-nav a:hover::after, .main-nav a:focus-visible::after { transform: scaleX(1); }
.site-header .btn { margin-left: auto; padding: .55rem 1rem; font-size: .875rem; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .875rem;
  font-weight: 600;
}
.lang-switch a { color: var(--ink-soft); text-decoration: none; padding: .25rem; }
.lang-switch a:hover, .lang-switch a:focus-visible { color: var(--primary); }
.lang-switch [aria-current="page"] { color: var(--primary); }
.lang-sep { color: var(--border); }
@media (min-width: 860px) {
  .main-nav { display: flex; }
  .site-header .btn { margin-left: 0; }
}

/* ---------- hero (atmosfera "blueprint": griglia tecnica + mesh + noise) ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(43, 191, 174, .16), transparent 60%),
    radial-gradient(900px 480px at 10% 0%, rgba(0, 120, 212, .13), transparent 55%),
    var(--surface);
  padding: 4.5rem 0 3.5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(0, 120, 212, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 120, 212, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(720px 480px at 72% 36%, #000 0%, transparent 75%);
  mask-image: radial-gradient(720px 480px at 72% 36%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .035;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2"/></filter><rect width="160" height="160" filter="url(%23n)"/></svg>');
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
/* entrance orchestrata al load */
.hero-copy > * { animation: hero-rise .7s cubic-bezier(.22, 1, .36, 1) backwards; }
.hero-copy > *:nth-child(1) { animation-delay: .05s; }
.hero-copy > *:nth-child(2) { animation-delay: .15s; }
.hero-copy > *:nth-child(3) { animation-delay: .25s; }
.hero-copy > *:nth-child(4) { animation-delay: .35s; }
.hero-copy > *:nth-child(5) { animation-delay: .45s; }
.hero-shot { animation: hero-shot-in .9s cubic-bezier(.22, 1, .36, 1) .3s backwards; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-shot-in {
  from { opacity: 0; transform: translateX(40px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
/* su mobile (layout impilato) i pulsanti dell'hero sono centrati */
@media (max-width: 979px) {
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1 1 auto; max-width: 340px; }
}
.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: .9375rem;
}
.hero-points li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .4rem;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: .42em;
  width: .9rem; height: .9rem;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center/65% no-repeat, var(--accent);
}
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 5fr 6fr; }
}

/* ---------- browser frame ---------- */
.browser-frame {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  background: #fff;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease;
}
.browser-frame:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(21, 33, 46, .18);
}
.browser-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #eef2f6;
  border-bottom: 1px solid var(--border);
}
.browser-bar span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #cdd7e1;
}
.hero-shot { transform: rotate(0.0001deg); } /* forza layer GPU, evita shimmer su blur header */

/* ---------- strip integrazioni (marquee continuo) ---------- */
.strip {
  border-block: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 1.1rem 0;
  overflow: hidden;
}
.strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .75rem 2rem;
}
.strip-label { font-size: .8125rem; color: var(--ink-soft); flex: none; }
.marquee { flex-basis: 100%; }
@media (min-width: 760px) {
  .strip-inner { flex-wrap: nowrap; }
  .marquee { flex-basis: auto; }
}
.marquee {
  display: flex;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.strip ul {
  display: flex;
  flex: none;
  gap: 3rem;
  padding: 0 1.5rem;
  list-style: none;
  margin: 0;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: .9375rem;
  white-space: nowrap;
  animation: marquee 26s linear infinite;
}
.marquee:hover ul { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .strip ul { animation: none; flex-wrap: wrap; white-space: normal; }
  .marquee ul[aria-hidden="true"] { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- sezioni ---------- */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--surface-alt); }
.section-head {
  max-width: 680px;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-head p { color: var(--ink-soft); }

/* ---------- cards ---------- */
.cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}
/* filo superiore che si accende all'hover */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.card:hover, .card:focus-within {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(0, 120, 212, .35);
}
.card:hover::before, .card:focus-within::before { transform: scaleX(1); }
.card p { margin: 0; color: var(--ink-soft); font-size: .9375rem; }
.card-slim { padding: 1.5rem 1.25rem; }
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1rem;
  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background-color .3s ease, color .3s ease;
}
.card:hover .card-icon {
  transform: scale(1.1) rotate(-4deg);
  background: var(--primary);
  color: #fff;
}
.card-icon svg { width: 24px; height: 24px; }

/* ---------- feature alternate ---------- */
.feature {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.feature-copy .check-list {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}
.feature-copy .check-list li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: .55rem;
  color: var(--ink-soft);
}
.feature-copy .check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: .28em;
  width: 1.05rem; height: 1.05rem;
  border-radius: 50%;
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center/65% no-repeat, var(--primary);
}
.feature-copy p { color: var(--ink-soft); }
@media (min-width: 980px) {
  .feature { grid-template-columns: 7fr 5fr; }
  .feature-reverse { grid-template-columns: 5fr 7fr; }
  .feature-reverse .browser-frame { order: 2; }
  .feature-reverse .feature-copy { order: 1; }
}

/* ---------- sezione scura ---------- */
.section-dark {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(0, 120, 212, .25), transparent 60%),
    var(--dark);
  color: #e8eff6;
}
.section-dark .section-head p { color: #aebccb; }
.pillars {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  background: rgba(255, 255, 255, .04);
  transition: border-color .3s ease, background-color .3s ease, transform .3s ease;
}
.pillar:hover {
  border-color: rgba(109, 185, 236, .55);
  background: rgba(255, 255, 255, .07);
  transform: translateY(-3px);
}
.pillar h3 { color: #fff; font-size: 1.05rem; }
.pillar p { margin: 0; color: #aebccb; font-size: .9375rem; }

/* ---------- numeri ---------- */
.stats {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--ink-soft); font-size: .9375rem; }

/* ---------- CTA (gradiente in lento movimento) ---------- */
.cta {
  background: linear-gradient(125deg, var(--primary-dark), var(--primary) 40%, var(--accent) 75%, var(--primary-dark));
  background-size: 250% 250%;
  animation: cta-drift 14s ease-in-out infinite alternate;
  color: #fff;
  padding: 4.5rem 0;
}
@keyframes cta-drift {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) { .cta { animation: none; } }
.cta-inner { text-align: center; max-width: 640px; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .85); margin-bottom: 1.75rem; }

/* ---------- duo (due schermate affiancate) ---------- */
.duo {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  margin-bottom: 2.5rem;
}
@media (min-width: 860px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo figcaption {
  padding: .7rem 1rem;
  font-size: .8125rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
}
.cards-3 { margin-top: 2rem; }
@media (min-width: 980px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.center-copy { max-width: 760px; margin: 0 auto; }
.check-list-2col { columns: 1; }
@media (min-width: 760px) { .check-list-2col { columns: 2; column-gap: 3rem; } }
.check-list-2col li { break-inside: avoid; }

/* ---------- animazioni reveal ---------- */
.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}
/* le schermate delle feature entrano dal proprio lato */
.has-js .feature .browser-frame.reveal { transform: translateX(-36px); }
.has-js .feature-reverse .browser-frame.reveal { transform: translateX(36px); }
.has-js .reveal.visible,
/* stessa specificita' delle regole laterali: senza, il translateX resterebbe
   applicato anche dopo il reveal (immagini decentrate) */
.has-js .feature .browser-frame.reveal.visible,
.has-js .feature-reverse .browser-frame.reveal.visible { opacity: 1; transform: none; }
/* stagger: i figli .reveal di un contenitore .stagger entrano a cascata */
.has-js .stagger > .reveal:nth-child(2) { transition-delay: .08s; }
.has-js .stagger > .reveal:nth-child(3) { transition-delay: .16s; }
.has-js .stagger > .reveal:nth-child(4) { transition-delay: .24s; }
.has-js .stagger > .reveal:nth-child(5) { transition-delay: .32s; }
.has-js .stagger > .reveal:nth-child(6) { transition-delay: .4s; }
.has-js .stagger > .reveal:nth-child(7) { transition-delay: .48s; }
.has-js .stagger > .reveal:nth-child(8) { transition-delay: .56s; }
@media (prefers-reduced-motion: reduce) {
  .has-js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-copy > *, .hero-shot, .hl::after { animation: none; }
  .card::before, .card-icon, .browser-frame, .pillar, .btn { transition: none; }
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--dark);
  color: #aebccb;
  padding: 2.5rem 0;
  font-size: .875rem;
}
.footer-inner { display: grid; gap: .75rem; }
.site-footer .brand { color: #fff; }
.site-footer .brand-name strong { color: #6db9ec; }
.footer-note { color: #76879a; margin: 0; }
