/* ============================================================
   ATENYS — Engicam Visual Override
   Collegare DOPO il blocco <style> inline della pagina
   ============================================================ */

/* ── 0. VARIABILI ─────────────────────────────────────────── */
:root {
  /* Palette Engicam */
  --eng-accent:       #0071B8;
  --eng-accent-hover: #005FA3;
  --eng-text:         #222222;
  --eng-text-light:   #666666;
  --eng-text-grey:    #B0B0B0;
  --eng-bg:           #EDEDED;
  --eng-bg-light:     #F5F5F5;
  --eng-bg-dark:      #50535A;
  --eng-white:        #FFFFFF;
  --eng-border:       #E6E6E6;
  --eng-bg-darker:    #1E2227;
  --cyan: var(--eng-accent);

  /* Colori funzionali Atenys */
  --atenys-boot:       #0891b2;
  --atenys-updates:    #16a34a;
  --atenys-cve:        #ea580c;
  --atenys-encryption: #6366f1;

  --radius:           3px;

  /* Font */
  --eng-font:         'Inter', sans-serif;
  --eng-font-mono:    'JetBrains Mono', monospace;
}

/* ── 1. TIPOGRAFIA BASE ───────────────────────────────────── */
a {
  color: var(--eng-accent);
}
a:hover, a:focus {
  color: var(--eng-accent-hover);
}

/* H1 — solo hero, deve avere impatto */
body h1,
body .hero-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
body .hero-title span {
  background: linear-gradient(135deg, #0071B8 0%, #005FA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.cta-title {
  font-weight: 700;
}

/* H2 — titoli di sezione, autorevoli ma non dominanti */
body h2,
body .section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* H3 — card titles, pacchetti, mercati */
body h3,
body .feature-title,
body .flow-title,
body .pkg-title,
body .market-label,
body .sd-title,
body .int-step-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0;
}

/* Sottotitolo hero — è quasi un tag, va piccolo e leggero */
body .hero-sub {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Descrizione hero — corpo principale visibile subito */
body .hero-desc {
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
}

/* Descrizioni di sezione (sotto i titoli H2) */
body .section-desc,
body .services-sub {
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

/* Body card e descrizioni interne */
body .feature-desc,
body .pkg-desc,
body .market-desc,
body .sd-desc,
body .sd-item-desc {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0;
}

/* Label sopra i titoli di sezione */
body .section-label,
body .packages-label,
body .int-steps-label,
body .cta-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Badge e tag piccoli */
body .pkg-badge,
body .pkg-step-tag,
body .market-tag,
body .hero-badge,
body .int-step-desc {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.02em;
}

.hero-badge {gap: .4em}

/* ── 2. SFONDI SEZIONI ────────────────────────────────────── */
body #how-it-works { background: var(--eng-bg-light) !important; }
body #services      { background: var(--eng-white)    !important; }
body #markets       { background: var(--eng-bg-light) !important; }
#cta, footer {background: var(--eng-bg-darker); }

/* ── HERO LOGO ─────────────────────────────────────────────── */
body #hero-logo {
  max-width: 400px;
  height: auto;
  margin-bottom: 2rem;
}

/* ── HERO ──────────────────────────── */
body::before {
  display: none;
}

body #hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,113,184,0.18) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 65%, transparent 100%);
}
body .hero-glow {
  display: block;
  background: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    rgba(0, 113, 184, 0.08) 0%,
    rgba(0, 113, 184, 0.03) 50%,
    transparent 100%
  );
}
body #hero {
  background: var(--eng-white);
  padding-top: max(5rem, calc(70px + 3rem));
  padding-bottom: 5rem;
}
body .hero-actions {
  margin-top: 2.5rem;
  margin-bottom: 2.5rem;
}
body .hero-chips {
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.chip {
  background: var(--eng-bg-light);
  border: 1px solid var(--eng-border);
}
body .terminal {
  margin-top: 1rem;
}

/* ── SEZIONI ─────────────────── */
body #features,
body #how-it-works,
body #services,
body #markets {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ── STATS ──────────────────────────────── */
body #stats {
  background: var(--eng-bg-darker);
  border-top: none;
  border-bottom: none;
  position: relative;
  overflow: hidden;
}

body #stats::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgba(0, 113, 184, 0.25) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

