/* Operio™ — operiowebapp.it · Design System Light + Dark (v1.0.0.134)
   Default Light professionale con contrasti scuri strategici e toggle tema Dark completo.
   Zero CDN runtime, zero overflow orizzontale, accessibile (WCAG AA/AAA). */

/* ==========================================================================
   0. TOKEN DUAL-THEME (Light default + Dark override sincronizzato con <meta name="color-scheme">)
   ========================================================================== */
:root {
  color-scheme: light;

  --bg-canvas: #ffffff;
  --bg-band: #f6f8fb;
  --bg-surface: #ffffff;
  --bg-surface-2: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-panel-solid: #ffffff;
  --bg-input: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.085);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-brand: rgba(5, 150, 105, 0.4);

  --text-primary: #0b1220;
  --text-secondary: #334155;
  --text-muted: #526075;

  --brand-300: #047857;
  --brand-400: #059669;
  --brand-500: #10b981;
  --brand-600: #047857;
  --brand-ink: #ffffff;

  --teal-400: #0d9488;
  --cyan-400: #0284c7;
  --amber-300: #b45309;
  --amber-400: #d97706;
  --rose-400: #e11d48;

  --header-bg: rgba(255, 255, 255, 0.86);
  --header-bg-top: rgba(255, 255, 255, 0.55);
  --menu-bg: rgba(255, 255, 255, 0.98);
  --grid-line: rgba(15, 23, 42, 0.048);
  --aurora-1: rgba(16, 185, 129, 0.12);
  --aurora-2: rgba(14, 165, 233, 0.08);
  --aurora-3: rgba(132, 204, 22, 0.08);
  --spotlight: rgba(16, 185, 129, 0.09);

  --gradient-text-bg: linear-gradient(105deg, #065f46 0%, #059669 52%, #15803d 100%);
  --pill-emerald-bg: rgba(5, 150, 105, 0.1);
  --pill-emerald-fg: #065f46;
  --pill-emerald-bd: rgba(5, 150, 105, 0.28);
  --pill-cyan-bg: rgba(2, 132, 199, 0.09);
  --pill-cyan-fg: #0369a1;
  --pill-cyan-bd: rgba(2, 132, 199, 0.24);
  --pill-amber-bg: rgba(217, 119, 6, 0.1);
  --pill-amber-fg: #92400e;
  --pill-amber-bd: rgba(217, 119, 6, 0.28);

  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 36px -18px rgba(15, 23, 42, 0.12);
  --shadow-float: 0 34px 90px -26px rgba(15, 23, 42, 0.34);

  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, Consolas, monospace;

  --header-h: 4.25rem;
  --radius-sm: 0.625rem;
  --radius-md: 0.875rem;
  --radius-lg: 1.125rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;

  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  accent-color: var(--brand-500);
}

