/* ============================================================
   isolAIted — Design System & Custom Styles
   Stack: HTML5 + Tailwind CSS CDN + Vanilla JS + PHP
   Dark mode first. Mobile first.
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS (CSS Custom Properties)
   ------------------------------------------------------------ */
:root {
  /* Brand Colors — converted from CMYK brand identity */
  --color-cyan:    #00BFFF;   /* C75 M10 Y20 K0  — primary accent, CTA */
  --color-blue:    #0080BF;   /* C100 M50 Y25 K0 — hover, links, secondary */
  --color-navy:    #004099;   /* C100 M75 Y40 K0 — deep bg, badges */
  --color-dark:    #0D0F14;   /* C75 M70 Y60 K80 — main page background */
  --color-black:   #0A0B0D;   /* C75 M70 Y65 K85 — darkest bg, footer */

  /* Surface Colors (layering on top of dark bg) */
  --color-surface:          #131720;   /* cards, panels */
  --color-surface-elevated: #1C2333;   /* modals, dropdowns, nav bg */
  --color-surface-hover:    #222B3E;   /* hover state on surfaces */
  --color-border:           rgba(255, 255, 255, 0.07);
  --color-border-accent:    rgba(64, 230, 204, 0.25);

  /* Text Colors */
  --color-text-primary:   #F0F5FA;   /* headings, main body */
  --color-text-secondary: #94A3B8;   /* supporting text, labels */
  --color-text-muted:     #5A6A80;   /* placeholders, disabled */
  --color-text-inverse:   #0D0F14;   /* text on light/cyan backgrounds */

  /* Semantic */
  --color-success: #22D3A0;
  --color-warning: #F59E0B;
  --color-error:   #F43F5E;

  /* Programma Partner — accento ambra riservato ai contenuti per i partner */
  --color-amber:        #FFB020;
  --color-amber-bright: #FFC44D;

  /* Typography */
  --font-sans: 'Titillium Web', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Type Scale */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */
  --text-6xl:  3.75rem;    /* 60px */
  --text-7xl:  4.5rem;     /* 72px */

  /* Spacing Scale */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-2xl:  1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 8px 32px rgba(0, 0, 0, 0.6);
  --shadow-glow-cyan: 0 0 24px rgba(64, 230, 204, 0.2);
  --shadow-glow-blue: 0 0 24px rgba(0, 128, 191, 0.2);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

  /* Layout */
  --container-max: 1600px;
  --container-pad: 1.5rem;
  --nav-height:    4.5rem;
}

/* ------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-dark);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-blue);
}

/* ------------------------------------------------------------
   3. TYPOGRAPHY
   Note: base heading sizes are set in header.php <style> block
   to guarantee they load AFTER Tailwind CDN Preflight injection.
   Here we only define colour, spacing and semantic variants.
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Titillium Web', system-ui, -apple-system, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem,  5.5vw, 4.5rem);  font-weight: 300; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.875rem, 3.5vw, 3rem);   font-weight: 200; }
h3 { font-size: clamp(1.2rem,   2vw,   1.6rem); font-weight: 400; }
h4 { font-size: 1.15rem; font-weight: 600; }

.hero-title    { font-size: clamp(2.75rem, 7vw, 5.625rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; }
.hero-subtitle { font-size: clamp(1.05rem, 2vw, 1.2rem); color: #94A3B8; line-height: 1.75; }

.section-header h2 { font-size: clamp(1.875rem, 3.5vw, 2.75rem); }
.section-header p  { font-size: clamp(1rem, 1.5vw, 1.15rem); }

p {
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* Large lead paragraph */
.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--color-text-secondary);
  line-height: 1.75;
}

