/* ===========================================================
   B&B Il Frattiero — www.ilfrattiero.it
   Redesign 2026 — warm cream / terracotta / olive
   Pure static (no build step). Fonts self-hosted (GDPR/CSP-safe).
   =========================================================== */

/* ---------- Self-hosted fonts (latin, variable) ---------- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/playfair-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url(/assets/fonts/geist-latin.woff2) format('woff2');
}

/* ---------- Design tokens ---------- */
:root {
  --background: oklch(0.97 0.012 85);
  --foreground: oklch(0.26 0.018 60);
  --card: oklch(0.985 0.008 85);
  --card-foreground: oklch(0.26 0.018 60);
  --primary: oklch(0.55 0.13 45);          /* terracotta */
  --primary-foreground: oklch(0.98 0.01 85);
  --secondary: oklch(0.92 0.025 80);        /* warm sand */
  --secondary-foreground: oklch(0.34 0.04 55);
  --muted: oklch(0.93 0.018 82);
  --muted-foreground: oklch(0.5 0.03 60);
  --accent: oklch(0.62 0.07 130);           /* olive/sage */
  --accent-foreground: oklch(0.98 0.01 85);
  /* Darker variants for small text on light backgrounds (WCAG AA) */
  --primary-ink: oklch(0.47 0.14 45);
  --accent-ink: oklch(0.47 0.10 130);
  --border: oklch(0.88 0.02 78);
  --input: oklch(0.88 0.02 78);
  --ring: oklch(0.55 0.13 45);

  /* Theme-fixed tokens (decoupled from bg/fg so they survive the dark flip) */
  --overlay: oklch(0.26 0.018 60);      /* dark scrim over hero/header images — dark in both themes */
  --on-overlay: oklch(0.98 0.01 85);    /* text/elements that sit on the scrim — light in both themes */
  --footer-bg: var(--foreground);       /* footer & lang-banner stay a dark bar in both themes */
  --footer-fg: var(--background);

  /* sRGB-resolved derived colours — replace the CSS colour-mixing function, which Safari supports
     only from 16.2 (all iOS 15.x and 16.0-16.1 would otherwise drop these declarations).
     These are theme-dependent, so they're re-defined in the dark block below. The theme-fixed
     translucent colours (over --overlay / --on-overlay / footer) are inlined as rgb() at point of use. */
  --header-bg: rgb(249 246 236 / 0.949);   /* was: --background 95% */
  --nav-fg: rgb(42 34 27 / 0.8);           /* was: --foreground 80% */
  --hover-bg: rgb(237 227 209 / 0.502);    /* was: --secondary 50% */
  --accent-soft: rgb(121 141 101 / 0.149); /* was: --accent 15% */
  --ring-focus: rgb(176 86 40 / 0.302);    /* was: --ring 30% */
  --soft-bg: rgb(244 238 226);             /* was: --secondary 40% + --background */
  --disc-hover-bg: rgb(251 248 241);       /* was: --card 60% + --background */

  --radius: 0.5rem;
  --radius-pill: 999px;            /* fully rounded pills / circular icon buttons */

  /* Elevation — shared card shadows (one-off shadows stay inline at point of use) */
  --shadow-sm: 0 1px 2px oklch(0.26 0.018 60 / 0.06);
  --shadow-md: 0 10px 30px oklch(0.26 0.018 60 / 0.13);

  /* Motion — duration+easing pairs reused across components */
  --transition-fast: .15s ease;
  --transition-base: .2s ease;
  --transition-slow: .3s ease;

  /* Z-index layer model (low → high). Local component stacking (hero/control
     contexts at z 2 and 10) is intentionally not tokenised — it's self-contained. */
  --z-dropdown: 30;                /* mobile menu, back-to-top */
  --z-sticky: 40;                  /* sticky site header */
  --z-floating: 50;                /* language-suggestion banner */
  --z-modal: 60;                   /* lightbox overlay */
  --z-skip-link: 100;              /* skip-to-content, must top everything */

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;

  --wrap: 80rem;
}

