/* ==========================================================================
   Et' Magnè da Velia — Risto & Bar, Pianoro
   Direction: "insegna del paese". Bordeaux (from the sign) is the single
   accent + brand; terracotta (the brick facade) is one section band; the
   yellow/azure of the plastic chairs stays in the photos only, never in UI.
   Type: Bitter (slab display) + Karla (body). Mobile-first (390px).
   Radius system: buttons = pill, surfaces/images = 12px.
   ========================================================================== */

:root {
  --canvas:   #faf5ec;   /* tablecloth cream */
  --surface:  #f3e9d7;   /* deeper cream — the menù band + footer */
  --ink:      #2a211c;   /* warm near-black text */
  --muted:    #6f6357;   /* secondary text */
  --line:     rgba(42, 33, 28, 0.14);

  --wine:      #7a1f2e;  /* the sign lettering — brand + ONLY accent */
  --wine-deep: #641823;  /* hover */
  --wine-ink:  #f9f0e3;  /* cream text on wine/brick */
  --brick:     #9e3a24;  /* the facade — one band */
  --pennant:   #f4e7cf;  /* festoni */

  --font-display: "Bitter", Georgia, serif;
  --font-body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 12px;
  --measure: 62ch;
  --wrap: 1080px;
}

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

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--wine); }
section[id] { scroll-margin-top: 72px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); font-weight: 800; color: var(--ink); margin-bottom: 0.75rem; }
h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 0.55rem; }

/* -- buttons --------------------------------------------------------------- */
.btn {
  display: inline-block; text-decoration: none;
  font-family: var(--font-body); font-weight: 700; font-size: 0.98rem;
  padding: 0.72rem 1.4rem; border-radius: 999px;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--wine); color: var(--wine-ink); border-color: var(--wine); }
.btn-primary:hover { background: var(--wine-deep); border-color: var(--wine-deep); transform: translateY(-1px); }

.btn-outline { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn-outline:hover { background: var(--wine); color: var(--wine-ink); }

/* on the wine hero band */
.btn-onwine { background: var(--wine-ink); color: var(--wine); border-color: var(--wine-ink); }
.btn-onwine:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost-wine { background: transparent; color: var(--wine-ink); border-color: rgba(249, 240, 227, 0.55); }
.btn-ghost-wine:hover { background: rgba(249, 240, 227, 0.14); border-color: var(--wine-ink); }

/* -- top bar --------------------------------------------------------------- */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.7rem 1.15rem;
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--canvas) 90%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub { font-weight: 600; font-style: italic; font-size: 0.92rem; color: var(--wine); }
.topbar-cta {
  text-decoration: none; font-weight: 700; font-size: 0.92rem;
  color: var(--wine-ink); background: var(--wine);
  padding: 0.46rem 1.05rem; border-radius: 999px; white-space: nowrap;
  transition: background-color 0.2s ease;
}
.topbar-cta:hover { background: var(--wine-deep); }

/* -- hero (wine band + festoni) -------------------------------------------- */
.hero { position: relative; background: var(--wine); color: var(--wine-ink); text-align: center; }
.bunting {
  height: 22px; width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 24'%3E%3Cline x1='0' y1='3' x2='40' y2='3' stroke='%23f4e7cf' stroke-opacity='0.5' stroke-width='1'/%3E%3Cpolygon points='2,3 18,3 10,20' fill='%23f4e7cf'/%3E%3Cpolygon points='22,3 38,3 30,20' fill='%23f4e7cf'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 40px 22px;
}
.hero-inner {
  max-width: 40ch; margin: 0 auto;
  padding: clamp(2.6rem, 8vw, 4rem) 1.25rem clamp(3rem, 8vw, 4.5rem);
}
.hero-kicker {
  text-transform: uppercase; letter-spacing: 0.18em; font-weight: 700;
  font-size: 0.78rem; color: rgba(249, 240, 227, 0.82); margin-bottom: 1rem;
}
.hero h1 {
  font-weight: 800; font-size: clamp(2.7rem, 12vw, 4.3rem);
  line-height: 1.0; margin-bottom: 1.15rem;
}
.hero-velia {
  display: block; font-weight: 600; font-style: italic;
  font-size: 0.46em; line-height: 1.15; color: rgba(249, 240, 227, 0.92);
  letter-spacing: 0; margin-top: 0.15em;
}
.hero-sub { max-width: 34ch; margin: 0 auto 1.7rem; color: rgba(249, 240, 227, 0.92); font-size: 1.03rem; }
.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; }

