/* ==========================================================================
   Hotel Kapriol — main.css
   Design system: design-system/MASTER.md ("Legno vecchio, cuore caldo")
   ========================================================================== */

/* Font ospitati in locale (privacy-friendly: nessuna richiesta a Google Fonts).
   Fraunces e Karla sono variable font (i file coprono l'intero range di pesi). */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin.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: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/karla-latin.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: 'Karla';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/karla-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --cream: #FAF6EE;
  --linen: #F2ECDF;
  --ink: #2E2418;
  --ink-soft: #6B5D4A;
  --pine: #3A5743;
  --pine-deep: #2A4033;
  --honey: #C4913F;
  --honey-deep: #8A652B; /* per testo piccolo su fondi chiari (contrasto ≥4.5:1) */
  --bark: #221B12;
  --border: #E5DCC9;
  --danger: #B3402A;
  --on-dark: #F5EFE3;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', 'Segoe UI', sans-serif;

  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --dur: 600ms;
  --dur-fast: 250ms;

  --container: 1200px;
  --radius: 6px;
  --shadow-soft: 0 18px 50px -22px rgba(46, 36, 24, .28);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
/* <picture> non deve alterare il layout: l'<img> è trattato come figlio diretto */
picture { display: contents; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(30px, 4vw, 48px); }
h3 { font-size: clamp(22px, 2.6vw, 28px); }

p { margin: 0 0 1em; }

a { color: var(--pine); }

button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 2px;
}

::selection { background: var(--honey); color: var(--bark); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pine);
  color: #fff;
  padding: 10px 18px;
  z-index: 2000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* Paper grain overlay on light sections */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.section { padding-block: clamp(64px, 9vw, 120px); }
.section--linen { background: var(--linen); }
.section--dark { background: var(--bark); color: var(--on-dark); }
.section--pine { background: var(--pine-deep); color: var(--on-dark); }
.section--dark h2, .section--pine h2,
.section--dark h3, .section--pine h3 { color: var(--on-dark); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--honey-deep);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--honey);
}
/* Su fondi scuri l'eyebrow torna chiaro (contrasto su --bark/--pine-deep) */
.section--dark .eyebrow, .section--pine .eyebrow { color: #E4C689; }
.section--dark .eyebrow::before, .section--pine .eyebrow::before { background: #E4C689; }

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  color: var(--ink-soft);
  max-width: 62ch;
}
.section--dark .lead, .section--pine .lead { color: #CDBFA6; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 30px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--pine); color: #fff; }
.btn--primary:hover { background: var(--pine-deep); }

.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }

.btn--light { border-color: var(--on-dark); color: var(--on-dark); background: transparent; }
.btn--light:hover { background: var(--on-dark); color: var(--bark); }

/* Animated underline links */
.link-line {
  position: relative;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}
.link-line::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease-out);
}
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  transition: background-color 350ms var(--ease-out), box-shadow 350ms var(--ease-out);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 12px;
}
/* Nota: niente backdrop-filter qui — creerebbe un containing block
   che intrappola il pannello nav mobile (position: fixed). */
.site-header.is-solid {
  background: rgba(250, 246, 238, .97);
  box-shadow: 0 1px 0 var(--border), 0 12px 30px -22px rgba(46,36,24,.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand__icon { width: 40px; height: 40px; color: var(--honey); flex: none; }
.brand__img { height: 60px; width: auto; display: block; }
.brand__mark { height: 50px; width: auto; display: block; flex: none; }
.brand__name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.05;
}
.brand__tag {
  display: block;
  margin-top: 5px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Header over hero (transparent) */
.site-header.on-hero:not(.is-solid) .brand,
.site-header.on-hero:not(.is-solid) .nav a:not(.btn),
.site-header.on-hero:not(.is-solid) .lang-switch,
.site-header.on-hero:not(.is-solid) .lang-switch button {
  color: var(--on-dark);
}
.site-header.on-hero:not(.is-solid) .brand__tag { color: rgba(245,239,227,.75); }
.site-header.on-hero:not(.is-solid) .nav-toggle span { background: var(--on-dark); }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); }
.nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 15.5px;
  padding: 6px 2px;
  white-space: nowrap;
}
.nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--honey);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur-fast) var(--ease-out);
}
.nav a:not(.btn):hover::after,
.nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); transform-origin: left; }
.nav a[aria-current="page"] { font-weight: 700; }