/* ---------- Dark theme ----------
   Auto for dark-OS visitors; the :not([data-theme="light"]) guard lets a
   dark-OS visitor opt back to light (the toggle sets data-theme="light",
   which falls through to the base :root tokens above). Light-OS visitors
   never match this query, so they always get light and never see the toggle.
   Theme-fixed tokens (--overlay/--on-overlay/--footer-*) are intentionally
   NOT overridden — scrims, footers and over-photo controls stay constant. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --background: oklch(0.20 0.012 70);
    --foreground: oklch(0.92 0.012 85);
    --card: oklch(0.245 0.014 70);
    --card-foreground: oklch(0.92 0.012 85);
    --primary: oklch(0.55 0.13 45);          /* terracotta — same L as light so white-on-primary (topbar/buttons) stays ≥4.5 */
    --primary-foreground: oklch(0.98 0.01 85);
    --secondary: oklch(0.30 0.022 72);        /* warm sand, dark */
    --secondary-foreground: oklch(0.90 0.02 80);
    --muted: oklch(0.27 0.016 72);
    --muted-foreground: oklch(0.72 0.022 78);
    --accent: oklch(0.64 0.08 130);           /* sage */
    --accent-foreground: oklch(0.16 0.012 70);
    /* Lighter variants — on dark bg, colored small text must be light, not darkened */
    --primary-ink: oklch(0.76 0.12 45);
    --accent-ink: oklch(0.78 0.08 130);
    --border: oklch(0.34 0.015 72);
    --input: oklch(0.34 0.015 72);
    --ring: oklch(0.62 0.13 45);
    --footer-bg: oklch(0.15 0.012 70);        /* anchors the page bottom, darker than bg */
    --footer-fg: oklch(0.92 0.012 85);
    /* dark-theme sRGB equivalents of the derived colours defined in :root */
    --header-bg: rgb(26 21 16 / 0.949);
    --nav-fg: rgb(232 227 220 / 0.8);
    --hover-bg: rgb(54 44 34 / 0.502);
    --accent-soft: rgb(121 148 101 / 0.149);
    --ring-focus: rgb(195 106 63 / 0.302);
    --soft-bg: rgb(36 30 23);
    --disc-hover-bg: rgb(32 27 22);
  }
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute must win over display rules (e.g. .form-grid, .theme-toggle). */
[hidden] { display: none !important; }
* { border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--foreground);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.wrap-5 { max-width: 64rem; }
.wrap-3 { max-width: 48rem; }
@media (min-width: 768px) { .wrap { padding: 0 2rem; } }

.section { padding: 5rem 0; }
@media (min-width: 768px) { .section { padding: 7rem 0; } }
.section-sm { padding: 5rem 0; }
@media (min-width: 768px) { .section-sm { padding: 6rem 0; } }

.bg-soft { background: var(--soft-bg); }
.bg-card { background: var(--card); }
.bg-dark { background: var(--footer-bg); color: var(--footer-fg); }

.eyebrow {
  font-size: 0.8125rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--primary-ink); margin: 0;
}
.bg-dark .eyebrow { color: rgb(248 245 237 / 0.6); }
.lead { color: var(--muted-foreground); line-height: 1.7; }
/* Muted lead text on dark bands — sRGB at point of use (the CSS colour-mixing
   function is unsupported on iOS < 16.2; mirrors the footer convention above). */
