/* ==========================================================================
   LA BETTOLA — Vineria & Degustazioni, Barcellona Pozzo di Gotto (ME)
   Direction: editorial "carta" / wine-list. Palette pulled from THEIR signage:
   pale sage-stone paper (their signboard), ink-indigo (their cursive script),
   a single bordeaux-wine accent (the tilting red glass + the hairline under
   the wordmark). Type: DM Serif Display (+italic) / Karla. Radius: 2px.
   Mobile-first (390px), MOTION ~3 (CSS hover + soft reveals, reduced-motion safe).
   ========================================================================== */

:root {
  --paper:        #eceee4;   /* canvas: their sage-stone signboard */
  --band:         #e3e6d9;   /* alternating band */
  --surface:      #f6f7f0;   /* raised card / hero plate */
  --hairline:     #d1d6c4;   /* thin rules */
  --hairline-soft:#dde1d2;

  --ink:          #1b2a44;   /* dominant: their navy cursive script */
  --ink-deep:     #16223a;   /* dark bands (quote + footer) */
  --muted:        #566072;   /* meta / secondary text (~5.2:1 on paper) */

  --accent:       #7c2230;   /* single action accent: bordeaux / the wine glass */
  --accent-hover: #641a26;
  --accent-soft:  #e0929b;   /* accent tint for dark backgrounds (rosé) */

  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body:    "Karla", -apple-system, "Segoe UI", system-ui, sans-serif;
  --radius: 2px;
  --measure: 60ch;
  --edge: 1.35rem;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.12; letter-spacing: 0; }
h2 { font-size: clamp(1.75rem, 6vw, 2.6rem); color: var(--ink); margin-bottom: 0.6rem; }
h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 0.35rem; }

/* Content <img> safety net (iron rule): never tower on mobile. */
@media (max-width: 640px) {
  figure img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* -- wine-glass mark -------------------------------------------------------- */
.mark, .hero-mark { fill: var(--accent); display: block; }
.calice-fill { fill: var(--accent); opacity: 0.28; }

/* -- top bar ---------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem var(--edge);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline-soft);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--ink); }
.brand .mark { width: 15px; height: 20px; }
.brand-word { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; }
.topbar-cta {
  text-decoration: none; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em;
  color: #fff; background: var(--accent);
  padding: 0.4rem 1rem; border-radius: var(--radius);
  transition: background 0.25s ease, transform 0.15s ease;
}
.topbar-cta:hover { background: var(--accent-hover); }
.topbar-cta:active { transform: translateY(1px); }

/* -- hero: photo masthead --------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex; align-items: flex-end;
  padding: 1.25rem var(--edge) 2rem;
  overflow: hidden;
}
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background: #24201a url("images/sala.jpg") center 42% / cover no-repeat;
}
.hero-photo::after {   /* ink-indigo scrim so the plate + type read clean */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(16,22,34,0.86) 0%, rgba(16,22,34,0.52) 45%, rgba(16,22,34,0.34) 100%);
}
.hero-plate {
  position: relative; z-index: 1;
  width: 100%; max-width: 40rem; margin: 0 auto;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem 1.7rem;
  text-align: center;
  box-shadow: 0 22px 60px -28px rgba(16,22,34,0.7);
}
.hero-kicker {
  color: var(--muted); font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; margin-bottom: 0.5rem;
}
.hero-mark { width: 26px; height: 35px; margin: 0.1rem auto 0.35rem; }
.wordmark {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(2.9rem, 13vw, 4.6rem); line-height: 1.02; color: var(--ink);
  padding-bottom: 0.06em;   /* italic descender clearance */
}
.hero-rule {
  display: block; width: 62px; height: 2px; margin: 0.85rem auto 0.9rem;
  background: var(--accent);
}
.hero-sub {
  color: var(--muted); max-width: 34ch; margin: 0 auto 1.3rem; font-size: 1.02rem;
}
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* -- buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 0.62rem 1.35rem; border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, transform 0.15s ease, border-color 0.25s ease;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--surface); }
.btn:active { transform: translateY(1px); }

/* -- generic sections ------------------------------------------------------- */
.section { padding: 3.4rem var(--edge); max-width: var(--measure); margin: 0 auto; }

