/* ============================================
   FoglIA — Landing Page Design System
   Based on Brand Identity System (Feb 2026)
   ============================================ */

/* --- Fonts --- */
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/Outfit-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/Outfit-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/Outfit-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/Outfit-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/InstrumentSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../assets/fonts/InstrumentSerif-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* --- Custom Properties (Brand Identity) --- */
:root {
  /* Palette — Principali */
  --verde-primario: #1B7A3D;
  --verde-chiaro: #2A9D4E;
  --verde-scuro: #0F5C2B;
  --verde-ia: #2ED573;

  /* Palette — Accento */
  --lime: #A8E06C;
  --lime-soft: #D4F5A8;

  /* Palette — Neutri */
  --bosco: #0C1F0F;
  --bosco-soft: #1A3320;
  --grigio-verde: #6B7C6E;

  /* Sfondi */
  --sfondo-caldo: #FAFDF6;
  --sfondo-secondario: #F4F9EE;
  --bianco: #FFFFFF;

  /* Gradienti */
  --gradiente-primario: linear-gradient(135deg, #1B7A3D, #0F5C2B);
  --gradiente-accento: linear-gradient(135deg, #2A9D4E, #A8E06C);
  --gradiente-logo: linear-gradient(135deg, #0F5C2B, #A8E06C);

  /* Typography */
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;

  /* Spacing */
  --section-padding: 5rem 0;
  --container-max: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--bosco);
  background: var(--sfondo-caldo);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--verde-primario);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: var(--verde-chiaro);
}

ul, ol {
  list-style: none;
}

/* --- Typography Scale --- */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  line-height: 1.15;
}

.display-italic {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.3;
}

h1, .h1 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

h2, .h2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
}

h3, .h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.35;
}

.body-text {
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
}

.caption {
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--sfondo-secondario);
}

.text-center {
  text-align: center;
}

/* --- Logotype --- */
.logotype {
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
}
.logotype-fogl {
  font-weight: 300;
}
.logotype-ia {
  font-weight: 600;
  color: var(--verde-ia);
}
.logotype--large {
  font-size: clamp(3rem, 6vw, 5rem);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  text-decoration: none;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(15, 92, 43, 0.2);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradiente-primario);
  color: var(--bianco);
}
.btn-primary:hover {
  color: var(--bianco);
}

.btn-secondary {
  background: transparent;
  color: var(--verde-primario);
  border: 2px solid var(--verde-primario);
}
.btn-secondary:hover {
  background: var(--verde-primario);
  color: var(--bianco);
}

.btn-disabled {
  background: var(--grigio-verde);
  color: var(--bianco);
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* --- Header / Nav --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.scrolled,
.site-header:has(.nav.open) {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 20px rgba(12, 31, 15, 0.06);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-logo img {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--bosco);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--verde-primario);
}

.nav-cta .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bosco);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}
.hero-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.hero-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}
.hero-payoff {
  color: var(--grigio-verde);
  margin-top: 0.75rem;
}
.hero-description {
  margin-top: 1.5rem;
  color: var(--grigio-verde);
  font-size: 1.15rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--sfondo-secondario);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(12, 31, 15, 0.08);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--gradiente-accento);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--grigio-verde);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* --- How It Works --- */
.steps {
  display: flex;
  gap: 2rem;
  margin-top: 3rem;
  align-items: flex-start;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.66% + 28px);
  right: calc(16.66% + 28px);
  height: 2px;
  background: var(--gradiente-accento);
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradiente-accento);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--verde-scuro);
  position: relative;
  z-index: 1;
}
.step h3 {
  margin-bottom: 0.5rem;
}
.step p {
  color: var(--grigio-verde);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* --- Preview / Screenshot --- */
.preview-frame {
  max-width: 800px;
  margin: 3rem auto 0;
  background: var(--gradiente-primario);
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  text-align: center;
}

/* --- Pricing --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.pricing-card {
  background: var(--bianco);
  border: 2px solid var(--sfondo-secondario);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  position: relative;
}
.pricing-card--pro {
  border-color: var(--verde-chiaro);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--lime-soft);
  color: var(--verde-scuro);
  font-weight: 500;
  font-size: 0.8rem;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  letter-spacing: 0.02em;
}

.pricing-name {
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.pricing-price {
  font-size: 2rem;
  font-weight: 600;
  color: var(--verde-primario);
  margin-bottom: 1.5rem;
}
.pricing-price span {
  font-size: 1rem;
  font-weight: 300;
  color: var(--grigio-verde);
}

.pricing-features {
  margin-bottom: 2rem;
}
.pricing-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}
.pricing-features li::before {
  content: '✓';
  color: var(--verde-chiaro);
  font-weight: 600;
}

.pricing-card .btn {
  width: 100%;
}

/* --- FAQ --- */
.faq-list {
  max-width: 700px;
  margin: 3rem auto 0;
}

.faq-item {
  border-bottom: 1px solid rgba(107, 124, 110, 0.15);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.25rem 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--bosco);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question:hover {
  color: var(--verde-primario);
}
.faq-icon {
  font-size: 1.3rem;
  transition: transform 0.3s;
  flex-shrink: 0;
  color: var(--verde-chiaro);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 1.25rem;
}
.faq-answer p {
  color: var(--grigio-verde);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- Footer --- */
.site-footer {
  background: var(--bosco);
  color: rgba(255, 255, 255, 0.7);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logotype {
  font-size: 1.3rem;
}
.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h4 {
  color: var(--bianco);
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}
.footer-col a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--verde-ia);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

/* --- Section Header --- */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 1rem;
}
.section-label {
  display: inline-block;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verde-chiaro);
  margin-bottom: 0.75rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 3.5rem 0;
  }

  .nav {
    flex-wrap: wrap;
    position: relative;
  }
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-toggle {
    display: block;
  }

  /* Mobile menu overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(12, 31, 15, 0.45);
    z-index: 99;
  }
  .nav-overlay.visible {
    display: block;
  }

  /* Mobile menu — single dropdown panel */
  .nav.open .nav-links,
  .nav.open .nav-cta {
    display: flex;
  }
  .nav.open .nav-links {
    flex-direction: column;
    order: 10;
    flex-basis: 100%;
    padding: 1rem 0 0;
    gap: 0;
    border-top: 1px solid rgba(107, 124, 110, 0.1);
    margin-top: 1rem;
  }
  .nav.open .nav-links a {
    padding: 0.75rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(107, 124, 110, 0.07);
  }
  .nav.open .nav-cta {
    order: 11;
    flex-basis: 100%;
    padding: 1rem 0 0.5rem;
    justify-content: center;
  }
  .nav.open .nav-cta .btn {
    width: 100%;
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 3rem;
  }
  .hero-logo {
    width: 80px;
    height: 80px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
  }
  .steps::before {
    top: 28px;
    left: 50%;
    right: auto;
    width: 2px;
    height: calc(100% - 56px);
    transform: translateX(-50%);
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    max-width: 300px;
  }
}
