/* Palette e misure: per cambiare i colori basta modificare queste variabili. */
:root {
  --c-primary: #1f5f5b;      /* verde petrolio */
  --c-primary-dark: #164744;
  --c-accent: #c98a5a;       /* terracotta morbida */
  --c-bg: #fbf9f5;
  --c-tint: #f1ece3;
  --c-surface: #ffffff;
  --c-text: #23302f;
  --c-muted: #5f6b69;
  --c-border: #e3ddd2;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 6px 20px rgb(31 95 91 / .06);
  --wrap: 1120px;
  /* Font di sistema: nessuna richiesta esterna, nessun problema di privacy. */
  --f-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
img { max-width: 100%; display: block; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, .h3 { font-family: var(--f-serif); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; color: var(--c-text); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3, .h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--c-muted); }
.lead { font-size: 1.15rem; color: var(--c-muted); max-width: 60ch; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--c-accent); margin-bottom: .8em; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 2px solid var(--c-primary);
  background: var(--c-primary); color: #fff;
  font-weight: 600; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: #fff; }
.btn--small { min-height: 40px; padding: 0 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow::after { content: " →"; }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: rgb(251 249 245 / .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-border); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-text); font-family: var(--f-serif); font-weight: 600; font-size: 1.15rem; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { text-decoration: none; color: var(--c-text); font-weight: 500; }
.nav a[aria-current="page"]:not(.btn) { color: var(--c-primary); box-shadow: inset 0 -2px 0 var(--c-accent); }
.nav-toggle, .nav-btn { display: none; }

@media (max-width: 760px) {
  .nav-btn { display: flex; flex-direction: column; gap: 5px; padding: 12px; cursor: pointer; }
  .nav-btn span { width: 22px; height: 2px; background: var(--c-text); border-radius: 2px; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--c-bg); border-bottom: 1px solid var(--c-border);
    padding: 8px 20px 20px; display: none;
  }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--c-border); }
  .nav .btn { margin-top: 16px; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

/* Sezioni */
.hero { padding: clamp(48px, 8vw, 96px) 0; background: linear-gradient(180deg, var(--c-tint), var(--c-bg)); }
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero__card { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--c-border); }
.card__title { font-family: var(--f-serif); font-weight: 600; font-size: 1.25rem; margin-bottom: .6em; }
@media (max-width: 860px) { .hero__inner { grid-template-columns: 1fr; gap: 32px; } }

.page-head { padding: clamp(40px, 7vw, 80px) 0 8px; }
.page-head--center { text-align: center; padding-bottom: 80px; }
.page-head--center .lead { margin-inline: auto; }

.section { padding: clamp(40px, 7vw, 80px) 0; }
.section--tint { background: var(--c-tint); }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid--2, .grid--3 { grid-template-columns: 1fr; } }

.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }

.feature__num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; margin-bottom: 14px; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta h2 { margin-bottom: .3em; }

/* Orari e contatti */
.orari, .contatti { list-style: none; margin: 0 0 1em; padding: 0; }
.orari li, .contatti li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--c-border); }
.orari li:last-child, .contatti li:last-child { border-bottom: 0; }
.orari li span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.contatti li span:last-child, .contatti li a { text-align: right; }
.orari--compact li { padding: 4px 0; border: 0; font-size: .95rem; }

/* Team */
.person__foto { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin-bottom: 16px; }
.person__foto--iniziali { display: grid; place-items: center; background: var(--c-tint); color: var(--c-primary); font-family: var(--f-serif); font-size: 2.2rem; font-weight: 600; }
.person__ruolo { color: var(--c-accent); font-weight: 600; font-size: .95rem; margin-top: -.4em; }

/* Testi lunghi */
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }

/* Footer */
.footer { background: var(--c-primary-dark); color: #dfe8e6; padding: 56px 0 24px; margin-top: 40px; font-size: .95rem; }
.footer a { color: #fff; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer__title { font-family: var(--f-serif); font-weight: 600; color: #fff; font-size: 1.1rem; }
.footer__bottom { border-top: 1px solid rgb(255 255 255 / .15); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: #b9c9c6; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print { .header, .footer__bottom, .nav-btn { display: none; } body { background: #fff; } }

/* Slider prima/dopo */
.pd { margin: 0; --pos: 50%; }
.pd__frame { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--c-tint); user-select: none; }
.pd__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd__prima { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.pd__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 6px rgb(0 0 0 / .35); pointer-events: none; }
.pd__handle::after { content: "‹ ›"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--c-primary); display: grid; place-items: center; font-weight: 700; box-shadow: var(--shadow); }
.pd__frame:focus-within .pd__handle::after { outline: 3px solid var(--c-accent); }
.pd__label { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: rgb(0 0 0 / .55); color: #fff; font-size: .8rem; font-weight: 600; pointer-events: none; }
.pd__label--dopo { left: auto; right: 12px; }
/* Input invisibile sopra l'immagine: funziona con mouse, dito e tastiera */
.pd__range { position: absolute; top: 0; left: -22px; width: calc(100% + 44px); height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.pd__range::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 600px; }
.pd__range::-moz-range-thumb { width: 44px; height: 600px; border: 0; }
.pd figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 12px; }
/* Consiglio del giorno */
.section--compact { padding: 32px 0; }
.tip { background: var(--c-surface); border: 1px solid var(--c-border); border-left: 4px solid var(--c-accent); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.tip__label { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; color: var(--c-accent); margin-bottom: .4em; }
.tip__text { font-family: var(--f-serif); font-size: 1.2rem; margin: 0; }