:root {
  --forest: #1f3a1a;
  --forest-2: #2b4d24;
  --leaf: #5aa832;
  --leaf-dark: #3f8a1f;
  --wa: #1fa855;
  --wa-dark: #178a45;
  --cream: #f7f5ef;
  --paper: #ffffff;
  --ink: #1c2419;
  --muted: #5a6655;
  --line: #e4e1d7;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(20, 40, 15, .25);
  --serif: "Lora", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--cream); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--leaf-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.08rem; font-weight: 600; }
p { margin: 0 0 1em; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .8em 1.3em; border-radius: 999px; border: 2px solid transparent; font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-lg { font-size: 1.08rem; padding: .95em 1.6em; }
.btn-small { font-size: .92rem; padding: .55em 1em; }
.btn-primary { background: var(--leaf); color: #fff; }
.btn-primary:hover { background: var(--leaf-dark); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp:hover { background: var(--wa-dark); }
.btn-whatsapp svg, .mobile-bar .wa svg { fill: currentColor; stroke: none; }
.btn-ghost { background: transparent; border-color: currentColor; color: inherit; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand img { height: 54px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--leaf-dark); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { position: relative; min-height: min(88vh, 760px); display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 25, 8, .25) 0%, rgba(10, 25, 8, .35) 40%, rgba(10, 25, 8, .82) 100%); }
.hero-content { position: relative; z-index: 1; padding-block: 120px 64px; max-width: 880px; margin-left: max(16px, (100% - 1160px) / 2); }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.hero .lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); max-width: 600px; opacity: .95; }
.hero .eyebrow { color: #c9eab5; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.hero-note { display: flex; align-items: center; gap: .5em; font-weight: 500; margin: 0; }
.hero-note svg { color: #9fe07a; stroke-width: 3; }

.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--leaf-dark); margin-bottom: .8em; }

/* Strip */
.strip { background: var(--forest); color: #fff; }
.strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-block: 22px; text-align: center; }
.strip strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.strip span { font-size: .88rem; opacity: .75; }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--paper); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.section-cta { margin-top: 36px; color: var(--muted); }

/* Services */
.services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.services li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px; transition: box-shadow .2s, transform .2s; }
.services li:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.services li > svg { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: #eaf4e2; color: var(--leaf-dark); margin-bottom: 16px; stroke-width: 1.8; }
.services p { color: var(--muted); margin: 0; font-size: .96rem; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 10px; }
.gallery a { display: block; overflow: hidden; border-radius: 10px; background: #dfe7d6; }
.gallery a.g-wide { grid-column: span 2; grid-row: span 2; }
.gallery a.g-tall { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }

.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 15, 6, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(1400px, 92vw); max-height: 86vh; width: auto; border-radius: 6px; }
.lightbox button { position: fixed; background: rgba(255, 255, 255, .12); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-img img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.about-text > p { color: #34402f; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 32px 0 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; }
.steps li::before { content: counter(s); grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; background: var(--forest); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.15rem; }
.steps span { color: var(--muted); font-size: .94rem; }

/* Contact */
.section-dark { background: var(--forest); color: #eef3ea; }
.section-dark .eyebrow { color: #a6d98a; }
.section-dark a { color: #fff; }
.contact { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.contact-info > p { opacity: .85; font-size: 1.08rem; }
.contact-list { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 20px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list li > svg { width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #a6d98a; }
.contact-list span { display: block; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; opacity: .65; }
.contact-list a { font-size: 1.12rem; font-weight: 500; text-decoration: none; word-break: break-word; }
.contact-list a:hover { text-decoration: underline; }
.area { opacity: .8; font-size: .95rem; }
.social { display: flex; gap: 12px; flex-wrap: wrap; }
.social a { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; text-decoration: none; font-size: .95rem; }
.social a:hover { background: rgba(255, 255, 255, .08); }

.contact-form { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .45); }
.contact-form h3 { font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin-bottom: 18px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: .88rem; font-weight: 600; }
.field input, .field select, .field textarea { font: inherit; font-size: 1rem; padding: .7em .85em; border: 1.5px solid var(--line); border-radius: 10px; background: #fcfcfa; color: var(--ink); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(90, 168, 50, .2); }
.field input[aria-invalid="true"] { border-color: #c0392b; }
.form-error { color: #b03224; font-size: .92rem; font-weight: 500; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.form-actions .btn { flex: 1 1 180px; }
.contact-form .btn-ghost { color: var(--forest); }
.form-note { font-size: .82rem; color: var(--muted); margin: 14px 0 0; }
.form-note a { color: var(--leaf-dark); }

/* Footer */
.site-footer { background: #142811; color: #b9c6b3; font-size: .9rem; padding-block: 32px; }
.site-footer a { color: #dfe8da; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer strong { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* Mobile bar */
.mobile-bar { display: none; }

/* Cookie banner */
.cookie-banner { position: fixed; z-index: 60; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin-inline: auto; background: var(--paper); color: var(--ink); border-radius: var(--radius); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .35); padding: 18px 20px; font-size: .92rem; }
.cookie-banner p { margin-bottom: 12px; }
.cookie-banner div { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-banner .btn-ghost { color: var(--forest); }

/* Simple pages (privacy, 404) */
.page { padding-block: 56px 80px; max-width: 760px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page h2 { font-size: 1.4rem; margin-top: 1.8em; }

/* Responsive */
@media (max-width: 1100px) {
  .services { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: #fff; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .3); transform: translateY(-120%); visibility: hidden; transition: transform .25s, visibility .25s; }
  .nav.open { transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }
  .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); }
  .about, .contact { grid-template-columns: 1fr; }
  .about-img img { aspect-ratio: 16 / 10; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}

@media (max-width: 640px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .site-footer { padding-bottom: 96px; }
  .brand img { height: 44px; }
  .hero { min-height: 82vh; }
  .hero-content { padding-block: 96px 40px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .gallery { grid-auto-rows: 120px; gap: 8px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .services { grid-template-columns: 1fr; }
  .services li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; }
  .services li > svg { grid-row: span 2; margin: 0; }
  .services h3 { margin-bottom: .25em; }
  .footer-links { align-items: flex-start; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; z-index: 55; left: 0; right: 0; bottom: 0; height: 64px; box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
  .mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .5em; color: #fff; font-weight: 600; text-decoration: none; background: var(--leaf-dark); }
  .mobile-bar a.wa { background: var(--wa); }
  .cookie-banner { bottom: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Avviso "numero copiato" (computer) */
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--forest); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 500; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
