/* =========================================================================
   Farmacia Pasquali — foglio di stile unico, mobile-first.
   Palette e misure sono variabili qui sotto: per cambiare il verde
   d'accento basta modificare --accent / --accent-strong / --accent-soft.
   ========================================================================= */

:root {
  /* Palette dalle grafiche social della farmacia */
  --bg: #fbf8f1;               /* crema */
  --surface: #f5eee3;          /* beige caldo, alternato al crema */
  --surface-2: #ebdfcd;
  --line: #e4d7c3;
  --text: #3a2e22;             /* bruno scuro, contrasto 12:1 */
  --heading: #5a4330;          /* marroncino scuro del logo per i titoli, contrasto 8:1 */
  --muted: #6b5d4f;            /* contrasto 5.5:1 anche su --surface */
  --accent: #34802a;           /* verde vivace, bianco sopra = 4.9:1 */
  --accent-strong: #276620;
  --accent-soft: #e2f1d6;
  --leaf: #6cbf3f;             /* verde brillante della croce: solo decorazioni */
  --sage: #cfe3b5;
  --brown: #84653f;            /* marroncino del logo F+P (contrasto 4.6:1 sul crema) */
  --brown-line: #d8c7ab;       /* linee sottili color marroncino */
  --gold: #c9a24a;             /* oro: solo dettagli (linee, cornici), mai testo su chiaro */
  --gold-light: #e6c879;       /* oro chiaro per testi su fondo scuro */
  --warn-bg: #fff4c7;
  --danger: #a3332b;
  --focus: #1f6feb;

  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Merriweather", Georgia, "Times New Roman", serif;
  --font-label: "Montserrat", system-ui, sans-serif;
  --font-script: "Kaushan Script", "Brush Script MT", cursive;
  --font-logo: "Oswald", "Arial Narrow", sans-serif;

  --radius: 24px;
  --radius-sm: 14px;
  --gutter: 22px;
  --maxw: 1240px;
  --header-h: 68px;
  --section-y: 96px;
  --shadow: 0 1px 2px rgba(31, 29, 26, .03), 0 12px 32px rgba(31, 29, 26, .06);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 40px; --section-y: 152px; --header-h: 84px; }
}

