/* ============================================================
   Sergio Zacheo — Medicina Cinese & Riflessologia
   Static site stylesheet
   Ported from claude.ai/design prototype, refined for production.
   ============================================================ */

/* ------------------------------------------------------------
   Self-hosted fonts (GDPR-friendly, no Google Fonts CDN).
   Files in /assets/fonts/ are the Latin subsets of the official
   Google Fonts variable WOFF2 builds — one file per family +
   italic, covering all weight ranges used by the site.
   ------------------------------------------------------------ */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('./assets/fonts/cormorant-garamond.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 300 400;
  font-display: swap;
  src: url('./assets/fonts/cormorant-garamond-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url('./assets/fonts/dm-sans.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f5f1eb;
  --bg2:       #ede8e0;
  --bg3:       #e4ddd4;
  --gold:      #c47f5a;   /* Decorative copper — borders, lines, large display italic accents. Fails WCAG AA on body text by design; never use on small text. */
  --gold-dim:  #8e553a;   /* Readable copper — small text, CTAs, link hover. 5.3:1 on --bg, 4.9:1 on --bg2, passes AA on both. */
  --gold-deep: #7c4a31;   /* Pressed-state copper — button hover backgrounds. */
  --text:      #1e1a16;
  --muted:     #6e6358;   /* Secondary text — 5.2:1 on --bg, 4.85:1 on --bg2. */
  --border:    #d4ccc2;
  --serif:     'Cormorant Garamond', 'Cormorant', 'Times New Roman', serif;
  --serif-cjk: 'Songti SC', 'STSong', 'SimSun', 'Hiragino Mincho ProN', 'Yu Mincho', 'Cormorant Garamond', serif;
  --sans:      'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h:     74px;
  --ease:      cubic-bezier(.2, .8, .2, 1);

  /* Layout rail — every section's content is centered within
     --container and bounded by --gutter on each side, so the
     vertical content edges form a single straight line down the page. */
  --container:        1180px;
  --container-tight:  880px;
  --gutter:           clamp(20px, 4vw, 48px);

  /* Spacing scale — replaces the ad-hoc 10/14/18/24/36/40/48/80/96
     values scattered through the original stylesheet. */
  --space-1: 8px;
  --space-2: 14px;
  --space-3: 22px;
  --space-4: 32px;
  --space-5: 48px;
  --space-6: 72px;
  --space-7: 96px;

  /* Vertical rail visibility — invisible by default.
     Set to ~0.08 to render a subtle copper-tinted line at the
     container's left edge across all body sections. */
  --rail-opacity: 0;
}

/* Optional vertical alignment rail on the main column.
   Driven entirely by --rail-opacity: when set to 0 the pseudo-
   element is fully transparent (no visual effect, no layout cost). */
main {
  position: relative;
}
main::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: max(var(--gutter), calc((100% - var(--container)) / 2));
  width: 1px;
  background: var(--gold);
  opacity: var(--rail-opacity);
  pointer-events: none;
  z-index: 1;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* 109% root → 1rem ≈ 17.44px. Scales proportionally with user
     accessibility preferences, while every rem-based size in the
     stylesheet inflates by the same factor. */
  font-size: 109%;
}

/* Anchor targets sit below the fixed nav (74px) when navigated to directly. */
section[id], [id^="tratt-"], #top {
  scroll-margin-top: 90px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

/* Subtle paper-grain overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Accessibility: skip-to-content (visible only on keyboard focus) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 24px;
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10000;
  transition: top 0.25s var(--ease);
}
.skip-link:focus { top: 18px; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px clamp(20px, 4vw, 48px);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.4s var(--ease), border-bottom 0.4s var(--ease), padding 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(245, 241, 235, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px clamp(20px, 4vw, 48px);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  cursor: pointer;
}
.nav-logo span { color: var(--gold); font-style: italic; }
.nav-links { display: flex; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s var(--ease);
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav-links a:hover { color: var(--gold-dim); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid var(--gold-dim);
  padding: 9px 22px;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.nav-cta:hover { background: var(--gold-dim); color: var(--bg); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  width: 22px; height: 1px;
  background: var(--text);
  display: block;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* MOBILE MENU */
#mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(245, 241, 235, 0.985);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  animation: fade-in 0.4s var(--ease);
}
#mobile-menu[hidden] { display: none; }
#mobile-menu a {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  font-weight: 300;
  color: var(--text);
}
#mobile-menu a:hover { color: var(--gold-dim); }
.menu-close {
  position: absolute;
  top: 22px; right: 22px;
  font-size: 1.4rem;
  background: none; border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 10px;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  display: flex; align-items: flex-start;
  padding-block: 124px 88px;
  padding-inline: var(--gutter);
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #f5f1eb 0%, #ede5d8 50%, #f5f1eb 100%);
}
.hero-pattern {
  position: absolute; inset: 0;
  opacity: 0.035;
  background-image: repeating-linear-gradient(45deg, var(--gold-dim) 0, var(--gold-dim) 1px, transparent 0, transparent 50%);
  background-size: 12px 12px;
}
.hero-meridian {
  position: absolute;
  right: clamp(-40px, 2vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  width: clamp(420px, 50vw, 680px);
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  will-change: transform;
}
.meridian-svg {
  width: 100%;
  height: 100%;
  animation: qi-spin 240s linear infinite;
  will-change: transform;
  display: block;
}
@keyframes qi-spin {
  to { transform: rotate(360deg); }
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 0;
}
.hero-content > * {
  max-width: 720px;
}
.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 24px;
  display: flex; align-items: center; gap: 16px;
}
.hero-eyebrow::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin-bottom: 28px;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
  font-weight: 500;
}
.hero-subtitle {
  font-size: clamp(1.05rem, 1.2vw, 1.25rem);
  color: var(--text);
  max-width: 540px;
  margin-bottom: 44px;
  line-height: 1.65;
  font-weight: 400;
}
.hero-actions {
  display: flex; align-items: center; gap: 32px;
  flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold-dim);
  padding: 14px 36px;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
}
.btn-primary:hover {
  background: var(--gold-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 74, 49, 0.28);
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-ghost {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
  transition: color 0.25s var(--ease), gap 0.25s var(--ease);
}
.btn-ghost::after { content: '→'; transition: transform 0.25s var(--ease); }
.btn-ghost:hover { color: var(--text); gap: 14px; }
.btn-ghost:hover::after { transform: translateX(2px); }

/* ============================================================
   SECTION SHELL & PAGE RAIL
   Every section gets the same vertical-padding rhythm and the
   same horizontal gutter. Inside, every direct child is bounded
   by --container and centered, so content edges align across
   sections in a single straight rail.
   ============================================================ */
section {
  padding-block: var(--space-6);
  padding-inline: var(--gutter);
  position: relative;
}
section > .section-label,
section > h2.section-title,
section > .section-head,
section > .about-grid,
section > .trattamenti-grid,
section > .collab-inner,
section > .testi-grid,
section > .gallery-grid,
section > .faq-list,
section > .prenota-inner,
section > .contatti-grid {
  max-width: var(--container);
  margin-inline: auto;
}
/* FAQ uses a narrower reading column for comfortable line-length;
   the section header above it shrinks to match so the column reads
   as a single coherent unit. */
section#faq > .section-label,
section#faq > h2.section-title,
section#faq > .faq-list {
  max-width: var(--container-tight);
}
.section-head { margin-bottom: var(--space-5); }
.section-label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-2);
  display: flex; align-items: center; gap: 14px;
  font-weight: 500;
}
.section-label::before {
  content: '';
  width: 48px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: 0.7;
}
h2.section-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 500;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  letter-spacing: -0.012em;
  font-feature-settings: "ss01" 1, "liga" 1;
}
h2.section-title em {
  font-style: italic;
  color: var(--gold-dim);
  font-weight: 500;
}
.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   PHOTO SLOTS (placeholders ready to swap with real photos)
   ============================================================ */
