@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300&family=DM+Mono:wght@400;500&display=swap');

/* ──────────────────────────────────────────────────────────────────────────
   AI.GOR design language — marketing site.
   Navy + orange, with orange demoted to a *signal* colour and all figures
   (importi, percentuali, date) set in DM Mono for precision. The site stays
   navy-dominant (authority); the stats band is the one light reading surface.
   Tokens mirror design/README.md. Keep the var *names* — every page reads them.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --navy: #0E1B3C;
  --navy-mid: #1B2C56;   /* navy-700 */
  --navy-light: #243A70; /* lifted navy for gradients */
  --navy-900: #0A1430;   /* deepest navy — footer, alt sections */
  --orange: #F47B20;
  --orange-dark: #D96A10;
  --orange-ink: #C25A0C; /* orange text on light (AA-safe) */
  --orange-soft: #FCEDE0;
  --orange-glow: rgba(244,123,32,0.16);
  --white: #FFFFFF;
  --off-white: #F6F7F9;  /* light reading surface (page) */
  --ink: #0E1B3C;        /* primary text on light */
  --ink-muted: #5E6B86;  /* secondary text on light */
  --grey: #8A93A8;
  --grey-light: #C8CDD8;
  --green: #1F9D57;      /* trust marker (fonte ANAC) */
  --border: rgba(255,255,255,0.08);
  --border-orange: rgba(244,123,32,0.3);
  --text-body: #C8CDD8;
  --font-display: 'Outfit', sans-serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--navy); }
::-webkit-scrollbar-thumb { background: var(--orange); border-radius: 2px; }

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.02em; }

/* Eyebrow / mono label — DM Mono, tracked uppercase. Orange on navy; use
   `.eyebrow.on-light` for the orange-ink variant on light surfaces. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
}
.eyebrow.on-light { color: var(--orange-ink); }

/* Mono figure helper — importi, percentuali, date. */
.figure, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Green "fonte ANAC · aggiornato" trust marker. */
.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--grey);
}
.trust-line::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Always solid navy so the white logo + links stay readable over the now-light
     content sections (not just over the hero). Scrolling adds a subtle shadow. */
  background: rgba(14,27,60,0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled {
  box-shadow: 0 6px 24px rgba(10,20,48,0.25);
}
.nav-logo img { height: 40px; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--grey-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.nav-links a.active { color: var(--orange); }
.nav-cta {
  background: var(--orange);
  color: var(--white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 700 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--orange-dark) !important; transform: translateY(-1px); }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: 0.3s; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
}
.btn-primary {
  background: var(--orange);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(244,123,32,0.35); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.28);
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); transform: translateY(-2px); }

/* ── SECTION COMMONS ── */
section { padding: 7rem 4rem; position: relative; }

/* Light reading surface — flips text to ink for sustained reading. */
.section-light { background: var(--off-white); color: var(--ink); }
.section-light h1, .section-light h2, .section-light h3, .section-light h4 { color: var(--ink); }
.section-light p { color: var(--ink-muted); }

.container { max-width: 1200px; margin: 0 auto; }

.section-header { margin-bottom: 4rem; }
.section-header h2 {
  font-size: clamp(1.4rem, 2.4vw, 2.1rem);
  margin-top: 0.75rem;
  line-height: 1.12;
}

/* ── DIVIDER LINE ── */
.divider {
  width: 48px;
  height: 3px;
  background: var(--orange);
  margin: 1rem 0;
  border-radius: 2px;
}

/* ── STAT NUMBER ── */
.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ── CARDS ── */
.card {
  background: var(--navy-mid);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: var(--border-orange);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* ── FOOTER ── */
footer {
  background: var(--navy-900);
  padding: 4rem 4rem 2rem;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem;
}
.footer-brand img { height: 36px; margin-bottom: 1rem; }
.footer-brand p { color: var(--grey); font-size: 0.875rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grey); margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul a { color: var(--grey-light); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--grey);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* ── ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── NOISE OVERLAY ── */
.noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── GRID DOTS BG ── */
.grid-bg {
  background-image: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* ── ORANGE GLOW BLOB ── */
.glow-blob {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244,123,32,0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  section { padding: 5rem 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 0; right: -100%; width: 75vw; height: 100vh; background: var(--navy); padding: 6rem 2rem 2rem; gap: 1.5rem; transition: right 0.3s; z-index: 99; }
  .nav-links.open { display: flex; right: 0; }
  .nav-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ── CONTACT / LEAD FORMS ──────────────────────────────────────────────────
   Shared form styling for the contact sections (partnership / enterprise /
   subscription). Posts to the /api/contact Pages Function → Slack. */
.contact-section { background: var(--navy-900); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}
.contact-text h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.contact-text p { color: var(--text-body); line-height: 1.8; margin-bottom: 1.5rem; font-size: 0.95rem; }
.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--grey-light);
}
.contact-list li:last-child { border-bottom: none; }
.contact-list .icon { font-size: 1rem; flex-shrink: 0; }
.contact-form {
  background: var(--navy-mid);
  border: 1px solid var(--border-orange);
  border-radius: 20px;
  padding: 2.5rem;
}
.contact-form h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.contact-form p { font-size: 0.85rem; color: var(--grey); margin-bottom: 2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 0.5rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--orange); }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--navy-mid); }
.form-group textarea { resize: none; height: 80px; }
/* honeypot — hidden from humans, bots fill it */
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { display: none; margin-top: 1rem; padding: 0.8rem 1rem; border-radius: 8px; font-size: 0.82rem; line-height: 1.5; }
.form-msg.ok { display: block; background: rgba(31,157,87,0.12); border: 1px solid rgba(31,157,87,0.35); color: #1F9D57; }
.form-msg.err { display: block; background: rgba(255,80,80,0.1); border: 1px solid rgba(255,80,80,0.3); color: #ff8080; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