/* Monospaced inline code */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.4em;
  color: var(--color-cyan);
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-reverse {
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ------------------------------------------------------------
   4. LAYOUT UTILITIES
   ------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section {
  padding-top: var(--space-24);
  padding-bottom: var(--space-24);
}

.section-sm {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.section-alt {
  background-color: var(--color-black);
}

.section-navy {
  background-color: var(--color-navy);
}

/* ------------------------------------------------------------
   5. NAVIGATION
   ------------------------------------------------------------ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background-color: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background-color var(--transition-base), box-shadow var(--transition-base);
}

.nav.scrolled {
  background-color: rgba(10, 11, 13, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

@media (min-width: 768px) {
  .nav-links { display: flex; }
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.lang-btn {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1;
}

.lang-btn.active {
  background: var(--color-cyan);
  color: var(--color-text-inverse);
}

/* Mobile menu toggle */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-2);
  background: none;
  border: none;
}

@media (min-width: 768px) {
  .nav-hamburger { display: none; }
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-fast);
}

/* Mobile nav drawer */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-black);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-6);
  z-index: 99;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}

.nav-mobile a:last-child { border-bottom: none; }

/* ------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Primary CTA */
.btn-primary {
  background: var(--color-cyan);
  color: var(--color-text-inverse);
}

.btn-primary:hover {
  background: #5CEEDD;
  color: var(--color-text-inverse);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow-cyan);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-cyan);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--color-cyan);
  border: 1px solid var(--color-border-accent);
}

/* Griglia delle card dei componenti (pagina Funzionalità).
   Il numero di colonne arriva inline come --core-cols; qui si riduce
   sui formati stretti, altrimenti a 5 colonne il testo va a capo su ogni parola. */
.core-cards {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(var(--core-cols, 4), 1fr);
}

@media (max-width: 1150px) {
  .core-cards { grid-template-columns: repeat(min(var(--core-cols, 4), 3), 1fr); }
}

@media (max-width: 820px) {
  .core-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .core-cards { grid-template-columns: 1fr; }
}

/* Amber — riservato alle azioni verso il Programma Partner */
.btn-amber {
  background: transparent;
  color: var(--color-amber);
  border: 1px solid rgba(255, 176, 32, 0.35);
}

.btn-amber:hover {
  background: rgba(255, 176, 32, 0.1);
  color: var(--color-amber-bright);
  border-color: var(--color-amber);
  transform: translateY(-1px);
}

.btn-ghost:hover {
  background: rgba(64, 230, 204, 0.08);
  color: var(--color-cyan);
  transform: translateY(-1px);
}

/* Sizes */
.btn-lg {
  padding: 1rem 2rem;
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

/* ------------------------------------------------------------
   7. BADGES / CHIPS
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-cyan {
  background: rgba(64, 230, 204, 0.12);
  color: var(--color-cyan);
  border: 1px solid rgba(64, 230, 204, 0.2);
}

.badge-blue {
  background: rgba(0, 128, 191, 0.12);
  color: #60B8E0;
  border: 1px solid rgba(0, 128, 191, 0.2);
}

.badge-navy {
  background: rgba(0, 64, 153, 0.3);
  color: #93B4E8;
  border: 1px solid rgba(0, 64, 153, 0.4);
}

.badge-launch {
  background: rgba(255, 176, 32, 0.14);
  color: #FFB020;
  border: 1px solid rgba(255, 176, 32, 0.35);
  font-size: .65rem;
  padding: 0.15rem 0.6rem;
}

/* Badge dei contenuti Programma Partner */
.badge-amber {
  background: rgba(255, 176, 32, 0.12);
  color: var(--color-amber);
  border: 1px solid rgba(255, 176, 32, 0.3);
}

/* ------------------------------------------------------------
   8. CARDS
   ------------------------------------------------------------ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  transition: border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  border-color: var(--color-border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-cyan);
}

.card-elevated {
  background: var(--color-surface-elevated);
}

.target-hero-card {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(135deg, var(--color-cyan), var(--color-blue)) border-box;
  position: relative;
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: var(--space-6);
  color: var(--color-cyan);
  font-size: 1.5rem;
  /* Support both emoji and SVG icons */
  line-height: 1;
}

/* ------------------------------------------------------------
   9. HERO
   ------------------------------------------------------------ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + 4rem);
  padding-bottom: calc(var(--space-20) + 2rem);
}

/* Subtle grid/dot background */
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 64, 153, 0.35) 0%, transparent 70%),
    radial-gradient(circle at 80% 80%, rgba(64, 230, 204, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 30%, transparent 80%);
  pointer-events: none;
}