:root:has(> head > meta[name="color-scheme"][content="dark"]),
:root[data-theme="dark"] {
  color-scheme: dark;

  --bg-canvas: #04070d;
  --bg-band: #060a12;
  --bg-surface: #0b1220;
  --bg-surface-2: rgba(255, 255, 255, 0.035);
  --bg-panel: rgba(255, 255, 255, 0.028);
  --bg-panel-solid: #0b111c;
  --bg-input: rgba(2, 5, 10, 0.72);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-brand: rgba(52, 211, 153, 0.4);

  --text-primary: #f4f7fb;
  --text-secondary: #c3cbd7;
  --text-muted: #8f99aa;

  --brand-300: #6ee7b7;
  --brand-400: #34d399;
  --brand-500: #10b981;
  --brand-600: #059669;
  --brand-ink: #02140d;

  --teal-400: #2dd4bf;
  --cyan-400: #22d3ee;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --rose-400: #fb7185;

  --header-bg: rgba(4, 7, 13, 0.88);
  --header-bg-top: rgba(4, 7, 13, 0.35);
  --menu-bg: #0c1322;
  --grid-line: rgba(255, 255, 255, 0.045);
  --aurora-1: rgba(16, 185, 129, 0.24);
  --aurora-2: rgba(34, 211, 238, 0.1);
  --aurora-3: rgba(163, 230, 53, 0.11);
  --spotlight: rgba(52, 211, 153, 0.12);

  --gradient-text-bg: linear-gradient(100deg, #ffffff 0%, #c8f7dd 30%, #34d399 68%, #a3e635 100%);
  --pill-emerald-bg: rgba(52, 211, 153, 0.12);
  --pill-emerald-fg: #6ee7b7;
  --pill-emerald-bd: rgba(52, 211, 153, 0.28);
  --pill-cyan-bg: rgba(34, 211, 238, 0.1);
  --pill-cyan-fg: #67e8f9;
  --pill-cyan-bd: rgba(34, 211, 238, 0.26);
  --pill-amber-bg: rgba(251, 191, 36, 0.1);
  --pill-amber-fg: #fcd34d;
  --pill-amber-bd: rgba(251, 191, 36, 0.28);

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 20px 50px -30px rgba(0, 0, 0, 0.9);
  --shadow-float: 0 40px 120px -40px rgba(0, 0, 0, 0.9);
}

/* Superfici sempre scure a contrasto (cabina app, fascia risultati, smartphone, footer) */
.surface-dark,
.cockpit-wrapper,
.phone-frame,
.site-footer {
  color-scheme: only dark;
  --bg-surface: #0b1220;
  --bg-panel: rgba(255, 255, 255, 0.03);
  --bg-panel-solid: #0b111c;
  --border-subtle: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-brand: rgba(52, 211, 153, 0.42);
  --text-primary: #f4f7fb;
  --text-secondary: #c6cedb;
  --text-muted: #93a0b4;
  --brand-300: #6ee7b7;
  --brand-400: #34d399;
  --brand-ink: #02140d;
  --spotlight: rgba(52, 211, 153, 0.14);
  --pill-emerald-bg: rgba(52, 211, 153, 0.14);
  --pill-emerald-fg: #6ee7b7;
  --pill-emerald-bd: rgba(52, 211, 153, 0.3);
  --pill-cyan-bg: rgba(34, 211, 238, 0.12);
  --pill-cyan-fg: #67e8f9;
  --pill-cyan-bd: rgba(34, 211, 238, 0.28);
  --pill-amber-bg: rgba(251, 191, 36, 0.12);
  --pill-amber-fg: #fcd34d;
  --pill-amber-bd: rgba(251, 191, 36, 0.3);
  color: var(--text-secondary);
}

/* ==========================================================================
   1. BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 1rem);
  max-inline-size: 100%;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-block-size: 100dvh;
  max-inline-size: 100%;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--text-secondary);
}

:target {
  scroll-margin-block-start: calc(var(--header-h) + 1.25rem);
}

::selection {
  background: rgba(16, 185, 129, 0.25);
  color: var(--text-primary);
}

img,
svg {
  display: block;
  max-inline-size: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  text-wrap: pretty;
}

code,
.mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  inline-size: 1px;
  block-size: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Sprite icone */
.icon-sprite {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
}

.ico {
  display: inline-block;
  flex: none;
  inline-size: 1.15em;
  block-size: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   2. LAYOUT E TIPOGRAFIA
   ========================================================================== */
.container {
  inline-size: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

.container-narrow {
  inline-size: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
}

.h1-hero {
  font-size: clamp(2.1rem, 1.25rem + 3.3vw, 3.85rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.032em;
  word-spacing: 0.08em;
}

.h2-section {
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.7rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
  word-spacing: 0.07em;
}

.h3-card {
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  word-spacing: 0.05em;
}

.gradient-text {
  background: var(--gradient-text-bg);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--pill-emerald-bg);
  color: var(--pill-emerald-fg);
  border: 1px solid var(--pill-emerald-bd);
}

.kicker {
  display: inline-block;
  margin-block-end: 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-400);
}

.pulse-dot,
.live-dot {
  inline-size: 0.45rem;
  block-size: 0.45rem;
  border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .live-dot {
    animation: live-pulse 2.4s ease-in-out infinite;
  }
  @keyframes live-pulse {
    50% {
      box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
  }
}

.section-lead {
  margin: 0.9rem 0 1.5rem;
  font-size: 1rem;
  color: var(--text-muted);
  max-inline-size: 38rem;
}

/* ==========================================================================
   3. PULSANTI
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.2rem;
  min-block-size: 2.75rem;
  border-radius: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s var(--ease-out),
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn .ico {
  inline-size: 1.05em;
  block-size: 1.05em;
  stroke-width: 2;
  transition: transform 0.2s var(--ease-out);
}

.btn:hover .ico:last-child {
  transform: translateX(2px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: var(--brand-ink);
  border-color: rgba(4, 120, 87, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 2px 6px rgba(5, 150, 105, 0.22),
    0 10px 26px -10px rgba(5, 150, 105, 0.5);
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .btn-primary,
:root[data-theme="dark"] .btn-primary,
.surface-dark .btn-primary {
  background: linear-gradient(180deg, #4ade9f 0%, #10b981 100%);
  color: #02140d;
  border-color: rgba(167, 243, 208, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 10px 30px -10px rgba(16, 185, 129, 0.65);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.surface-dark .btn-secondary,
.site-footer .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7fb;
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-secondary:hover {
  background: var(--bg-surface-2);
  border-color: var(--border-brand);
}

.surface-dark .btn-secondary:hover,
.site-footer .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  min-block-size: 2.35rem;
  font-size: 0.84rem;
  border-radius: 0.65rem;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  min-block-size: 3.15rem;
  font-size: 0.98rem;
  border-radius: 0.85rem;
}

.btn-block {
  inline-size: 100%;
  white-space: normal;
}

.btn:disabled {
  opacity: 0.65;
  cursor: progress;
}

/* ==========================================================================
   4. HEADER ADATTIVO + TOGGLE TEMA CHIARO/SCURO
   ========================================================================== */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  block-size: var(--header-h);
  contain: layout style;
  background-color: var(--header-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-block-end: 1px solid var(--border-subtle);
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .site-header {
    animation: header-solidify linear both;
    animation-timeline: scroll(block root);
    animation-range: 0px 140px;
  }
  @keyframes header-solidify {
    from {
      background-color: var(--header-bg-top);
      border-block-end-color: transparent;
    }
    to {
      background-color: var(--header-bg);
      border-block-end-color: var(--border-subtle);
    }
  }
}

.site-header.is-measuring * {
  transition: none !important;
}

.header-inner {
  inline-size: min(100% - 2.5rem, 76rem);
  block-size: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.header-inner > * {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.site-logo img {
  block-size: 2.2rem;
  inline-size: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.14));
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .site-logo img,
:root[data-theme="dark"] .site-logo img {
  block-size: 2.35rem;
  padding: 0.2rem 0.58rem;
  border-radius: 0.58rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  filter: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-inline-start: auto;
}

.menu-button {
  anchor-name: --menu-button;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  min-block-size: 2.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-button:hover {
  background: var(--bg-surface-2);
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  position: fixed;
  inset: auto;
  inset-block-start: calc(var(--header-h) + 0.4rem);
  inset-block-start: anchor(--menu-button bottom);
  inset-inline-end: 1rem;
  inline-size: min(88dvw, 20rem);
  max-inline-size: calc(100dvw - 2rem);
  block-size: fit-content;
  max-block-size: calc(100dvh - 5.5rem);
  margin-block-start: 0.5rem;
  overflow: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  background: var(--menu-bg);
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.28);
  color: var(--text-primary);
}

.site-menu:not(:is(:popover-open, .\:popover-open)) {
  display: none;
}

.site-menu:is(:popover-open, .\:popover-open) {
  display: grid;
  gap: 0.15rem;
}

.site-menu a {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-menu a:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
}

.site-menu a[aria-current] {
  color: var(--brand-300);
  background: var(--pill-emerald-bg);
}

.site-menu .menu-only {
  margin-block-start: 0.3rem;
  padding-block-start: 0.3rem;
  border-block-start: 1px solid var(--border-subtle);
}

.site-menu .menu-only a {
  color: var(--brand-400);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* Pulsante Sole/Luna */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  inline-size: 2.35rem;
  block-size: 2.35rem;
  padding: 0;
  border-radius: 0.65rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.2s var(--ease-out);
}

.theme-toggle:hover {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border-brand);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .ico {
  inline-size: 1.05rem;
  block-size: 1.05rem;
}

/* Mostra solo lo stato opposto a quello attivo */
.theme-toggle .state-light {
  display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .state-dark,
:root[data-theme="dark"] .theme-toggle .state-dark {
  display: none;
}

:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle .state-light,
:root[data-theme="dark"] .theme-toggle .state-light {
  display: contents;
}

@media (max-width: 520px) {
  .header-inner {
    inline-size: calc(100% - 1.5rem);
    gap: 0.4rem;
  }
  .site-logo img {
    block-size: 1.85rem;
  }
  .site-nav {
    gap: 0.35rem;
  }
  .menu-button {
    padding: 0.42rem 0.65rem;
    min-block-size: 2.15rem;
    font-size: 0.8rem;
  }
  .header-actions {
    gap: 0.35rem;
  }
  .theme-toggle {
    inline-size: 2.15rem;
    block-size: 2.15rem;
  }
  .header-actions .btn-primary.btn-sm {
    padding: 0.42rem 0.7rem;
    min-block-size: 2.15rem;
    font-size: 0.78rem;
  }
  .header-actions .btn-primary.btn-sm .ico {
    display: none;
  }
  .header-actions .btn-secondary,
  .header-actions .header-login {
    display: none;
  }
}

.site-header.is-wide .menu-button {
  display: none;
}

.site-header.is-wide .site-nav {
  margin-inline: auto;
}

.site-header.is-wide .site-menu {
  position: static;
  display: flex;
  align-items: center;
  gap: 0.1rem;
  inline-size: auto;
  max-inline-size: none;
  block-size: auto;
  max-block-size: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.site-header.is-wide .site-menu .menu-only {
  display: none;
}

.site-header.is-wide .site-menu a {
  position: relative;
  padding: 0.45rem 0.72rem;
  font-size: 0.875rem;
  border-radius: 0.55rem;
}

.site-header.is-wide .site-menu a[aria-current] {
  background: transparent;
  color: var(--text-primary);
}

.site-header.is-wide .site-menu a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0.72rem 0.1rem;
  border-block-end: 2px solid var(--brand-400);
  border-radius: 2px;
}

/* ==========================================================================
   5. HERO
   ========================================================================== */
.hero-section {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3rem, 6vw, 5rem) clamp(3rem, 6vw, 4.75rem);
  overflow: clip;
}

/* Griglia tecnica leggera */
.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 0%, #000 35%, transparent 80%);
  mask-image: radial-gradient(ellipse 78% 58% at 50% 0%, #000 35%, transparent 80%);
}

/* Aurora calibrata Light/Dark */
.hero-section::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset-block-start: -12rem;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: min(72rem, 100%);
  block-size: 32rem;
  background:
    radial-gradient(closest-side at 34% 55%, var(--aurora-1), transparent),
    radial-gradient(closest-side at 68% 45%, var(--aurora-3), transparent),
    radial-gradient(closest-side at 52% 72%, var(--aurora-2), transparent);
  filter: blur(42px);
  pointer-events: none;
}

.hero-top {
  max-inline-size: 60rem;
  margin-inline: auto;
  text-align: center;
  display: grid;
  justify-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-inline-size: 100%;
  padding: 0.3rem 0.9rem 0.3rem 0.35rem;
  margin-block-end: 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  box-shadow: 0 2px 10px -4px rgba(15, 23, 42, 0.08);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: normal;
  text-align: start;
  transition: border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.hero-badge:hover {
  border-color: var(--border-brand);
  transform: translateY(-1px);
}

.hero-badge-tag {
  flex: none;
  padding: 0.16rem 0.58rem;
  border-radius: 999px;
  background: var(--pill-emerald-bg);
  color: var(--pill-emerald-fg);
  font-size: 0.72rem;
  font-weight: 700;
}

.hero-badge .ico {
  color: var(--text-muted);
  flex: none;
}

@media (max-width: 560px) {
  .hero-badge {
    border-radius: 0.85rem;
    padding: 0.45rem 0.72rem;
    gap: 0.45rem;
    font-size: 0.77rem;
    line-height: 1.38;
  }
}

.hero-lead {
  font-size: clamp(1.02rem, 0.95rem + 0.35vw, 1.18rem);
  line-height: 1.65;
  color: var(--text-secondary);
  margin-block: 1.4rem 2rem;
  max-inline-size: 42rem;
}

.hero-top .hero-lead {
  margin-inline: auto;
}

.hero-lead strong {
  color: var(--text-primary);
  font-weight: 600;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: center;
}

.hero-trust {
  list-style: none;
  margin: 1.65rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1.5rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.hero-trust .ico {
  color: var(--brand-400);
  stroke-width: 2.4;
}

/* ==========================================================================
   6. CABINA INTERATTIVA (Sempre dark a contrasto, stile app professionale)
   ========================================================================== */
.cockpit-stage {
  position: relative;
  margin-block-start: clamp(2.75rem, 5.5vw, 4rem);
}

.cockpit-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 10% 8% -6%;
  border-radius: 3rem;
  background: radial-gradient(closest-side, rgba(16, 185, 129, 0.22), transparent);
  filter: blur(48px);
  pointer-events: none;
}

.cockpit-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, #0d1424 0%, #070b14 100%);
  border: 1px solid rgba(15, 23, 42, 0.28);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    var(--shadow-float);
  overflow: hidden;
}

.cockpit-wrapper::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 10%;
  block-size: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.7), transparent);
  pointer-events: none;
}

