/* ============================================================
   WebCreator — DESIGN v2 (ui-ux-pro-max) — premium override layer.
   Loaded AFTER base.css + the per-category variant, so it only refines:
   spacing, elevation, type rhythm and component polish. It reuses the same
   class contract and the per-site accent (var(--accent), auto-extracted from
   the hero photo), so every one of the 18 categories gets the upgrade with
   zero structural/template change. Goal: calmer, more editorial, more
   professional — the look that converts.
   ============================================================ */
:root {
  /* PALETTE (ui-ux-pro-max "sage neutral + calm teal"): clean slate neutrals +
     a fresh teal accent — replaces the earthy black/brown that read poorly. The
     accent is forced (!important) over the per-photo extracted colour, which was
     often brown/dark for B&B photos. */
  --ink: #0F172A;            /* slate-900 text/headings (not brown) */
  --bg: #F8FAFC;             /* clean off-white (not cream) */
  --surface: #FFFFFF;
  --muted: #64748B;          /* slate */
  --border: #E2E8F0;         /* slate-200 */
  --dark-panel: #0F172A;     /* topbar/footer: clean slate, not brown-black */
  /* accent comes per-CATEGORY from the builder (_V2_PALETTE) — a curated fresh
     colour per activity type (teal for B&B, rose for beauty, …), injected after
     this file, replacing the earthy per-photo accent. */
  /* refined geometry — a touch less round reads more grown-up/editorial */
  --radius: 18px; --radius-sm: 12px; --radius-md: 16px; --radius-lg: 24px;
  /* softer, layered elevation (premium depth, not heavy drop-shadows) */
  --shadow-xs: 0 1px 2px rgba(20,12,6,.05), 0 1px 3px rgba(20,12,6,.05);
  --shadow-sm: 0 2px 6px -2px rgba(20,12,6,.10), 0 6px 18px -8px rgba(20,12,6,.12);
  --shadow:    0 8px 24px -10px rgba(20,12,6,.18), 0 24px 60px -30px rgba(20,12,6,.30);
  --shadow-lg: 0 30px 80px -32px rgba(20,12,6,.42);
  --maxw: 1200px;
  /* Even lighter, airier hero scrim — photo stays bright, headline still legible. */
  --hero-overlay:
    linear-gradient(100deg, rgba(20,14,9,.46) 0%, rgba(20,14,9,.12) 44%, transparent 72%),
    linear-gradient(0deg, rgba(20,14,9,.34) 0%, transparent 42%);
}

/* calmer body rhythm + crisper rendering */
body { line-height: 1.7; }
h1, h2, h3 { letter-spacing: -.025em; }

/* ---------- header: REAL liquid glass FLOATING OVER THE HERO ----------
   The glass effect is only visible when there's a photo behind it. So the hero
   pulls UP behind the sticky header (negative margin). Only `.hero` pages get
   this — legal/accessibility have no `.hero`, so their header sits normally and
   nothing breaks. The frosted bar stays light enough for dark nav text to read
   over both the hero photo and (when scrolled) light content. */
.site-header {
  padding-block: 1rem;
  background: color-mix(in srgb, var(--surface) 68%, transparent);
  backdrop-filter: saturate(150%) blur(20px); -webkit-backdrop-filter: saturate(150%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, #fff 40%, transparent);
  box-shadow: 0 8px 28px -22px rgba(20,12,6,.4);
}
.brand { font-size: 1.25rem; }
.main-nav a { font-weight: 600; }
.hero { margin-top: -68px; }
.hero--small { margin-top: -64px; }
@media (max-width: 760px) { .hero { margin-top: -58px; } .hero--small { margin-top: -56px; } }

/* ---------- hero: more editorial, restrained motion ---------- */
.hero { min-height: 100svh; }
.hero::after { opacity: .42; }                 /* tone down the decorative glow */
.hero-inner { max-width: 1040px; padding: clamp(2rem, 6vw, 8rem); }
.hero h1 { font-size: clamp(3rem, 8.5vw, 6rem); line-height: 1.02; letter-spacing: -.035em; }
.hero .subtitle { font-size: clamp(1.15rem, 2.4vw, 1.55rem); max-width: 46ch; opacity: .95; line-height: 1.55; }
.hero .eyebrow {
  letter-spacing: .24em; font-size: .76rem; padding: .5rem 1.05rem;
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.34);
}
.hero-cta { gap: .9rem; margin-top: 1.6rem; }

/* ---------- generous, editorial section rhythm ---------- */
.section { max-width: 1200px; padding: clamp(4.5rem, 9vw, 8.5rem) clamp(1.2rem, 4vw, 2rem); }
/* Gallery and FAQ share the page background, so their two stacked section
   paddings read as one oversized empty band. Tighten just that seam. */
#gallery:has(+ #faq) { padding-bottom: clamp(2rem, 4.5vw, 3.5rem); }
#gallery + #faq { padding-top: clamp(2rem, 4.5vw, 3.5rem); }
.section--alt > .section-inner { max-width: 1200px; padding-inline: clamp(1.3rem, 5vw, 2.5rem); }
.section--alt::before { opacity: .55; }
.section-title { font-size: clamp(2.1rem, 4.6vw, 3.1rem); letter-spacing: -.03em; }
.section-title::after { width: 52px; height: 3px; margin-top: .85rem; }
.lead { font-size: 1.12rem; line-height: 1.7; max-width: 66ch; }

