/* Prova 3/site/style.css
 * Design system "Terra — Organic Design" (vedi CSS/prova 3/DESIGN.md).
 * Palette earthy, Literata serif + Nunito Sans body, ombre soft, 12px radius.
 */

:root {
  /* Colori */
  --primary: #7b4f2e;       /* Legno di castagno — warm wood brown */
  --primary-700: #5e3a1f;
  --primary-100: #f2e5d4;
  --bg: #faf6f0;            /* Warm cream */
  --bg-2: #f3ece0;          /* Cream più caldo per layer */
  --bg-card: #fffdf9;
  --tertiary: #705c30;      /* Warm amber */
  --tertiary-100: #efe6cf;
  --text: #2e3230;
  --text-soft: #5a605b;
  --outline: #d9d2bf;
  --outline-soft: #ece5d4;
  --footer-bg: #2d1f0e;
  --footer-text: #d8d4c4;
  --shadow-soft: 0 4px 20px rgba(46, 50, 48, 0.06);
  --shadow-md: 0 8px 28px rgba(46, 50, 48, 0.10);

  /* Tipografia */
  --font-display: "Literata", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Forme */
  --radius: 12px;
  --radius-pill: 999px;

  /* Spaziature */
  --sp-sm: 12px;
  --sp-md: 24px;
  --sp-lg: 48px;
  --sp-xl: 80px;
  --container: 1180px;
  --gutter: 24px;
}

* , *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover { color: var(--primary-700); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0 0 var(--sp-sm);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); text-align: center; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 var(--sp-sm); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.narrow { max-width: 760px; margin-inline: auto; }
.muted { color: var(--text-soft); }
.small { font-size: .875rem; }
.center { text-align: center; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--outline-soft);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding-block: 14px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--primary); }

.primary-nav ul {
  display: flex;
  gap: var(--sp-md);
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
}
.primary-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.primary-nav a:hover { color: var(--primary); }
.primary-nav a.is-active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius);
  padding: 12px 22px;
  font-size: 0.95rem;
  text-align: center;
  transition: background .2s ease, transform .15s ease, color .2s ease, border-color .2s ease;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--primary-700); color: #fff; transform: translateY(-1px); }
.btn-pill { border-radius: var(--radius-pill); padding: 10px 22px; }
.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--outline);
}
.btn-secondary:hover { border-color: var(--primary); background: var(--primary-100); color: var(--primary-700); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px auto;
  transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero.small { min-height: 44vh; }
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,16,6,0.30) 0%, rgba(28,16,6,0.55) 70%, rgba(28,16,6,0.65) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-xl);
  text-align: center;
  margin: 0 auto;
  max-width: 760px;
}
.hero h1 { color: #fff; }
.hero p.lead {
  color: rgba(255,255,255,0.92);
  font-size: 1.05rem;
  max-width: 620px;
  margin: var(--sp-sm) auto var(--sp-md);
}
.hero-cta {
  display: flex;
  justify-content: center;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-top: var(--sp-md);
}
.hero-cta .btn-secondary { background: rgba(255,255,255,0.95); }

/* ===== Sezione ===== */
.section {
  padding: var(--sp-xl) 0;
}
.section.tight { padding: var(--sp-lg) 0; }
.section.alt { background: var(--bg-2); }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto var(--sp-lg);
}
.section-head p {
  color: var(--text-soft);
  margin-top: var(--sp-sm);
}

/* ===== Home: Storia split ===== */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-lg); }
}
.split .media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ===== Card camere ===== */
.rooms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
@media (min-width: 720px) {
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
}
.room-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.room-card .media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.room-card .media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease;
}
.room-card:hover .media img { transform: scale(1.04); }
.badge {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}
.badge.amber { background: var(--tertiary); }
.badge.muted { background: rgba(255,255,255,0.92); color: var(--text); }
.room-card .body {
  padding: var(--sp-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.room-card h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--text);
}
.room-card .features {
  display: flex; flex-wrap: wrap; gap: 6px;
  list-style: none; padding: 0; margin: 6px 0 0;
}
.room-card .features li {
  background: var(--tertiary-100);
  color: var(--tertiary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
.room-card .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-sm);
  margin-top: var(--sp-sm);
}
.price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--tertiary);
  font-weight: 600;
}
.price small { font-weight: 400; color: var(--text-soft); font-size: 0.8rem; display: block; }