.photo-slot {
  position: relative;
  background:
    radial-gradient(circle at 30% 30%, rgba(196, 127, 90, 0.07), transparent 55%),
    linear-gradient(135deg, var(--bg3) 0%, var(--bg2) 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  isolation: isolate;
}
.photo-slot::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(196, 127, 90, 0.18);
  pointer-events: none;
}
.photo-slot-char {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--serif-cjk);
  font-size: clamp(4.5rem, 13vw, 8.5rem);
  color: rgba(196, 127, 90, 0.22);
  font-weight: 300;
  line-height: 1;
  user-select: none;
  z-index: 0;
  letter-spacing: 0;
}
.photo-slot-label {
  position: relative;
  z-index: 1;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(245, 241, 235, 0.92);
  padding: 6px 14px;
  margin-top: auto;
  margin-bottom: 14px;
}

/* ============================================================
   CHI SONO
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: var(--space-6);
  align-items: start;
}
.about-img {
  aspect-ratio: 4 / 5;     /* Matches the source portrait (1122×1402 ≈ 4:5). */
  width: 100%;
  display: block;
  overflow: hidden;
}
.about-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 22%;   /* Keep face well-framed on tighter crops. */
}
.about-text > h2 { margin-bottom: 24px; }
.about-text p {
  color: var(--text);
  margin-bottom: 18px;
  font-size: 1rem;
  line-height: 1.7;
  max-width: 62ch;
}
.about-badges {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  margin-top: 36px;
}
.badge {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  border: 1px solid var(--gold-dim);
  background: rgba(196, 127, 90, 0.08);
  padding: 7px 14px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
  font-weight: 500;
}
.badge:hover {
  background: var(--gold);
  color: var(--bg);
}
.about-quote {
  margin-top: var(--space-5);
  padding: 28px 48px;
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
  background: var(--bg2);
  text-align: center;
  max-width: fit-content;
  margin-inline: auto;
}
.about-quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.32rem;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  font-weight: 500;
  white-space: nowrap;
}

/* ============================================================
   TRATTAMENTI
   ============================================================ */
.trattamenti-bg { background: var(--bg2); }
.trattamenti-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}
.tratt-card {
  background: var(--bg);
  padding: 40px 34px 56px;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
  border: 1px solid transparent;
  position: relative;
  outline: none;
}
.tratt-card:hover,
.tratt-card.active {
  background: var(--bg3);
  border-color: var(--border);
}
.tratt-card.active .tratt-number { color: var(--gold); }
.tratt-number {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: 20px;
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}
.tratt-card:hover .tratt-number { transform: translateX(4px); color: var(--gold-dim); }
.tratt-name {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -0.005em;
}
.tratt-short {
  font-size: 0.94rem;
  color: var(--text);
  opacity: 0.82;
  line-height: 1.55;
  margin-bottom: 0;
  font-weight: 400;
}
.tratt-detail {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin-top 0.35s var(--ease);
  margin-top: 0;
}
.tratt-card.active .tratt-detail {
  max-height: 320px;
  opacity: 1;
  margin-top: 20px;
}
.tratt-toggle {
  position: absolute;
  bottom: 36px; right: 36px;
  width: 30px; height: 30px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--gold-dim);
  transition: transform 0.4s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
  user-select: none;
}
.tratt-card:hover .tratt-toggle { border-color: var(--gold-dim); color: var(--gold); }
.tratt-card.active .tratt-toggle { transform: rotate(45deg); border-color: var(--gold); color: var(--gold); }

/* ============================================================
   COLLABORAZIONE
   ============================================================ */
.collab-inner {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
.collab-text > h2 { margin-bottom: 24px; }
.collab-text p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 58ch;
}
.collab-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
}
.collab-icon {
  width: 168px; height: 168px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif-cjk);
  font-size: 4.2rem;
  color: rgba(196, 127, 90, 0.55);
  background: radial-gradient(circle, rgba(196, 127, 90, 0.04), transparent 70%);
  position: relative;
  isolation: isolate;
}
/* Concentric outer hairline ring — echoes the meridian-wheel motif. */
.collab-icon::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1px solid rgba(196, 127, 90, 0.22);
  pointer-events: none;
}
.collab-connector {
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, transparent, var(--gold-dim), transparent);
  opacity: 0.6;
}

/* ============================================================
   TESTIMONIANZE
   ============================================================ */