/* --- Base ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.8 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 300; line-height: 1.18; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--heading); }
h1 { font-size: clamp(2.7rem, 7vw, 5.2rem); line-height: 1.08; }
h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); }
h3 { font-size: 1.3rem; font-weight: 400; line-height: 1.3; letter-spacing: 0; }
.script { font-family: var(--font-script); font-weight: 400; letter-spacing: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent-soft); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--surface { background: var(--surface); }
.eyebrow { display: inline-flex; align-items: center; gap: .7rem; font: 600 .74rem/1.4 var(--font-label); letter-spacing: .22em; text-transform: uppercase; color: var(--brown); margin-bottom: 1.2rem; }
/* i tre trattini verdi "di enfasi" delle grafiche */
.eyebrow::before { content: ""; width: 22px; height: 22px; flex: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236cbf3f' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M4 13 8.5 15.5M7.5 5.5l3.5 5M15 3.5l-.5 6.5'/%3E%3C/svg%3E") center / contain no-repeat; }
.lead { font-size: clamp(1.08rem, 2vw, 1.22rem); line-height: 1.7; color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.section-head { max-width: 42rem; margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.section-head h2 { margin-bottom: .45em; }
/* barra verde sotto i titoli, come nelle grafiche */
.section-head h2::after, .page-head h1::after { content: ""; display: block; width: 68px; height: 5px; margin-top: .45em; border-radius: 3px; background: linear-gradient(90deg, var(--leaf) 0 70%, var(--gold) 70% 100%); }
/* Home: titolo a sinistra, testo a destra, come un'impaginazione da rivista */
@media (min-width: 1000px) {
  [data-page="index"] .section-head:not(.section-head--row) { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 5rem; align-items: end; }
  [data-page="index"] .section-head:not(.section-head--row) > * { grid-column: 1; }
  [data-page="index"] .section-head:not(.section-head--row) > .lead { grid-column: 2; grid-row: 2; margin-bottom: .6rem; }
  [data-page="index"] .section-head:not(.section-head--row) > .plan3d__note { grid-column: 2; grid-row: 3; }
}
.section-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; max-width: none; }
.section-head--row > div { max-width: 40rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 12px; color: #fff; }

/* Segnaposto evidenziati (solo se showPlaceholders = true) */
.show-ph .ph { background: rgba(201, 162, 39, .1); border-bottom: 1px dashed #b8921f; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

/* --- Pulsanti ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 50px; padding: .7rem 1.7rem; border-radius: 999px;
  font: 600 .78rem/1.2 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--brown); border-color: var(--brown-line); }
.btn--ghost:hover { border-color: var(--brown); color: var(--brown); background: rgba(132, 101, 63, .06); }

.btn--light { background: #fff; color: var(--text); border-color: var(--line); }
.btn--light:hover { border-color: var(--accent); color: var(--accent); }
.btn--small { min-height: 40px; padding: .5rem 1.1rem; font-size: .7rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .5rem; font: 600 .76rem/1.4 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 241, .92);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__bar { display: flex; align-items: center; gap: .75rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; margin-right: auto; min-width: 0; }
.brand { gap: .75rem; }
.brand img { width: auto; height: 58px; flex: none; }
.brand__name { font: 400 1.3rem/1.05 var(--font-logo); letter-spacing: .05em; text-transform: uppercase; color: var(--brown); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__name small { display: block; margin-top: 5px; font: 400 .6rem/1 var(--font-label); color: var(--muted); letter-spacing: .22em; text-transform: uppercase; }
/* Telefoni stretti: il nome va su due righe invece di essere tagliato */
@media (max-width: 559px) {
  .brand__name { white-space: normal; font-size: 1rem; line-height: 1.05; }
  .brand img { height: 42px; }
  .brand__name small { display: none; }
}
@media (max-width: 359px) {
  .site-header__bar { gap: .5rem; }
  .brand { gap: .5rem; }
  .brand img { height: 34px; }
  .brand__name { font-size: .9rem; }
  .call-btn { padding-inline: .8rem; letter-spacing: .08em; }
}

.nav { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .5rem; }
.nav a { position: relative; display: block; padding: .6rem .7rem; color: var(--text); text-decoration: none; font: 500 .74rem/1 var(--font-sans); letter-spacing: .16em; text-transform: uppercase; }
.nav a::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .2rem; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.nav a:hover { color: var(--accent); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--accent); }

.call-btn { min-height: 42px; padding: .5rem 1rem; }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--brown-line); border-radius: 50%; background: transparent; color: var(--brown); cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }

.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: .5rem 0 1rem; }
.mobile-nav a { display: block; padding: .85rem 0; font: 300 1.45rem/1.3 var(--font-serif); color: var(--heading); text-decoration: none; border-bottom: 1px solid var(--line); }
.mobile-nav a[aria-current="page"] { color: var(--accent); font-style: italic; }

