:root {
  --bg: #f6f1e7;
  --bg-alt: #fbf8f2;
  --text: #213126;
  --text-soft: #59675c;
  --primary: #3f6a4f;
  --primary-dark: #2d4d39;
  --accent: #b86f3c;
  --card: rgba(255, 255, 255, 0.82);
  --line: rgba(33, 49, 38, 0.12);
  --shadow: 0 20px 50px rgba(33, 49, 38, 0.10);
  --radius: 24px;
  --max: 1180px;
  --header-h: 82px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.container { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; }
.narrow { width: min(calc(100% - 2rem), 800px); }
.section { padding: clamp(4rem, 7vw, 6rem) 0; position: relative; }
.alt { background: var(--bg-alt); }
.grid { display: grid; gap: 2rem; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }

.section-tag, .eyebrow {
  display: inline-flex;
  padding: .35rem .75rem;
  border-radius: 999px;
  background: rgba(63, 106, 79, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: .75rem;
}
h1, h2, h3 { line-height: 1.1; margin: 0 0 1rem; }
h1 { font-size: clamp(2.3rem, 5vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--text-soft); }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(246, 241, 231, 0.88);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}
.nav-wrap {
  min-height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: inline-flex; align-items: center; gap: .75rem; font-weight: 800; }
.logo-mark {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.logo-text { font-size: .98rem; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav a { color: var(--text); font-weight: 600; }
.lang-toggle {
  padding: .55rem .75rem; border-radius: 999px;
  border: 0; background: rgba(63,106,79,0.08); cursor: pointer; font-weight: 700;
}
.burger {
  display: none; width: 48px; height: 48px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.6);
  align-items: center; justify-content: center; flex-direction: column; gap: 5px; cursor: pointer;
}
.burger span { width: 22px; height: 2px; background: var(--text); border-radius: 99px; }

/* HERO */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid; align-items: center; overflow: clip;
}
.hero-bg, .hero-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-bg { object-fit: cover; }
.hero-overlay { background: linear-gradient(135deg, rgba(20,31,24,.72), rgba(33,49,38,.35)); }
.hero-content { position: relative; z-index: 1; color: #fff; padding-block: 5rem; }
.hero-content p, .hero-content h1, .hero-content .eyebrow { color: #fff; }
.hero-text { max-width: 640px; font-size: 1.1rem; }
.hero-actions, .map-actions, .cookie-banner__actions {
  display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.5rem;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95rem 1.75rem; border-radius: 999px; font-weight: 700;
  border: 1px solid transparent;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary {
  background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.3); color: #fff;
}
.alt .btn-secondary, .section .btn-secondary {
  background: rgba(63,106,79,0.08); border-color: rgba(63,106,79,0.2); color: var(--text);
}
.btn-ghost { border-color: rgba(255,255,255,0.3); color: #fff; }

/* ABOUT */
.about-layout { max-width: 760px; }

/* PRODOTTI TIPICI */
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.product-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.45);
  box-shadow: var(--shadow); border-radius: var(--radius);
  padding: 1.5rem; display: grid; gap: .6rem;
  border-top: 4px solid var(--primary);
}
.product-card h3 { color: var(--primary-dark); }
.product-card p { color: var(--text-soft); }
.product-card .btn-map {
  justify-self: start; padding: .55rem 1.1rem; font-size: .9rem; margin-top: .25rem;
}

/* EVENTS */
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1.5rem; margin-bottom: 2rem;
}
.section-intro { max-width: 620px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.event-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.45);
  box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 28px 50px rgba(33,49,38,.14); }
.event-card img { aspect-ratio: 16/10; width: 100%; object-fit: cover; }
.event-card__body { padding: 1.2rem; }
.event-meta { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .92rem; color: var(--primary-dark); margin-bottom: .7rem; }
.event-link { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--primary); }
.event-link::after { content: "->"; }
.events-loading { grid-column: 1 / -1; }

/* GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.gallery-item {
  background: var(--card); border: 1px solid rgba(255,255,255,.45);
  box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden;
}
.gallery-item img { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.gallery-copy { padding: 1rem 1.1rem 1.2rem; }

/* STORIA */
.story-index {
  display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem;
}
.story-index a {
  display: inline-flex; padding: .55rem 1rem; border-radius: 999px;
  background: rgba(63,106,79,.10); color: var(--primary-dark); font-weight: 700;
  border: 1px solid rgba(63,106,79,.18); transition: background .25s ease;
}
.story-index a:hover { background: rgba(63,106,79,.20); }
.story-section { scroll-margin-top: calc(var(--header-h) + 12px); }
.story-image {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.story-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.order-first { order: -1; }

/* CONTACTS */
.contact-layout { align-items: stretch; }
.contact-list p { margin-bottom: .6rem; }
.contact-list strong { color: var(--text); }
.map-card {
  background: var(--card); border: 1px solid rgba(255,255,255,.45);
  box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; padding: .8rem;
}
.social-links {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.social-link:hover {
  transform: translateY(-2px);
}

/* Colori brand allo hover */
.social-link:hover svg {
  color: #fff;
}
.social-link:nth-child(1):hover {
  background: #1877f2; /* Facebook blu */
}
.social-link:nth-child(2):hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); /* Instagram gradient */
}

.map-card iframe { width: 100%; min-height: 420px; border: 0; border-radius: 18px; }
.map-note { font-size: .88rem; padding: .7rem .4rem .2rem; }
.map-note a { color: var(--primary); text-decoration: underline; }
.map-actions { margin-top: 1.5rem; }

/* FOOTER */
.site-footer { padding: 1.25rem 0 2rem; border-top: 1px solid var(--line); }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; }

/* COOKIE BANNER */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 60;
}
.cookie-banner.hidden { display: none; }
.cookie-banner__content {
  width: min(960px, 100%); margin-inline: auto;
  background: rgba(33,49,38,.95); color: #fff; border-radius: 24px;
  padding: 1.25rem 1.5rem; box-shadow: 0 24px 60px rgba(0,0,0,.25);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between;
}
.cookie-banner__content p { color: rgba(255,255,255,.88); margin: 0; flex: 1 1 280px; }

/* DETAIL */
.detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2.5rem; align-items: center; }
.detail-image img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-image[hidden] { display: none; }
.detail-meta { display: grid; gap: .4rem; margin: 1.2rem 0 1.5rem; }
.detail-description p { margin-bottom: 1rem; }

/* REVEAL ANIMATIONS */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .75s ease, transform .75s ease;
}
.reveal.delay-1 { transition-delay: .14s; }
.reveal.delay-2 { transition-delay: .26s; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .cards-grid, .gallery-grid, .products-grid, .two-col, .detail-grid {
    grid-template-columns: 1fr;
  }
  .section-head, .footer-wrap { flex-direction: column; align-items: flex-start; }
  .order-first { order: 0; }
}

@media (max-width: 820px) {
  .burger { display: inline-flex; }
  .site-nav {
    position: absolute; top: calc(100% + .5rem);
    right: 1rem; left: 1rem;
    background: rgba(251,248,242,.98); border: 1px solid var(--line);
    border-radius: 22px; padding: 1.25rem;
    box-shadow: var(--shadow); display: none; flex-direction: column; align-items: flex-start;
  }
  .site-nav.open { display: flex; }
  .site-nav a { color: var(--text); font-size: 1.1rem; padding: .4rem 0; width: 100%; }
}

@media (max-width: 640px) {
  .hero { min-height: 78svh; }
  .map-card iframe { min-height: 300px; }
  .btn, .hero-actions .btn, .map-actions .btn { width: 100%; }
  .cookie-banner { left: .75rem; right: .75rem; bottom: .75rem; }
  .cookie-banner__content {
    border-radius: 18px;
    padding: 1rem;
    gap: .75rem;
  }
  .cookie-banner__actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin-top: .25rem;
  }
  .cookie-banner__actions .btn {
    width: 100%;
    min-height: 48px;
    padding: .75rem .85rem;
  }
}