/* -- facade (full-bleed media strip) --------------------------------------- */
.facade img {
  width: 100%; aspect-ratio: 136 / 57; max-height: 460px;
  object-fit: cover; object-position: 50% 42%;
}

/* -- sections -------------------------------------------------------------- */
.section { padding: clamp(2.75rem, 7vw, 4.5rem) 1.25rem; max-width: var(--wrap); margin: 0 auto; }

/* -- chi siamo (split) ----------------------------------------------------- */
.chi-grid { display: grid; gap: 1.75rem; }
.chi-text p { max-width: 50ch; margin-bottom: 1rem; }
.chi-note { color: var(--muted); }
.rating {
  display: inline-flex; align-items: baseline; gap: 0.55rem;
  margin-top: 1.15rem; text-decoration: none;
}
.rating-score { font-family: var(--font-display); font-weight: 800; color: var(--wine); font-size: 1.3rem; }
.rating-meta { color: var(--muted); font-size: 0.92rem; }
.rating:hover .rating-meta { color: var(--ink); }
.chi-photo { margin: 0; }
.chi-photo img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 42%;
  border-radius: var(--radius);
  box-shadow: 0 16px 34px -20px rgba(42, 33, 28, 0.55);
}
@media (min-width: 760px) {
  .chi-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 2.75rem; }
}

/* -- menù fisso (feature board, full-width surface band) ------------------- */
.menu { max-width: none; background: var(--surface); }
.menu > * { max-width: var(--measure); margin-left: auto; margin-right: auto; }
.menu-lead { color: var(--muted); font-size: 1.06rem; }
.board {
  max-width: 620px; margin-top: 1.6rem;
  background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 4.5vw, 2rem);
  box-shadow: 0 18px 40px -26px rgba(42, 33, 28, 0.5);
}
.board-row {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.9rem;
  align-items: baseline; padding: 0.9rem 0; border-bottom: 1px dashed var(--line);
}
.board-row:first-child { padding-top: 0; }
.board-course { font-family: var(--font-display); font-weight: 800; color: var(--wine); font-size: 1.15rem; }
.board-desc { color: var(--ink); }
.board-price {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  margin-top: 1.1rem; padding-top: 1.05rem; border-top: 2px solid var(--wine);
}
.board-price-label { color: var(--muted); font-weight: 700; letter-spacing: 0.01em; }
.board-price-value { font-family: var(--font-display); font-weight: 800; color: var(--wine); font-size: 1.4rem; }
.menu-note { color: var(--muted); font-size: 0.88rem; margin-top: 1.1rem; }

/* -- crescentine band (terracotta) ----------------------------------------- */
.band-brick { background: var(--brick); color: var(--wine-ink); padding: clamp(2.75rem, 7vw, 4.25rem) 1.25rem; }
.band-inner { max-width: 48ch; margin: 0 auto; text-align: center; }
.band-brick h2 { color: var(--wine-ink); }
.band-brick p { color: rgba(249, 240, 227, 0.94); margin-top: 0.7rem; }

/* -- dalla cucina (gallery) ------------------------------------------------ */
.piatti-lead { color: var(--muted); font-size: 1.06rem; max-width: var(--measure); }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 1.5rem; }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform 0.4s ease; }
.gallery figcaption { padding-top: 0.55rem; font-size: 0.92rem; color: var(--muted); }
.gallery figure:hover img { transform: scale(1.035); }
@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; }
}

/* -- orari & dove ---------------------------------------------------------- */
.info-grid { display: grid; gap: 2.25rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .info-grid { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.hours { border-collapse: collapse; width: 100%; max-width: 340px; }
.hours td { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
.hours td:first-child { font-weight: 700; color: var(--ink); }
.hours td:last-child { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.hours-note { margin-top: 0.85rem; color: var(--muted); font-size: 0.92rem; }
.contact-lines { margin-bottom: 1.15rem; line-height: 1.75; }
.contact-lines a { font-weight: 700; }
.contact-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* -- footer ---------------------------------------------------------------- */
.footer {
  padding: 2.5rem 1.25rem 3rem; text-align: center;
  color: var(--muted); font-size: 0.9rem;
  background: var(--surface); border-top: 1px solid var(--line);
}
.footer p { margin: 0 auto; }
.demo-note { margin-top: 0.5rem; opacity: 0.75; }

/* -- subtle entrance (MOTION 3, gated) ------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .hero-kicker { animation: rise 0.5s 0.05s both; }
  .hero h1 { animation: rise 0.6s 0.12s both; }
  .hero-sub { animation: rise 0.6s 0.22s both; }
  .hero-actions { animation: rise 0.6s 0.32s both; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