/* ===== Servizi grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-md);
}
.service {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--sp-md);
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease;
}
.service:hover { transform: translateY(-3px); }
.service .icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary);
  display: grid; place-items: center;
  margin: 0 auto var(--sp-sm);
  font-size: 1.6rem;
}
.service h3 { font-size: 1.05rem; }
.service p { color: var(--text-soft); margin: 0; font-size: 0.93rem; }

/* ===== Regole ===== */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-md);
}
@media (min-width: 720px) {
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
}
.rule {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--sp-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: var(--sp-sm);
}
.rule .ico {
  flex: 0 0 40px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 1.1rem;
}
.rule h4 { margin: 0 0 4px; font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.rule p { color: var(--text-soft); margin: 0; font-size: 0.9rem; }

/* ===== Testimonials ===== */
.testimonials {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
@media (min-width: 720px) {
  .testimonials { grid-template-columns: repeat(3, 1fr); }
}
.testimonial {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--sp-md);
  box-shadow: var(--shadow-soft);
}
.stars { color: var(--tertiary); letter-spacing: 2px; margin-bottom: 8px; }
.testimonial blockquote {
  margin: 0;
  font-style: italic;
  color: var(--text);
}
.testimonial cite {
  margin-top: 12px;
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ===== Paths page ===== */
.filter-chips {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 0 var(--sp-lg);
}
.chip {
  background: var(--bg-card);
  border: 1px solid var(--outline);
  color: var(--text);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.paths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
@media (min-width: 720px) {
  .paths-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .paths-grid { grid-template-columns: repeat(3, 1fr); }
}
.path-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.path-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.path-card .media {
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  position: relative;
}
.path-card .body {
  padding: var(--sp-md);
  display: flex; flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.path-card h3 { margin: 0; }
.path-card p { color: var(--text-soft); margin: 0; font-size: 0.93rem; }
.path-card .btn { margin-top: auto; }
.path-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.path-actions .btn { flex: 1 1 auto; min-width: 0; padding: 10px 14px; font-size: 0.9rem; }

/* ===== Contact ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
@media (min-width: 860px) {
  .contact-grid { grid-template-columns: 1.4fr 1fr; }
}
.contact-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--sp-lg);
  box-shadow: var(--shadow-soft);
}
.contact-form h2 { text-align: left; margin-top: 0; }
.contact-form .lead { color: var(--text-soft); margin-bottom: var(--sp-md); }
.field { margin-bottom: var(--sp-sm); }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123, 79, 46, 0.18);
}
.field textarea { resize: vertical; min-height: 130px; }
.field .error {
  display: block;
  color: #b13a3a;
  font-size: 0.78rem;
  min-height: 16px;
  margin-top: 4px;
}
.field.invalid input, .field.invalid textarea { border-color: #b13a3a; }
.form-status { margin-top: var(--sp-sm); font-weight: 700; }
.form-status.ok { color: var(--primary); }
.form-status.err { color: #b13a3a; }

.info-cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--sp-md);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: var(--sp-sm);
  align-items: flex-start;
}
.info-card .ico {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--primary-100);
  color: var(--primary);
  display: grid; place-items: center;
  font-size: 1.2rem;
}
.info-card h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.05rem; }
.info-card p { margin: 0; color: var(--text-soft); font-size: 0.92rem; }

.map {
  margin-top: var(--sp-md);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
  background: var(--bg-2);
}
.map iframe { width: 100%; height: 100%; border: 0; }

/* ===== Galleria detail (camera) ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-top: var(--sp-md);
}
.gal-item {
  border: 0; padding: 0; cursor: pointer; background: transparent;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow: var(--shadow-soft);
}
.gal-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease, filter .3s ease;
}
.gal-item:hover img { transform: scale(1.05); filter: brightness(.94); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 24, 22, 0.92);
  display: none;
  align-items: center; justify-content: center;
  z-index: 100;
  padding: var(--sp-md);
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: 95vw; max-height: 90vh;
  border-radius: var(--radius);
}
.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 0; cursor: pointer;
  font-size: 1.6rem;
}
.lb-close:hover { background: rgba(255,255,255,0.22); }

/* ===== Footer ===== */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--sp-lg) 0 var(--sp-md);
  margin-top: var(--sp-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand h3 {
  color: #fff;
  font-family: var(--font-display);
  margin-bottom: 4px;
}
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; font-size: 0.92rem; }
.footer-grid a { color: var(--footer-text); }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  margin-top: var(--sp-md);
  padding-top: var(--sp-sm);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(216, 212, 196, 0.8);
}
.footer-bottom a { color: rgba(216, 212, 196, 0.9); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Responsive nav ===== */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
  }
  .primary-nav.open {
    display: block;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--outline-soft);
    box-shadow: var(--shadow-soft);
    padding: var(--sp-sm) 0;
  }
  .primary-nav.open ul {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--gutter);
    gap: 0;
  }
  .primary-nav.open li { border-bottom: 1px solid var(--outline-soft); }
  .primary-nav.open li:last-child { border-bottom: 0; }
  .primary-nav.open a {
    display: block;
    padding: 14px 4px;
  }
  .section { padding: var(--sp-lg) 0; }
  .hero { min-height: 70vh; }
  .hero.small { min-height: 38vh; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   R.A.L.P.H. — Restyling moderno (override non-distruttivi)
   Stack: CSS3 puro + custom properties. Nessuna libreria.
   Identità invariata: palette Terra, Literata + Nunito Sans, logo,
   architettura delle pagine. Solo modernizzazione di superficie.
   ============================================================ */

/* === R.A.L.P.H. — R: Rispetta l’esistente (spacing + typo) === */
:root {
  /* Easing naturale Material-like (250–350ms ideale) */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 180ms;
  --t-base: 260ms;
  --t-slow: 380ms;

  /* Ombre soft a strati (Soft UI) */
  --shadow-1: 0 1px 2px rgba(46, 50, 48, 0.04), 0 2px 6px rgba(46, 50, 48, 0.05);
  --shadow-2: 0 4px 12px rgba(46, 50, 48, 0.06), 0 10px 30px rgba(46, 50, 48, 0.08);
  --shadow-3: 0 10px 26px rgba(46, 50, 48, 0.10), 0 22px 60px rgba(46, 50, 48, 0.10);

  /* Ring focus accessibile */
  --focus-ring: 0 0 0 3px rgba(123, 79, 46, 0.32);

  /* Gradienti tenui */
  --grad-cream: linear-gradient(180deg, #fbf8f2 0%, #f6efe2 100%);
}

/* Tipografia leggermente più ariosa, senza rompere la gerarchia */
body {
  line-height: 1.7;             /* +0.05 per maggior respiro */
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { letter-spacing: -0.012em; }
h1 { font-size: clamp(2.1rem, 4.8vw, 3.25rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section { padding: clamp(56px, 7vw, 96px) 0; }   /* spazi più generosi */
.section-head { margin-bottom: clamp(28px, 4vw, 56px); }

/* === R.A.L.P.H. — L: layout + microstile moderno =========== */

/* Header con sottile vetro morbido (glassmorphism leggero) */
.site-header {
  background: linear-gradient(180deg, rgba(250, 246, 240, 0.88), rgba(250, 246, 240, 0.74));
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(217, 210, 191, 0.5);
}
.primary-nav a {
  position: relative;
  transition: color var(--t-fast) var(--ease);
}
/* Indicatore underline animato */
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease-out);
}
.primary-nav a:hover::after,
.primary-nav a.is-active::after { transform: scaleX(1); }
.primary-nav a.is-active { border-bottom-color: transparent; }  /* sostituito da ::after */

/* Buttons: ombre soft, hover lift, focus-ring accessibile */
.btn {
  transition:
    background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease),
    transform var(--t-base) var(--ease-out);
}
.btn-primary { box-shadow: var(--shadow-1); }
.btn-primary:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.btn-secondary:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }

/* Focus-visible globale (no outline removal: ring soft) */
:focus { outline: none; }
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}
.chip:focus-visible, .btn:focus-visible { box-shadow: var(--focus-ring); }

