:root {
  --bg: #faf7f2;
  --bg-alt: #f1ebe1;
  --dark: #2b2521;
  --text: #3a332e;
  --muted: #7a6f66;
  --accent: #a0623a;
  --accent-dark: #834d2b;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(43, 37, 33, .08);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: calc(72px + var(--safe-top));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--dark); }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

.eyebrow {
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: .9rem 1.6rem;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
  border: 1.5px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--dark); }

/* Header */
.header {
  position: fixed; inset: 0 0 auto 0;
  height: var(--header-h);
  padding-top: var(--safe-top);
  z-index: 50;
  transition: background .3s, box-shadow .3s;
  color: var(--white);
}
.header.is-scrolled { background: rgba(250, 247, 242, .96); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(0,0,0,.06); color: var(--dark); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 2rem; }
.nav a { text-decoration: none; font-size: .95rem; font-weight: 500; opacity: .9; }
.nav a:hover { color: var(--accent); opacity: 1; }
.header__actions { display: flex; align-items: center; gap: .75rem; }

.lang { display: flex; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: inherit; cursor: pointer;
  font: 600 .8rem var(--sans); padding: .4rem .75rem; letter-spacing: .05em;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--white); }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: .5rem; color: inherit; }
.burger span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .3s, opacity .3s; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  background: #d4ccbe url("../img/hero.jpg") 60% center/cover no-repeat;
  color: var(--white);
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(30,24,20,.55), rgba(30,24,20,0) 22%), linear-gradient(100deg, rgba(30,24,20,.78) 0%, rgba(30,24,20,.35) 70%, rgba(30,24,20,.2) 100%); }
.hero__content { position: relative; max-width: 720px; margin-left: max(16px, (100% - 1180px) / 2); padding-top: var(--header-h); }
.hero h1 { color: var(--white); }
.hero .eyebrow { color: #e7c2a3; }
.hero__lead { font-size: 1.15rem; opacity: .92; max-width: 560px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--dark { background: var(--dark); color: #e9e2da; }
.section--dark h2 { color: var(--white); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.section__head p:last-child { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split__img img { border-radius: var(--radius); aspect-ratio: 4/5; object-fit: cover; width: 100%; box-shadow: var(--shadow); }
.split__text p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.feature { text-align: center; }
.feature__icon {
  width: 60px; height: 60px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--white);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.feature__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.feature h3 { font-size: 1.35rem; }
.feature p { color: var(--muted); font-size: .95rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .3s; }
.card:hover { transform: translateY(-6px); }
.card img { aspect-ratio: 3/2; object-fit: cover; width: 100%; transition: transform .5s ease; }
.card__zoom { display: block; width: 100%; padding: 0; border: 0; background: var(--bg-alt); cursor: zoom-in; overflow: hidden; }
.card__zoom:hover img { transform: scale(1.04); }
.card__zoom { position: relative; }
.card__badge {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(30,24,20,.72); color: var(--white); font-size: .75rem; font-weight: 500;
  padding: .25rem .6rem; border-radius: 999px; backdrop-filter: blur(4px);
}
.lightbox__count { color: #a89d93; font-size: .85rem; margin-left: .25rem; }
.card__zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.card { display: flex; flex-direction: column; }
.card[hidden] { display: none; }
.card__body { flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: .25em; }
.card__ask {
  margin-top: auto; padding-top: 1rem; align-self: flex-start;
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--accent); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.card__ask::before {
  content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='1.5'/%3E%3Cpath d='M3.5 6l8.5 7 8.5-7'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='1.5'/%3E%3Cpath d='M3.5 6l8.5 7 8.5-7'/%3E%3C/svg%3E") center/contain no-repeat;
}
.card__ask { white-space: nowrap; }
.card__ask-short { display: none; }
.card__ask:hover { color: var(--accent-dark); text-decoration: underline; }
.more { text-align: center; margin-top: 2rem; }
.more:empty { display: none; }
.btn--outline { background: none; border-color: var(--accent); color: var(--accent); font: inherit; font-weight: 500; cursor: pointer; }
.btn--outline:hover { background: var(--accent); color: var(--white); }

/* Come lavoriamo */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: s; }
.step { position: relative; padding-top: .5rem; }
.step__num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--accent); color: var(--accent);
  font-family: var(--serif); font-size: 1.5rem; font-weight: 600; margin-bottom: 1rem;
}
.step h3 { font-size: 1.4rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* Mappa su consenso */
.map-consent {
  height: 100%; min-height: 380px; border-radius: var(--radius);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.map-consent svg { width: 44px; height: 44px; fill: none; stroke: #e7c2a3; stroke-width: 1.5; margin-bottom: .75rem; }
.map-consent p { margin: 0 0 .5rem; color: var(--white); }
.map-consent__note { color: #a89d93 !important; font-size: .85rem; margin-bottom: 1.25rem !important; }
.map-consent__actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 16, 13, .94);
  display: flex; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1200px, 100%); text-align: center; }
.lightbox img { max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 8px; }
.lightbox figcaption { color: #e9e2da; margin-top: 1rem; font-size: .95rem; }
.lightbox__ask { display: table; margin: 1rem auto 0; padding: .7rem 1.3rem; font-size: .9rem; }
.lightbox figcaption strong { font-family: var(--serif); font-size: 1.4rem; color: var(--white); margin-right: .5rem; }
.lightbox__btn {
  position: absolute; background: rgba(255,255,255,.1); color: var(--white); border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
}
.lightbox__btn:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: calc(16px + var(--safe-top)); right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.card__body { padding: 1.25rem 1.4rem 1.5rem; }
.card__body p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 4rem); align-items: stretch; }
.contact__info > p { color: #c9bfb5; }
.contact__list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1.1rem; }
.contact__list li { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); padding-bottom: 1rem; }
.contact__list strong { color: #e7c2a3; font-weight: 500; font-size: .9rem; }
.contact__list a { text-decoration: none; }
.contact__list a:hover { color: #e7c2a3; }
.contact__cta { display: flex; flex-wrap: wrap; gap: 1rem; }
.contact__map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; border-radius: var(--radius); filter: grayscale(.3); }

/* Footer */
.footer { background: #201b18; color: #a89d93; padding: 2rem 0 calc(5.5rem + var(--safe-bottom)); font-size: .9rem; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.footer p { margin: 0; }
.footer .logo { color: var(--white); font-size: 1.4rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); }

/* Pulsante email fisso */
.mail-float {
  position: fixed; right: 20px; bottom: calc(20px + var(--safe-bottom)); z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .2s, background .2s;
}
.mail-float.is-hidden { opacity: 0; transform: scale(.6); pointer-events: none; }
.mail-float { transition: transform .25s, background .2s, opacity .25s; }
.mail-float:hover { transform: scale(1.08); background: var(--accent-dark); }
.mail-float svg { width: 26px; height: 26px; fill: none; stroke: var(--white); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.contact__alt { margin-top: 1.25rem; font-size: .9rem; color: #a89d93; }
.contact__alt a { color: #e7c2a3; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */
@media (max-width: 1000px) {
  .cards, .features, .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1080px) {
  .burger { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); color: var(--dark);
    padding: .5rem 16px 1.5rem;
    box-shadow: 0 10px 20px rgba(0,0,0,.08);
    transform: translateY(calc(-100% - var(--header-h)));
    visibility: hidden;
    transition: transform .35s ease, visibility 0s linear .35s;
    z-index: -1;
  }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--bg-alt); font-size: 1.05rem; }
  .header.menu-open { background: var(--bg); color: var(--dark); }
  .header.menu-open .nav { transform: none; visibility: visible; transition: transform .35s ease; }
  .header.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header.menu-open .burger span:nth-child(2) { opacity: 0; }
  .header.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 820px) {
  .split, .contact { grid-template-columns: 1fr; }
  .split__img img { aspect-ratio: 4/3; }
}
@media (max-width: 560px) {
  .logo { font-size: 1.3rem; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: calc(16px + var(--safe-bottom)); transform: none; }
  .features, .steps { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .card__body { padding: .8rem .85rem 1rem; }
  .card__body h3 { font-size: 1.15rem; }
  .card__body p { font-size: .8rem; line-height: 1.45; }
  .card__ask { font-size: .78rem; padding-top: .7rem; gap: .3rem; }
  .card__ask::before { width: 15px; height: 15px; }
  .card__ask-long { display: none; }
  .card__ask-short { display: inline; }
  .steps { gap: 1.5rem; }
  .step { display: grid; grid-template-columns: 48px 1fr; column-gap: 1rem; padding-top: 0; }
  .step__num { grid-row: span 2; margin-bottom: 0; }
  .step h3 { margin-bottom: .2em; }
  .step p { margin: 0; }
  .contact__list li { grid-template-columns: 1fr; gap: .2rem; }
  .hero__cta .btn { flex: 1 1 100%; text-align: center; }
}

/* Pagina privacy */
.legal .container { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-top: 1rem; }
.legal h2 { font-size: 1.5rem; margin-top: 2rem; }
.legal p { color: var(--text); }
.legal a { color: var(--accent); }
.legal__date { color: var(--muted) !important; font-size: .9rem; }
.legal hr { border: 0; border-top: 1px solid var(--bg-alt); margin: 4rem 0 2rem; }