/* -- intro ------------------------------------------------------------------ */
.intro .lede { font-size: 1.12rem; color: var(--ink); max-width: 56ch; }
.rating {
  display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap;
  margin: 1.5rem 0 0.2rem;
}
.rating-score { font-family: var(--font-display); font-size: 1.9rem; color: var(--ink); line-height: 1; }
.rating-stars { color: var(--accent); letter-spacing: 0.08em; font-size: 1rem; }
.rating-count { color: var(--muted); font-size: 0.9rem; }
.chips {
  list-style: none; padding: 0; margin: 1.4rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.chips li {
  font-size: 0.82rem; color: var(--muted);
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 0.28rem 0.7rem; background: var(--surface);
}

/* -- la carta (editorial index) --------------------------------------------- */
.carta { max-width: 62ch; }
.carta-head { margin-bottom: 1.6rem; }
.carta-head .lede { color: var(--muted); max-width: 52ch; }
.carta-list { list-style: none; padding: 0; margin: 0; }
.carta-list li {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem;
  padding: 1.5rem 0; border-top: 1px solid var(--hairline);
}
.carta-list li:last-child { border-bottom: 1px solid var(--hairline); }
.carta-num {
  font-family: var(--font-display); font-style: italic; font-size: 1.5rem;
  color: var(--accent); line-height: 1.1;
}
.carta-body h3 { margin-bottom: 0.4rem; }
.carta-body p { color: var(--muted); }
.carta-note { margin-top: 1.4rem; color: var(--muted); font-size: 0.9rem; }

/* -- photo band ------------------------------------------------------------- */
.photoband { margin: 0.5rem 0; }
.photoband figure { margin: 0; }
.photoband img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  object-position: center 34%;   /* keep the lit sign in frame */
}
.photoband figcaption {
  max-width: var(--measure); margin: 0.7rem auto 0; padding: 0 var(--edge);
  color: var(--muted); font-size: 0.9rem; font-style: italic;
}

/* -- quote band (ink-indigo) ------------------------------------------------ */
.quote {
  background: var(--ink-deep); color: var(--paper);
  max-width: none; padding-left: var(--edge); padding-right: var(--edge);
}
.quote > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.quote h2 { color: var(--paper); }
.quote-big { margin: 1.4rem auto 0; }
.quote-big p {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.28; color: var(--paper);
  padding-bottom: 0.06em;
}
.quote-big cite, .quote-small cite {
  display: block; margin-top: 0.7rem; font-style: normal;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-soft);
}
.quote-small {
  margin: 1.9rem auto 0; padding-top: 1.4rem;
  border-top: 1px solid rgba(224,146,155,0.28);
}
.quote-small p { color: color-mix(in srgb, var(--paper) 88%, transparent); font-size: 1.02rem; }

/* -- orari & dove ----------------------------------------------------------- */
.dove-grid { display: grid; gap: 2.2rem; margin-top: 1.4rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 24rem; }
.hours td { padding: 0.44rem 0.5rem 0.44rem 0; border-bottom: 1px solid var(--hairline-soft); }
.hours tr:last-child td { border-bottom: 0; }
.hours td:first-child { color: var(--ink); font-weight: 600; }
.hours td:last-child { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.hours td.closed { color: var(--muted); opacity: 0.7; }
.hours tr.is-today td {
  color: var(--accent); font-weight: 700;
}
.hours tr.is-today td:first-child { position: relative; }
.hours tr.is-today td:first-child::before {
  content: ""; position: absolute; left: -0.7rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 1.05em; background: var(--accent); border-radius: 2px;
}
.hours-note { margin-top: 0.85rem; color: var(--muted); font-size: 0.9rem; }
.contact-lines { margin-bottom: 1.15rem; }
.contact-lines a { text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.dove-contact .btn { margin-top: 0.2rem; }

/* -- footer ----------------------------------------------------------------- */
.footer {
  background: var(--ink-deep); color: color-mix(in srgb, var(--paper) 80%, transparent);
  text-align: center; padding: 2.8rem var(--edge) 3.2rem;
}
.footer-lockup { display: inline-flex; align-items: center; gap: 0.55rem; margin-bottom: 0.9rem; }
.footer-lockup .mark { width: 17px; height: 23px; fill: var(--accent-soft); }
.footer-lockup .calice-fill { fill: var(--accent-soft); }
.footer-lockup .brand-word { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--paper); }
.footer-meta { font-size: 0.9rem; }
.footer-meta a { color: var(--accent-soft); text-decoration: none; }
.footer-copy { margin-top: 0.6rem; font-size: 0.82rem; opacity: 0.75; }
.demo-note { margin-top: 0.9rem; font-size: 0.78rem; opacity: 0.6; }

/* -- reveal-on-scroll (MOTION 3) -------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16,1,0.3,1); }
  .reveal.is-in { opacity: 1; transform: none; }
  .hero-plate { animation: plate-in 0.8s cubic-bezier(0.16,1,0.3,1) both; }
  @keyframes plate-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ============================ DESKTOP ====================================== */
@media (min-width: 720px) {
  :root { --edge: 2rem; }
  .hero { min-height: min(90vh, 760px); padding-bottom: 3rem; }
  .hero-plate { padding: 2.2rem 2.4rem 2.4rem; }
  .section { padding: 5rem var(--edge); }
  .dove-grid { grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
  .carta-list li { grid-template-columns: 3rem 1fr; gap: 1.4rem; padding: 1.8rem 0; }
  .carta-num { font-size: 1.8rem; }
  .photoband img { aspect-ratio: 21 / 9; max-height: 68vh; }
}

@media (min-width: 1024px) {
  .hero-plate { max-width: 42rem; }
}
