/* ==========================================================================
   OSTERIA OTTOCENTO — Barcellona Pozzo di Gotto (ME)
   Direction: "gazzetta d'epoca" editorial on cool stone-paper.
   Canvas = cold mineral paper; ONE accent = petrol-teal (their placemats);
   warmth lives only in the photos. Type = Playfair Display (heritage Didone,
   the literal voice of "l'Ottocento") + Archivo (industrial humanist grotesque).
   Shape system: radius 0 everywhere + 1px hairline rules as the structural motif.
   Mobile-first (390px), then min-width:760px.
   ========================================================================== */

:root {
  --bg: #ecefee;          /* cold stone / aged-enamel paper */
  --tint: #e2e7e6;        /* alternating band */
  --surface: #f6f8f7;     /* raised plate */
  --line: #cdd6d3;        /* hairline rules */
  --line-strong: #b4c0bc;
  --ink: #16211f;         /* petrol near-black text (~15:1) */
  --muted: #4f5c58;       /* secondary text (~5.9:1 AA) */
  --accent: #0a6a68;      /* petrol-teal — the only touchable colour */
  --accent-deep: #084f4e; /* hover / pressed */
  --accent-ink: #f4f9f8;  /* text on teal */
  --band: #0a5654;        /* full teal review band */
  --band-mint: #8fd3cf;   /* light mark on teal band */
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-body: "Archivo", -apple-system, "Segoe UI", system-ui, sans-serif;
  --measure: 64ch;
  --page: 1120px;
}

* { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  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); line-height: 1.08; font-weight: 700; letter-spacing: -0.01em; }

/* content photos never tower on mobile: landscape crop by default (iron rule) */
figure img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.wrap { max-width: var(--page); margin: 0 auto; padding-inline: 1.25rem; }
.measure { max-width: var(--measure); }

/* -- top bar --------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
  padding: 0.7rem 1.25rem;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand .mark { width: 20px; height: 26px; color: var(--accent); flex: none; }
.brand .word { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: 0.01em; }
.topbar-cta {
  text-decoration: none; font-family: var(--font-body); font-weight: 600;
  font-size: 0.9rem; letter-spacing: 0.02em;
  color: var(--accent-ink); background: var(--accent);
  padding: 0.5rem 1.05rem;
  transition: background .25s ease;
}
.topbar-cta:hover { background: var(--accent-deep); }

/* -- hero ------------------------------------------------------------------ */
.hero { padding-top: clamp(2.25rem, 6vh, 3.5rem); padding-bottom: clamp(2.5rem, 6vh, 4rem); }
.hero-grid { display: grid; gap: 1.75rem; }
.hero-eyebrow {
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--accent); margin-bottom: 1rem;
}
.hero-mark { width: 34px; height: 44px; color: var(--accent); margin-bottom: 0.85rem; }
.hero-title { font-size: clamp(3.1rem, 15vw, 6.5rem); font-weight: 700; letter-spacing: -0.02em; }
.hero-rule { width: 68px; height: 2px; background: var(--accent); margin: 1.25rem 0; }
.hero-sub { color: var(--muted); max-width: 40ch; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.6rem; }

.hero-figure { position: relative; border: 1px solid var(--line-strong); padding: 8px; background: var(--surface); }
.hero-figure img { aspect-ratio: 3 / 2; object-fit: cover; object-position: center 62%; }
.hero-figure figcaption {
  font-family: var(--font-display); font-style: italic; font-size: 0.95rem;
  color: var(--muted); padding: 0.6rem 0.15rem 0.15rem;
}

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  text-decoration: none; font-family: var(--font-body); font-weight: 600;
  font-size: 0.98rem; letter-spacing: 0.01em;
  padding: 0.72rem 1.35rem;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
  transition: background .25s ease, color .25s ease, transform .1s ease, border-color .25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }

/* -- generic bands / sections --------------------------------------------- */
.band { padding-block: clamp(3rem, 7vh, 4.75rem); }
.band--tint { background: var(--tint); border-block: 1px solid var(--line); }
.section-kicker {
  font-size: 0.76rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.7rem;
}
h2.section-title { font-size: clamp(2rem, 6vw, 2.9rem); margin-bottom: 1rem; }

