/* =========================================================
   HEARTH – restaurant and café website template
   EDIT YOUR COLOURS AND FONTS HERE. Everything else follows.
   ========================================================= */
:root {
  --sea: #16323a;        /* main colour: header text, headings, dark band */
  --sea-2: #1d4a52;
  --cream: #f3ede2;      /* page background */
  --sand: #e7dfcf;       /* lines and borders */
  --brass: #b8863b;      /* small labels and accents */
  --tomato: #c9553c;     /* main buttons */
  --ink: #1d2326;        /* body text */
  --muted: #5d6669;      /* secondary text */
  --veg-bg: #dcebdd; --veg: #2a6b3f;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --radius: 20px;
}

/* ---------- Fonts (included in assets/fonts, free under the SIL Open Font Licence) ---------- */
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url(fonts/fraunces-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-display: swap; src: url(fonts/fraunces-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 700; font-display: swap; src: url(fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2"); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 16px/1.6 var(--font-body); color-scheme: light; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
[id] { scroll-margin-top: 16px; }

/* ---------- Header ---------- */
.nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px max(20px, 5vw); border-bottom: 1px solid var(--sand); }
.logo { font: 700 22px/1 var(--font-head); color: var(--sea); text-decoration: none; }
.logo i { color: var(--brass); font-style: normal; }
.nav nav { display: flex; align-items: center; gap: 20px; }
.nav nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav .nav-btn { background: var(--sea); color: var(--cream); padding: 10px 16px; border-radius: 999px; white-space: nowrap; }

/* ---------- Intro ---------- */
.intro { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center; padding: 36px max(20px, 5vw); }
.kicker { font: 500 13px/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.intro h1 { font-size: 30px; line-height: 1.2; color: var(--sea); margin-top: 12px; }
.lede { font-size: 17px; color: var(--muted); max-width: 46ch; margin-top: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 22px; border-radius: 999px; background: var(--tomato); color: #fff; border: 0; font: 600 16px/1 var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { filter: brightness(.94); }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { display: inline-flex; align-items: center; height: 48px; padding: 0 22px; border-radius: 999px; border: 1.5px solid var(--sea); color: var(--sea); font-weight: 600; text-decoration: none; }
.open-now { display: flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14.5px; color: var(--sea); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #2f9e6e; }
.open-now.closed .dot { background: var(--tomato); }
.art { width: 100%; max-width: 260px; justify-self: end; border-radius: var(--radius); background: #f6e3c4; object-fit: cover; aspect-ratio: 1; }

/* ---------- Sections ---------- */
.section { padding: 48px max(20px, 5vw); border-top: 1px solid var(--sand); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { font-size: 28px; color: var(--sea); }
.section-head p { color: var(--muted); max-width: 46ch; }

/* ---------- Menu ---------- */
.menu-bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs, .filters { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs button, .filters button { font: 500 15px/1 var(--font-body); padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--sand); background: transparent; color: var(--ink); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--sea); border-color: var(--sea); color: var(--cream); }
.filters button[aria-pressed="true"] { border-color: var(--tomato); color: var(--tomato); }
.dishes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px; }
.dishes li { padding: 20px 0; border-bottom: 1px dashed #d4c9b4; }
.dish-top { display: flex; align-items: baseline; gap: 10px; }
.dish-top h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.leader { flex: 1; border-bottom: 2px dotted #cbbfa8; transform: translateY(-4px); min-width: 20px; }
.price { font: 500 16px/1 var(--font-mono); color: var(--sea); }
.dishes p { color: var(--muted); font-size: 15px; margin-top: 4px; }
.diet { font: 600 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; background: var(--veg-bg); color: var(--veg); }
.dishes .allergens { font: 400 12.5px/1.4 var(--font-mono); color: var(--brass); }
.empty { padding: 20px 0; color: var(--muted); }
.key { margin-top: 20px; font: 400 12.5px/1.6 var(--font-mono); color: var(--muted); }

/* ---------- Visit ---------- */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; background: var(--sea); color: var(--cream); border-top: 0; }
.visit h2 { font-size: 28px; color: var(--cream); }
.visit address { font-style: normal; font-size: 17px; line-height: 1.5; margin-top: 18px; }
.small { font-size: 15px; opacity: .8; margin: 14px 0 24px; }
.visit .btn-ghost { border-color: var(--cream); color: var(--cream); }
.hours { width: 100%; border-collapse: collapse; align-self: start; font-size: 17px; }
.hours caption { text-align: left; font: 500 13px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: #e9b872; padding-bottom: 12px; }
.hours th, .hours td { padding: 14px 0; border-bottom: 1px solid rgba(243, 237, 226, .2); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-family: var(--font-mono); }
.hours tr.today th, .hours tr.today td { font-weight: 600; color: #fff; }

/* ---------- Booking ---------- */
.booking { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 12px; align-items: end; background: #fff; padding: 20px; border-radius: var(--radius); border: 1px solid var(--sand); }
.booking label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.booking input, .booking select { height: 46px; border: 1.5px solid var(--sand); border-radius: 12px; padding: 0 12px; font: 400 16px/1 var(--font-body); background: var(--cream); color: var(--ink); min-width: 0; width: 100%; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { display: grid; gap: 6px; padding: 24px; background: #fff; border-radius: var(--radius); border: 1px solid var(--sand); }
.form-error { margin-top: 12px; color: var(--tomato); font-weight: 500; }

/* ---------- Footer ---------- */
.footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 28px max(20px, 5vw); font-size: 14px; color: var(--muted); border-top: 1px solid var(--sand); }

/* ---------- Chat assistant ---------- */
.assist { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: grid; justify-items: end; gap: 10px; }
.assist-btn { height: 48px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--sea); color: var(--cream); font: 600 15px/1 var(--font-body); box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); cursor: pointer; }
.chat { width: min(340px, calc(100vw - 32px)); background: #fff; border-radius: 18px; border: 1px solid var(--sand); box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--sea); color: var(--cream); }
.chat-head button { background: none; border: 0; color: var(--cream); font-size: 22px; line-height: 1; cursor: pointer; }
.chat-body { padding: 14px; display: grid; gap: 8px; max-height: 260px; overflow: auto; font-size: 14.5px; }
.reply { background: var(--cream); padding: 10px 12px; border-radius: 12px 12px 12px 4px; }
.me { background: var(--sea); color: var(--cream); padding: 10px 12px; border-radius: 12px 12px 4px 12px; justify-self: end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; }
.chips button { font: 500 13px/1.2 var(--font-body); padding: 8px 10px; border-radius: 999px; border: 1px solid var(--sand); background: #fff; color: var(--sea); cursor: pointer; text-align: left; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 820px) {
  .intro, .visit { grid-template-columns: 1fr; }
  .art { justify-self: start; max-width: 320px; }
  .dishes { grid-template-columns: 1fr; }
  .booking { grid-template-columns: 1fr 1fr; }
  .booking .btn { grid-column: 1 / -1; }
  .nav nav a:not(.nav-btn) { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .assist, .nav nav, #book { display: none; } .visit { background: none; color: var(--ink); } }
