/* =========================================================
   SIMONE ZOCCHETTI — Tecnico Paesaggista dipl. SSS
   Design tokens: personalizza qui colori, font e spaziature
   ========================================================= */

:root {
  /* --- Palette (basata sul logo) --- */
  --stone:        #999999;   /* grigio del logo */
  --moss:         #c3d100;   /* verde del logo */
  --moss-dark:    #96a100;   /* verde più scuro, per hover/testo su chiaro */
  --ink:          #22241f;   /* antracite quasi nero, testo principale */
  --paper:        #f6f5f1;   /* bianco caldo, sfondo principale */
  --stone-light:  #e2e1dc;   /* grigio chiarissimo, bordi/divisori */
  --stone-dark:   #4a4a47;   /* grigio scuro, testo secondario su chiaro */

  /* --- Tipografia --- */
  /* Neue Haas Unica è un font a pagamento: carica i file woff2 in /fonts/
     e scommenta il blocco @font-face qui sotto. Nel frattempo uso un
     fallback di sistema molto simile per look & feel immediati. */
  --font-main: "Neue Haas Unica", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --container-max: 1180px;
  --radius: 2px;
}

/* Decommenta quando hai i file del font:
@font-face {
  font-family: "Neue Haas Unica";
  src: url("../fonts/NeueHaasUnica-Light.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Unica";
  src: url("../fonts/NeueHaasUnica-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
*/

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  font-weight: 300;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container-narrow {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-weight: 300;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss-dark);
  font-weight: 400;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--moss);
}

a { color: var(--ink); text-decoration: none; }

/* --- Focus visibile per accessibilità --- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--moss-dark);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* =========================================================
   NAVBAR
   ========================================================= */
.navbar-custom {
  background: rgba(246, 245, 241, 0.94);
  border-bottom: 1px solid var(--stone-light);
  padding: 18px 0;
  transition: padding 0.25s ease;
}
.navbar-custom.scrolled { padding: 10px 0; }

.brand {
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}
.brand span { color: var(--moss-dark); }

.nav-link-custom {
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: var(--stone-dark);
  margin-left: 28px;
  position: relative;
  padding-bottom: 4px;
}
.nav-link-custom:hover,
.nav-link-custom.active { color: var(--ink); }
.nav-link-custom::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--moss);
  transition: width 0.25s ease;
}
.nav-link-custom:hover::after,
.nav-link-custom.active::after { width: 100%; }

#navToggle {
  position: relative;
  z-index: 1060; /* resta sopra l'overlay del menu mobile, così si può sempre chiudere */
}

/* --- Menu mobile: overlay a schermo intero, testo centrato --- */
@media (max-width: 991.98px) {
  .navbar-collapse-custom {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: var(--paper);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }
  .navbar-collapse-custom.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .navbar-collapse-custom .navbar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .navbar-collapse-custom .nav-link-custom {
    margin-left: 0;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
  }
  .navbar-collapse-custom .nav-link-custom.btn-moss {
    margin-top: 10px;
    font-size: 1.1rem;
  }
  body.nav-open { overflow: hidden; } /* blocca lo scroll dietro al menu aperto */
}

/* =========================================================
   HERO — linee di livello (curve topografiche) come firma visiva
   ========================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 90px;
}

.hero-contours {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
}
.hero-contours svg { width: 100%; height: 100%; }
.hero-contours path {
  fill: none;
  stroke: var(--stone);
  stroke-width: 1;
  opacity: 0.35;
}
.hero-contours path.accent { stroke: var(--moss); opacity: 0.6; stroke-width: 1.3; }

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.08;
}
.hero h1 em {
  font-style: normal;
  color: var(--moss-dark);
}

.hero-lead {
  max-width: 75ch;
  color: var(--stone-dark);
  font-size: 1.08rem;
  margin-top: 20px;
}

.hero-title {
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stone-dark);
  margin-top: 6px;
}

.btn-moss {
  background: var(--moss);
  border: 1px solid var(--moss);
  color: var(--ink);
  padding: 13px 28px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.btn-moss:hover { background: var(--moss-dark); border-color: var(--moss-dark); color: #fff; }

.btn-outline-ink {
  background: transparent;
  border: 1px solid var(--stone);
  color: var(--ink);
  padding: 13px 28px;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}
.btn-outline-ink:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.scroll-cue {
  position: absolute;
  bottom: 28px; left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--stone-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 28px;
  background: linear-gradient(var(--stone), transparent);
  animation: scrollpulse 1.8s ease-in-out infinite;
}
@keyframes scrollpulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* =========================================================
   SEZIONI GENERICHE
   ========================================================= */
section { padding: 110px 0; position: relative; }
section + section { border-top: 1px solid var(--stone-light); }

.section-alt { background: #efeee8; }

.section-heading { max-width: 60ch; margin-bottom: 56px; }
.section-heading h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-heading p { color: var(--stone-dark); margin-top: 16px; font-size: 1.02rem; }

/* linea "quota" divisoria in stile planimetrico */
.contour-divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--stone);
  font-size: 0.75rem; letter-spacing: 0.1em;
  margin: 70px 0;
}
.contour-divider::before, .contour-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--stone-light);
}