.cockpit-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(2, 4, 9, 0.58);
  border-block-end: 1px solid var(--border-subtle);
}

.window-dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.window-dots span {
  inline-size: 0.7rem;
  block-size: 0.7rem;
  border-radius: 50%;
}

.window-dots span:nth-child(1) { background: #f87171; }
.window-dots span:nth-child(2) { background: #fbbf24; }
.window-dots span:nth-child(3) { background: #34d399; }

.cockpit-url {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-inline-size: 100%;
  min-inline-size: 0;
  padding: 0.3rem 0.85rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cockpit-url .ico {
  inline-size: 0.85rem;
  block-size: 0.85rem;
  color: var(--brand-400);
}

.cockpit-url > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cockpit-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .cockpit-status {
    display: none;
  }
  .cockpit-bar {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.cockpit-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 960px) {
  .cockpit-body {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

@property --fade-start {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

@property --fade-end {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.cockpit-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.6rem;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: inline proximity;
  scroll-padding-inline: 2.5rem;
  border-block-end: 1px solid var(--border-subtle);
  background: rgba(2, 4, 9, 0.38);
  --fade-size: 2.5rem;
  mask:
    linear-gradient(black, black) no-clip subtract,
    linear-gradient(to right, black, transparent) 0 0 / var(--fade-start) 100% no-repeat no-clip,
    linear-gradient(to right, transparent, black) 100% 0 / var(--fade-end) 100% no-repeat no-clip;
}

.cockpit-tabs::-webkit-scrollbar {
  display: none;
}

@supports ((animation-timeline: scroll()) and (animation-range: 0% 100%)) {
  .cockpit-tabs {
    animation: tabs-fade-start linear both, tabs-fade-end linear both;
    animation-timeline: scroll(self inline);
    animation-range: 0 var(--fade-size), calc(100% - var(--fade-size)) 100%;
  }
  @keyframes tabs-fade-start {
    to { --fade-start: var(--fade-size); }
  }
  @keyframes tabs-fade-end {
    from { --fade-end: var(--fade-size); }
  }
}

@media (min-width: 960px) {
  .cockpit-tabs {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem;
    overflow: visible;
    mask: none;
    animation: none;
    border-block-end: 0;
    border-inline-end: 1px solid var(--border-subtle);
  }
}

.cockpit-tab-btn {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.7rem;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.cockpit-tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.045);
}

.cockpit-tab-btn[aria-selected="true"] {
  color: var(--text-primary);
  background: rgba(52, 211, 153, 0.1);
}

.cockpit-tab-btn[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0.75rem 0;
  border-block-end: 2px solid var(--brand-400);
  border-radius: 2px;
}

@media (min-width: 960px) {
  .cockpit-tab-btn[aria-selected="true"]::after {
    inset: 0.6rem auto 0.6rem 0;
    border-block-end: 0;
    border-inline-start: 2px solid var(--brand-400);
  }
}

.tab-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.tab-ico .ico {
  inline-size: 1rem;
  block-size: 1rem;
}

.cockpit-tab-btn[aria-selected="true"] .tab-ico {
  color: var(--brand-300);
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.34);
}

.tab-text {
  display: grid;
  gap: 0.05rem;
}

.tab-title {
  white-space: nowrap;
}

.tab-sub {
  display: none;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (min-width: 960px) {
  .tab-sub {
    display: block;
  }
}

.cockpit-panels {
  display: grid;
  min-inline-size: 0;
}

.cockpit-panels > .cockpit-panel {
  grid-area: 1 / 1;
  min-inline-size: 0;
}

.cockpit-panel-inner {
  padding: clamp(1.25rem, 2.8vw, 2.1rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}

@media (min-width: 1140px) {
  .cockpit-panel-inner {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cockpit-panel:not([hidden]) .cockpit-panel-inner {
    animation: panel-in 0.35s var(--ease-out);
  }
  @keyframes panel-in {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
}

.panel-summary > .pill {
  max-inline-size: 100%;
  white-space: normal;
  line-height: 1.35;
}

.panel-summary h3 {
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  word-spacing: 0.06em;
  margin-block: 0.85rem 0.75rem;
  color: #f4f7fb;
}

.panel-summary p {
  margin: 0 0 1.25rem;
  font-size: 0.94rem;
  color: #c6cedb;
}

.panel-summary p strong {
  color: #ffffff;
  font-weight: 600;
}

/* Elenchi con spunta */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
  font-size: 0.89rem;
  line-height: 1.55;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: var(--text-secondary);
}

.check-list li strong {
  color: var(--text-primary);
  font-weight: 600;
}

.check-mark {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  margin-block-start: 0.1rem;
  border-radius: 50%;
  background: var(--pill-emerald-bg);
  color: var(--brand-400);
  font-size: 0.75rem;
  font-weight: 900;
}

.check-mark .ico {
  inline-size: 0.8rem;
  block-size: 0.8rem;
  stroke-width: 2.8;
}

.ui-stage {
  background: rgba(2, 4, 9, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: grid;
  gap: 0.6rem;
}

.ui-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.15rem 0.2rem 0.75rem;
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
  margin-block-end: 0.2rem;
}

.ui-stage-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #f4f7fb;
}

.ui-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ui-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 560px) {
  .ui-row {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .ui-row > .pill {
    grid-column: 2;
    justify-self: start;
  }
}

.ui-ico {
  display: inline-grid;
  place-items: center;
  inline-size: 2.1rem;
  block-size: 2.1rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #6ee7b7;
}

.ui-ico .ico {
  inline-size: 1rem;
  block-size: 1rem;
}

.ui-row-main {
  display: grid;
  gap: 0.2rem;
  min-inline-size: 0;
}

.ui-row-main strong {
  color: #f4f7fb;
  font-size: 0.84rem;
  font-weight: 600;
}

.ui-row-sub {
  color: #93a0b4;
  font-size: 0.78rem;
  line-height: 1.45;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  inline-size: fit-content;
  padding: 0.2rem 0.62rem;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-emerald {
  background: var(--pill-emerald-bg);
  color: var(--pill-emerald-fg);
  border: 1px solid var(--pill-emerald-bd);
}

.pill-cyan {
  background: var(--pill-cyan-bg);
  color: var(--pill-cyan-fg);
  border: 1px solid var(--pill-cyan-bd);
}

.pill-amber {
  background: var(--pill-amber-bg);
  color: var(--pill-amber-fg);
  border: 1px solid var(--pill-amber-bd);
}

.doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.doc-tag {
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.76rem;
  font-weight: 500;
  color: #d6dde8;
}

/* ==========================================================================
   7. FASCIA COMPATIBILITÀ
   ========================================================================== */
.compat-strip {
  padding-block: 0.5rem 3rem;
}

.compat-title {
  margin: 0 0 1.1rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.compat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.compat-list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.compat-list .ico {
  color: var(--brand-400);
}

/* ==========================================================================
   8. SEZIONI + COME FUNZIONA CON LINEA ANIMATA + STORIE FOTOGRAFICHE
   ========================================================================== */
.section {
  position: relative;
  padding-block: clamp(4rem, 7.5vw, 6.5rem);
  overflow: clip;
}

.section-alt {
  background: var(--bg-band);
  border-block: 1px solid var(--border-subtle);
}

.surface-dark {
  background:
    radial-gradient(ellipse 65rem 32rem at 50% 0%, rgba(16, 185, 129, 0.14), transparent 70%),
    #060b14;
  border-block: 1px solid rgba(255, 255, 255, 0.08);
}

.section-header {
  max-inline-size: 46rem;
  margin-inline: auto;
  text-align: center;
  margin-block-end: clamp(2.25rem, 4.5vw, 3.25rem);
}

.section-header p {
  margin-block: 0.95rem 0;
  font-size: 1.04rem;
  color: var(--text-muted);
}

/* Come funziona + disegno vettoriale animato di sfondo */
.flow-wrap {
  position: relative;
}

.flow-track {
  display: none;
  position: absolute;
  inset-block-start: 2.8rem;
  inset-inline: 10%;
  inline-size: 80%;
  block-size: 4rem;
  pointer-events: none;
  z-index: 0;
}

@media (min-width: 960px) {
  .flow-track {
    display: block;
  }
}

.flow-track-base {
  fill: none;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  stroke-dasharray: 5 6;
}

.flow-track-pulse {
  fill: none;
  stroke: var(--brand-400);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 64 260;
  opacity: 0.7;
}

@media (prefers-reduced-motion: no-preference) {
  .flow-track-pulse {
    animation: flow-dash 7s linear infinite;
  }
  @keyframes flow-dash {
    to {
      stroke-dashoffset: -324;
    }
  }
}

.steps-grid {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}

.step-card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.step-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-2px);
}

.step-num {
  position: absolute;
  inset-block-start: 1.4rem;
  inset-inline-end: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.step-ico {
  display: inline-grid;
  place-items: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  margin-block-end: 1.1rem;
  border-radius: 0.8rem;
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  color: var(--brand-400);
}

.step-ico .ico {
  inline-size: 1.3rem;
  block-size: 1.3rem;
}

.step-card p {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Card fotografiche editoriali (#vita-operativa) */
.stories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .stories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.story-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, transform 0.3s var(--ease-out);
}

.story-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-3px);
}

.story-media {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg-surface-2);
}

.story-media img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 14%;
  transition: transform 0.6s var(--ease-out);
}

@media (prefers-reduced-motion: no-preference) {
  .story-card:hover .story-media img {
    transform: scale(1.04);
  }
}

/* Sfumatura morbida che fonde il bordo inferiore della foto con la card */
.story-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 48%, var(--bg-surface) 100%);
  pointer-events: none;
}

.story-tag {
  position: absolute;
  inset-block-start: 0.9rem;
  inset-inline-start: 0.9rem;
  z-index: 2;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 600;
}

.story-body {
  position: relative;
  z-index: 2;
  padding: 0.4rem 1.5rem 1.65rem;
  display: grid;
  gap: 0.55rem;
}

.story-body p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Spotlight interattivo sulle card al passaggio del mouse (solo puntatore fine) */
@media (hover: hover) and (pointer: fine) {
  .spotlight-card {
    position: relative;
  }
  .spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), var(--spotlight), transparent 65%);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 1;
  }
  .spotlight-card:hover::before {
    opacity: 1;
  }
}