/* Card: bordo morbido + lift + image zoom */
.room-card, .path-card, .service, .testimonial, .rule, .contact-form, .info-card {
  border-radius: 16px;                /* leggero arrotondamento extra */
  box-shadow: var(--shadow-1);
  transition: transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease);
}
.room-card:hover, .path-card:hover, .service:hover, .testimonial:hover, .info-card:hover {
  box-shadow: var(--shadow-3);
}
.room-card .media img,
.path-card .media {
  transition: transform 700ms var(--ease-out), filter var(--t-slow) var(--ease);
}
.room-card:hover .media img { transform: scale(1.06); }
.path-card:hover .media { transform: scale(1.04); filter: saturate(1.05); }

/* Service icon — alone luminoso al hover */
.service .icon {
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.service:hover .icon {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(123, 79, 46, 0.28);
}

/* Hero — overlay verticale + gradient cinematic */
.hero-overlay {
  background:
    radial-gradient(120% 80% at 50% 30%, rgba(28,16,6,0.05) 0%, rgba(28,16,6,0.55) 60%, rgba(28,16,6,0.78) 100%),
    linear-gradient(180deg, rgba(28,16,6,0.15) 0%, rgba(28,16,6,0.55) 100%);
}
.hero h1 {
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}

/* Filter chips — pill morbida con micro-lift */
.chip {
  transition: background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease);
}
.chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.chip.active { box-shadow: 0 6px 16px rgba(123, 79, 46, 0.28); }