.testi-bg { background: var(--bg2); }
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: var(--space-5);
}
.testi-card {
  background: var(--bg);
  padding: 40px 30px;
  display: flex; flex-direction: column;
}
.testi-stars {
  color: var(--gold);
  font-size: 0.95rem;
  margin-bottom: 20px;
  letter-spacing: 4px;
}
.testi-text {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 24px;
  font-weight: 500;
}
.testi-author {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: auto;
  font-weight: 500;
}
.testi-author strong {
  color: var(--gold-dim);
  display: block;
  font-weight: 600;
  margin-bottom: 3px;
  font-size: 0.84rem;
}

/* ============================================================
   GALLERIA
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 240px 180px;
  gap: 3px;
  margin-top: var(--space-5);
}
.gallery-item {
  background: var(--bg3);
  overflow: hidden;
  position: relative;
}
.gallery-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-item:nth-child(1) { grid-row: span 2; grid-column: span 1; }
.gallery-item:nth-child(3) { grid-column: span 2; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: var(--container-tight);
  margin-top: var(--space-5);
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  width: 100%;
  padding: 24px 0;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: color 0.25s var(--ease);
  user-select: none;
  background: none;
  border: none;
  text-align: left;
  gap: 24px;
}
.faq-q:hover { color: var(--gold-dim); }
.faq-icon {
  width: 26px; height: 26px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--gold-dim);
  transition: transform 0.35s var(--ease), border-color 0.25s var(--ease);
  font-family: var(--sans);
}
.faq-q:hover .faq-icon { border-color: var(--gold-dim); color: var(--gold); }
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--gold); color: var(--gold); }
.faq-a {
  font-size: 1rem;
  color: var(--text);
  opacity: 0.92;
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), padding 0.3s var(--ease);
  font-weight: 400;
}
.faq-item.open .faq-a {
  max-height: 400px;
  padding-bottom: 26px;
}

/* ============================================================
   PRENOTAZIONE
   ============================================================ */
.prenota-bg { background: var(--bg2); }
.prenota-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: start;
}
.prenota-info p {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 16px;
  max-width: 52ch;
}
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 24px;
  padding: 12px 8px 12px 0;
  transition: transform 0.25s var(--ease);
  border-radius: 2px;
}
.contact-item:hover { transform: translateX(4px); }
.contact-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  color: var(--gold);
  flex-shrink: 0;
  background: var(--bg);
}
.contact-text {
  font-size: 0.94rem;
  color: var(--text);
  opacity: 0.78;
  line-height: 1.5;
  font-weight: 400;
}
.contact-text strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 4px;
  opacity: 1;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
input, select, textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus {
  border-color: var(--gold-dim);
  background: #fdfaf3;
}
.field-invalid { border-color: var(--gold) !important; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238e553a' stroke-width='1.2'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
textarea { resize: vertical; min-height: 110px; }
.form-submit {
  background: var(--gold-dim);
  color: var(--bg);
  border: none;
  padding: 16px 36px;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}
.form-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s var(--ease);
}
.form-submit:hover {
  background: var(--gold-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 74, 49, 0.28);
}
.form-submit:hover::after { transform: translateX(100%); }
.form-success {
  padding: 28px;
  background: rgba(196, 127, 90, 0.07);
  border: 1px solid var(--gold-dim);
  color: var(--gold-dim);
  letter-spacing: 0.04em;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.6;
  animation: fade-in 0.5s var(--ease);
}
.form-error {
  padding: 12px 16px;
  background: rgba(142, 85, 58, 0.08);
  border-left: 2px solid var(--gold-dim);
  color: var(--gold-dim);
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 4px;
}
.form-error[hidden] { display: none; }