.bg-dark .lead { color: rgb(249 246 236 / 0.8); }
.text-pretty { text-wrap: pretty; }
/* Inline accent link (terracotta, underlined) used in prose on light backgrounds. */
.link-accent { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.h2 { font-size: 1.875rem; }
@media (min-width: 768px) { .h2 { font-size: 2.25rem; } }
.section-head { max-width: 42rem; }
.section-head h2 { margin-top: 0.75rem; }
.section-head .lead { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  border-radius: var(--radius-pill); padding: 0.85rem 1.75rem;
  font-size: 0.875rem; font-weight: 500; border: 0;
  background: var(--primary); color: var(--primary-foreground);
  transition: opacity var(--transition-fast), transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}
.btn:hover { opacity: 0.9; }
.btn svg { width: 1rem; height: 1rem; }
.btn-light { background: var(--on-overlay); color: var(--overlay); }
.btn-outline-light {
  background: rgb(255 245 245 / 0.102);
  color: var(--on-overlay);
  border: 1px solid rgb(250 248 240 / 0.4);
  backdrop-filter: blur(4px);
}
.btn-outline-light:hover { background: rgb(250 250 240 / 0.2); opacity: 1; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; font-weight: 500; color: var(--primary-ink);
  transition: opacity var(--transition-fast);
}
.link-arrow:hover { opacity: 0.8; }
.link-arrow svg { width: 1rem; height: 1rem; transition: transform var(--transition-base); }
.link-arrow:hover svg { transform: translateX(3px); }

/* Offset in-page anchor jumps (#scrivici, #noi, skip-link…) so the target clears the
   sticky header instead of landing hidden beneath it. Header ≈ 4.75rem mobile / ≈ 6rem desktop. */
html { scroll-padding-top: 5.5rem; }
@media (min-width: 768px) { html { scroll-padding-top: 7.5rem; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar { display: none; background: var(--primary); color: var(--primary-foreground); }
@media (min-width: 768px) { .topbar { display: block; } }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 0.4rem; padding-bottom: 0.4rem; font-size: 0.75rem; letter-spacing: 0.02em; }
.topbar a { font-weight: 500; }
.topbar a:hover { text-decoration: underline; text-underline-offset: 2px; }
.topbar .topbar-right { display: flex; align-items: center; gap: 1rem; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.brand { display: flex; flex-direction: column; line-height: 1; min-width: 0; flex: 0 1 auto; }
.brand .brand-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) { .brand .brand-name { font-size: 1.5rem; } }
.brand .brand-sub { display: none; font-size: 0.75rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted-foreground); margin-top: 0.15rem; }
@media (min-width: 768px) { .brand .brand-sub { display: block; } }

.nav-desktop { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .nav-desktop { display: flex; } }
.nav-desktop a { font-size: 0.875rem; letter-spacing: 0.02em; color: var(--nav-fg); transition: color var(--transition-fast); }
.nav-desktop a:hover { color: var(--primary); }
.nav-desktop a.active { color: var(--primary-ink); }

.header-actions { display: flex; align-items: center; gap: 0.25rem; flex: none; }
@media (min-width: 640px) { .header-actions { gap: 0.75rem; } }
.btn-prenota { display: none; }
@media (min-width: 640px) { .btn-prenota { display: inline-flex; padding: 0.65rem 1.25rem; } }
/* Direct call / WhatsApp icons — shown on mobile where the topbar + Prenota pill are hidden */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-pill); color: var(--foreground); transition: color var(--transition-fast), background var(--transition-fast); }
.icon-btn:hover { color: var(--primary); background: var(--hover-bg); }
.icon-btn svg { width: 1.35rem; height: 1.35rem; }
@media (min-width: 768px) { .icon-btn { display: none; } }

/* Theme toggle — shown by JS only for dark-OS visitors (ships [hidden]). */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: var(--radius-pill); background: none; color: var(--foreground); cursor: pointer; transition: color var(--transition-fast), background var(--transition-fast); }
.theme-toggle:hover { color: var(--primary); background: var(--hover-bg); }
.theme-toggle svg { width: 1.35rem; height: 1.35rem; }
.theme-toggle[hidden] { display: none; }
/* Sun shown in dark theme (click → light); moon shown in light. */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline-flex; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: inline-flex; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
/* Language switcher (IT | EN) — always visible, desktop and mobile */
.lang-switch { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.04em; }
.lang-switch a { padding: 0.35rem 0.3rem; color: var(--muted-foreground); transition: color var(--transition-fast); }
.lang-switch a:hover { color: var(--primary); }
.lang-switch a[aria-current="true"] { color: var(--foreground); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--primary); }
.lang-switch .sep { color: var(--border); user-select: none; }

.menu-toggle { display: inline-flex; background: none; border: 0; color: var(--foreground); padding: 0.25rem; }
@media (min-width: 1024px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 1.5rem; height: 1.5rem; }

/* Mobile menu overlay */
/* Menu fills the screen behind the still-visible sticky header (z-index 40) */
.mobile-menu { position: fixed; inset: 0; z-index: var(--z-dropdown); display: none; flex-direction: column; background: var(--background); padding-top: 4.75rem; }
.mobile-menu.open { display: flex; }
.mobile-menu-top { display: none; }
.mobile-menu nav { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2rem; }
.mobile-menu nav a { font-family: var(--font-serif); font-size: 1.875rem; color: var(--foreground); transition: color var(--transition-fast); }
.mobile-menu nav a:hover { color: var(--primary); }
.mobile-menu nav a.btn { color: var(--primary-foreground); }
.mobile-menu .menu-foot { border-top: 1px solid var(--border); padding: 1.25rem; text-align: center; font-size: 0.875rem; color: var(--muted-foreground); }
.mobile-menu .menu-foot a { font-weight: 500; color: var(--foreground); }
.mobile-menu .menu-lang { padding: 0 1.25rem 1.25rem; text-align: center; font-size: 0.9375rem; color: var(--muted-foreground); }
.mobile-menu .menu-lang a { font-weight: 500; color: var(--foreground); }
.mobile-menu .menu-lang a[aria-current="true"] { color: var(--primary-ink); font-weight: 600; }
.mobile-menu .menu-note { margin-top: -1.25rem; font-size: 0.875rem; color: var(--muted-foreground); text-align: center; }