/* schermi medi: menu completo ma poco spazio, via la riga piccola sotto il nome */
@media (min-width: 960px) and (max-width: 1139px) {
  .brand__name small { display: none; }
  .nav ul { gap: .2rem; }
  .nav a { padding-inline: .55rem; }
}
@media (min-width: 960px) {
  .nav { display: block; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* --- Hero ---------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding-block: 40px var(--section-y); }
.hero > .container { position: relative; z-index: 1; }
/* logo accanto al nome grande: se non c'è spazio (telefoni stretti) va sopra */
.hero__brand { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem clamp(1.1rem, 2.6vw, 2.2rem); margin-bottom: .2em; }
.hero__brand h1 { margin: 0; }
.hero__logo { height: clamp(5.2rem, 9vw, 8.5rem); width: auto; flex: none; }
/* rametto di foglie in alto a destra e onde salvia in basso a sinistra, come nelle grafiche */
.hero::before { content: ""; position: absolute; top: -40px; right: -70px; width: clamp(180px, 26vw, 360px); aspect-ratio: 1; background: url("/assets/img/deco/foglie.svg") center / contain no-repeat; transform: scaleX(-1) rotate(-12deg); opacity: .9; }
.hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: clamp(240px, 38vw, 560px); aspect-ratio: 4 / 3; background: url("/assets/img/deco/onde.svg") center / 100% 100% no-repeat; transform: scaleX(-1); opacity: .75; }
.hero h1 .script { display: block; position: relative; width: max-content; max-width: 100%; margin-top: .05em; font-size: 1.12em; line-height: 1.05; color: var(--accent); }
/* pennellata verde sotto la parola in corsivo */
.hero h1 .script::after { content: ""; position: absolute; left: -2%; right: -6%; bottom: -.18em; height: .22em; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M3 15C70 6 160 2 297 4C200 7 110 11 6 18Z' fill='%236cbf3f'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { margin-bottom: .3em; }
.hero__title { font-family: var(--font-serif); font-weight: 300; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; color: var(--heading); margin: 1.1em 0 .8em; font-style: italic; }
.hero__media { position: relative; isolation: isolate; aspect-ratio: 4 / 3; background: var(--surface-2); margin-right: 12px; border-radius: var(--radius); }
.hero__media::before { content: ""; position: absolute; z-index: -1; inset: 12px -12px -12px 12px; border: 1.5px solid var(--gold); border-radius: inherit; } /* cornice sfalsata */
.hero__media img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.hero .btn-row { margin-top: 1.75rem; }
.hero__status { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 0; font-size: .92rem; color: var(--muted); }
.hero__status-icon { width: 16px; height: 16px; color: var(--accent); flex: none; margin-left: -3px; }
@media (min-width: 900px) {
  .hero { padding-top: 88px; }
  .hero__grid { grid-template-columns: 1.15fr 1fr; gap: clamp(3rem, 6vw, 6rem); }
  .hero__media { margin-right: 22px; }
  .hero__media::before { inset: 22px -22px -22px 22px; }
}

.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #b9b2a8; flex: none; }
.status-dot.is-open { background: #2f9e62; box-shadow: 0 0 0 4px rgba(47, 158, 98, .15); }

/* --- Card servizi -------------------------------------------------------- */

.grid { display: grid; gap: 2.75rem 2.5rem; counter-reset: scheda; }
@media (min-width: 640px) { .grid--2, .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 4rem 3.5rem; } }

.card {
  position: relative; display: flex; flex-direction: column; gap: .4rem;
  padding: 1.6rem 0 0; border-top: 1px solid var(--brown-line); counter-increment: scheda;
}
.card::before { content: counter(scheda, decimal-leading-zero); font: 600 .7rem/1 var(--font-label); letter-spacing: .2em; color: var(--brown); }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, var(--leaf) 0 75%, var(--gold) 75% 100%); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.card:hover::after { transform: scaleX(1); }
.card .card__icon { display: none; }
.card h3 { margin: 1rem 0 .5rem; font-size: clamp(1.35rem, 2vw, 1.55rem); font-weight: 400; line-height: 1.25; transition: color .4s var(--ease); }
.card p { color: var(--muted); margin: 0; }
.card__icon { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); }
.card__icon svg { width: 22px; height: 22px; stroke-width: 1.6; }
.card__foot { margin-top: auto; padding-top: 1.4rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.card--link:hover h3 { color: var(--accent); font-style: italic; }
.card--link .link-arrow svg { transition: transform .5s var(--ease); }
.card--link:hover .link-arrow svg { transform: translateX(6px); }
.card--link a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* tutta la card cliccabile */
.card--link a { text-decoration: none; color: inherit; }
.tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); }
.tag svg { width: 16px; height: 16px; }
.badge { display: inline-block; padding: .35rem .75rem; border-radius: 999px; background: var(--surface); color: var(--muted); font: 500 .66rem/1.3 var(--font-label); letter-spacing: .12em; text-transform: uppercase; }