/* Honeypot anti-bot field — visually hidden but still in the DOM so
   automated submitters fill it and trigger Netlify's spam filter.
   Avoid `display: none` / `visibility: hidden` because some bots skip
   those; off-screen positioning is the recommended pattern. */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* GDPR consent checkbox. Custom-styled to match the form's minimal
   palette without losing native keyboard/screen-reader behavior. */
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  cursor: pointer;
}
.form-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  position: relative;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  padding: 0;
}
.form-consent input[type="checkbox"]:hover { border-color: var(--gold-dim); }
.form-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--gold-dim);
  outline-offset: 2px;
}
.form-consent input[type="checkbox"]:checked {
  background: var(--gold-dim);
  border-color: var(--gold-dim);
}
.form-consent input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--bg);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.form-consent input[type="checkbox"].field-invalid {
  border-color: var(--gold) !important;
}
.form-consent a {
  color: var(--gold-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-consent a:hover { color: var(--gold-deep); }

/* ============================================================
   CONTATTI
   ============================================================ */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: var(--space-5);
}
.contatti-cell {
  padding: 48px;
  border: 1px solid var(--border);
  transition: background 0.25s var(--ease);
}
.contatti-cell:hover { background: var(--bg2); }
.contatti-cell:nth-child(2) { border-left: none; }
.contatti-cell:nth-child(3) { border-top: none; }
.contatti-cell:nth-child(4) { border-left: none; border-top: none; }
.cc-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 14px;
  font-weight: 500;
}
.cc-value {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}
.cc-value a { transition: color 0.25s var(--ease); }
.cc-value a:hover { color: var(--gold-dim); }
.cc-value-sm {
  font-size: 1rem;
  line-height: 1.6;
  font-family: var(--sans);
  color: rgba(30, 26, 22, 0.88);
  font-weight: 400;
}
.cc-sub {
  font-size: 0.9rem;
  color: rgba(30, 26, 22, 0.75);
  margin-top: 10px;
  font-weight: 400;
}
.cc-sub a:hover { color: var(--gold-dim); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px clamp(20px, 4vw, 48px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--muted);
}
.footer-logo span { color: var(--gold-dim); font-style: italic; }
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.footer-links a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.footer-links a:hover,
.footer-links a[aria-current="page"] {
  color: var(--gold-dim);
}
.footer-copy {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============================================================
   LEGAL PAGE (privacy, etc.) — long-form text layout
   ============================================================ */
.legal-page {
  padding: calc(var(--nav-h) + var(--space-6)) var(--gutter) var(--space-7);
  background: var(--bg);
}
.legal-inner {
  max-width: var(--container-tight);
  margin: 0 auto;
}
.legal-page .section-title { margin-bottom: var(--space-3); }
.legal-lead {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: var(--space-2);
  font-weight: 400;
}
.legal-updated {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: var(--space-5);
}
.legal-page h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  letter-spacing: 0.01em;
}
.legal-page p,
.legal-page li {
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--text);
  font-weight: 400;
}
.legal-page p { margin-bottom: var(--space-2); }
.legal-page ul,
.legal-page ol {
  margin: 0 0 var(--space-2) 1.4em;
}
.legal-page li { margin-bottom: 6px; }
.legal-page strong { font-weight: 500; }
.legal-page em { font-style: italic; color: var(--gold-dim); }
.legal-page a {
  color: var(--gold-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.25s var(--ease);
}
.legal-page a:hover { color: var(--gold-deep); }
.legal-meta {
  list-style: none;
  margin-left: 0 !important;
  padding: 0;
  margin-bottom: var(--space-2);
}
.legal-meta li {
  padding: 4px 0;
  font-size: 0.95rem;
}
.legal-page .legal-back {
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
}
.legal-page .legal-back a { font-family: inherit; }

/* Thank-you page (post-form submission fallback for no-JS users). */
.thanks-page {
  padding: calc(var(--nav-h) + var(--space-7)) var(--gutter) var(--space-7);
  background: var(--bg);
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
}
.thanks-inner {
  max-width: var(--container-tight);
  text-align: center;
}
.thanks-page .section-title {
  margin: var(--space-2) 0 var(--space-3);
}
.thanks-lead {
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: var(--space-3);
  font-weight: 400;
}
.thanks-meta {
  font-family: var(--sans);
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--muted);
  margin-bottom: var(--space-5);
}
.thanks-meta a {
  color: var(--gold-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.thanks-meta a:hover { color: var(--gold-deep); }
.thanks-back {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
}
.thanks-back a { color: var(--gold-dim); }
.thanks-back a:hover { color: var(--gold-deep); }

/* ============================================================
   REVEAL ANIMATIONS
   `.js` is added to <html> as the page loads. Without JS, every
   element stays visible — graceful degradation.
   ============================================================ */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.js [data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE — TABLET (≤900px)
   ============================================================ */
@media (max-width: 900px) {
  .nav { padding: 18px 24px; }
  .nav.scrolled { padding: 12px 24px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }

  .hero { padding-block: 110px 70px; }
  .hero-meridian { display: none; }
  .hero-content { max-width: 100%; }
  .hero-content > * { max-width: 100%; }
  .hero-title { font-size: clamp(2.8rem, 8vw, 3.8rem); }
  .hero-subtitle { font-size: 1.02rem; }

  section { padding-block: var(--space-6); }
  h2.section-title { margin-bottom: 28px; }
  .section-head { margin-bottom: 28px; }

  .about-grid,
  .prenota-inner,
  .collab-inner {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .about-img { max-width: 480px; }

  .trattamenti-grid { grid-template-columns: 1fr 1fr; }
  .testi-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 32px; }
  .testi-card { padding: 32px 26px; }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 220px 220px;
  }
  .gallery-item:nth-child(1) { grid-row: auto; grid-column: auto; }
  .gallery-item:nth-child(3) { grid-column: auto; }

  .contatti-grid { grid-template-columns: 1fr; }
  .contatti-cell { padding: 30px 26px; }
  .contatti-cell:nth-child(2) { border-left: 1px solid var(--border); border-top: none; }
  .contatti-cell:nth-child(3) { border-top: none; }
  .contatti-cell:nth-child(4) { border-left: 1px solid var(--border); border-top: none; }

  .collab-visual { flex-direction: row; gap: 28px; }
  .collab-connector { width: 56px; height: 1px; background: linear-gradient(to right, transparent, var(--gold-dim), transparent); }
  .collab-icon { width: 120px; height: 120px; font-size: 3rem; }
  .collab-icon::before { inset: -10px; }

  .about-quote { max-width: 100%; }
  .about-quote p { white-space: normal; }

  footer { flex-direction: column; gap: 12px; text-align: center; }
}

/* ============================================================
   RESPONSIVE — PHONE (≤600px)
   ============================================================ */
@media (max-width: 600px) {
  body { font-size: 16px; }
  section { padding-block: var(--space-5); }
  h2.section-title { margin-bottom: 24px; }

  .hero { padding-block: 100px 56px; }
  .hero-eyebrow { font-size: 0.68rem; gap: 12px; }
  .hero-eyebrow::before { width: 28px; }
  .hero-title { font-size: clamp(2.6rem, 11vw, 3.4rem); margin-bottom: 22px; }
  .hero-subtitle { font-size: 1rem; max-width: 100%; margin-bottom: 36px; }
  .hero-actions { gap: 18px; }
  .btn-primary { padding: 13px 28px; }

  .trattamenti-grid { grid-template-columns: 1fr; gap: 1px; }
  .tratt-card { padding: 32px 22px 50px; }
  .tratt-toggle { bottom: 26px; right: 22px; }
  .tratt-name { font-size: 1.55rem; }
  .tratt-short { font-size: 0.96rem; }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 220px);
    gap: 2px;
  }

  .form-row { grid-template-columns: 1fr; }
  .contatti-cell { padding: 26px 20px; }
  .cc-value { font-size: 1.3rem; }

  .about-quote { padding: 22px; }
  .about-quote p { font-size: 1.18rem; white-space: normal; }

  .collab-visual { flex-direction: column; gap: 28px; }
  .collab-connector { width: 1px; height: 56px;
    background: linear-gradient(to bottom, transparent, var(--gold-dim), transparent); }
  .testi-text { font-size: 1.12rem; }
  .faq-q { font-size: 1.14rem; padding: 22px 0; gap: 16px; }
  .faq-a { font-size: 0.96rem; }
}

/* ============================================================
   PRINT — minimal sanitization
   ============================================================ */
@media print {
  .nav, #mobile-menu, .hero-meridian, .photo-slot-char,
  .form-submit, form, .hero-pattern, body::before { display: none !important; }
  body { color: #000; background: #fff; }
  section { padding: 24px 0; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .meridian-svg { animation: none; }
}