/* <picture> wraps the styled <img> only to offer AVIF/WebP/JPEG <source>s; it must be
   layout-transparent so the image is positioned/sized exactly as a direct child would be. */
picture { display: contents; }

/* ---------- Hero (home) ---------- */
.hero { position: relative; display: flex; align-items: center; overflow: hidden; min-height: 88vh; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(43 33 27 / 0.6), rgb(43 34 26 / 0.349), rgb(43 34 27 / 0.702)); }
.hero-content { position: relative; z-index: 2; color: var(--on-overlay); }
.hero-content .eyebrow { color: rgb(251 248 241 / 0.8); }
.hero h1 { font-size: 3rem; font-weight: 600; line-height: 1.05; margin-top: 0; max-width: 18ch; color: var(--on-overlay); }
@media (min-width: 768px) { .hero h1 { font-size: 4.5rem; } }
.hero-tagline { display: block; margin-top: 1rem; font-family: var(--font-sans); font-size: 1.125rem; font-weight: 500; letter-spacing: 0.02em; color: rgb(251 248 241 / 0.851); }
@media (min-width: 768px) { .hero-tagline { font-size: 1.5rem; } }
.hero-sub { margin-top: 1.25rem; max-width: 34rem; font-size: 1.125rem; color: rgb(251 248 241 / 0.902); text-wrap: pretty; }
@media (min-width: 768px) { .hero-sub { font-size: 1.25rem; } }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-note { margin-top: 1rem; font-size: 0.9375rem; color: rgb(251 248 241 / 0.851); }

/* ---------- Page header (inner pages) ---------- */
.page-header { position: relative; display: flex; align-items: flex-end; overflow: hidden; min-height: 42vh; }
@media (min-width: 768px) { .page-header { min-height: 52vh; } }
.page-header img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-header-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgb(42 34 27 / 0.8), rgb(43 33 26 / 0.302), rgb(39 29 29 / 0.102)); }
.page-header .wrap { position: relative; z-index: 2; padding-bottom: 2.5rem; }
@media (min-width: 768px) { .page-header .wrap { padding-bottom: 3.5rem; } }
.page-header h1 { font-size: 2.25rem; font-weight: 600; color: var(--on-overlay); }
@media (min-width: 768px) { .page-header h1 { font-size: 3.75rem; } }
.page-header p { margin-top: 0.75rem; max-width: 34rem; font-size: 1rem; color: rgb(251 248 241 / 0.851); text-wrap: pretty; }
@media (min-width: 768px) { .page-header p { font-size: 1.125rem; } }

/* ---------- Grid helpers ---------- */
.grid-2 { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-2-wide { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 768px) { .grid-2-wide { grid-template-columns: 1fr 1.4fr; } }
.grid-3 { display: grid; gap: 1.75rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .order-1-md { order: 1; } .order-2-md { order: 2; } }

.media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--secondary); }
.media.ratio-5-4 { aspect-ratio: 5 / 4; }
.media.ratio-4-3 { aspect-ratio: 4 / 3; }
.media.ratio-square { aspect-ratio: 1 / 1; }
.media.ratio-booking { aspect-ratio: 1170 / 585; }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media.contain img { object-fit: contain; padding: 1.5rem; }

.prose-block h2 { margin-top: 0.75rem; }
.prose-block .lead { margin-top: 1.25rem; }
.prose-block .lead + .lead { margin-top: 1rem; }
.prose-block .link-arrow { margin-top: 1.5rem; }

/* ---------- Feature cards (home) ---------- */
.feature-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition-base); }
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-card .media { border-radius: 0; aspect-ratio: 4 / 3; }
.feature-card .media img { transition: transform .5s ease; }
.feature-card:hover .media img { transform: scale(1.05); }
.feature-card .body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.feature-card h3 { font-size: 1.5rem; }
.feature-card p { margin-top: 0.5rem; flex: 1; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }
.feature-card .link-arrow { margin-top: 1rem; }