/* Two-column hero layout: text left, logo right */
.hero-two-col {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

.hero-content {
  max-width: 700px;
}

/* Hero logo */
.hero-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-logo-img {
  width: clamp(160px, 18vw, 280px);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 0 40px rgba(64, 230, 204, 0.18));
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

/* Feature screenshots — two stacked images per section */
.feature-screenshots {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
}

.feature-screenshot-img {
  width: 100%;
  height: auto;
  border-radius: .75rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(64, 230, 204, 0.06);
  display: block;
  transition: box-shadow .3s ease, transform .3s ease;
}

.feature-screenshot-img:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(64, 230, 204, 0.18);
  transform: translateY(-2px);
}

.lightbox-trigger {
  cursor: zoom-in;
}

/* Mode screenshot — homepage tab panels */
.mode-screenshot {
  width: 100%;
  height: auto;
  border-radius: .75rem;
  border: 1px solid var(--color-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(64, 230, 204, 0.06);
  display: block;
  transition: box-shadow .3s ease, transform .3s ease;
}

.mode-screenshot:hover {
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(64, 230, 204, 0.18);
  transform: translateY(-2px);
}

/* ── Lucide Icons ── */
.li {
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}
.li-sm  { width: 1.25rem; height: 1.25rem; }
.li-md  { width: 2rem;    height: 2rem;    }
.li-lg  { width: 2.5rem;  height: 2.5rem;  }
.li-xl  { width: 3rem;    height: 3rem;    }
.li-2xl { width: 3.5rem;  height: 3.5rem;  }

/* ── Lightbox overlay ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(10, 11, 13, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: .75rem;
  border: 1px solid rgba(64, 230, 204, 0.2);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  transform: scale(.94);
  transition: transform .25s ease;
  cursor: zoom-out;
}

.lightbox-overlay.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text-primary);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
  z-index: 9001;
}

.lightbox-close:hover {
  background: rgba(64, 230, 204, 0.15);
  border-color: rgba(64, 230, 204, 0.35);
  color: var(--color-cyan);
}

.hero-title {
  margin-bottom: var(--space-8);
  color: var(--color-text-primary);
  /* font-size set in header.php <style> as .hero-title */
}

.hero-subtitle {
  /* font-size set in header.php <style> as .hero-subtitle */
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-12);
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

.hero-trust {
  margin-top: var(--space-12);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.hero-trust-item svg {
  color: var(--color-cyan);
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------
   10. SECTION HEADERS
   ------------------------------------------------------------ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-header .badge {
  margin-bottom: var(--space-4);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--text-lg);
}

/* ------------------------------------------------------------
   11. DIVIDER
   ------------------------------------------------------------ */
.divider {
  width: 3rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-cyan), var(--color-blue));
  margin: var(--space-4) 0;
  border-radius: var(--radius-full);
}

.divider-center { margin: var(--space-4) auto; }

/* ------------------------------------------------------------
   12. FEATURE GRID (3-level operativi)
   ------------------------------------------------------------ */
.feature-tabs {
  display: flex;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-1);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.feature-tab {
  flex: 1;
  min-width: 120px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  cursor: pointer;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  text-align: center;
}

.feature-tab.active {
  background: var(--color-cyan);
  color: var(--color-text-inverse);
  border-color: var(--color-cyan);
}

.feature-tab[data-tab="registry"].active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.feature-tab:not(.active):hover {
  background: var(--color-surface);
  color: var(--color-text-primary);
  border-color: var(--color-cyan);
  transform: translateY(-1px);
}

.feature-tab[data-tab="registry"]:not(.active):hover {
  border-color: #3b82f6;
}

.feature-tab-sep {
  width: 1px;
  background: rgba(255, 255, 255, 0.15);
  margin: var(--space-2) var(--space-5);
  flex-shrink: 0;
  align-self: stretch;
}

.feature-panel {
  display: none;
}

.feature-panel.active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
}

