/* ============================================================
   CSS CUSTOM PROPERTIES
   Colori: aggiorna --color-accent con il colore esatto del logo
   ============================================================ */
:root {
  --color-bg:        #FFFFFF;
  --color-dark:      #0D1B2A;   /* navy scuro */
  --color-accent:    #5d7f2d;   /* verde logo scuro */
  --color-accent-lt: #97c14a;   /* verde logo per hover */
  --color-mid:       #F4F4F0;   /* grigio chiarissimo per sezioni alternate */
  --color-text:      #1A1A1A;
  --color-muted:     #6B7280;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', sans-serif;

  --max-w: 1100px;
  --section-pad: 100px 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}

nav.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

/* Logo testuale — sostituisci con <img> quando hai il file */
.nav-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-dark);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--color-accent); }
.nav-logo-img { height: 60px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-accent); }

/* Switcher lingua */
.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: 20px;
}
.lang-switch button {
  background: none;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-accent);
  transition: background 0.2s, color 0.2s;
}
.lang-switch button.active,
.lang-switch button:hover {
  background: var(--color-accent);
  color: #fff;
}

/* Hamburger mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: transform 0.3s, opacity 0.3s;
}

/* ============================================================
   SECTION 1 — HERO
   ============================================================ */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

/* Sottile griglia di sfondo — abbellimento minimal */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(13,27,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,42,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* Cerchio decorativo in basso a destra */
#hero::after {
  content: '';
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(212,115,10,0.12);
  pointer-events: none;
}

.hero-eyebrow {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeUp 0.8s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--color-dark);
  max-width: 780px;
  opacity: 0;
  animation: fadeUp 0.8s 0.4s forwards;
}

.hero-title em {
  font-style: italic;
  color: var(--color-accent);
}

.hero-sub {
  margin-top: 24px;
  font-size: 1.25rem;
  color: var(--color-muted);
  max-width: 520px;
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s forwards;
}

.hero-cta {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.8s forwards;
}

/* Pulsante primario */
.btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover {
  background: var(--color-accent-lt);
  transform: translateY(-2px);
}

/* Pulsante secondario (outline) */
.btn-outline {
  display: inline-block;
  padding: 14px 32px;
  border: 1.5px solid var(--color-dark);
  color: var(--color-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* Freccia scroll */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0;
  animation: fadeIn 1s 1.4s forwards;
}
.scroll-hint span {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.scroll-hint .arrow {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--color-muted), transparent);
  animation: pulse-line 1.8s ease-in-out infinite;
}

/* ============================================================
   SEZIONE COMUNE
   ============================================================ */
section { padding: var(--section-pad); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 1rem;
  color: var(--color-muted);
  max-width: 560px;
  font-weight: 300;
}

/* ============================================================
   SECTION 2 — PROBLEMI CHE RISOLVIAMO
   ============================================================ */
#solutions {
  background: var(--color-mid);
}

.solutions-header { margin-bottom: 56px; }

/* Griglia accordion */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.problem-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.problem-card:hover { box-shadow: 0 6px 30px rgba(0,0,0,0.08); }

/* Intestazione card (sempre visibile) */
.problem-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  cursor: pointer;
  user-select: none;
}

.problem-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(212,115,10,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.problem-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.problem-title-wrap { flex: 1; }

.problem-title {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.problem-subtitle {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Icona chevron */
.chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-muted);
  transition: transform 0.3s;
}
.problem-card.open .chevron { transform: rotate(180deg); }

/* Corpo espandibile */
.problem-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
}
.problem-card.open .problem-body { max-height: 400px; }

.problem-body-inner {
  padding: 0 24px 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.problem-body-inner p {
  font-size: 0.88rem;
  color: var(--color-muted);
  margin-top: 16px;
  margin-bottom: 12px;
}

.solution-tag {
  display: inline-block;
  background: rgba(212,115,10,0.1);
  color: var(--color-accent);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin: 3px 4px 3px 0;
}

/* ============================================================
   SECTION 3 — CHI SIAMO
   ============================================================ */
#about { background: var(--color-bg); }

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.about-text .section-sub { max-width: 100%; margin-bottom: 24px; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

.stat-box {
  border-left: 3px solid var(--color-accent);
  padding-left: 16px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-dark);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* Team card */
.about-team { display: flex; flex-direction: column; gap: 20px; }

.team-card {
  background: var(--color-mid);
  border-radius: 10px;
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  flex-shrink: 0;
}

.team-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-dark);
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.team-bio {
  font-size: 0.87rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.team-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.team-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(13,27,42,0.07);
  color: var(--color-dark);
}

/* ============================================================
   SEZIONE DIVIDER — dark band
   ============================================================ */
.dark-band {
  background: var(--color-dark);
  padding: 60px 24px;
  text-align: center;
}

.dark-band p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  color: #fff;
  max-width: 720px;
  margin: 0 auto;
  line-height: 1.4;
}

.dark-band p em {
  color: var(--color-accent-lt);
  font-style: italic;
}

/* ============================================================
   SECTION 4 — CONTATTI
   ============================================================ */
#contact {
  background: var(--color-mid);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-info { padding-top: 8px; }

.contact-info .section-sub { margin-bottom: 40px; }

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-item-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.contact-item-value {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--color-dark);
}

.contact-item-value a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-item-value a:hover { color: var(--color-accent); }

/* Box messaggio semplice */
.contact-note {
  background: var(--color-dark);
  color: #fff;
  border-radius: 10px;
  padding: 36px;
}

.contact-note h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.contact-note p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 28px;
}

.contact-note .btn-primary {
  display: inline-block;
  background: var(--color-accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--color-dark);
  padding: 32px 24px;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

footer a {
  color: var(--color-accent-lt);
  text-decoration: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --section-pad: 70px 20px; }

  .nav-links { display: none; }
  .hamburger { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .about-layout,
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }

  .about-stats { grid-template-columns: 1fr 1fr; }

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

  #hero::after { display: none; }
}