/* --- Storia (teaser) ----------------------------------------------------- */

.split { display: grid; gap: 2rem; align-items: center; }
.split__media { position: relative; isolation: isolate; aspect-ratio: 3 / 2; background: var(--surface-2); border-radius: var(--radius); margin-left: 12px; }
.split__media::before { content: ""; position: absolute; z-index: -1; inset: 12px 12px -12px -12px; border: 1.5px solid var(--gold); border-radius: inherit; } /* cornice sfalsata, speculare a quella in cima */
.split__media img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
@media (min-width: 900px) { .split__media { margin-left: 22px; } .split__media::before { inset: 22px 22px -22px -22px; } }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 7rem; } }

/* --- Turni --------------------------------------------------------------- */

.turni {
  display: grid; gap: 2.5rem; padding-block: clamp(2rem, 4vw, 3.5rem);
  border-top: 1px solid var(--brown-line); border-bottom: 1px solid var(--brown-line);
}
.turni__label { display: flex; align-items: center; gap: .6rem; font: 500 .7rem/1.4 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--accent-strong); }
.turni__label svg { width: 22px; height: 22px; }
.turni__next { font-family: var(--font-serif); font-weight: 300; font-size: clamp(1.9rem, 4.6vw, 2.7rem); line-height: 1.15; color: var(--heading); margin: .6rem 0 .4rem; }
.turni__next::first-letter, .footer-turno strong::first-letter, .cal__title::first-letter { text-transform: uppercase; }
.turni__when { color: var(--accent-strong); font-weight: 500; }
.turni__dates { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 2.5rem; }
@media (min-width: 560px) { .turni__dates { grid-template-columns: 1fr 1fr; } }
.turni__dates li { display: flex; align-items: center; gap: .75rem; padding: .8rem 0; border-bottom: 1px solid var(--brown-line); font-size: .98rem; }
.turni__dates li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--gold); flex: none; }
.turni__dates li.is-next { color: var(--accent); font-weight: 600; }
.turni__dates li.is-next::before { background: var(--leaf); border-color: var(--leaf); }
.turni__dates-title { font: 500 .68rem/1.4 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
@media (min-width: 900px) { .turni { grid-template-columns: 1fr 1.1fr; align-items: start; gap: 6rem; } }

/* --- Vieni a trovarci ---------------------------------------------------- */

.visit { display: grid; gap: 2rem; }
.visit__map { overflow: hidden; background: var(--surface-2); min-height: 320px; border-radius: var(--radius); filter: sepia(.12) saturate(.8); }
.visit__map iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.info-list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 1.1rem; }
.info-list li { display: grid; grid-template-columns: 24px 1fr; gap: .9rem; align-items: start; }
.info-list svg { width: 20px; height: 20px; color: var(--accent); margin-top: .1rem; stroke-width: 1.6; }
.info-list strong { display: block; margin-bottom: .2rem; font: 500 .68rem/1.4 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.info-list a { color: var(--text); }
.hours { width: 100%; border-collapse: collapse; font-size: .98rem; }
.hours th, .hours td { text-align: left; padding: .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.hours th { font-weight: 500; width: 7.5em; color: var(--muted); }
.hours tr.is-today th, .hours tr.is-today td { color: var(--accent-strong); font-weight: 600; }
@media (min-width: 900px) { .visit { grid-template-columns: 1.25fr 1fr; gap: 5.5rem; } .visit__map { min-height: 520px; } }

/* --- Intestazione pagine interne ---------------------------------------- */

.page-head { padding-block: 56px 24px; }
.page-head { position: relative; overflow: hidden; }
.page-head > .container { position: relative; z-index: 1; }
.page-head::before { content: ""; position: absolute; top: -30px; right: -60px; width: clamp(160px, 22vw, 300px); aspect-ratio: 1; background: url("/assets/img/deco/foglie.svg") center / contain no-repeat; transform: scaleX(-1) rotate(-12deg); opacity: .85; }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); line-height: 1.05; letter-spacing: -.015em; }
.page-head .lead { margin-top: .5rem; }
@media (min-width: 768px) { .page-head { padding-block: 112px 40px; } }