/* ---------- Badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: var(--radius-pill); padding: 0.4rem 1rem; font-size: 0.875rem; font-weight: 500; background: var(--accent-soft); color: var(--accent-ink); }
.badge svg { width: 1rem; height: 1rem; }

/* ---------- Attractions table ---------- */
.table-card { margin-top: 2.5rem; overflow: hidden; border-radius: var(--radius); border: 1px solid rgb(248 248 235 / 0.149); }
.attr-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
.attr-table thead { background: rgb(245 245 235 / 0.102); color: rgb(249 245 236 / 0.8); }
.attr-table th { padding: 0.75rem 1.25rem; font-weight: 500; }
.attr-table th.right, .attr-table td.right { text-align: right; }
.attr-table td { padding: 0.75rem 1.25rem; border-top: 1px solid rgb(245 245 235 / 0.102); color: rgb(249 245 236 / 0.902); }
.attr-table tbody tr:nth-child(even) { background: rgb(255 255 223 / 0.031); }
.attr-table td.right { color: rgb(249 245 236 / 0.702); }
.attr-table .cell-time { display: inline-flex; align-items: center; gap: 0.4rem; }
.attr-table .cell-time svg { width: 0.9rem; height: 0.9rem; }

/* ---------- Rooms (camere) ---------- */
.room { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .room { grid-template-columns: 1fr 1fr; } }
.rooms-stack { display: flex; flex-direction: column; gap: 5rem; }
.room h2 { font-size: 1.875rem; margin-top: 0.5rem; }
@media (min-width: 768px) { .room h2 { font-size: 2.25rem; } }
.room .room-desc { margin-top: 1rem; color: var(--muted-foreground); line-height: 1.7; }
.rate-chips { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.rate-chip { border-radius: var(--radius); border: 1px solid var(--border); background: var(--soft-bg); padding: 0.6rem 1rem; text-align: center; }
.rate-chip .price { font-family: var(--font-serif); font-size: 1.125rem; font-weight: 600; }
.rate-chip .who { font-size: 0.75rem; color: var(--muted-foreground); }
.room .link-arrow { margin-top: 1.5rem; }

/* ---------- Services grid ---------- */
.service-list { margin-top: 2.5rem; display: grid; gap: 1rem; }
@media (min-width: 640px) { .service-list { grid-template-columns: 1fr 1fr; } }
.service-item { display: flex; gap: 0.75rem; align-items: flex-start; border-radius: var(--radius); background: var(--card); padding: 1.25rem; box-shadow: var(--shadow-sm); }
.service-item .tick { margin-top: 0.15rem; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); }
.service-item .tick svg { width: 1rem; height: 1rem; }
.service-item .txt { font-size: 0.875rem; line-height: 1.6; }
.service-item .txt strong { font-weight: 600; }
.service-item .txt span { color: var(--muted-foreground); }

/* ---------- Carousel (crossfade) ---------- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--secondary); aspect-ratio: 4 / 3; }
.carousel .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.carousel .slide.active { opacity: 1; }
.carousel .slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 10; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--radius-pill); padding: 0.5rem; background: rgb(251 248 241 / 0.702); color: var(--overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--transition-base), background var(--transition-fast); }
.carousel:hover .carousel-btn, .carousel-btn:focus-visible { opacity: 1; }
.carousel-btn:hover { background: var(--on-overlay); }
.carousel-btn svg { width: 1.25rem; height: 1.25rem; }
.carousel-btn.prev { left: 0.75rem; }
.carousel-btn.next { right: 0.75rem; }
.carousel-dots { position: absolute; inset-inline: 0; bottom: 0.75rem; z-index: 10; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.carousel-dots button { height: 0.5rem; width: 0.5rem; border: 0; border-radius: var(--radius-pill); background: rgb(252 248 242 / 0.6); transition: all var(--transition-base); }
.carousel-dots button[aria-current="true"] { width: 1.5rem; background: var(--on-overlay); }

/* ---------- Masonry gallery + lightbox ---------- */
.masonry { columns: 2; column-gap: 0.75rem; }
@media (min-width: 768px) { .masonry { columns: 3; column-gap: 1rem; } }
.masonry > button { display: block; width: 100%; margin: 0 0 0.75rem; padding: 0; border: 0; background: var(--secondary); border-radius: var(--radius); overflow: hidden; break-inside: avoid; position: relative; }
@media (min-width: 768px) { .masonry > button { margin-bottom: 1rem; } }
.masonry img { width: 100%; transition: transform .5s ease; }
.masonry > button:hover img { transform: scale(1.05); }
.gallery-note { margin-top: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }

.lightbox { position: fixed; inset: 0; z-index: var(--z-modal); display: none; align-items: center; justify-content: center; padding: 1rem; background: rgb(43 34 27 / 0.902); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.lightbox.open { display: flex; }
.lightbox figure { position: relative; display: flex; flex-direction: column; align-items: center; max-width: 56rem; width: 100%; margin: 0; }
.lightbox img { max-height: 80vh; width: auto; max-width: 100%; object-fit: contain; }
.lightbox figcaption { margin-top: 1rem; text-align: center; font-size: 0.875rem; color: rgb(251 248 241 / 0.8); }
.lightbox-btn { position: absolute; z-index: 10; display: inline-flex; border: 0; border-radius: var(--radius-pill); padding: 0.6rem; background: rgb(248 248 242 / 0.149); color: var(--on-overlay); transition: background var(--transition-fast); }
.lightbox-btn:hover { background: rgb(252 248 242 / 0.302); }
.lightbox-btn svg { width: 1.5rem; height: 1.5rem; }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 0.75rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.75rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 768px) { .lightbox-prev { left: 1.5rem; } .lightbox-next { right: 1.5rem; } }

/* ---------- FAQ ---------- */
.faq { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--border); }
.faq-q { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; text-align: left; background: none; border: 0; font-weight: 500; color: var(--foreground); }
.faq-q .icon { flex: none; width: 1.25rem; height: 1.25rem; color: var(--primary); transition: transform var(--transition-slow); }
.faq-q[aria-expanded="true"] .icon { transform: rotate(45deg); }
.faq-panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--transition-slow), opacity var(--transition-slow); }
.faq-panel.open { grid-template-rows: 1fr; opacity: 1; }
.faq-panel > div { overflow: hidden; }
.faq-panel p { padding: 0 1.25rem 1.25rem; color: var(--muted-foreground); line-height: 1.7; }

/* ---------- Reviews ---------- */
.reviews { margin-top: 2.5rem; columns: 1; column-gap: 1.5rem; }
@media (min-width: 768px) { .reviews { columns: 2; } }
@media (min-width: 1024px) { .reviews { columns: 3; } }
.review { break-inside: avoid; margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 1.5rem; box-shadow: var(--shadow-sm); }
.review .quote-mark { width: 1.75rem; height: 1.75rem; color: rgb(176 86 40 / 0.302); }
.review blockquote { margin: 0.75rem 0 0; line-height: 1.7; color: var(--foreground); }
.review figcaption { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: 0.75rem; font-size: 0.875rem; }
.review .author { font-weight: 500; }
.review .meta { display: block; margin-top: 0.15rem; font-size: 0.75rem; color: var(--muted-foreground); }

/* ---------- Disciplines (wellness) ---------- */
.disc-grid { margin-top: 3rem; display: grid; gap: 1px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); background: var(--border); }
@media (min-width: 640px) { .disc-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .disc-grid { grid-template-columns: repeat(3, 1fr); } }
.disc { background: var(--card); padding: 1.75rem; transition: background var(--transition-fast); }
.disc:hover { background: var(--disc-hover-bg); }
.disc h3 { font-size: 1.5rem; }
.disc p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.disc.cta { display: flex; flex-direction: column; justify-content: center; background: var(--primary); color: var(--primary-foreground); }
.disc.cta p { color: var(--primary-foreground); font-family: var(--font-serif); font-size: 1.25rem; font-weight: 600; margin: 0; }
.disc.cta .link-arrow { margin-top: 0.75rem; color: var(--primary-foreground); }

/* ---------- Quote band ---------- */
.quote-band { position: relative; overflow: hidden; padding: 6rem 0; }
@media (min-width: 768px) { .quote-band { padding: 8rem 0; } }
.quote-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.quote-band-overlay { position: absolute; inset: 0; background: rgb(43 34 28 / 0.651); }
.quote-band .wrap { position: relative; z-index: 2; text-align: center; }
.quote-band p { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 500; line-height: 1.5; color: var(--on-overlay); text-wrap: balance; }
@media (min-width: 768px) { .quote-band p { font-size: 1.875rem; } }

/* ---------- "Ideal for" cards ---------- */
.ideal-grid { margin-top: 2.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .ideal-grid { grid-template-columns: repeat(3, 1fr); } }
.ideal-card { border-radius: var(--radius); background: var(--card); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.ideal-card .ico { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: var(--radius-pill); background: rgb(177 88 39 / 0.102); color: var(--primary); }
.ideal-card .ico svg { width: 1.5rem; height: 1.5rem; }
.ideal-card h3 { margin-top: 1.25rem; font-size: 1.25rem; }
.ideal-card p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.6; }