body .stat-num {
  background: linear-gradient(135deg, var(--eng-white) 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body .stat-label {
  color: rgba(255, 255, 255, 0.5);
}

/* ── FEATURES — sfondo neutro ──────────────────────────────── */
body #features {
  background: var(--eng-white);
}
.feature-icon {
  border-radius: 50px;
}

/* ── FEATURE CARDS ─────────────────────────────────────────── */
body .feature-card:nth-child(1) { --accent: var(--atenys-boot); }
body .feature-card:nth-child(1) .feature-icon {
  background: rgba(8, 145, 178, 0.08);
  border-color: rgba(8, 145, 178, 0.2);
}

body .feature-card:nth-child(2) { --accent: var(--atenys-updates); }
body .feature-card:nth-child(2) .feature-icon {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.2);
}

body .feature-card:nth-child(3) { --accent: var(--atenys-cve); }
body .feature-card:nth-child(3) .feature-icon {
  background: rgba(234, 88, 12, 0.08);
  border-color: rgba(234, 88, 12, 0.2);
}

body .feature-card:nth-child(4) { --accent: var(--atenys-encryption); }
body .feature-card:nth-child(4) .feature-icon {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

/* Flow cards — stessa logica per #how-it-works */
body .flow-card:nth-child(1) .flow-num {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.3);
  color: var(--atenys-boot);
}

body .flow-card:nth-child(2) .flow-num {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.3);
  color: var(--atenys-updates);
}

body .flow-card:nth-child(3) .flow-num {
  background: rgba(234, 88, 12, 0.1);
  border-color: rgba(234, 88, 12, 0.3);
  color: var(--atenys-cve);
}

/* ── INTEGRATION JOURNEY ───────────────────────────────────── */

/* Step bubble — uniforma al sistema funzionale */
body .int-step:nth-child(1) { --bc: var(--atenys-boot); }
body .int-step:nth-child(2) { --bc: var(--eng-accent); }
body .int-step:nth-child(3) { --bc: var(--atenys-cve); }
body .int-step:nth-child(4) { --bc: var(--atenys-cve); }
body .int-step:nth-child(5) { --bc: var(--atenys-cve); }
body .int-step:nth-child(6) { --bc: var(--atenys-updates); }

/* Step detail panel — colore header coerente */
body .step-detail[data-panel="1"] { --sd-color: var(--atenys-boot); }
body .step-detail[data-panel="2"] { --sd-color: var(--eng-accent); }
body .step-detail[data-panel="3"] { --sd-color: var(--atenys-cve); }
body .step-detail[data-panel="4"] { --sd-color: var(--atenys-cve); }
body .step-detail[data-panel="5"] { --sd-color: var(--atenys-cve); }
body .step-detail[data-panel="6"] { --sd-color: var(--atenys-updates); }

/* ── PACKAGE CARDS ─────────────────────────────────────────── */

/* Reset colori casuali, sistema funzionale coerente */
body .pkg-card:nth-child(1) { --pkg-color: var(--atenys-boot); }
body .pkg-card:nth-child(2) { --pkg-color: var(--eng-accent); }
body .pkg-card:nth-child(3) { --pkg-color: var(--atenys-cve); }
body .pkg-card:nth-child(4) { --pkg-color: var(--atenys-cve); }
body .pkg-card:nth-child(5) { --pkg-color: var(--atenys-updates); }

/* Step tag dentro le card */
body .pkg-step-tag {
  color: var(--eng-text-light);
  border-color: var(--eng-border);
  background: var(--eng-bg-light);
}

/* CTA button nelle card — accent Engicam uniforme */
body .pkg-cta {
  color: var(--eng-accent);
  border-color: var(--eng-accent);
  background: rgba(0, 113, 184, 0.05);
}

body .pkg-cta:hover {
  background: var(--eng-accent);
  color: var(--eng-white);
}

/* ── MARKET PILLS ───────────────────────────────────────────── */

/* Reset tutti i colori variabili */
body .market-pill {
  --m-color: var(--eng-accent);
  background: var(--eng-white);
  border-color: var(--eng-border);
}