/* checkmark / cross */
.check { color: var(--color-cyan); font-size: 1.1rem; }
.cross  { color: var(--color-text-muted); font-size: 1.1rem; }
.partial { color: var(--color-warning); font-size: var(--text-sm); }

/* ------------------------------------------------------------
   14. PRICING CARDS
   ------------------------------------------------------------ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  align-items: start;
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
}

.pricing-card.featured {
  border-color: var(--color-cyan);
  position: relative;
  box-shadow: var(--shadow-glow-cyan);
}

.pricing-card-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

.pricing-price {
  font-size: var(--text-5xl);
  font-weight: 600;
  line-height: 1;
  margin: var(--space-4) 0;
}

.pricing-price sup {
  font-size: var(--text-2xl);
  vertical-align: top;
  margin-top: var(--space-2);
}

.pricing-features-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

.pricing-features {
  list-style: none;
  margin: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.pricing-features li::before {
  content: '✓';
  color: var(--color-cyan);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ------------------------------------------------------------
   15. COMPLIANCE STRIP
   ------------------------------------------------------------ */
.compliance-strip {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-8) 0;
}

.compliance-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  align-items: center;
}

.compliance-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.compliance-item .icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: rgba(64, 230, 204, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-cyan);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.compliance-item .label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
}

.compliance-item .sublabel {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ------------------------------------------------------------
   16. FOOTER
   ------------------------------------------------------------ */
.footer {
  background: var(--color-black);
  border-top: 1px solid var(--color-border);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr);
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  max-width: 280px;
}

.footer-brand img {
  height: 1.55rem;
  margin-bottom: var(--space-4);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-cyan);
}

/* Voce Programma Partner: stesso accento ambra del resto dei contenuti partner */
.footer-links a.footer-link-amber        { color: var(--color-amber); }
.footer-links a.footer-link-amber:hover  { color: var(--color-amber-bright); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  padding-top: var(--space-8);
}

.footer-bottom p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-virtualway {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-virtualway img {
  height: 1.75rem;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
  display: inline-block;
  width: auto;
}

.footer-virtualway:hover img {
  opacity: 1;
}

/* ------------------------------------------------------------
   17. FORM (Contact)
   ------------------------------------------------------------ */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  -webkit-appearance: none;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-cyan);
  box-shadow: 0 0 0 3px rgba(64, 230, 204, 0.12);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-message {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin-top: var(--space-4);
  display: none;
}

.form-message.success {
  background: rgba(34, 211, 160, 0.1);
  border: 1px solid rgba(34, 211, 160, 0.25);
  color: var(--color-success);
  display: block;
}

.form-message.error {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--color-error);
  display: block;
}

/* ------------------------------------------------------------
   18. UTILITIES
   ------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.pt-nav { padding-top: var(--nav-height); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(64, 230, 204, 0); }
  50%       { box-shadow: 0 0 20px 4px rgba(64, 230, 204, 0.15); }
}

.animate-fade-up {
  animation: fadeInUp 0.6s ease both;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-black); }
::-webkit-scrollbar-thumb { background: var(--color-surface-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-blue); }

/* ------------------------------------------------------------
   19. RESPONSIVE HELPERS
   ------------------------------------------------------------ */
/* Hero two-col: hide logo on tablet and below to avoid crowding */
@media (max-width: 900px) {
  .hero-two-col {
    grid-template-columns: 1fr;
  }
  .hero-logo-area {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --container-pad: 1rem;
    --space-24: 4rem;
    --space-20: 3rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* ============================================================
   FAQ ACCORDION
============================================================ */
.faq-item {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color 0.2s ease;
}
.faq-item:hover {
  border-color: rgba(64, 230, 204, 0.3);
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  font-family: inherit;
}
.faq-trigger:focus-visible {
  outline: 2px solid var(--color-cyan);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--color-cyan);
  transition: transform 0.25s ease;
}
.faq-trigger[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}
.faq-body.is-open {
  max-height: 600px;
  padding: 0 1.5rem 1.25rem;
}
.faq-body p {
  font-size: .875rem;
  line-height: 1.75;
  color: var(--color-text-secondary);
  margin: 0;
}
