/* ============ Tamellini — Azienda Agricola ============ */

@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/playfair-display-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/playfair-display-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/playfair-display-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('../assets/fonts/playfair-display-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Abril Fatface'; src: url('../assets/fonts/abril-fatface-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mulish'; src: url('../assets/fonts/mulish-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mulish'; src: url('../assets/fonts/mulish-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mulish'; src: url('../assets/fonts/mulish-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Mulish'; src: url('../assets/fonts/mulish-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --cream: #f6f3e2;
  --cream-2: #f7f4df;
  --beige: #d9d6c4;
  --peach: #fbe5d5;
  --taupe: #57504b;
  --taupe-2: #6b625c;
  --dark: #3f3a36;
  --ink: #4a4a4a;
  --muted: #8b8b8b;
  --olive: #85855c;
  --terra: #b06a3b;
  --sidebar-bg: #fbfbfa;
  --sidebar-w: 320px;
  --serif: 'Playfair Display', Georgia, serif;
  --display: 'Abril Fatface', 'Playfair Display', Georgia, serif;
  --sans: 'Mulish', 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Sidebar (desktop) ---------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  padding: 2.2rem 2.4rem;
  z-index: 100;
  overflow-y: auto;
}
.brand { display: block; text-align: center; margin-bottom: 2.8rem; }
.brand img { width: 150px; margin: 0 auto 0.4rem; }
.brand .brand-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  letter-spacing: 0.18em;
  color: var(--terra);
  text-transform: uppercase;
}
.nav { display: flex; flex-direction: column; gap: 1.25rem; }
.nav a {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7a7a7a;
  transition: color 0.25s;
}
.nav a:hover { color: var(--dark); }
.nav a.active { color: var(--dark); font-weight: 500; }
.sidebar-bottom { margin-top: auto; padding-top: 3rem; }
.lang { font-size: 0.8rem; letter-spacing: 0.1em; color: #7a7a7a; margin-bottom: 1.6rem; }
.lang a { color: inherit; transition: color 0.2s; }
.lang a:hover { color: var(--dark); }
.lang a.on,
.lang .on { color: var(--dark); font-weight: 500; pointer-events: none; }
/* Home hero language switch */
.hero-lang {
  position: absolute;
  top: 1.35rem;
  left: 1.35rem;
  z-index: 3;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}
.hero-lang a { color: rgba(255, 255, 255, 0.72); }
.hero-lang a:hover { color: #fff; }
.hero-lang a.on { color: #fff; font-weight: 500; }
.address { font-size: 0.78rem; color: #9a9a9a; line-height: 1.6; }

/* ---------- Mobile header ---------- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(251, 251, 250, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #eee;
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.1rem;
}
.mobile-header .m-brand { display: flex; align-items: center; gap: 0.6rem; }
.mobile-header .m-brand img { width: 42px; }
.mobile-header .m-brand span {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  color: var(--terra);
  text-transform: uppercase;
}
.burger {
  width: 44px; height: 44px;
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px;
}
.burger span { display: block; width: 24px; height: 2px; background: var(--dark); transition: 0.3s; }
body.menu-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  background: var(--sidebar-bg);
  z-index: 190;
  padding: 2.5rem 1.5rem;
  flex-direction: column;
  gap: 1.6rem;
  text-align: center;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
}
body.menu-open .mobile-menu { opacity: 1; transform: none; pointer-events: auto; }
.mobile-menu a {
  font-size: 0.95rem; letter-spacing: 0.16em; text-transform: uppercase; color: #6a6a6a;
}
.mobile-menu a.active { color: var(--dark); font-weight: 500; }
.mobile-menu .lang {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
}
.mobile-menu .lang a {
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: uppercase;
  color: #6a6a6a;
}
.mobile-menu .lang a.on {
  color: var(--dark);
  font-weight: 500;
}
.mobile-menu .address { margin-top: auto; }
/* Scroll lock while the menu overlay is open (JS saves/restores the offset) */
body.menu-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

/* ---------- Main column ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; }

/* ---------- Quote banner ---------- */
.quote-banner {
  background: var(--taupe);
  color: #fff;
  text-align: center;
  padding: 3.2rem 2rem 2.6rem;
}
.quote-banner .q {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.4;
  max-width: 34em;
  margin: 0 auto;
}
.quote-banner .who {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  margin-top: 1.4rem;
  opacity: 0.95;
}

/* ---------- Story blocks (final hybrid tiles) ----------
   Full-bleed equal tiles: 50/50, min-square photos; text fills tile.
   If copy needs more height the row grows and the photo extends vertically. */
.hyb-split {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  margin: 0;
}
.hyb-split .txt {
  container-type: inline-size;
  container-name: hyb-txt;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  text-align: left;
  box-sizing: border-box;
  padding: 0;
}
.hyb-split .txt-in {
  padding: clamp(1.5rem, 8cqw, 2.75rem);
  width: 100%;
  box-sizing: border-box;
}
.hyb-split .txt.on-beige { background: var(--beige); }
.hyb-split .txt h2 {
  font-family: var(--display);
  font-weight: 400;
  /* Proto-style: scales with the tile, caps on large screens */
  font-size: clamp(19px, calc(9px + 3cqw), 27px);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #83837f;
  margin-bottom: 3cqw;
  line-height: 1.3;
  max-width: none;
}
.hyb-split .txt p {
  margin-bottom: 0.9em;
  line-height: 1.55;
  font-size: clamp(15px, calc(6px + 2.5cqw), 21px);
  max-width: none;
}
.hyb-split .txt p:last-child { margin-bottom: 0; }
.hyb-split .pic {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  width: 100%;
}
.hyb-split .pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hyb-split .pic.bw img { filter: grayscale(1); }

/* Desktop: 50/50 tiles.
   - Default: row is at least square (each side 1:1), text fills/centered in tile.
   - If copy needs more height: row grows, photo loses square and extends
     vertically (cover) — no paragraph scrolling. */
@media (min-width: 901px) {
  .hyb-split {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .hyb-split .txt {
    overflow: visible;
    height: auto;
    min-height: 100%;
    justify-content: center;
  }
  .hyb-split .txt-in {
    padding: 8cqw;
  }
  /* Min square via width; grows taller with the row when text is long */
  .hyb-split .pic {
    aspect-ratio: auto;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
  }
  .hyb-split .pic::before {
    content: '';
    display: block;
    padding-bottom: 100%; /* establishes min height = column width (square) */
  }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--taupe);
  color: #fff;
  text-align: center;
  padding: 2.6rem 1.5rem;
  font-family: var(--serif);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}
.footer a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Legal / privacy ---------- */
.legal-page {
  max-width: 46rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  color: #4f4f4a;
}
.legal-page h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 0.5rem;
}
.legal-page .legal-updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 2.2rem;
}
.legal-page h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--dark);
  margin: 1.8rem 0 0.7rem;
}
.legal-page p { margin-bottom: 0.9rem; line-height: 1.7; }
.legal-page ul {
  margin: 0 0 1rem 1.2rem;
  line-height: 1.7;
}
.legal-page li { margin-bottom: 0.4rem; }
.legal-page a {
  color: var(--terra);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 4rem) 1.5rem;
}
.notfound .nf-logo { width: clamp(120px, 18vw, 170px); margin-bottom: 1.6rem; }
.notfound .nf-code {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 1;
  color: var(--beige);
  letter-spacing: 0.04em;
}
.notfound h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
  margin: 0.6rem 0 1rem;
}
.notfound .nf-text { color: #6d6d64; max-width: 34em; }
.notfound .nf-alt { font-style: italic; color: #8b8b80; margin-top: 0.35rem; }
.nf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 1rem;
  margin-top: 2.2rem;
}
.nf-cta {
  display: inline-block;
  background: var(--taupe);
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.8rem 2.1rem;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s;
}
.nf-cta:hover { background: var(--dark); }
.nf-cta.ghost { background: transparent; color: var(--taupe); border: 1px solid rgba(87, 80, 75, 0.35); }
.nf-cta.ghost:hover { background: var(--taupe); color: #fff; border-color: var(--taupe); }
.nf-lang-link {
  margin-top: 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nf-lang-link a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.nf-lang-link a:hover { color: var(--dark); }

/* ---------- Home / hero (cinematic + one path) ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.hero video, .hero .hero-fallback {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(20, 25, 15, 0.35) 0%,
    rgba(20, 25, 15, 0.22) 45%,
    rgba(20, 25, 15, 0.45) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: #fff;
  padding: 1rem 1.25rem 5rem;
  display: flex; flex-direction: column; align-items: center;
}
.hero-content img.hero-logo {
  width: clamp(200px, 28vw, 320px);
  margin: 0 auto 0.5rem;
  filter: brightness(0) invert(1);
}
.hero-content .hero-name {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
}
.hero-tagline {
  margin-top: 0.85rem;
  font-size: clamp(0.72rem, 1.15vw, 0.88rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.88;
  text-shadow: 0 1px 12px rgba(0,0,0,0.35);
}
.hero-cta {
  display: inline-block;
  margin-top: 1.6rem;
  background: rgba(246, 243, 226, 0.94);
  color: #5a5a48;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.85rem 2.4rem;
  border-radius: 999px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
  box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}
.hero-cta:hover {
  background: var(--taupe);
  color: #fff;
  transform: translateY(-2px);
}
.hero-nav {
  position: absolute; bottom: 2rem; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9rem 2rem;
  padding: 0 1.5rem;
}
.hero-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
  text-shadow: 0 1px 10px rgba(0,0,0,0.4);
}
.hero-nav a:hover { color: #fff; border-color: rgba(255,255,255,0.7); }

/* Mute / unmute — browsers require muted for autoplay; user can enable sound */
.hero-mute {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(20, 25, 15, 0.35);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background 0.25s, border-color 0.25s;
}
.hero-mute:hover {
  background: rgba(20, 25, 15, 0.55);
  border-color: rgba(255, 255, 255, 0.75);
}
.hero-mute .icon-unmuted { display: none; }
.hero-mute:not(.is-muted) .icon-muted { display: none; }
.hero-mute:not(.is-muted) .icon-unmuted { display: block; }

/* ---------- Wines index ---------- */
.vini-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: url('../assets/img/vini-bg.webp') center/cover no-repeat;
  display: flex; align-items: center;
}
.vini-hero::before { content: ''; position: absolute; inset: 0; background: rgba(203, 208, 186, 0.55); backdrop-filter: blur(2px); }
.vini-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  width: 100%;
  padding: clamp(2rem, 5vw, 4.5rem);
}
.vino-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  outline: none;
}
/* Kill blue mobile focus box; keep a soft ring only for keyboard focus */
.vino-card:focus { outline: none; }
.vino-card:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.55);
  outline-offset: 8px;
}
.vino-card img { -webkit-tap-highlight-color: transparent; }
.vino-card .b {
  height: clamp(300px, 46vh, 460px);
  display: flex; align-items: flex-end; justify-content: center;
  margin-bottom: 1.6rem;
}
.vino-card .b img {
  max-height: 100%;
  width: auto;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.25));
  transition: transform 0.35s;
}
.vino-card:hover .b img { transform: translateY(-8px); }
.vino-card h2 {
  font-family: var(--display);
  font-weight: 400;
  color: #fff;
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 2px 14px rgba(0,0,0,0.45);
  line-height: 1.35;
  min-height: 2.7em;
  display: flex; align-items: center;
}
.btn {
  display: inline-block;
  margin-top: 1.2rem;
  background: rgba(246, 243, 226, 0.92);
  color: #6b6b52;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 2.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  transition: background 0.3s, color 0.3s;
}
.btn:hover { background: var(--taupe); color: #fff; }

/* ---------- Wine detail ---------- */
/* Default:  photo | scheda | (awards collapsed)
   Premi:    (photo collapsed) | scheda | awards
   Desktop: slide (B) on awards body only — arrows stay fixed.
   Mobile: instant; full-height premi + footer at bottom. */
.wine-page {
  --premi-dur: 0.58s;
  --premi-ease: cubic-bezier(0.33, 0.1, 0.2, 1);
  --wine-pad: clamp(2rem, 4vw, 3.6rem);
  display: grid;
  grid-template-columns: 42% minmax(0, 1fr) 0fr;
  grid-template-rows: 1fr;
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  overflow-anchor: none;
  overflow-x: clip;
  /* Cream underlay — prevents white flash while columns reflow */
  background: var(--cream);
  transition: grid-template-columns var(--premi-dur) var(--premi-ease);
}
.wine-page.is-premi {
  grid-template-columns: 0fr minmax(0, 1fr) minmax(240px, 28%);
}
.wine-photo {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  min-height: 420px;
  min-width: 0;
  overflow: hidden;
  background: var(--cream);
}
.wine-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s var(--premi-ease), transform var(--premi-dur) var(--premi-ease);
}
.wine-page.is-premi .wine-photo {
  pointer-events: none;
  min-height: 0;
}
.wine-page.is-premi .wine-photo img {
  opacity: 0;
  transform: translateX(-10%) scale(1.03);
}
.wine-sheet {
  grid-column: 2;
  grid-row: 1;
  background: var(--cream);
  padding: var(--wine-pad);
  padding-bottom: calc(var(--wine-pad) + 3rem);
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
/* Awards panel stays put (solid cream). Only .wine-awards-body slides.
   When collapsed, awards must NOT affect row height (long award lists
   like Soave DOC were stretching the page and hiding the back arrow). */
.wine-awards {
  grid-column: 3;
  grid-row: 1;
  background: var(--cream);
  padding: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear var(--premi-dur);
}
.wine-page:not(.is-premi) .wine-awards {
  /* Collapse out of layout height while closed */
  max-height: 0;
  align-self: start;
}
.wine-page.is-premi .wine-awards {
  visibility: visible;
  pointer-events: auto;
  max-height: none;
  align-self: stretch;
  min-height: 100%;
  transition: visibility 0s linear 0s;
}
.wine-awards-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: var(--wine-pad);
  padding-bottom: calc(var(--wine-pad) + 3rem);
  transform: translateX(22%);
  transition: transform var(--premi-dur) var(--premi-ease);
}
.wine-page.is-premi .wine-awards-body {
  transform: translateX(0);
}
/* When collapsed, don't let awards content force a min track size */
.wine-page:not(.is-premi) .wine-awards-body {
  min-width: 0;
}