/* --- Timeline (Chi siamo) ----------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 1px; background: var(--gold); }
.timeline__item { position: relative; padding-left: 48px; padding-bottom: 3.5rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: ""; position: absolute; left: 4px; top: 8px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--accent); box-shadow: inset 0 0 0 4px var(--bg), inset 0 0 0 8px var(--accent);
}
.timeline__year { font: 500 .72rem/1.4 var(--font-label); color: var(--accent); letter-spacing: .24em; }
.timeline__photo { margin: 1.25rem 0 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); aspect-ratio: 3 / 2; }
.timeline__photo img { width: 100%; height: 100%; object-fit: cover; }
.timeline__photo--vintage img { filter: sepia(.35) saturate(.85); }
.timeline__photo figcaption { font: italic 300 .95rem/1.5 var(--font-serif); color: var(--muted); padding: .6rem .2rem 0; background: var(--bg); }
@media (min-width: 900px) {
  .timeline::before { left: 50%; transform: translateX(-1px); }
  .timeline__item { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; padding-left: 0; align-items: center; }
  .timeline__item::before { left: 50%; transform: translateX(-50%); top: 50%; }
  .timeline__item:nth-child(even) .timeline__text { order: 2; }
  .timeline__photo { margin: 0; }
}

.team { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.team__member { padding: 1.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.team__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); margin-bottom: 1rem; }
.team__avatar svg { width: 28px; height: 28px; }
.team__member strong { display: block; font: 400 1.15rem/1.3 var(--font-serif); color: var(--heading); }

/* --- Servizi ------------------------------------------------------------- */