/* ---------- Contact info cards ---------- */
/* Mobile: single column in the order Chiamaci, Scrivici, Direzioni, Metodi di pagamento */
.contatti-grid { grid-template-columns: 1fr; }
.c-chiamaci  { order: 1; }
.c-scrivici  { order: 2; }
.c-direzioni { order: 3; }
.c-pagamento { order: 4; }
/* Desktop: two columns — Chiamaci/Direzioni/Pagamento on the left, Scrivici (form) on the right */
@media (min-width: 1024px) {
  .contatti-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
  .c-chiamaci  { grid-column: 1; grid-row: 1; }
  .c-direzioni { grid-column: 1; grid-row: 2; }
  .c-pagamento { grid-column: 1; grid-row: 3; }
  .c-scrivici  { grid-column: 2; grid-row: 1 / span 3; }
}
.info-h { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.info-h svg { width: 1.25rem; height: 1.25rem; color: var(--primary); }
.info-note { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.info-table { margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); font-size: 0.875rem; }
.info-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.85rem 1.25rem; }
.info-row + .info-row { border-top: 1px solid var(--border); }
.info-row dt, .info-row .k { color: var(--muted-foreground); }
.info-row dd, .info-row .v { margin: 0; text-align: right; }
.info-row a { font-weight: 500; }
.info-row a:hover { color: var(--primary); }
.info-row .mono { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: 0.8rem; }
.info-row .stack a { display: block; }
.icon-inline { display: inline-flex; align-items: center; gap: 0.4rem; }
.icon-inline svg { width: 1rem; height: 1rem; }

/* ---------- Forms ---------- */
.form { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 1.5rem; }
@media (min-width: 768px) { .form { padding: 2rem; } }
.form-grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-grid .col-2 { grid-column: 1 / -1; }
.form label.fld-label { display: block; font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.form input, .form textarea {
  margin-top: 0.4rem; width: 100%; border: 1px solid var(--input); border-radius: calc(var(--radius) * 0.75);
  background: var(--background); padding: 0.65rem 0.9rem; font: inherit; font-size: 0.875rem; color: var(--foreground);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--ring-focus); }
/* Inline validation feedback — only after the user has interacted (not on load) */
.form input:user-invalid, .form textarea:user-invalid { border-color: oklch(0.55 0.20 27); }
.form input:user-invalid:focus, .form textarea:user-invalid:focus { box-shadow: 0 0 0 3px rgb(203 40 40 / 0.251); }
.form fieldset { margin: 1.5rem 0 0; padding: 0; border: 0; }
.form legend { padding: 0; font-size: 0.875rem; font-weight: 500; color: var(--foreground); }
.check-row { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
.check input { width: 1rem; height: 1rem; accent-color: var(--primary); }
.consent { margin-top: 1.25rem; display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.875rem; color: var(--muted-foreground); }
.consent input { margin-top: 0.2rem; width: 1rem; height: 1rem; accent-color: var(--primary); flex: none; }
.consent a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.form .btn { margin-top: 1.5rem; width: 100%; }
.form-alt { margin-top: 1rem; text-align: center; font-size: 0.75rem; color: var(--muted-foreground); }
.form-alt a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }

/* Map CTA */
.map-cta { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; min-height: 300px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 2.5rem; text-align: center; transition: border-color var(--transition-fast); }
@media (min-width: 768px) { .map-cta { min-height: 360px; } }
.map-cta:hover { border-color: var(--primary); }
.map-cta .pin { display: inline-flex; align-items: center; justify-content: center; width: 3.5rem; height: 3.5rem; border-radius: var(--radius-pill); background: rgb(177 88 39 / 0.102); color: var(--primary); }
.map-cta .pin svg { width: 1.75rem; height: 1.75rem; }
.map-cta .addr { font-family: var(--font-serif); font-size: 1.5rem; color: var(--foreground); }
.map-cta .sub { margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

/* ---------- Team (noi) ---------- */
.team-grid { margin-top: 3rem; display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .team-grid { grid-template-columns: repeat(3, 1fr); } }
.team-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 1.5rem; }
.team-card .head { display: flex; align-items: center; gap: 1rem; }
.team-card .avatar { width: 3.5rem; height: 3.5rem; flex: none; border-radius: var(--radius-pill); overflow: hidden; background: var(--secondary); }
.team-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1.25rem; }
.team-card p { margin-top: 1rem; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.7; }