/* Griglie e card funzionalità */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1rem;
}

.bento-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 760px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .bento-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bento-wide {
    grid-column: span 2;
  }
}

.feature-card {
  position: relative;
  padding: 1.6rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: grid;
  align-content: start;
  gap: 0.7rem;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.feature-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-2px);
}

.feature-icon {
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: 0.8rem;
  display: inline-grid;
  place-items: center;
  margin-block-end: 0.4rem;
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  color: var(--brand-400);
  font-size: 1.2rem;
}

.feature-icon .ico {
  inline-size: 1.3rem;
  block-size: 1.3rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.feature-card p strong {
  color: var(--text-primary);
  font-weight: 600;
}

.tag-soft {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  vertical-align: 0.15em;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--text-muted);
}

.chip-row {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip-row li {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.code-snippet {
  margin: 0.4rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: #0b1220;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.c-tag { color: #f472b6; }
.c-attr { color: #93c5fd; }
.c-str { color: #6ee7b7; }

.pro-note {
  margin: 2rem auto 0;
  max-inline-size: 52rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   9. RISULTATI IN PRODUZIONE (Fascia scura a contrasto con trama topografica)
   ========================================================================== */
.dark-topo-bg {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}

.surface-dark > .container {
  position: relative;
  z-index: 1;
}

.case-study-wrap {
  container: casegrid / inline-size;
}

.case-study-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@container casegrid (inline-size >= 38rem) {
  .case-study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto 1fr auto);
  }
}

@container casegrid (inline-size >= 62rem) {
  .case-study-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto 1fr auto;
  }
}

.case-card {
  grid-row: span 3;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-rows: subgrid;
  gap: 0.9rem;
  min-inline-size: 0;
  padding: 1.6rem 1.5rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.25s ease;
}

.case-card:hover {
  border-color: rgba(52, 211, 153, 0.4);
}

.case-card > header {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 0.2rem;
}

.case-metric {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.8rem + 1.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 20%, #86efac 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.case-metric-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #34d399;
  margin-block-end: 0.85rem;
}

.case-card > header h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  color: #f4f7fb;
}

.case-card > p {
  margin: 0;
  font-size: 0.88rem;
  color: #b7c2d3;
  line-height: 1.6;
}

.case-card > footer {
  padding-block-start: 0.85rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
}

.territory-callout {
  position: relative;
  overflow: hidden;
  margin-block-start: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(ellipse 60% 120% at 0% 0%, rgba(16, 185, 129, 0.2), transparent 70%),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(52, 211, 153, 0.4);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.territory-copy {
  flex: 1 1 24rem;
  min-inline-size: 0;
}

.territory-copy h3 {
  margin-block: 0 0.35rem;
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.5rem);
  font-weight: 800;
  color: #ffffff;
}

.territory-copy p {
  margin: 0;
  font-size: 0.95rem;
  color: #c6cedb;
  max-inline-size: 42rem;
}

/* ==========================================================================
   10. SIMULATORE DI RISPARMIO
   ========================================================================== */
.roi-box {
  display: grid;
  gap: 2rem;
}

.roi-intro {
  max-inline-size: 46rem;
}

.roi-intro p {
  margin: 1rem 0 0;
  font-size: 1.02rem;
  color: var(--text-muted);
}

.roi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 960px) {
  .roi-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.roi-controls {
  display: grid;
  gap: 1.6rem;
  align-content: center;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.roi-field {
  display: grid;
  gap: 0.6rem;
}

.roi-field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.roi-field-head output {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-300);
}

.roi-field input[type="range"] {
  inline-size: 100%;
  margin: 0;
  accent-color: var(--brand-500);
  cursor: pointer;
}

.roi-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.roi-stat {
  display: grid;
  align-content: space-between;
  gap: 0.75rem;
  padding: 1.35rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.roi-stat.is-accent {
  background:
    radial-gradient(ellipse 90% 90% at 0% 0%, rgba(16, 185, 129, 0.12), transparent 70%),
    var(--bg-surface);
  border-color: var(--border-brand);
}

.roi-stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.roi-stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.05rem + 0.9vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.roi-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 420px) {
  .roi-results {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   11. PREZZI (€10 / €49 / €119 / €249), SWITCH MENSILE/ANNUALE & CONFIGURATORE
   ========================================================================== */
.billing-switch-wrap {
  display: flex;
  justify-content: center;
  margin-block-end: 2rem;
}

.billing-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
}

.billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.billing-btn[aria-pressed="true"] {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.14);
}

.billing-save-pill {
  padding: 0.15rem 0.52rem;
  border-radius: 999px;
  background: var(--pill-emerald-bg);
  color: var(--pill-emerald-fg);
  font-size: 0.72rem;
  font-weight: 700;
}

.plans-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  align-items: stretch;
}

@media (min-width: 680px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1140px) {
  .plans-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.plan-card {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.75rem;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.plan-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.plan-card.is-featured {
  border-color: var(--border-brand);
  box-shadow: 0 24px 70px -28px rgba(5, 150, 105, 0.28);
}

.plan-card.is-selected {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 2px var(--brand-500), 0 24px 70px -28px rgba(5, 150, 105, 0.32);
}

.plan-badge {
  position: absolute;
  inset-block-start: -0.82rem;
  inset-inline-start: 50%;
  translate: -50% 0;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #10b981, #059669);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 18px -6px rgba(5, 150, 105, 0.55);
}

.plan-meta {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-400);
}

.plan-name {
  margin-block-start: 0.4rem;
  font-size: 1.45rem;
  font-weight: 800;
}

.plan-desc {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-block-size: 2.8em;
}

.plan-price-block {
  margin-block: 1.2rem 1.25rem;
  padding-block-end: 1.25rem;
  border-block-end: 1px solid var(--border-subtle);
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.plan-price strong {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  color: var(--text-primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan-price span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.plan-price-note {
  margin-block-start: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brand-300);
  min-block-size: 1.3em;
}

.plan-extra {
  margin: 0 0 1.15rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  background: var(--bg-surface-2);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-card > .btn {
  inline-size: 100%;
}

.migration-banner {
  margin-block-start: 1.35rem;
  padding: 1rem 1.35rem;
  border-radius: var(--radius-xl);
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.migration-banner strong {
  color: var(--text-primary);
  font-weight: 700;
}

.addons-box {
  margin-block-start: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
}

.addons-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.addons-head > span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.addons-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin-block: 1.25rem;
}

@media (min-width: 680px) {
  .addons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  #solo-packs-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.addon-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-band);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.addon-toggle:hover {
  border-color: var(--border-strong);
}

.addon-toggle:has(input:checked) {
  border-color: var(--border-brand);
  background: var(--pill-emerald-bg);
}

.addon-toggle.is-included {
  opacity: 0.9;
  border-style: dashed;
  border-color: var(--border-brand);
}

.addon-toggle input[type="checkbox"] {
  accent-color: var(--brand-500);
  inline-size: 1.15rem;
  block-size: 1.15rem;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
}

.addon-info {
  display: grid;
  gap: 0.35rem;
  font-size: 0.84rem;
}

.addon-info strong {
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 600;
}

.addon-info strong em {
  display: block;
  margin-block-start: 0.15rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-300);
}

.addon-info > span {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.quote-summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding-block-start: 1.25rem;
  border-block-start: 1px solid var(--border-subtle);
}

.quote-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quote-breakdown {
  margin-block-start: 0.25rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
}

.quote-total-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
}

.quote-total {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.quote-total > span {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand-300);
  font-variant-numeric: tabular-nums;
}

.quote-total small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.quote-box {
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
}

/* ==========================================================================
   12. DOWNLOAD, MOCKUP SMARTPHONE & DOMANDE FREQUENTI
   ========================================================================== */
.split-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 960px) {
  .split-2 {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 5vw, 4rem);
  }
}

@media (min-width: 960px) {
  #download .split-2 > div:first-child {
    position: sticky;
    inset-block-start: calc(var(--header-h) + 1.5rem);
  }
}