.cat-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.cat-nav a { padding: .6rem 1.1rem; border-radius: 999px; border: 1px solid var(--brown-line); color: var(--brown); text-decoration: none; font: 500 .72rem/1.2 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; }
.cat-nav a:hover { border-color: var(--accent); color: var(--accent); }
.category { padding-block: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.category:first-of-type { border-top: 0; }
.category__head { display: flex; gap: 1.25rem; align-items: center; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.category__head h2 { margin: 0; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.category__head p { margin: .2rem 0 0; color: var(--muted); }

.brands { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); margin-top: 1.5rem; }
@media (min-width: 640px) { .brands { grid-template-columns: repeat(4, 1fr); } }
.brand-tile {
  aspect-ratio: 3 / 2; display: grid; place-items: center; text-align: center; padding: 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.brand-tile strong { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.15rem; line-height: 1.25; color: var(--heading); }
.brand-tile span { font: 400 .62rem/1.4 var(--font-label); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

/* --- Prenota ------------------------------------------------------------- */

.booking-layout { display: grid; gap: 2rem; align-items: start; }
@media (max-width: 999px) { .booking-layout.is-confirmed .booking-aside { display: none; } }
@media (min-width: 1000px) { .booking-layout { grid-template-columns: 1fr 340px; gap: 3rem; } .booking-aside { position: sticky; top: calc(var(--header-h) + 24px); } }

.demo-badge {
  display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: 999px;
  background: var(--warn-bg); color: #6b5300; border: 1px solid #ecd67f; font: 500 .68rem/1.3 var(--font-label); letter-spacing: .14em; text-transform: uppercase;
}
.demo-badge[hidden] { display: none; }
.demo-badge svg { width: 16px; height: 16px; }

.form-step { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.5rem; margin: 0 0 1rem; background: #fff; min-width: 0; }
@media (min-width: 640px) { .form-step { padding: 2rem; } }
.form-step legend { float: left; width: 100%; padding: 0; margin-bottom: 1.25rem; display: flex; align-items: center; gap: .85rem; font-family: var(--font-serif); font-weight: 300; font-size: 1.4rem; line-height: 1.25; color: var(--heading); }
.form-step legend + * { clear: both; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 500 .78rem var(--font-label); flex: none; }
.form-step.is-disabled { opacity: .55; }

.field { display: grid; gap: .35rem; margin-bottom: 1.1rem; align-content: start; }
.field label, .field .label { font-weight: 500; font-size: .95rem; }
.field .opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: .75rem .95rem; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--brown-line); border-radius: 12px; transition: border-color .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23645d55' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.75rem; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #b4aca1; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: 3px solid rgba(52, 128, 42, .2); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .92rem; font-weight: 500; }
.field-error:empty { display: none; }
.field-hint { color: var(--muted); font-size: .9rem; }
.row-2 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.check { display: grid; grid-template-columns: 24px 1fr; gap: .75rem; align-items: start; font-size: .98rem; }
.check input { width: 22px; height: 22px; margin: .15rem 0 0; accent-color: var(--accent); }

/* Honeypot anti-spam: invisibile alle persone, non ai bot */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.service-info { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .9rem 1rem; border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); font-size: .95rem; margin-top: -.25rem; }
.service-info[hidden] { display: none; }

/* Calendario */
.cal { max-width: 420px; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.cal__title { display: inline-block; font: 400 1.2rem/1.2 var(--font-serif); color: var(--heading); }
.cal__nav { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--brown-line); background: #fff; color: var(--text); cursor: pointer; }
.cal__nav:disabled { opacity: .35; cursor: default; }
.cal__nav svg { width: 18px; height: 18px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal__dow { text-align: center; font: 500 .64rem/1.4 var(--font-label); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: .35rem; }
.cal__day {
  aspect-ratio: 1; min-height: 40px; display: grid; place-items: center; border-radius: 50%; border: 1px solid transparent;
  background: var(--accent-soft); color: var(--accent-strong); font: 600 .95rem var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer;
}
.cal__day:hover:not(:disabled) { border-color: var(--accent); }
.cal__day:disabled { background: transparent; color: #b9b2a8; font-weight: 400; cursor: default; }
.cal__day[aria-pressed="true"] { background: var(--accent); color: #fff; }
.cal__day.is-today:not([aria-pressed="true"]) { box-shadow: inset 0 0 0 1.5px var(--muted); }
.cal__legend { font-size: .85rem; color: var(--muted); margin-top: .75rem; }

.slots { margin-top: 1.5rem; }
.slots__title { font: 500 .68rem/1.4 var(--font-label); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: .9rem; }
.slots__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slot span {
  display: grid; place-items: center; min-height: 46px; border-radius: 999px;
  border: 1px solid var(--brown-line); background: #fff; font-weight: 600; font-variant-numeric: tabular-nums;
}
.slot input:hover + span { border-color: var(--accent); }
.slot input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.slots__empty { padding: 1rem; border-radius: var(--radius-sm); background: var(--surface); color: var(--muted); }
.loading { display: inline-flex; align-items: center; gap: .6rem; color: var(--muted); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-alert { padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: #fbeceb; color: #7d231d; border: 1px solid #f0c9c5; margin-bottom: 1rem; }
.form-alert[hidden] { display: none; }
.submit-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: .5rem; }

.aside-card { padding: 1.6rem; border-radius: var(--radius-sm); background: var(--surface); }
.aside-card + .aside-card { margin-top: 1rem; }
.aside-card h2 { font-size: 1.35rem; font-weight: 300; }
.summary { margin: 0; display: grid; gap: .75rem; }
.summary div { display: grid; gap: .1rem; }
.summary dt { font: 500 .64rem/1.4 var(--font-label); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; }
.phone-cta { font-size: 1.05rem; }
.phone-cta a { font-weight: 600; white-space: nowrap; }

.confirm { text-align: left; padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius-sm); border: 1px solid #d3e2d8; background: var(--accent-soft); }
.confirm[hidden] { display: none; }
.confirm__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; margin-bottom: 1.25rem; }
.confirm__icon svg { width: 28px; height: 28px; }
.confirm .summary { background: #fff; padding: 1.25rem; border-radius: var(--radius-sm); margin: 1.5rem 0; }
.confirm__demo { font-size: .95rem; color: var(--muted); }

/* --- Testo semplice (privacy) ------------------------------------------- */

.prose { max-width: 44rem; }

/* --- Footer -------------------------------------------------------------- */

.site-footer { position: relative; overflow: hidden; background: #46331f; color: #f6efe3; padding-block: clamp(64px, 9vw, 120px) 36px; font-size: .95rem; }
.site-footer > .container { position: relative; z-index: 1; }
.site-footer::before { content: ""; position: absolute; right: -60px; bottom: -40px; width: clamp(200px, 28vw, 380px); aspect-ratio: 1; background: url("/assets/img/deco/foglie.svg") center / contain no-repeat; opacity: .22; }
.site-footer .muted, .footer-hours dt { color: #dccdb7; }
.site-footer :focus-visible { outline-color: #8ab4ff; }
.footer-mark { margin: 0 0 clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(1.5rem, 3vw, 2.5rem); border-bottom: 1px solid rgba(230, 200, 121, .3);
  font: 300 clamp(2.6rem, 8.5vw, 6.6rem)/1.05 var(--font-serif); letter-spacing: -.015em; color: #f6f3e8; }
.footer-mark .script { color: var(--gold-light); font-size: 1.12em; }
.footer-mark { display: flex; flex-wrap: wrap; align-items: center; gap: .3em .35em; }
.footer-mark img { height: 1.05em; width: auto; flex: none; margin-right: .1em; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.site-footer h2 { font: 600 .68rem/1.4 var(--font-label); letter-spacing: .22em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: #f6f3e8; text-decoration-color: rgba(246, 243, 232, .35); }
.site-footer a:hover { color: #fff; text-decoration-color: currentColor; }
.site-footer address { font-style: normal; }
.footer-hours { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.footer-hours dt { color: #dccdb7; }
.footer-hours dd { margin: 0; }
.footer-turno { padding: 0 0 0 1rem; border-left: 2px solid var(--gold); }
.footer-turno strong { display: block; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: clamp(3rem, 6vw, 5rem); padding-top: 1.5rem; border-top: 1px solid rgba(230, 200, 121, .3); font: 400 .66rem/1.6 var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: #dccdb7; }
.footer-bottom a { color: #dccdb7; }
.site-footer .show-ph .ph, .show-ph .site-footer .ph { background: rgba(201, 162, 39, .18); border-bottom-color: #d9b64a; }

/* --- Pianta 3D ------------------------------------------------------------ */

.plan3d__note { font-size: .9rem; color: var(--muted); margin: 0; }
.plan3d__layout { display: grid; gap: 1.5rem; }
@media (min-width: 1000px) { .plan3d__layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

.plan3d__viewer { position: relative; }
.plan3d__stage {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  height: clamp(380px, 40vw, 520px);
  background: radial-gradient(120% 90% at 50% 15%, #ffffff 0%, var(--bg) 55%, var(--surface-2) 100%);
  border: 1px solid var(--line);
  touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (max-width: 599px) {
  .plan3d__viewer { margin-inline: calc(var(--gutter) * -1); }
  .plan3d__stage { height: min(100vw, 440px); border-radius: 0; border-inline: 0; }
}
.plan3d__stage.is-dragging { cursor: grabbing; }
.plan3d__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plan3d__loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: .95rem; }
.plan3d__stage.is-ready .plan3d__loading { display: none; }
.plan3d__stage--fallback { display: grid; place-items: center; padding: 2rem; text-align: center; color: var(--muted); cursor: auto; }
.plan3d__stage--fallback svg { width: 20px; height: 20px; display: inline; vertical-align: -4px; }

.plan3d__pins { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.plan3d__pin {
  position: absolute; left: 0; top: 0; pointer-events: auto;
  display: inline-flex; align-items: center; gap: .4rem; padding: 3px; padding-right: 3px;
  margin: 0; border: 0; border-radius: 999px; background: #fff; color: var(--text);
  font: 600 .78rem/1 var(--font-sans); letter-spacing: .02em; white-space: nowrap; cursor: pointer;
  box-shadow: 0 1px 2px rgba(43, 40, 37, .12), 0 4px 14px rgba(43, 40, 37, .14);
  translate: -50% -100%; will-change: transform;
  transition: background-color .2s, color .2s, scale .2s;
}
.plan3d__pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; background: inherit; translate: -50% 0; rotate: 45deg; border-radius: 2px; z-index: -1; }
.plan3d__pin-name { display: none; padding-right: .55rem; }
.plan3d__pin.is-active { background: var(--accent); color: #fff; scale: 1.08; z-index: 2; }
.plan3d__pin.is-active .plan3d__pin-name { display: inline; }
@media (hover: hover) { .plan3d__pin:hover { z-index: 3; } .plan3d__pin:hover .plan3d__pin-name { display: inline; } }
.plan3d__pin.is-active .plan3d__num { background: #fff; color: var(--accent); }
.plan3d__pin:hover:not(.is-active) { background: var(--accent-soft); }

.plan3d__num {
  display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--accent); color: #fff; font: 500 .72rem/1 var(--font-label);
}

.plan3d__controls {
  position: absolute; z-index: 2; left: 50%; bottom: 12px; translate: -50% 0;
  display: flex; gap: 2px; padding: 4px; max-width: calc(100% - 16px);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 4px 16px rgba(46, 51, 37, .08);
}
.plan3d__ctl {
  display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .3rem;
  border: 0; border-radius: 999px; background: transparent; color: var(--heading); cursor: pointer;
  font: 600 .68rem var(--font-sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.plan3d__ctl--text { padding: 0 .8rem; }
.plan3d__ctl:hover { background: var(--accent-soft); }
.plan3d__ctl svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.plan3d__aside-title { font: 500 .66rem/1.4 var(--font-label); letter-spacing: .24em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.plan3d__list { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; border-top: 1px solid var(--brown-line); }
@media (min-width: 600px) and (max-width: 999px) { .plan3d__list { grid-template-columns: 1fr 1fr; column-gap: 2rem; } }
.plan3d__chip {
  display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 48px; padding: .55rem 0;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); text-align: left;
  font: 300 1.05rem/1.3 var(--font-serif); cursor: pointer; transition: color .3s var(--ease), padding .4s var(--ease);
}
.plan3d__chip .plan3d__num { background: transparent; border: 1px solid var(--brown-line); color: var(--brown); }
.plan3d__chip:hover { color: var(--accent); padding-left: .35rem; }
.plan3d__chip[aria-pressed="true"] { color: var(--accent); font-style: italic; }
.plan3d__chip[aria-pressed="true"] .plan3d__num { background: var(--accent); border-color: var(--accent); color: #fff; }

.plan3d__info { padding: 1.4rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); }
.plan3d__info:empty { display: none; }
.plan3d__info h3 { display: flex; align-items: center; gap: .7rem; font-size: 1.3rem; font-weight: 400; }
.plan3d__info p { color: var(--muted); }
.plan3d__hint { display: flex; gap: .5rem; align-items: flex-start; margin: 0; font-size: .95rem; }
.plan3d__hint svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent); }
.plan3d__svc { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.plan3d__svc li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .5rem .5rem .75rem; background: #fff; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.plan3d__svc span { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.plan3d__svc span svg { width: 20px; height: 20px; color: var(--accent); flex: none; }

/* --- Comparsa allo scroll (attivata da main.js solo se il movimento è consentito) --- */

.reveal-on .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.reveal-on .reveal.is-in { opacity: 1; transform: none; }

/* --- Movimento ridotto --------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .reveal-on .reveal { opacity: 1 !important; transform: none !important; }
  .site-header, .site-footer, .plan3d, .visit__map { display: none; }
}
