/* ============================================================
   Estetica De Fazio Distribution — Sito vetrina
   Palette: nero / bianco + accento oro champagne
   ============================================================ */

:root {
  --black: #111110;
  --ink: #1c1b1a;
  --soft: #5b574f;
  --line: #e6e1d8;
  --cream: #f6f3ee;
  --white: #ffffff;
  --gold: #b08d57;
  --gold-soft: #c9a877;
  --radius: 4px;
  --max: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
  font-size: 16px;
}

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

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

body {
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -.3px;
}

.section { padding: clamp(64px, 9vw, 130px) 0; }

/* ---------- Eyebrow / titles ---------- */
.section-eyebrow,
.hero-eyebrow {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .72rem;
  color: var(--gold);
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3.2rem);
  color: var(--ink);
  margin-bottom: 26px;
}
.section-title.light { color: var(--white); }

.section-head.center { text-align: center; max-width: 760px; margin: 0 auto clamp(40px,5vw,68px); }
.section-head.center .section-eyebrow { display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  padding: 16px 34px;
  border-radius: var(--radius);
  transition: all .35s var(--ease);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--gold); color: var(--white); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }

.brand-logo { height: 46px; width: auto; transition: opacity .4s, height .4s var(--ease); }
.brand-logo--light { position: absolute; top: 0; left: 0; }

/* default (top of page, over hero): show light logo */
.brand { position: relative; display: inline-block; }
.brand-logo--dark { opacity: 0; }
.brand-logo--light { opacity: 1; }
.site-header.scrolled .brand-logo--dark { opacity: 1; }
.site-header.scrolled .brand-logo--light { opacity: 0; }
.site-header.scrolled .brand-logo { height: 38px; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  color: var(--white);
  position: relative;
  transition: color .3s;
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 1px; background: var(--gold); transition: width .35s var(--ease);
}
.nav-link:hover::after { width: 100%; }
.site-header.scrolled .nav-link { color: var(--ink); }

.nav-cta {
  border: 1px solid rgba(255,255,255,.5);
  padding: 10px 22px;
  border-radius: var(--radius);
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); border-color: var(--gold); color: var(--white); }
.site-header.scrolled .nav-cta { border-color: var(--ink); }
.site-header.scrolled .nav-cta:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--white); transition: all .3s var(--ease); }
.site-header.scrolled .nav-toggle span { background: var(--ink); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(10,10,9,.86) 0%, rgba(10,10,9,.55) 55%, rgba(10,10,9,.78) 100%),
    url('../img/hero-bg.png') center/cover no-repeat;
  transform: scale(1.05);
  animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom { to { transform: scale(1.15); } }

.hero-inner { position: relative; z-index: 2; max-width: 820px; margin: 0; padding-top: 80px; text-align: left; }
.hero-actions { justify-content: flex-start; }
.hero-eyebrow { color: var(--gold-soft); }
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  color: var(--white);
  margin-bottom: 26px;
}
.hero-lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  max-width: 640px;
  color: rgba(255,255,255,.85);
  margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-ghost { border-color: rgba(255,255,255,.6); color: var(--white); }
.hero .btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.hero-scroll {
  position: absolute; bottom: 34px; left: 50%; transform: translateX(-50%);
  width: 26px; height: 44px; border: 1px solid rgba(255,255,255,.5); border-radius: 14px;
  z-index: 2;
}
.hero-scroll span {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 3px; height: 8px; background: var(--gold-soft); border-radius: 2px;
  animation: scrollDot 1.8s var(--ease) infinite;
}
@keyframes scrollDot { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,14px)} 100%{opacity:0} }

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--white); }
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.about-text p { color: var(--soft); margin-bottom: 18px; font-size: 1.05rem; }
.about-text strong { color: var(--ink); font-weight: 400; }

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.stat { background: var(--cream); padding: 34px 26px; text-align: center; }
.stat-num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 6px;
}
.stat-label {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .68rem;
  color: var(--soft);
}

/* ============================================================
   SERVIZI
   ============================================================ */
.services { background: var(--cream); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.service-card {
  background: var(--white);
  padding: 46px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .45s;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 60px -28px rgba(17,17,16,.28);
  border-color: transparent;
}
.service-icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--cream);
  color: var(--gold);
  margin-bottom: 26px;
  transition: background .4s, color .4s;
}
.service-card:hover .service-icon { background: var(--ink); color: var(--gold-soft); }
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 14px; color: var(--ink); }
.service-card p { color: var(--soft); font-size: .98rem; }

/* ============================================================
   PARTNER
   ============================================================ */
.partners { background: var(--white); }
.section-sub { color: var(--soft); font-size: 1.02rem; max-width: 560px; margin: 0 auto; }