/* -- statement ------------------------------------------------------------- */
.statement p { color: var(--muted); font-size: 1.12rem; max-width: 56ch; }
.rating { display: flex; align-items: baseline; gap: 0.6rem; margin-top: 1.6rem; flex-wrap: wrap; }
.rating .stars { color: var(--accent); font-size: 1.05rem; letter-spacing: 0.1em; }
.rating .score { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.rating .count { color: var(--muted); font-size: 0.92rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.chip {
  font-size: 0.85rem; font-weight: 500; color: var(--ink);
  border: 1px solid var(--line-strong); padding: 0.4rem 0.8rem;
  background: var(--surface);
}

/* -- "A tavola" editorial index ------------------------------------------- */
.tavola-lede { color: var(--muted); max-width: 52ch; margin-bottom: 2.25rem; }
.tavola-index { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); }
.tavola-index li {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.4rem 1rem;
  align-items: baseline; padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.tavola-num { font-family: var(--font-display); font-weight: 700; color: var(--accent); font-size: 1.15rem; }
.tavola-body h3 { font-size: 1.28rem; color: var(--ink); margin-bottom: 0.25rem; }
.tavola-body p { color: var(--muted); font-size: 1rem; }

.plates { display: grid; gap: 1rem; margin-top: 2.25rem; }
.plate { border: 1px solid var(--line-strong); padding: 8px; background: var(--surface); }
.plate img { aspect-ratio: 4 / 3; object-fit: cover; }
.plate figcaption {
  font-family: var(--font-display); font-style: italic; font-size: 0.95rem;
  color: var(--muted); padding: 0.6rem 0.15rem 0.1rem;
}
.tavola-note { margin-top: 1.75rem; color: var(--muted); font-size: 0.92rem; font-style: italic; }

/* -- reviews band (full teal) --------------------------------------------- */
.reviews { background: var(--band); color: var(--accent-ink); }
.reviews .section-kicker { color: var(--band-mint); }
.reviews-rating { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 2rem; flex-wrap: wrap; }
.reviews-rating .stars { color: var(--band-mint); letter-spacing: 0.1em; }
.reviews-rating .score { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; }
.reviews-rating .count { color: color-mix(in srgb, var(--accent-ink) 78%, transparent); font-size: 0.92rem; }
.quotes { display: grid; gap: 1.75rem; }
.quote { border-left: 2px solid var(--band-mint); padding-left: 1.1rem; }
.quote p { font-family: var(--font-display); font-style: italic; font-size: 1.28rem; line-height: 1.42; }
.quote .attr {
  display: block; margin-top: 0.7rem; font-family: var(--font-body); font-style: normal;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in srgb, var(--accent-ink) 72%, transparent);
}

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.hours { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); max-width: 30rem; }
.hours li {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.62rem 0; border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.hours .day { color: var(--ink); font-weight: 500; }
.hours li.today {
  color: var(--ink); font-weight: 600;
  padding-inline: 0.7rem;
  margin-inline: -0.7rem;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-left: 2px solid var(--accent);
}
.hours li.today .day { color: var(--accent-deep); }
.today-tag { font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-left: 0.5rem; }

.contact h3, .hours-col h3 { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); margin-bottom: 1rem; }
.contact address { font-style: normal; color: var(--muted); line-height: 1.9; }
.contact address a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.contact address a:hover { color: var(--accent-deep); }
.contact .btn { margin-top: 1.4rem; }

/* -- footer ---------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.footer .mark { width: 20px; height: 26px; color: var(--accent); margin: 0 auto 0.9rem; }
.footer .fword { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); letter-spacing: 0.02em; }
.footer p { margin-top: 0.4rem; }
.demo-note { margin-top: 0.9rem; opacity: 0.7; font-size: 0.82rem; }

/* -- motion: entrance reveal (gated) --------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(0.16,1,0.3,1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-grid > * { animation: rise .8s cubic-bezier(0.16,1,0.3,1) both; }
.js .hero-figure { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-grid > * { animation: none; }
}

/* -- desktop --------------------------------------------------------------- */
@media (min-width: 760px) {
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; }
  .hero-figure img { aspect-ratio: 4 / 5; object-position: center 60%; }
  .plates { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .plate img { aspect-ratio: 3 / 4; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .tavola-index li { grid-template-columns: 3rem 1fr; }
  .quotes { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