body .market-pill:nth-child(1) { --m-color: var(--atenys-boot); }
body .market-pill:nth-child(2) { --m-color: var(--atenys-updates); }
body .market-pill:nth-child(3) { --m-color: var(--atenys-encryption); }
body .market-pill:nth-child(4) { --m-color: var(--atenys-cve); }
body .market-pill:nth-child(5) { --m-color: var(--atenys-cve); }
body .market-pill:nth-child(6) { --m-color: var(--atenys-cve); }
body .market-pill:nth-child(7) { --m-color: var(--atenys-boot); }
body .market-pill:nth-child(8) { --m-color: var(--atenys-encryption); }
body .market-pill:nth-child(9) { --m-color: var(--atenys-boot); }
body .market-pill:nth-child(10) { --m-color: var(--eng-text-grey); }

body .market-pill:hover {
  border-color: var(--m-color);
}

/* Label */
body .market-label {
  color: var(--eng-text);
}

/* Descrizione */
body .market-desc {
  color: var(--eng-text-light);
}

/* Tag in fondo */
body .market-tag {
  color: var(--eng-text-grey);
  border-color: var(--eng-border);
  background: var(--eng-bg-light);
}

/* "And Many More" — stesso stile, nessun trattamento speciale */
body .market-pill--more {
  --m-color: var(--eng-accent);
  border-color: var(--eng-border);
}

body .market-more-list li {
  color: var(--eng-text-light);
}

/* ── BOTTONI ──────────────────────── */
.btn-primary:hover, .pkg-cta:hover,
.btn-primary:focus, .pkg-cta:focus {
  color: var(--eng-white);
}
.btn-primary {
  background: var(--eng-accent);
  border-color: var(--eng-accent);
  color: var(--eng-white);
}

.btn-primary:hover {
  background: var(--eng-accent-hover);
  border-color: var(--eng-accent-hover);
}

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

.btn-ghost:hover {
  border-color: var(--eng-accent);
  color: var(--eng-accent);
  background: transparent;
}

.btn-primary, .btn-ghost, .pkg-cta {
  border-radius: 3px;
}

/* ── CTA SECTION ───────────────────────────────────────────── */
#cta::before {
  background: radial-gradient(
    circle,
    rgba(0, 113, 184, 0.3) 0%,
    transparent 70%
  );
}
#cta .btn-primary:last-child {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--eng-white);
}

#cta .btn-primary:last-child:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: var(--eng-white);
}

/* ── NAVBAR ───────────────────────── */
body .nav-logo {
  margin-top: 5px;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}
body nav {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}
body .nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body .nav-logo-img {
  display: block;
  width: auto;
  max-width: 160px;
  height: 38px;
  object-fit: contain;
  object-position: left center;
}

/* ── NAV CTA ────────────────────────────────────────────────── */
.nav-cta {
  background: var(--eng-accent);
  border-color: var(--eng-accent);
  color: var(--eng-white);
  border-radius: 3px;
}

.nav-cta:hover {
  background: var(--eng-accent-hover);
}

/* -- ARCHITECTURE -- */
.flow-card-img {
  box-shadow: none;
}
.flow-card-img:hover {
  transform: none;
  box-shadow: none;
}

/* FOOTER */
.footer-info a {
  align-self: center;
}
.cta-label {
  color: var(--eng-accent);
}

@media (max-width: 700px) {

  body nav {
    justify-content: space-between;
    padding: 0 1rem;
  }

  body .nav-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  body .nav-logo-img {
    max-width: 110px;
    height: 30px;
  }

  body .nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
  }
  .nav-links a {
    font-size: .8rem;
  }

  body .nav-internal {
    display: none;
  }

  body .nav-cta {
    padding: 0.3rem 0.5rem;
    white-space: nowrap;
  }

  body #hero-logo {
    display: none;
  }

  body h1,
  body .hero-title {
    font-size: clamp(28px, 8vw, 40px);
  }

  body .hero-sub {
    font-size: 11px;
    letter-spacing: 0.03em;
  }

  body .hero-desc {
    font-size: 16px;
  }

  body .hero-actions {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  body .btn-primary,
  body .btn-ghost {
    width: 100%;
    justify-content: center;
  }

  body #features,
  body #how-it-works,
  body #services,
  body #markets {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  body #stats {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  body .markets-grid {
    grid-template-columns: 1fr;
  }

  body .market-pill--more {
    grid-column: span 1;
    flex-direction: column;
  }
}