.partner-grid {
  display: grid;
  /* minmax(0,…): senza il minimo a 0 le tracce si allargherebbero
     fino alla larghezza intrinseca dei loghi, sfondando il viewport */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.partner-logo {
  background: var(--white);
  min-height: 168px;
  padding: 32px 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .4s var(--ease);
}
.partner-logo img {
  /* doppio vincolo: i loghi molto larghi non sovrastano quelli compatti */
  max-height: 62px;
  max-width: 74%;
  width: auto;
  object-fit: contain;
  /* brightness uniforma il peso ottico: i loghi chiari non sbiadiscono */
  filter: grayscale(1) brightness(.6);
  opacity: .85;
  transition: filter .45s var(--ease), opacity .45s var(--ease), transform .45s var(--ease);
}
.partner-logo:hover { background: var(--cream); }
.partner-logo:hover img { filter: none; opacity: 1; transform: scale(1.06); }

/* Fallback: logo non ancora caricato → mostra il nome del brand */
.partner-logo.is-empty::after {
  content: attr(data-name);
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .7rem;
  color: var(--soft);
  opacity: .5;
  text-align: center;
}
.partner-logo.is-empty img { display: none; }

.partners-note {
  text-align: center;
  color: var(--soft);
  font-size: .95rem;
  margin-top: 34px;
}
.partners-note a { color: var(--gold); border-bottom: 1px solid transparent; transition: border-color .3s; }
.partners-note a:hover { border-color: var(--gold); }

/* ============================================================
   VALORI
   ============================================================ */
.values {
  background: var(--ink);
  color: var(--white);
  position: relative;
}
.values-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.values-list { list-style: none; display: flex; flex-direction: column; gap: 30px; }
.values-list li { display: flex; gap: 24px; align-items: flex-start; }
.values-list span {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--gold-soft);
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  padding-bottom: 4px;
}
.values-list h4 { font-size: 1.4rem; margin-bottom: 6px; color: var(--white); }
.values-list p { color: rgba(255,255,255,.65); font-size: .98rem; }

/* ============================================================
   CONTATTI
   ============================================================ */
.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: stretch;
}
.contact-info > p { color: var(--soft); margin-bottom: 36px; max-width: 460px; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 26px; }
.contact-list li { display: flex; gap: 18px; align-items: flex-start; }
.contact-ico {
  width: 48px; height: 48px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  color: var(--gold);
}
.contact-ico svg { width: 20px; height: 20px; }
.contact-label {
  display: block;
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .68rem;
  color: var(--soft);
  margin-bottom: 4px;
}
.contact-list a { display: block; color: var(--ink); transition: color .3s; }
.contact-list a:hover { color: var(--gold); }

.contact-map {
  min-height: 380px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.contact-map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; filter: grayscale(1) contrast(1.05); transition: filter .5s; }
.contact-map:hover iframe { filter: grayscale(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--black); color: rgba(255,255,255,.7); }
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 50px;
  padding: clamp(50px, 7vw, 80px) 28px;
}
.footer-brand img { height: 46px; margin-bottom: 22px; }
.footer-brand p { max-width: 320px; font-size: .95rem; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.footer-col h5 {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  color: var(--gold-soft);
  margin-bottom: 16px;
  font-weight: 400;
}
.footer-col a, .footer-col p { display: block; color: rgba(255,255,255,.7); font-size: .94rem; margin-bottom: 10px; transition: color .3s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; }
.footer-bottom p { font-size: .82rem; color: rgba(255,255,255,.45); text-align: center; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 920px) {
  .about-grid, .values-inner, .contact-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .footer-inner { grid-template-columns: 1fr; }
  .partner-logo { min-height: 130px; padding: 24px 20px; }
  .partner-logo img { max-height: 50px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; position: relative; z-index: 110; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh; height: 100dvh;
    width: min(78vw, 320px);
    z-index: 90;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 0 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .45s var(--ease);
  }
  .nav.open { transform: translateX(0); }
  .nav-link { color: var(--white) !important; font-size: 1rem; }
  .nav-cta { border-color: rgba(255,255,255,.4); }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-toggle.active span { background: var(--white) !important; }

  .footer-cols { grid-template-columns: 1fr 1fr; }
  .stat { padding: 26px 16px; }
}

@media (max-width: 560px) {
  /* 9 loghi su 2 colonne: l'ultimo occupa l'intera riga, niente celle vuote */
  .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .partner-logo:last-child { grid-column: span 2; }
  .partner-logo { min-height: 112px; padding: 20px 16px; }
  .partner-logo img { max-height: 44px; }
}

@media (max-width: 460px) {
  .container { padding: 0 20px; }
  .footer-cols { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}