.nav .btn { min-height: 44px; padding: 10px 20px; font-size: 13px; }

/* Language switch */
.lang-switch {
  display: flex;
  gap: 2px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius);
  padding: 2px;
  color: var(--ink);
}
.lang-switch button {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .06em;
  padding: 6px 9px;
  min-height: 32px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color var(--dur-fast), color var(--dur-fast);
}
.lang-switch button.is-active { background: var(--honey); color: var(--bark); }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  color: var(--on-dark);
  isolation: isolate;
  overflow: hidden;
}
.hero--short { min-height: 72dvh; }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  will-change: transform;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(34,27,18,.42) 0%, rgba(34,27,18,.06) 34%, rgba(34,27,18,.62) 100%);
}

.hero__content {
  width: 100%;
  padding-block: clamp(56px, 9vh, 110px);
}
.hero__content .eyebrow { color: #E4C689; }
.hero__content .eyebrow::before { background: #E4C689; }
.hero h1 { color: #fff; max-width: 14ch; text-wrap: balance; }
.hero__sub {
  font-size: clamp(17px, 1.7vw, 21px);
  max-width: 52ch;
  color: rgba(245,239,227,.92);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* Hero load animation */
.hero [data-hero-seq] {
  opacity: 0;
  transform: translateY(26px);
  animation: heroUp 850ms var(--ease-out) forwards;
}
.hero [data-hero-seq="1"] { animation-delay: 80ms; }
.hero [data-hero-seq="2"] { animation-delay: 200ms; }
.hero [data-hero-seq="3"] { animation-delay: 340ms; }
.hero [data-hero-seq="4"] { animation-delay: 480ms; }
@keyframes heroUp {
  to { opacity: 1; transform: none; }
}

.hero__scroll {
  position: absolute;
  bottom: 26px;
  right: clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245,239,227,.85);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll::after {
  content: "";
  width: 1.5px;
  height: 44px;
  background: currentColor;
  animation: scrollPulse 1.8s var(--ease-out) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---------- Mountain divider ---------- */
.divider {
  display: block;
  width: 100%;
  height: 46px;
  color: var(--border);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px -24px rgba(46,36,24,.35);
}
.card__media {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--linen);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur) var(--ease-out);
}
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 26px 26px 30px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__body h3 { margin-bottom: 2px; }
.card__body p { color: var(--ink-soft); font-size: 16px; margin: 0; }
.card__foot { margin-top: auto; padding-top: 16px; }

/* Editorial split (image + text) */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.split--flip .split__media { order: 2; }
.split__media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.5px solid rgba(250,246,238,.55);
  border-radius: 3px;
  pointer-events: none;
}

/* ---------- Photo placeholder (Alpen Suite) ---------- */
.ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(196,145,63,.06) 14px 28px),
    var(--linen);
  border: 1.5px dashed var(--honey);
  color: var(--ink-soft);
  text-align: center;
  padding: 20px;
  width: 100%;
  height: 100%;
  min-height: 240px;
}
.ph svg { width: 34px; height: 34px; color: var(--honey); }
.ph strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--ink);
}
.ph span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Stats band (60 anni) ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 600;
  color: var(--honey);
  line-height: 1;
}
.stat__label {
  margin-top: 8px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: inherit;
  opacity: .85;
}