.wine-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: nowrap;
}
.wine-head h1 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--olive);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.wine-head .btn {
  flex-shrink: 0;
  margin-top: 0.15em;
}
.wine-sheet dl div { margin-bottom: 1.05rem; }
.wine-sheet dt { display: inline; font-weight: 500; color: #55554d; }
.wine-sheet dt::after { content: ' '; }
.wine-sheet dd { display: inline; color: #6d6d64; }
.wine-sheet .block dt { display: block; }
.wine-sheet .block dd { display: block; }

/* Fixed bottom-right of .wine-page — not inside the sliding body */
.back-arrow {
  display: inline-block;
  position: absolute;
  right: var(--wine-pad);
  bottom: var(--wine-pad);
  z-index: 12;
  margin: 0;
  padding: 0;
  font-size: 1.9rem;
  color: var(--olive);
  line-height: 1;
  transition: color 0.2s;
}
.back-arrow:hover {
  transform: none;
  color: var(--taupe);
}
.wine-page.is-premi .wine-sheet [data-show-premi],
.wine-page.is-premi .wine-sheet > .back-arrow {
  visibility: hidden;
  pointer-events: none;
}
.wine-page:not(.is-premi) .wine-awards > .back-arrow {
  visibility: hidden;
  pointer-events: none;
}

.wine-awards h2 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--olive);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
  line-height: 1.3;
}
.wine-awards .critic { font-weight: 500; color: #55554d; margin-top: 1.1rem; }
.wine-awards .score { color: #6d6d64; margin-top: 0.25rem; }
.wine-awards .score b { font-weight: 500; color: #55554d; }

@media (prefers-reduced-motion: reduce) {
  .wine-page,
  .wine-page .wine-photo img,
  .wine-page .wine-awards-body {
    transition: none !important;
  }
  .wine-page.is-premi .wine-photo img,
  .wine-page .wine-awards-body,
  .wine-page.is-premi .wine-awards-body {
    transform: none;
  }
}

[hidden] { display: none !important; }

/* ---------- Contatti ---------- */
.contact-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: url('../assets/img/contatti-bg.webp') center/cover no-repeat;
  display: flex; align-items: center; justify-content: flex-end;
  padding: clamp(1.2rem, 4vw, 5rem);
}
.contact-card {
  position: relative; z-index: 2;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: clamp(1.6rem, 3vw, 2.8rem);
  width: min(480px, 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.contact-card h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4c4c46;
  margin-bottom: 1.1rem;
}
.contact-card p { font-size: 0.92rem; margin-bottom: 1.4rem; color: #4f4f4a; }
.contact-details {
  font-size: 0.88rem;
  color: #4f4f4a;
  line-height: 1.7;
  margin: -0.4rem 0 1.5rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid rgba(79, 79, 74, 0.15);
}
.contact-details a {
  color: var(--dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.contact-details a:hover { color: var(--terra); }
.contact-card input[type='text'],
.contact-card input[type='email'],
.contact-card textarea {
  width: 100%;
  border: 1px solid #d8d8d2;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 0.85rem 1.3rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  margin-bottom: 0.9rem;
  outline: none;
}
.contact-card textarea {
  border-radius: 1.25rem;
  min-height: 7.5rem;
  resize: vertical;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.contact-card input:focus,
.contact-card textarea:focus { border-color: var(--taupe-2); }
/* Real labels above each pill — placeholders alone disappear on typing and are
   not a reliable accessible name */
.contact-card .field { margin-bottom: 0.9rem; }
.contact-card .field label {
  display: block;
  margin: 0 0 0.35rem 1.3rem; /* indent matches the pill's horizontal padding */
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a6a64;
}
.contact-card .field input,
.contact-card .field textarea { margin-bottom: 0; }
.privacy-row { font-size: 0.8rem; color: #6a6a64; margin: 0.2rem 0 1.2rem; line-height: 1.5; }
.privacy-row a { text-decoration: underline; text-underline-offset: 2px; color: #4f4f4a; }
.form-note { font-size: 0.8rem; color: #7c7c74; margin-top: 0.9rem; min-height: 1.2em; }
.contact-card .btn:disabled { opacity: 0.6; cursor: wait; }
/* Honeypot: off-screen, not display:none (some bots skip those) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.contact-card { position: relative; }

/* ---------- Gallery ---------- */
.gallery-page {
  background: #575150;
  min-height: 100vh;
  padding: clamp(1.5rem, 4vw, 4rem);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gallery-main {
  width: min(880px, 100%);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: 1.6rem;
  position: relative;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.35); color: #fff; border: none; cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 0.55rem 0.8rem; border-radius: 4px;
  transition: background 0.3s;
}
.gallery-nav:hover { background: rgba(0,0,0,0.6); }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
  width: min(880px, 100%);
}
.gallery-thumbs img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: pointer;
  opacity: 0.75; transition: opacity 0.25s, outline 0.25s; outline: 2px solid transparent;
}
.gallery-thumbs img:hover { opacity: 1; }
.gallery-thumbs img.sel { opacity: 1; outline-color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  :root { --sidebar-w: 260px; }
  .sidebar { padding: 1.8rem 1.6rem; }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-top: 64px; }
  .mobile-header { display: flex; }
  .mobile-menu { display: flex; }
  .hero { height: calc(100svh); }
  .hyb-split,
  .hyb-split.reverse { grid-template-columns: 1fr; }
  /* Always text → photo on mobile so sections never meet as photo+photo or text+text */
  .hyb-split .txt { order: -1; }
  .hyb-split .pic { order: 1; }
  .vini-grid { grid-template-columns: 1fr; gap: 3.5rem; padding-top: 3rem; padding-bottom: 3rem; }
  .vino-card .b { height: 320px; }
  .vino-card h2 { min-height: 0; }
  /* Mobile: no premi transition */
  .wine-page,
  .wine-page.is-premi {
    grid-template-columns: 1fr;
    min-height: 0;
    transition: none;
  }
  .wine-photo {
    grid-column: 1;
    grid-row: auto;
    height: 380px;
    min-height: 0;
  }
  .wine-photo img {
    transition: none;
    transform: none !important;
    opacity: 1 !important;
  }
  .wine-sheet {
    grid-column: 1;
    grid-row: auto;
    padding-bottom: var(--wine-pad);
  }
  .wine-page.is-premi .wine-photo,
  .wine-page.is-premi .wine-sheet {
    display: none;
  }
  .wine-awards {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    transition: none !important;
    visibility: hidden;
    pointer-events: none;
    display: none;
  }
  .wine-awards-body {
    transform: none !important;
    transition: none !important;
    padding: clamp(1.6rem, 5vw, 2.4rem);
    padding-bottom: clamp(1.6rem, 5vw, 2.4rem);
    width: auto;
  }
  .wine-page:not(.is-premi) .wine-awards {
    max-height: none;
    align-self: auto;
  }
  .wine-page.is-premi .wine-awards {
    display: flex;
    flex: 1 1 auto;
    visibility: visible;
    pointer-events: auto;
    max-height: none;
    min-height: 0;
  }
  /* Full-screen premi: cream fills viewport, footer pinned to bottom */
  .main:has(.wine-page.is-premi) {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    box-sizing: border-box;
    background: var(--cream);
  }
  .wine-page.is-premi {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  /* Arrow bottom-right (in flow, not fixed overlay) */
  .wine-sheet > .back-arrow,
  .wine-awards > .back-arrow {
    position: static;
    right: auto;
    bottom: auto;
    z-index: auto;
    margin-top: 1.5rem;
    margin-left: auto;
    align-self: flex-end;
  }
  .wine-page.is-premi .wine-awards > .back-arrow {
    margin-top: auto;
    padding: 0 clamp(1.6rem, 5vw, 2.4rem) clamp(1.6rem, 5vw, 2.4rem);
  }
  .wine-head {
    flex-wrap: wrap;
  }
  .contact-hero { align-items: flex-end; padding-bottom: 2rem; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .gallery-main { aspect-ratio: 4 / 3; }
}
@media (max-width: 480px) {
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
  .hero-nav { gap: 0.7rem 1.2rem; bottom: 1.4rem; }
  .hero-mute { top: 0.9rem; right: 0.9rem; width: 40px; height: 40px; }
  .hero-lang { top: 1rem; left: 1rem; font-size: 0.72rem; }
  .hero-content { padding-bottom: 4.5rem; }
}