.download-stack {
  container-type: inline-size;
  display: grid;
  gap: 0.9rem;
}

.download-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem 1.1rem;
  padding: 1.35rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.download-card > .btn {
  grid-column: 1 / -1;
}

@container (inline-size >= 31rem) {
  .download-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .download-card > .btn {
    grid-column: auto;
  }
}

.download-ico {
  display: inline-grid;
  place-items: center;
  inline-size: 3rem;
  block-size: 3rem;
  border-radius: 0.85rem;
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  color: var(--brand-400);
}

.download-ico .ico {
  inline-size: 1.4rem;
  block-size: 1.4rem;
}

.download-info p {
  margin: 0.25rem 0 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Mockup smartphone Operio Mobile */
.phone-showcase {
  margin-block-start: 0.5rem;
  display: flex;
  justify-content: center;
}

.phone-frame {
  inline-size: min(100%, 21.5rem);
  padding: 0.7rem;
  border-radius: 2rem;
  background: linear-gradient(160deg, #1e293b, #090d16);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 28px 64px -22px rgba(15, 23, 42, 0.45);
}

.phone-screen {
  border-radius: 1.45rem;
  background: #070b14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
}

.phone-notch {
  inline-size: 4.5rem;
  block-size: 0.35rem;
  margin-inline: auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
}

.phone-head strong {
  color: #f4f7fb;
  font-family: var(--font-mono);
}

.phone-card {
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.phone-card strong {
  color: #f4f7fb;
  font-size: 0.82rem;
}

.phone-card span {
  color: #93a0b4;
}

.phone-sig {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 0.85rem;
  background: rgba(16, 185, 129, 0.12);
  border: 1px dashed rgba(52, 211, 153, 0.42);
  font-size: 0.78rem;
  color: #6ee7b7;
  font-weight: 600;
}

.install-notes {
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding-inline: 1.1rem;
}

.install-notes summary {
  cursor: pointer;
  padding-block: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.install-notes > div {
  padding-block-end: 1rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.install-notes a {
  color: var(--brand-400);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Fisarmonica nativa accessibile */
.accordion {
  display: grid;
  gap: 0.6rem;
  margin-block-start: 1.75rem;
}

.accordion details {
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding-inline: 1.25rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.accordion details[open] {
  border-color: var(--border-brand);
}

.accordion summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.05rem;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  cursor: pointer;
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: "";
  inline-size: 1rem;
  block-size: 1rem;
  flex-shrink: 0;
  background-color: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") no-repeat center / contain;
}

.accordion details[open] > summary::after {
  rotate: 45deg;
  background-color: var(--brand-400);
}

.accordion details::details-content {
  interpolate-size: allow-keywords;
  overflow: clip;
  contain: layout;
}

.accordion details:not([open])::details-content {
  block-size: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .accordion summary::after {
    transition: rotate 0.25s var(--ease-out), background-color 0.2s ease;
  }
  .accordion details::details-content {
    transition: block-size, content-visibility, display;
    transition-duration: 0.28s;
    transition-timing-function: ease-in-out;
    transition-behavior: allow-discrete;
  }
}

.accordion-body {
  padding-block: 0 1.15rem;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.accordion-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   13. ATTIVAZIONE: SFONDO AMBIENTALE SFUMATO, CONTATTI & MODULO
   ========================================================================== */
.section-cta {
  position: relative;
}

.cta-ambient-photo {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: min(55rem, 100%);
  block-size: 100%;
  object-fit: cover;
  opacity: 0.08;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 75% 75% at 25% 50%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 75% at 25% 50%, #000 0%, transparent 72%);
  z-index: 0;
}

.section-cta > .container {
  position: relative;
  z-index: 1;
}

.contact-card {
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 0.85rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-band);
  border: 1px solid var(--border-subtle);
  font-size: 0.88rem;
}

.contact-item strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
}

.contact-ico {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2.4rem;
  block-size: 2.4rem;
  border-radius: 0.7rem;
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  color: var(--brand-400);
}

.contact-ico .ico {
  inline-size: 1.1rem;
  block-size: 1.1rem;
}

.contact-link {
  display: inline-block;
  margin-block-start: 0.1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-300);
  overflow-wrap: anywhere;
}

.contact-link:hover {
  color: var(--text-primary);
}

.contact-sub {
  display: block;
  margin-block-start: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.contact-legal {
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.contact-legal strong {
  display: inline;
}

.contact-legal > div > strong:first-child {
  display: block;
  margin-block-end: 0.25rem;
}

.contact-legal .mono {
  color: var(--text-secondary);
}

.form-card {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-brand);
  box-shadow: var(--shadow-card);
}

.form-card > h3 {
  font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.form-intro {
  margin: 0.6rem 0 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-block-end: 1rem;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.field label span[aria-hidden="true"] {
  color: var(--brand-400);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: max(1rem, 0.95rem);
  min-block-size: 3rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  inline-size: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.75;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--border-brand);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

@media (pointer: coarse) {
  .field input,
  .field select,
  .field textarea {
    min-block-size: 3.25rem;
  }
}

.field textarea {
  min-block-size: 6rem;
  resize: vertical;
}

.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid,
.field input[aria-invalid="true"] {
  border-color: var(--rose-400);
}

.field-error {
  font-size: 0.78rem;
  color: var(--rose-400);
  min-block-size: 1rem;
}

.form-privacy {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

.form-privacy a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.form-status {
  margin-block-start: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-status.is-ok {
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  color: var(--pill-emerald-fg);
}

.form-status.is-err {
  background: var(--pill-amber-bg);
  border: 1px solid var(--pill-amber-bd);
  color: var(--pill-amber-fg);
}

/* ==========================================================================
   14. FOOTER (Sempre scuro a contrasto) E FINESTRE DI DIALOGO
   ========================================================================== */
.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: #04070d;
  border-block-start: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  color: #93a0b4;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 2.25rem;
  padding-block-end: 2.25rem;
  border-block-end: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 1080px) {
  .footer-grid {
    grid-template-columns: 1.3fr 1fr 1.2fr 1fr;
  }
}

.footer-brand {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

.footer-brand img {
  block-size: 2.75rem;
  inline-size: auto;
  padding: 0.25rem 0.68rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.footer-brand p {
  margin: 0;
  line-height: 1.6;
  max-inline-size: 22rem;
  color: #93a0b4;
}

.footer-title {
  color: #f4f7fb;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-block-end: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-links a {
  color: #c6cedb;
  transition: color 0.15s ease;
}

.footer-links a:hover,
.link-button:hover {
  color: #6ee7b7;
}

.footer-legal {
  display: grid;
  gap: 0.35rem;
  line-height: 1.55;
  color: #93a0b4;
}

.footer-legal > strong {
  color: #f4f7fb;
  font-weight: 600;
}

.footer-legal span strong {
  color: #c6cedb;
  font-weight: 600;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #93a0b4;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.footer-bottom {
  padding-block-start: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.5rem;
  font-size: 0.8rem;
}

.footer-bottom-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

/* ==========================================================================
   15. PAGINE SECONDARIE E DOCUMENTI LEGALI
   ========================================================================== */
main.section > .container-narrow > .hero-lead,
main.section .hero-lead {
  margin-inline: 0;
}

main.section .contact-card p {
  margin: 0.5rem 0 0;
  line-height: 1.65;
}

main.section .contact-card a:not(.btn) {
  color: var(--brand-300);
}

.legal-hero {
  margin-block-end: 2rem;
}

.legal-hero .h1-hero {
  font-size: clamp(1.9rem, 1.25rem + 2.5vw, 3rem);
  margin-block: 0.9rem 0.75rem;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.legal-meta strong {
  color: var(--text-secondary);
  font-weight: 600;
}

.legal-doc {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3.2vw, 2.5rem);
  border-radius: var(--radius-2xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.legal-section {
  display: grid;
  gap: 0.7rem;
  padding-block-end: 1.5rem;
  border-block-end: 1px solid var(--border-subtle);
}

.legal-section:last-child {
  padding-block-end: 0;
  border-block-end: 0;
}

.legal-section h2 {
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.28rem);
  font-weight: 700;
  color: var(--text-primary);
}

.legal-section p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.legal-section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-section a {
  color: var(--brand-300);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-list {
  margin: 0.25rem 0 0;
  padding-inline-start: 1.25rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.legal-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal-table-wrap {
  margin-block-start: 0.4rem;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-band);
}

.legal-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.55;
  text-align: start;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem 0.95rem;
  border-block-end: 1px solid var(--border-subtle);
  vertical-align: top;
}

.legal-table tr:last-child td {
  border-block-end: 0;
}

.legal-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface-2);
  white-space: nowrap;
}

.legal-table td {
  color: var(--text-secondary);
}

.legal-callout {
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: var(--pill-emerald-bg);
  border: 1px solid var(--pill-emerald-bd);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   16. COMPARSA AL PASSAGGIO (scroll-driven, miglioramento progressivo)
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    .reveal {
      animation: reveal-up linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 48%;
    }
    @keyframes reveal-up {
      from {
        opacity: 0;
        transform: translateY(24px);
      }
      to {
        opacity: 1;
        transform: none;
      }
    }
  }
}

@media (forced-colors: active) {
  .btn,
  .cockpit-tab-btn,
  .plan-card,
  .feature-card,
  .story-card,
  .step-card,
  .trust-vault-card {
    border: 1px solid CanvasText;
  }
  .gradient-text,
  .case-metric {
    color: CanvasText;
    background: none;
  }
}

/* ==========================================================================
   17. CRUSCOTTO "TASCA & UTILE REALE", GARANZIE ZERO-LOCK-IN & PAGINE VERTICALI
   ========================================================================== */
.check-list li,
.legal-list li {
  text-wrap: pretty;
}

/* Cruscotto mini-KPI "Tasca & Utile Reale" nella Cabina Interattiva (sempre dark) */
.pocket-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

@media (max-width: 480px) {
  .pocket-kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.pocket-kpi-card {
  padding: 0.72rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.085);
  display: grid;
  gap: 0.2rem;
}

.pocket-kpi-card.is-net {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-color: rgba(52, 211, 153, 0.38);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.pocket-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #93a0b4;
}

.pocket-kpi-val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #f4f7fb;
  font-variant-numeric: tabular-nums;
}

.pocket-kpi-card.is-net .pocket-kpi-val {
  font-size: 1.45rem;
  color: #6ee7b7;
}

.pocket-kpi-sub {
  font-size: 0.72rem;
  color: #93a0b4;
}

.pocket-breakeven {
  padding: 0.72rem 0.85rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 0.42rem;
}

.pocket-breakeven-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #c6cedb;
}

.pocket-breakeven-head strong {
  color: #6ee7b7;
  font-weight: 700;
}

.pocket-breakeven-track {
  inline-size: 100%;
  block-size: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.pocket-breakeven-fill {
  inline-size: 100%;
  block-size: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #10b981 0%, #34d399 65%, #a3e635 100%);
}

/* Sezione Sicurezza, Vault Cifrato & Libertà Zero-Lock-In */
.trust-vault-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 680px) {
  .trust-vault-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1120px) {
  .trust-vault-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.trust-vault-card {
  padding: 1.45rem;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: grid;
  align-content: start;
  gap: 0.6rem;
  transition: border-color 0.25s ease, transform 0.25s var(--ease-out);
}

.trust-vault-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-2px);
}

.trust-vault-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.trust-vault-card p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Tabella comparativa compatta Zero-Lock-In & Operatività */
.compare-wrap {
  margin-block-start: 1.5rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
}

.compare-table {
  inline-size: 100%;
  min-inline-size: 36rem;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: start;
}

.compare-table th,
.compare-table td {
  padding: 0.9rem 1.15rem;
  border-block-end: 1px solid var(--border-subtle);
  vertical-align: top;
}

.compare-table tbody tr:last-child td {
  border-block-end: 0;
}

.compare-table thead th {
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface-2);
}

.compare-table thead th.is-operio,
.compare-table tbody td.is-operio {
  background: var(--pill-emerald-bg);
}

.compare-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  inline-size: 28%;
}

.compare-table tbody td:nth-child(2) {
  color: var(--text-muted);
  inline-size: 34%;
}

.compare-table tbody td.is-operio {
  color: var(--text-primary);
  font-weight: 500;
  inline-size: 38%;
}

/* Layout arricchito pagine verticali SEO */
.subpage-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-block-end: 1.1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.subpage-breadcrumb a:hover {
  color: var(--brand-400);
}

.subpage-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  margin-block: 1.75rem;
}

@media (min-width: 780px) {
  .subpage-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.subpage-highlight {
  margin-block: 2rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-radius: var(--radius-2xl);
  background: var(--bg-band);
  border: 1px solid var(--border-strong);
  display: grid;
  gap: 1rem;
}