/* ---------- Season split panels (home) ---------- */
.seasons {
  display: flex;
  min-height: 560px;
  gap: 0;
}
.season {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  color: var(--on-dark);
  text-decoration: none;
  isolation: isolate;
  transition: flex 700ms var(--ease-out);
}
.seasons:hover .season { flex: .85; }
.seasons .season:hover { flex: 1.6; }
.season__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.season__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
}
.season:hover .season__bg img { transform: scale(1.06); }
.season::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(34,27,18,.05) 40%, rgba(34,27,18,.72) 100%);
  transition: background-color 400ms;
}
.season__body { padding: clamp(26px, 4vw, 48px); }
.season__body .eyebrow { color: #E4C689; margin-bottom: 10px; }
.season__body .eyebrow::before { background: #E4C689; }
.season__body h3 {
  font-size: clamp(30px, 3.4vw, 44px);
  color: #fff;
  margin-bottom: 8px;
}
.season__body p {
  max-width: 44ch;
  color: rgba(245,239,227,.9);
  margin-bottom: 14px;
  font-size: 16px;
}
.season__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #E4C689;
}
.season__cta svg { transition: transform var(--dur-fast) var(--ease-out); }
.season:hover .season__cta svg { transform: translateX(6px); }

/* ---------- Menu list (cucina) ---------- */
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding-block: 16px;
  border-bottom: 1px solid var(--border);
}
.section--dark .menu-list li,
.section--pine .menu-list li { border-color: rgba(245,239,227,.18); }
.menu-list .name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}
.menu-list .dots {
  flex: 1;
  border-bottom: 2px dotted var(--border);
  transform: translateY(-4px);
}
.section--dark .menu-list .dots,
.section--pine .menu-list .dots { border-color: rgba(245,239,227,.25); }
.menu-list .note { color: var(--ink-soft); font-size: 15px; white-space: nowrap; }
.section--dark .menu-list .note,
.section--pine .menu-list .note { color: #CDBFA6; }

/* ---------- Timeline (chi siamo) ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 6px; bottom: 6px;
  width: 1.5px;
  background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 34px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -30px; top: 7px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--honey);
  border: 2px solid var(--cream);
}
.timeline__year {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--honey);
}

/* ---------- Forms ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
}
/* Honeypot antispam: nascosto a occhi e screen reader, i bot lo compilano */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.form-field { display: flex; flex-direction: column; gap: 7px; }
.form-field--full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 14.5px; }
.form-field .req { color: var(--danger); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-height: 50px;
  transition: border-color var(--dur-fast);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgba(58,87,67,.15);
}
.form-field .hint { font-size: 13.5px; color: var(--ink-soft); }
.form-field .error {
  display: none;
  font-size: 13.5px;
  color: var(--danger);
  font-weight: 700;
}
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: var(--danger); }
.form-field.has-error .error { display: block; }

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 700;
}
.form-status.is-ok { display: block; background: #E4EFE6; color: var(--pine-deep); border: 1.5px solid var(--pine); }
.form-status.is-err { display: block; background: #F7E6E1; color: var(--danger); border: 1.5px solid var(--danger); }

/* ---------- Contact info ---------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list svg { width: 22px; height: 22px; color: var(--honey); flex: none; margin-top: 3px; }
.info-list a { color: inherit; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band .btn { margin-top: 26px; }
/* Eyebrow centrata con trattino su entrambi i lati */
.cta-band .eyebrow::after {
  content: "";
  width: 28px;
  height: 1.5px;
  background: var(--honey-deep);
}
.section--dark .cta-band .eyebrow::after,
.section--pine .cta-band .eyebrow::after { background: #E4C689; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bark);
  color: #CDBFA6;
  padding-block: 64px 32px;
  font-size: 15px;
}
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.7fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(245,239,227,.15);
}
.footer-grid h4 {
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legal-list { font-size: 13.5px; line-height: 1.5; color: #B7A98F; }
.legal-list li { word-break: break-word; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 26px;
  font-size: 13.5px;
}
.footer-legal-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; }
.footer-legal-links a { color: var(--on-dark); text-decoration: none; }
.footer-legal-links a:hover { text-decoration: underline; }
.cookie-prefs {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: var(--on-dark);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  text-decoration: none;
}
.cookie-prefs:hover { text-decoration: underline; }

/* ---------- Legal pages (privacy / cookie) ---------- */
.legal-page { padding-top: 132px; }
.legal-prose { max-width: 760px; }
.legal-prose h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-top: 1.8em;
  margin-bottom: .5em;
}
.legal-prose h2:first-of-type { margin-top: 1em; }
.legal-prose h3 { font-size: 20px; margin-top: 1.4em; margin-bottom: .4em; }
.legal-prose p, .legal-prose li { color: var(--ink-soft); }
.legal-prose ul { padding-left: 20px; display: grid; gap: 8px; margin: 0 0 1em; }
.legal-prose a { color: var(--pine); }
.legal-prose .updated {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--honey-deep);
  margin-bottom: 8px;
}
.legal-prose .todo {
  background: repeating-linear-gradient(45deg, transparent 0 12px, rgba(196,145,63,.08) 12px 24px), var(--linen);
  border: 1.5px dashed var(--honey);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--ink);
  font-size: 14.5px;
  margin: 0 0 1.2em;
}
.legal-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: 14.5px; }
@media (max-width: 640px) {
  /* su mobile la tabella scorre al suo interno invece di sbordare dalla pagina */
  .legal-prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.legal-prose th, .legal-prose td { text-align: left; padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal-prose th { background: var(--linen); color: var(--ink); font-weight: 700; }
.legal-prose td { color: var(--ink-soft); }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: clamp(14px, 3vw, 26px);
  transform: translateX(-50%) translateY(24px);
  z-index: 1000;
  width: min(760px, calc(100% - 28px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
  padding: 20px 24px;
  background: var(--bark);
  color: var(--on-dark);
  border: 1px solid rgba(245,239,227,.2);
  border-radius: 12px;
  box-shadow: 0 26px 60px -24px rgba(0,0,0,.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out), visibility 0s 350ms;
}
.cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  transition: opacity 350ms var(--ease-out), transform 350ms var(--ease-out);
}
.cookie-banner__text { flex: 1 1 320px; margin: 0; font-size: 14px; line-height: 1.55; color: #D9CEB8; }
.cookie-banner__text a { color: var(--on-dark); }
.cookie-banner__actions { flex: none; display: flex; gap: 10px; }
.cookie-banner .btn { min-height: 44px; padding: 11px 22px; font-size: 13px; }
@media (max-width: 520px) {
  .cookie-banner__actions { width: 100%; }
  .cookie-banner__actions .btn { width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .seasons { min-height: 480px; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    flex-direction: column;
    justify-content: center;
    gap: clamp(14px, 3vh, 26px);
    background: var(--bark);
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 350ms var(--ease-out), visibility 0s 350ms;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 350ms var(--ease-out);
  }
  .nav a:not(.btn) { color: var(--on-dark) !important; font-size: 24px; font-family: var(--font-display); }
  .nav .lang-switch { color: var(--on-dark); }
  .nav .lang-switch button { padding: 10px 16px; min-height: 44px; font-size: 14px; }
  .nav .btn { min-height: 52px; font-size: 15px; }
  .nav-toggle { display: flex; position: relative; z-index: 110; }
  .split, .split--flip { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

@media (max-width: 768px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .seasons { flex-direction: column; min-height: 0; }
  .season { min-height: 380px; flex: none !important; }
  .stats { grid-template-columns: 1fr; gap: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero__scroll { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero [data-hero-seq] { opacity: 1; transform: none; animation: none; }
  .hero__media img { transform: none !important; }
}


/* ---------- Galleria immagini (autoplay + frecce su hover) ----------
   PREDEFINITO: niente pallini indicatori sotto le foto, solo le frecce che
   compaiono al passaggio del mouse. Per una nuova galleria basta quindi non
   mettere il <div class="gallery__dots" data-gallery-dots></div>.
   Gli stili dei pallini restano qui sotto perché il JS li supporta ancora:
   sono diventati facoltativi, non più il comportamento di default. */
.gallery { position: relative; width: 100%; height: 100%; aspect-ratio: 4 / 3; overflow: hidden; }
.gallery__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 700ms var(--ease-out); }
.gallery__slide.is-active { opacity: 1; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: rgba(34,27,18,.55); color: #fff; border: 0; border-radius: 50%;
  cursor: pointer; opacity: 0; z-index: 3;
  transition: opacity 250ms ease, background-color 250ms ease;
}
.gallery__nav:hover { background: rgba(34,27,18,.82); }
.gallery__nav:focus-visible { opacity: 1; outline: 3px solid var(--honey); outline-offset: 2px; }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__nav svg { width: 21px; height: 21px; }
.gallery:hover .gallery__nav { opacity: 1; }
.gallery__dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 3; }
.gallery__dots button {
  width: 21px; height: 21px; padding: 0;
  border: 6.5px solid transparent; border-radius: 50%;
  background: rgba(255,255,255,.55); background-clip: padding-box;
  cursor: pointer;
  transition: background-color 250ms ease, transform 250ms ease;
}
.gallery__dots button:hover { background: rgba(255,255,255,.85); }
.gallery__dots button.is-active { background: #fff; transform: scale(1.3); }
@media (hover: none) { .gallery__nav { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gallery__slide { transition: none; } }