/* ---------- cards: clean, elevated, tactile ---------- */
.grid { gap: 1.8rem; margin-top: 2.8rem; }
.card { padding: 2rem; border-radius: var(--radius-lg); border-color: color-mix(in srgb, var(--ink) 8%, transparent); box-shadow: var(--shadow-sm); }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.3rem; letter-spacing: -.02em; }

/* ---------- gallery: tighter, softer ---------- */
.gallery { gap: 1.1rem; margin-top: 2.8rem; }
.gallery .media { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.gallery .media:hover { box-shadow: var(--shadow); }

/* ---------- buttons: refined proportions (contrast handled by base) ---------- */
.btn { padding: 1rem 2.1rem; letter-spacing: -.01em; border-radius: var(--radius-pill); }

/* ---------- map / forms / footer polish ---------- */
.map-wrap { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.form-card { border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.8rem, 4vw, 3rem); }
/* Evita che i campi sfondino il riquadro su mobile: gli item della griglia
   devono poter restringersi (min-width:0) e gli input riempire la larghezza. */
.form-grid { max-width: 100%; }
.field { min-width: 0; }
.field input, .field textarea, .field select {
  border-radius: 12px; padding: .95rem 1.05rem;
  width: 100%; min-width: 0; max-width: 100%;
}
.social-links a { box-shadow: var(--shadow-xs); }

/* ---------- subtle, professional motion ---------- */
.card, .btn, .gallery .media, .social-links a { transition: transform .24s cubic-bezier(.2,.7,.2,1), box-shadow .24s ease, border-color .24s ease, background .2s ease; }

/* ---------- staggered card cascade (ui-ux-pro-max stagger-sequence) ----------
   When a section reveals, its cards/grid items fade up one after another instead
   of all at once. Progressive: only with JS (html.js) so no-JS keeps them visible;
   disabled under reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal .grid > *, html.js .reveal.in .grid > * { will-change: transform; }
  html.js .reveal.in .grid > * { animation: v2rise .6s cubic-bezier(.2,.7,.2,1) both; }
  html.js .reveal .grid > :nth-child(2) { animation-delay: .07s; }
  html.js .reveal .grid > :nth-child(3) { animation-delay: .14s; }
  html.js .reveal .grid > :nth-child(4) { animation-delay: .21s; }
  html.js .reveal .grid > :nth-child(5) { animation-delay: .28s; }
  html.js .reveal .grid > :nth-child(n+6) { animation-delay: .35s; }
}
@keyframes v2rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Mobile: drop the header blur so the fixed slide-in drawer resolves against the
   viewport (a backdrop-filter ancestor would trap it into a broken half panel). */
@media (max-width: 760px) {
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; }
}

/* Floating contact buttons (WhatsApp + call) — bottom-right, all pages.
   a11y toggle lives bottom-left, so no collision. Below the nav drawer
   (z-index 60) so an open mobile menu covers them. */
.contact-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 59;
  display: flex; flex-direction: column; gap: 12px;
}
.contact-fab .cfab {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}
.contact-fab .cfab svg { width: 30px; height: 30px; }
.contact-fab .cfab-wa { background: #25d366; }
.contact-fab .cfab-call { background: var(--accent); }
.contact-fab .cfab:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.3); }
.contact-fab .cfab:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
/* On the home page the "Prenota" pill also floats bottom-right — lift it above the FABs. */
.float-cta { bottom: 148px; }
@media (max-width: 760px) {
  .contact-fab { right: 14px; bottom: 14px; }
  .contact-fab .cfab { width: 52px; height: 52px; }
  .float-cta { bottom: 134px; }
}
@media print { .contact-fab { display: none !important; } }

/* Honeypot anti-spam: campo fuori schermo. I bot lo compilano, gli utenti no. */
.hp-field { position: absolute !important; left: -9999px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Immagine hero servita in AVIF -> WebP -> JPEG (il browser sceglie il formato
   più leggero che supporta). Il preload punta all'AVIF per l'LCP. */
.hero-media {
  background-image: url('images/hero.jpg');
  background-image: -webkit-image-set(url('images/hero.avif') type('image/avif'), url('images/hero.webp') type('image/webp'), url('images/hero.jpg') type('image/jpeg'));
  background-image: image-set(url('images/hero.avif') type('image/avif'), url('images/hero.webp') type('image/webp'), url('images/hero.jpg') type('image/jpeg'));
}

/* Cookie banner ancorato in BASSO: così non copre header/hamburger in alto.
   Mentre è visibile, i pulsanti flottanti si nascondono per non sovrapporsi. */
.cookie-banner {
  top: auto; bottom: 0;
  border-top: 1px solid var(--border); border-bottom: 0;
  box-shadow: 0 -8px 26px rgba(0,0,0,.20);
}
body:has(#wc-cookie:not([hidden])) .contact-fab,
body:has(#wc-cookie:not([hidden])) .float-cta { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .contact-fab .cfab { transition: none; }
  .contact-fab .cfab:hover { transform: none; }
}