/* Form: input più ariosi + focus-ring coerente */
.field input, .field textarea {
  padding: 14px 16px;
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.field input:focus, .field textarea:focus { box-shadow: var(--focus-ring); }

/* Map iframe arrotondato + ombra coerente */
.map { box-shadow: var(--shadow-2); }

/* Footer: bordo superiore dorato — richiamo alle travi in legno chiaro */
.site-footer {
  border-top: 3px solid var(--tertiary);
}

/* Sfondi sezione alt con gradient impercettibile + texture lino alpino */
.section.alt {
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0px,
      transparent 28px,
      rgba(123, 79, 46, 0.016) 28px,
      rgba(123, 79, 46, 0.016) 29px
    ),
    var(--grad-cream);
}

/* === R.A.L.P.H. — P: microinterazioni & reveal ============ */

/* Reveal di base potenziato (più morbido + lieve scale) */
.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition:
    opacity 600ms var(--ease-out),
    transform 700ms var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }

/* Stagger automatico per figli reveal (gestito anche via JS data-delay) */
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.reveal[data-delay="4"] { transition-delay: 320ms; }

/* Image skeleton: placeholder a barre che pulsa fino a load */
img.lazy-img {
  background:
    linear-gradient(110deg, var(--bg-2) 8%, #efe6d2 18%, var(--bg-2) 33%);
  background-size: 200% 100%;
  animation: skeleton 1.6s linear infinite;
}
img.lazy-img.is-loaded { animation: none; background: transparent; }
@keyframes skeleton {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fade-in pagina (load) */
@keyframes ralph-page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
main, .site-header { animation: ralph-page-in 400ms var(--ease-out) both; }

/* Hero parallax — gestito anche da JS con --hero-y custom prop */
.hero-bg {
  will-change: transform;
  transform: translateY(var(--hero-y, 0px)) scale(1.06);
  transition: transform 100ms linear;
}

/* === R.A.L.P.H. — H: harmonize + a11y ====================== */

/* Scrollbar sottile coerente con la palette (browser supportati) */
* { scrollbar-width: thin; scrollbar-color: var(--primary) var(--bg-2); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 8px; border: 2px solid var(--bg); }
*::-webkit-scrollbar-track { background: var(--bg-2); }

/* Riduci movimento per chi lo richiede */
@media (prefers-reduced-motion: reduce) {
  .hero-bg { transform: none !important; }
  .room-card:hover, .path-card:hover, .service:hover, .testimonial:hover, .info-card:hover,
  .btn:hover, .chip:hover { transform: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Print-friendly: nasconde hover/animazioni e ottimizza colori */
@media print {
  .site-header, .site-footer, .hero, .filter-chips, .lightbox { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
}

/* ============================================================
   === RESTYLING MODERNO v2 — Rifiniture ===
   Tipografia con font-features OpenType + brand accent animato.
   ============================================================ */

/* Tipografia con feature OpenType — kerning e cifre tabular */
html { font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1; }
.price, .field input[type="number"] { font-variant-numeric: tabular-nums; }

/* Brand: pallino verde pulsante accanto al nome — usa primary */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(123, 79, 46, 0.55);
  animation: brand-pulse 2.4s var(--ease-out) infinite;
}
@keyframes brand-pulse {
  0%   { box-shadow: 0 0 0 0   rgba(123, 79, 46, 0.55); }
  70%  { box-shadow: 0 0 0 10px rgba(123, 79, 46, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(123, 79, 46, 0);   }
}
@media (prefers-reduced-motion: reduce) {
  .brand::before { animation: none; }
}

