:root {
  --bg: #f5f7f9;
  --bg-2: #eaeef2;
  --panel: #ffffff;
  --ink: #1f2e22;
  --ink-soft: rgba(31, 46, 34, .68);
  --ink-faint: rgba(31, 46, 34, .44);
  --accent: #3f7a4f;
  --ink-deep: #14201a;
  --accent-soft: rgba(63, 122, 79, .1);
  --line: rgba(31, 46, 34, .12);
  --display: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --pad: clamp(1.25rem, 5vw, 5rem);
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body);
  font-weight: 400; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased;
  animation: page-fade-in 420ms ease both;
}
body.nav-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }
body.page-leaving { opacity: 0; transition: opacity 200ms ease; }

.eyebrow {
  display: inline-block; margin: 0 0 1.1rem; font-size: .72rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent);
}

.section { position: relative; padding: 6rem var(--pad); }
.section--ink { background: var(--ink-deep); color: #f4f8fb; }
.section--ink .eyebrow { color: #9fd0ab; }
.section--ink p { color: rgba(244, 248, 251, .78); }
.section-inner { max-width: 1120px; margin: 0 auto; }
.sec-head { text-align: center; margin-bottom: 3rem; max-width: 38rem; margin-left: auto; margin-right: auto; }
.sec-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
@media (max-width: 560px) { .section { padding: 3.4rem var(--pad); } }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 200; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad); background: rgba(245, 247, 249, .9);
  border-bottom: 1px solid var(--line);
}
.site-header::before { content: ''; position: absolute; inset: 0; z-index: -1; backdrop-filter: blur(10px); }
.site-header__brand { display: flex; align-items: center; gap: .7rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.site-header__brand img { height: 2.2rem; width: 2.2rem; border-radius: 50%; object-fit: cover; }
.site-header__nav { display: flex; align-items: center; gap: 2rem; font-size: .86rem; }
.site-header__nav a:not(.btn) { color: var(--ink-soft); transition: color 160ms ease; position: relative; }
.site-header__nav a:not(.btn)::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--accent); transition: right 220ms ease; }
.site-header__nav a:not(.btn):hover { color: var(--ink); }
.site-header__nav a:not(.btn):hover::after { right: 0; }
.menu-toggle { display: none; }
@media (max-width: 880px) {
  .site-header__nav { position: fixed; inset: 4.2rem 0 0; flex-direction: column; justify-content: center; gap: 2.2rem; background: var(--bg); transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 220ms ease, transform 220ms ease, visibility 220ms; }
  body.nav-open .site-header__nav { opacity: 1; transform: translateY(0); visibility: visible; }
  .site-header__nav a:not(.btn) { font-size: 1.1rem; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
  .menu-toggle__icon { position: relative; width: 22px; height: 14px; }
  .menu-toggle__icon::before, .menu-toggle__icon::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); transition: transform 200ms ease; }
  .menu-toggle__icon::before { top: 0; } .menu-toggle__icon::after { bottom: 0; }
  body.nav-open .menu-toggle__icon::before { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .menu-toggle__icon::after { transform: translateY(-6.5px) rotate(-45deg); }
}

/* buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.7rem; font-size: .82rem; font-weight: 700; letter-spacing: .02em; border-radius: 8px; border: 1px solid transparent; position: relative; overflow: hidden; transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.btn::before { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform 550ms ease; }
.btn:hover::before { transform: translateX(120%); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(63, 122, 79, .3); }
.btn-accent:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 30px rgba(63, 122, 79, .42); }
.btn-outline { border-color: rgba(22, 50, 74, .25); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-3px); }
.btn-sm { padding: .65rem 1.3rem; font-size: .76rem; }
.btn:active { transform: translateY(0) scale(.97); }

/* hero */
.hero { position: relative; padding: 7rem var(--pad) 6rem; text-align: center; overflow: hidden; background: var(--ink-deep); }
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image: linear-gradient(rgba(159,208,171,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(159,208,171,.1) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 78%);
}
.hero-inner { position: relative; z-index: 2; max-width: 42rem; margin: 0 auto; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); color: #fff; }
.hero-lead { margin-top: 1.2rem; font-size: 1.02rem; color: rgba(244,248,251,.75); }
.hero-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 2rem; }
.hero .eyebrow { color: #9fd0ab; }
.hero-entrance { opacity: 0; animation: hero-fade-in 800ms cubic-bezier(.16,1,.3,1) both; }
@keyframes hero-fade-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

/* servizi */
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.service-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 2rem 1.6rem; text-align: center; transition: transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease; }
.service-card:hover { transform: translateY(-6px); border-color: rgba(63,122,79,.4); box-shadow: 0 1rem 2rem rgba(22,50,74,.08); }
.service-card .icon { font-size: 1.5rem; color: var(--accent); margin-bottom: 1rem; transition: transform 320ms ease; }
.service-card:hover .icon { transform: scale(1.15) rotate(-4deg); }
.service-card h3 { font-size: 1rem; font-weight: 600; }
@media (max-width: 860px) { .service-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .service-grid { grid-template-columns: 1fr; } }

/* chi sono */
.chi-sono { max-width: 42rem; margin: 0 auto; text-align: center; }
.chi-sono h2 { font-size: clamp(1.7rem, 3.6vw, 2.3rem); margin-bottom: 1.1rem; }
.chi-sono p { font-size: 1rem; }

/* dove/contatti */
.dove-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.dove-addr { margin: .6rem 0; font-size: .96rem; color: var(--ink-soft); display: flex; align-items: center; gap: .6rem; }
.dove-addr i { color: var(--accent); }
.map-frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; }
@media (max-width: 860px) { .dove-grid { grid-template-columns: 1fr; } }

/* footer */
.site-footer { padding: 3.5rem var(--pad) 2rem; text-align: center; border-top: 1px solid var(--line); }
.site-footer .footer-logo { height: 46px; width: 46px; border-radius: 50%; object-fit: cover; margin: 0 auto 1.2rem; }
.site-footer__social { display: flex; justify-content: center; gap: 1.4rem; margin-bottom: 1.2rem; font-size: .84rem; }
.site-footer__social a { color: var(--ink-soft); }
.site-footer__social a:hover { color: var(--accent); }
.site-footer .addr { font-size: .82rem; color: var(--ink-faint); }
.site-footer .credit { margin-top: 1.6rem; font-size: .72rem; color: var(--ink-faint); }
.site-footer .credit a { color: var(--accent); }

/* mobile book bar */
.mobile-book { display: none; }
@media (max-width: 780px) {
  .mobile-book { position: fixed; z-index: 190; right: .8rem; left: .8rem; bottom: max(.8rem, env(safe-area-inset-bottom)); display: flex; justify-content: center; padding: .95rem 1rem; color: #fff; background: var(--accent); font-size: .82rem; font-weight: 800; border-radius: 99px; box-shadow: 0 .5rem 2rem rgba(0,0,0,.25); animation: book-pulse 2.6s ease-in-out infinite; }
  .site-footer { padding-bottom: 6.5rem; }
  .hero-btns .btn { flex: 1 1 auto; justify-content: center; }
}
@keyframes book-pulse { 0%, 100% { box-shadow: 0 .5rem 2rem rgba(0,0,0,.25), 0 0 0 0 rgba(63,122,79,.5); } 50% { box-shadow: 0 .5rem 2rem rgba(0,0,0,.25), 0 0 0 8px rgba(63,122,79,0); } }

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity 750ms cubic-bezier(.16,1,.3,1), transform 750ms cubic-bezier(.16,1,.3,1); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0) scale(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .hero-entrance { animation: none !important; opacity: 1 !important; transform: none !important; }
  body { animation: none !important; opacity: 1 !important; }
}

/* monogramma (nessun logo disponibile) */
.monogram { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--display); font-weight: 700; }
.site-header__brand .monogram { width: 2.2rem; height: 2.2rem; font-size: .82rem; }
.footer-logo.monogram { width: 46px; height: 46px; font-size: 1rem; margin: 0 auto 1.2rem; }