/* ---------- Drone video ---------- */
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--secondary); }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-thumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgb(43 33 26 / 0.302); transition: background var(--transition-fast); }
.video-thumb:hover .play { background: rgb(42 35 27 / 0.4); }
.video-thumb .play span { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: var(--radius-pill); background: rgb(251 248 241 / 0.902); color: var(--primary); box-shadow: 0 8px 24px oklch(0.26 0.018 60 / 0.28); transition: transform var(--transition-fast); }
.video-thumb:hover .play span { transform: scale(1.1); }
.video-thumb .play svg { width: 1.75rem; height: 1.75rem; }
.note-box { margin-top: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--soft-bg); padding: 1rem; font-size: 0.875rem; line-height: 1.6; color: var(--muted-foreground); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--primary); color: var(--primary-foreground); padding: 4rem 0; }
.cta-band .wrap { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; text-align: center; }
.cta-band h2 { font-size: 1.875rem; }
@media (min-width: 768px) { .cta-band h2 { font-size: 2.25rem; } }
.cta-band p { max-width: 36rem; line-height: 1.7; color: var(--primary-foreground); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding: 3rem 0; }
.footer-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand .name { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; }
.footer-brand .tag { margin-top: 0.25rem; font-size: 0.875rem; color: rgb(248 245 237 / 0.6); }
.footer-brand .addr { margin-top: 1rem; font-size: 0.875rem; color: rgb(249 245 236 / 0.702); }
.footer-col { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; }
.footer-col .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgb(249 246 236 / 0.639); }
.footer-col a { color: rgb(249 245 236 / 0.8); transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--footer-fg); }
.footer-social { margin-top: 0.25rem; display: flex; gap: 1rem; }
.footer-bottom { margin-top: 2.5rem; border-top: 1px solid rgb(248 248 235 / 0.149); padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.75rem; color: rgb(250 246 237 / 0.549); }
@media (min-width: 768px) { .footer-bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.footer-bottom a { color: rgb(250 246 236 / 0.749); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Back to top ---------- */
.to-top { position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: var(--z-dropdown); display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: var(--radius-pill); border: 0; background: var(--primary); color: var(--primary-foreground); opacity: 0; pointer-events: none; transition: opacity var(--transition-base); }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 1.1rem; height: 1.1rem; }

/* ---------- Skip link / prose (legal pages) ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: var(--z-skip-link); background: var(--background); padding: 0.6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { left: 1rem; top: 1rem; }
.prose { max-width: 48rem; }
.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose p { margin-top: 1rem; color: var(--muted-foreground); line-height: 1.7; }
.prose a { color: var(--primary-ink); text-decoration: underline; text-underline-offset: 2px; }
.prose ul { margin-top: 1rem; padding-left: 1.25rem; color: var(--muted-foreground); line-height: 1.7; }

/* ---------- Language suggestion banner (dismissible, localStorage only) ---------- */
.lang-banner {
  /* Narrow screens: heading stacked directly above the button (both centred),
     close button pulled into the top-right corner so nothing is offset.
     Anchored left of the back-to-top button so neither blocks the other. */
  position: fixed; left: 1rem; right: 5rem; bottom: 1.1rem; z-index: var(--z-floating);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  background: var(--footer-bg); color: var(--footer-fg);
  border-radius: var(--radius); padding: 0.75rem 1rem;
  font-size: 0.875rem; line-height: 1.4; text-align: center;
  box-shadow: 0 10px 30px oklch(0.26 0.018 60 / 0.3);
}
@media (min-width: 640px) {
  .lang-banner {
    left: 50%; right: auto; transform: translateX(-50%);
    flex-direction: row; align-items: center; gap: 0.75rem;
    max-width: calc(100% - 12rem); text-align: left;
    border-radius: var(--radius-pill); padding: 0.5rem 0.5rem 0.5rem 1.25rem;
  }
}
.lang-banner .lang-banner-link {
  flex: none; display: inline-flex; align-items: center;
  border-radius: var(--radius-pill); padding: 0.45rem 1rem;
  background: var(--primary); color: var(--primary-foreground); font-weight: 500;
  transition: opacity var(--transition-fast);
}
.lang-banner .lang-banner-link:hover { opacity: 0.9; }
.lang-banner .lang-banner-close {
  /* Narrow screens: out of flow in the top-right corner */
  position: absolute; top: 0.35rem; right: 0.35rem;
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border: 0; border-radius: var(--radius-pill);
  background: none; color: rgb(249 245 236 / 0.702);
  transition: color var(--transition-fast), background var(--transition-fast);
}
@media (min-width: 640px) {
  .lang-banner .lang-banner-close { position: static; }
}
.lang-banner .lang-banner-close:hover { color: var(--footer-fg); background: rgb(248 248 235 / 0.149); }
.lang-banner .lang-banner-close svg { width: 1rem; height: 1rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .carousel .slide, .feature-card .media img, .masonry img { transition: none; }
}