/* --- Video --- */
.video-frame {
  position: relative;
  border: 1px solid var(--stone-light);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 16/9;
}
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* --- Filosofia --- */
.philosophy-figure {
  font-size: 5rem;
  line-height: 1;
  color: var(--moss);
  font-weight: 300;
  margin-bottom: 12px;
}

/* --- Servizi --- */
.service-card {
  background: var(--paper);
  border: 1px solid var(--stone-light);
  border-radius: var(--radius);
  padding: 34px 28px;
  height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.service-card:hover { border-color: var(--moss); transform: translateY(-4px); }
.service-card .num {
  font-size: 0.78rem;
  color: var(--moss-dark);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  display: block;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { color: var(--stone-dark); font-size: 0.94rem; margin: 0; }

/* --- Progetti (galleria) --- */
.project-card { position: relative; overflow: hidden; border-radius: var(--radius); }
.project-card .img-placeholder { height: 340px; transition: transform 0.5s ease, filter 0.35s ease; }
.project-card:hover .img-placeholder { transform: scale(1.04); filter: brightness(1.05); }
.project-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(34,36,31,0.85), transparent);
  color: #fff;
}
.project-caption .tag { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--moss); }
.project-caption h3 { color: #fff; font-size: 1.1rem; margin-top: 4px; }

/* --- La mia storia (timeline) --- */
.timeline { position: relative; padding-left: 34px; border-left: 1px solid var(--stone-light); }
.timeline-item { position: relative; padding-bottom: 46px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute; left: -39px; top: 4px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--moss); border: 2px solid var(--paper);
  box-shadow: 0 0 0 1px var(--moss);
}
.timeline-year { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--moss-dark); text-transform: uppercase; }
.timeline-item h3 { font-size: 1.1rem; margin-top: 6px; }
.timeline-item p { color: var(--stone-dark); margin-top: 8px; font-size: 0.95rem; }

/* --- Chi sono --- */
/* --- Placeholder colorati per le immagini: sostituiscili con foto reali
   quando disponibili (vedi commenti nell'HTML sopra ogni blocco) --- */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
}
.img-placeholder span {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.75;
}

.portrait-frame {
  border: 1px solid var(--stone-light);
  padding: 14px;
  background: #efeee8;
}
.portrait-frame img { width: 100%; display: block; }

.credential-list { list-style: none; padding: 0; margin: 26px 0 0; }
.credential-list li {
  display: flex; gap: 12px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--stone-light);
  font-size: 0.94rem; color: var(--stone-dark);
}
.credential-list li strong { color: var(--ink); min-width: 130px; font-weight: 400; }

/* --- Contatti --- */
.contact-info-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-info-item .icon { color: var(--moss-dark); flex-shrink: 0; margin-top: 3px; }
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item p { color: var(--stone-dark); font-size: 0.94rem; margin: 0; }

.form-control-custom {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--stone);
  border-radius: 0;
  padding: 12px 4px;
  color: var(--ink);
  font-family: var(--font-main);
}
.form-control-custom:focus {
  background: transparent;
  border-color: var(--moss-dark);
  box-shadow: none;
  color: var(--ink);
}
.form-control-custom::placeholder { color: var(--stone); }
label.form-label-custom {
  font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--stone-dark); margin-bottom: 6px;
}

.form-status { font-size: 0.9rem; margin-top: 16px; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--moss-dark); }
.form-status.err { color: #b5473f; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: 60px 0 30px;
}
footer .brand { color: var(--paper); }
footer .brand span { color: var(--moss); }
footer a.footer-link { color: #d7d6d0; font-size: 0.9rem; }
footer a.footer-link:hover { color: var(--moss); }
.footer-bottom {
  border-top: 1px solid #3a3c34;
  margin-top: 40px; padding-top: 22px;
  font-size: 0.78rem; color: #93958b;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
}
.footer-bottom a { color: #93958b; }
.footer-bottom a:hover { color: var(--moss); }

/* =========================================================
   COOKIE BANNER
   ========================================================= */
#cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: var(--ink);
  color: var(--paper);
  padding: 22px 0;
  border-top: 2px solid var(--moss);
  transform: translateY(110%);
  transition: transform 0.4s ease;
}
#cookie-banner.visible { transform: translateY(0); }
#cookie-banner .cookie-inner {
  display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
#cookie-banner p { margin: 0; font-size: 0.9rem; max-width: 60ch; color: #d7d6d0; }
#cookie-banner .cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-cookie-ghost {
  background: transparent; border: 1px solid #5a5c52; color: var(--paper);
  padding: 10px 20px; font-size: 0.84rem; border-radius: var(--radius);
}
.btn-cookie-ghost:hover { border-color: var(--paper); }

/* =========================================================
   REVEAL ON SCROLL (leggero, senza librerie esterne)
   ========================================================= */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 991px) {
  section { padding: 80px 0; }
  .hero { min-height: auto; padding: 150px 0 90px; }
  .nav-link-custom { margin-left: 0; }
}
