/* ===========================================================
   «Nome Agenzia» — foglio di stile
   Direzione: editoriale, tipografia ampia, forte impatto
   Palette: avorio, pietra, verde salvia profondo, oro caldo
   =========================================================== */

:root {
  --bg:        #f6f4ef;
  --surface:   #ffffff;
  --ink:       #1e1e1b;
  --ink-soft:  #55534d;
  --line:      #e4dfd5;
  --accent:    #3d5449;
  --accent-2:  #2b3a32;
  --dark:      #1c1f1c;   /* verde-nero per le sezioni scure */
  --dark-2:    #23272300;
  --gold:      #b0905e;
  --plum:      #3b2f45;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1240px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
em { font-style: italic; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 32px;
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Tipografia display ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
.display--light { color: #f4f1e9; }

.marker {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 1.4rem;
  font-weight: 600;
}
.marker--light { color: var(--gold); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  padding: 1rem 1.9rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  transition: background .25s, color .25s, border-color .25s, transform .08s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-2); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--light { background: #f4f1e9; color: var(--accent-2); font-weight: 600; }
.btn--light:hover { background: #fff; }
.btn--big { padding: 1.2rem 2.4rem; font-size: 1.4rem; font-family: var(--serif); }

/* ---------- Header (trasparente sopra l'hero) ---------- */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 55;
  transition: background .35s, box-shadow .35s, top .35s;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 120px;
}
.brand { text-decoration: none; display: flex; align-items: center; color: #fff; }
.brand__logo {
  display: block;
  height: 120px;
  width: auto;
  margin-top: 14px;
  max-width: 100%;
  object-fit: contain; /* evita lo schiacciamento se il max-width entra in gioco */
  transition: height .35s;
  /* il logo ha testo grigio pensato per fondi chiari: qui sta sopra l'hero scuro */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
}

.nav { display: flex; align-items: center; gap: 2.2rem; }
.nav a { text-decoration: none; font-size: 0.98rem; color: #fff; transition: opacity .2s; }
.nav a:not(.nav__cta):hover { opacity: .65; }
.nav__cta {
  border: 1px solid rgba(255,255,255,.5);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
}
.nav__cta { transition: background .25s, border-color .25s; }
.nav__cta:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.9); color: #fff !important; }
.nav-toggle { display: none; }

/* Stato: header agganciato dopo lo scroll — prugna scuro, testo chiaro */
.header.is-stuck {
  position: fixed;
  top: 0;
  background: var(--plum);
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 8px 30px rgba(0,0,0,.25);
}
/* logo centrato verticalmente: stesso spazio sopra e sotto */
.header.is-stuck .header__inner { min-height: 112px; }
.header.is-stuck .brand__logo { height: 88px; margin-top: 0; }
.header.is-stuck .nav__cta:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.9); color: #fff !important; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0;
  /* si vede solo se le foto non caricano */
  background-color: #263029;
  overflow: hidden;
}
/* Slider: le foto si alternano in dissolvenza, con uno zoom lento su quella visibile */
.hero__slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  transform: scale(1.06);
}
.hero__slide.is-active {
  opacity: 1;
  animation: heroZoom 9s ease-out forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
/* La foto è un interno chiaro: serve un velo scuro robusto perché il testo bianco resti leggibile */
.hero__overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(18,22,19,.82) 0%, rgba(18,22,19,.55) 55%, rgba(18,22,19,.35) 100%),
    linear-gradient(180deg, rgba(18,22,19,.55) 0%, rgba(18,22,19,.35) 40%, rgba(18,22,19,.8) 100%);
}
.hero__inner { position: relative; z-index: 2; padding-block: 8rem; max-width: 900px; }
.hero__eyebrow {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.22em;
  color: rgba(255,255,255,.85); margin: 0 0 1.6rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 1.8rem;
}
.hero__title em { color: #e8e2d4; font-weight: 400; }
.hero__lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 52ch;
  color: rgba(255,255,255,.9);
  margin: 0 0 2.6rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.reveal.hero__eyebrow { transition-delay: .05s; }
.hero__title.reveal { transition-delay: .15s; }
.hero__lead.reveal { transition-delay: .3s; }
.hero__actions.reveal { transition-delay: .45s; }

.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2; width: 26px; height: 42px; border: 1px solid rgba(255,255,255,.5);
  border-radius: 20px; display: grid; place-items: start center; padding-top: 8px;
}
.hero__scroll span { width: 3px; height: 8px; border-radius: 3px; background: #fff; animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* ---------- Statement ---------- */
.statement { padding: clamp(4.5rem, 10vw, 8rem) 0; background: var(--bg); }
.statement__text {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.8vw, 3rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: 0 auto;
  text-align: center;
}
.statement__text em { color: var(--accent); font-style: italic; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section--dark { background: var(--dark); color: #d8d5cb; }
.section__head { max-width: 760px; margin-bottom: 3.5rem; }

/* ---------- Chi siamo ---------- */
.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about__stat { margin: 1.6rem 0 0; display: flex; flex-direction: column; }
.about__stat strong {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.5rem, 8vw, 6rem); line-height: 1; color: var(--accent);
}
.about__stat span { color: var(--ink-soft); max-width: 16ch; margin-top: .4rem; }
.about__body p { color: var(--ink-soft); margin: 0 0 1.3rem; font-size: 1.08rem; }
.about__body .display { margin-bottom: 1.8rem; }
.signature { font-family: var(--serif); font-style: italic; color: var(--ink) !important; margin-top: 1.8rem !important; }

/* ---------- Servizi ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,.12);
}
.srv {
  display: flex;
  gap: 1.6rem;
  padding: 2.4rem 1.8rem;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: background .3s;
}
.srv:nth-child(odd) { border-right: 1px solid rgba(255,255,255,.12); }
.srv:hover { background: rgba(255,255,255,.03); }
.srv__n {
  flex: 0 0 auto;
  width: 9px; height: 9px;
  margin-top: .85rem;
  background: var(--gold);
  transform: rotate(45deg);
  transition: transform .3s;
}
.srv:hover .srv__n { transform: rotate(45deg) scale(1.25); }
.srv__main h3 { font-family: var(--serif); font-weight: 500; font-size: 1.45rem; color: #f4f1e9; margin: 0 0 .6rem; }
.srv__main p { margin: 0; color: #aaa79d; font-size: 1rem; }

/* ---------- Strip reperibilità ---------- */
.strip { background: var(--accent); color: #fff; }
.strip__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2.5rem;
  padding: clamp(3rem, 6vw, 5rem) 32px; flex-wrap: wrap;
}
.strip__kicker { text-transform: uppercase; letter-spacing: 0.2em; font-size: .8rem; color: #cdd8d0; margin: 0 0 1rem; }
.strip__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.2; color: #fff; margin: 0; }

/* Tre referenti reperibili, ognuno con il proprio numero */
.strip__people { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; min-width: 280px; }
.person {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.2rem;
  padding: 0.85rem 1.4rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  text-decoration: none; color: #fff;
  transition: background .2s, border-color .2s;
}
.person:hover { background: #f4f1e9; border-color: #f4f1e9; color: var(--accent-2); }
.person__name { font-size: 0.95rem; letter-spacing: 0.02em; }
.person__phone { font-family: var(--serif); font-size: 1.25rem; white-space: nowrap; }

/* ---------- Valori ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.5rem 2.6rem; }
.value__num { display: block; margin-bottom: 1rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line); }
.value__num::before {
  content: "";
  display: block;
  width: 9px; height: 9px;
  background: var(--gold);
  transform: rotate(45deg);
  margin: .3rem auto 0;
}
.value h3 { font-family: var(--serif); font-weight: 500; font-size: 1.3rem; margin: 0 0 .6rem; }
.value p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); align-items: stretch; }
.contact .display { margin-bottom: 1.4rem; }
.contact__lead { color: #b6b3a9; margin: 0 0 2.4rem; max-width: 42ch; font-size: 1.08rem; }
.contact__list { list-style: none; margin: 0; padding: 0; }
.contact__list li { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: 1.15rem 0; border-top: 1px solid rgba(255,255,255,.12); align-items: baseline; }
.contact__list li:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }
.contact__label { color: var(--gold); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; }
.contact__list a { color: #fff; text-decoration: none; transition: opacity .2s; }
.contact__list a:hover { opacity: .7; }

/* Riquadro mappa: pannello neutro finché non c'è l'embed della sede reale */
.map {
  border-radius: var(--radius);
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #8d8b7f;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  background-color: #232622;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 34px 34px;
  border: 1px solid #33362f;
}

/* ---------- Footer ---------- */
.footer { background: #14161300; background-color: #141613; color: #9a988e; padding: 3rem 0; }
.footer__inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; font-size: 0.9rem; }
.footer p { margin: 0.4rem 0 0; }
.brand__logo--foot { height: 125px; filter: none; }
.footer__meta { text-align: right; }

/* ---------- Call FAB (mobile) ---------- */
.call-fab { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); z-index: 70; }
/* WhatsApp: sempre visibile; su mobile sale sopra il pulsante di chiamata */
.wa-fab { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); z-index: 70; transition: transform .2s; }
.wa-fab:hover { transform: scale(1.06); }
/* Facebook: sopra WhatsApp */
.fb-fab { position: fixed; right: 18px; bottom: 86px; width: 56px; height: 56px; border-radius: 50%; background: #1877f2; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.3); z-index: 70; transition: transform .2s; }
.fb-fab:hover { transform: scale(1.06); }

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 940px) {
  .about { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr; }
  .srv:nth-child(odd) { border-right: none; }
  .values { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: none; border: none; cursor: pointer; z-index: 80; }
  .nav-toggle span { display: block; height: 2px; width: 26px; background: #fff; transition: .25s; }
  .nav-toggle[aria-expanded="true"] span { background: var(--ink); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    flex-direction: column; align-items: stretch; justify-content: center; gap: 0;
    background: var(--bg); padding: 2rem; transform: translateX(105%);
    transition: transform .35s ease; box-shadow: -12px 0 40px rgba(0,0,0,.15);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { color: var(--ink) !important; padding: 1rem 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav__cta { margin-top: 1.5rem; text-align: center; border: 1px solid var(--accent) !important; color: var(--accent) !important; }

  .call-fab { display: grid; }
  .wa-fab { bottom: 86px; }
  .fb-fab { bottom: 154px; }
  .footer__meta { text-align: left; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 22px; }
  /* su telefono il testo occupa tutta la larghezza: velo pieno, non laterale */
  .hero__overlay {
    background: linear-gradient(180deg, rgba(18,22,19,.78) 0%, rgba(18,22,19,.68) 45%, rgba(18,22,19,.88) 100%);
  }
  .header__inner,
  .header.is-stuck .header__inner { min-height: 88px; }
  .brand__logo,
  .header.is-stuck .brand__logo { height: 83px; }
  .brand__logo--foot { height: 94px; }
  .values { grid-template-columns: 1fr; }
  .contact__list li { grid-template-columns: 1fr; gap: 0.2rem; }
  .strip__inner { flex-direction: column; align-items: stretch; }
  .strip__people { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__slide { transform: none; transition: none; }
}
