/* ==========================================================
   Ember & Olive · fictional restaurant demo
   Palette: charcoal, ember orange, olive green, cream
   ========================================================== */
:root {
  --charcoal: #1C1410;
  --charcoal-2: #261B15;
  --ember: #E4572E;
  --amber: #F2A65A;
  --olive: #7A8B45;
  --cream: #F5EBDD;
  --muted: #C9B8A3;
  --line: rgba(245, 235, 221, 0.12);
  --radius: 14px;
  --max: 1120px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--charcoal); color: var(--cream); font-family: var(--sans); line-height: 1.6; overflow-x: hidden; }
a { color: var(--amber); }
[hidden] { display: none !important; } /* keep `hidden` working on flex/grid elements */
h1, h2, .logo { font-family: var(--serif); line-height: 1.1; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.sub { color: var(--muted); margin: 8px 0 28px; }

/* ---------- Demo bar ---------- */
.demo-bar { background: var(--olive); color: #fff; text-align: center; font-size: 0.8rem; padding: 6px 16px; }
.demo-bar a { color: #fff; font-weight: 600; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(28, 20, 16, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-size: 1.4rem; font-weight: 700; color: var(--cream); text-decoration: none; }
.logo span { color: var(--ember); }
.nav nav { display: flex; align-items: center; gap: 26px; }
.nav nav a { color: var(--cream); text-decoration: none; font-size: 0.95rem; }
.nav nav a:hover { color: var(--amber); }
.burger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--cream); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 600 0.95rem var(--sans);
  color: #fff; background: var(--ember);
  border: 2px solid var(--ember);
  padding: 12px 24px; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); background: #cf4621; }
.btn.outline { background: transparent; color: var(--cream); border-color: var(--line); }
.btn.outline:hover { border-color: var(--amber); }
.btn.small { padding: 8px 18px; font-size: 0.85rem; }
.btn.full { width: 100%; }

/* ---------- Layout ---------- */
main { padding: 0 16px; }
.section, .hero, .highlights { max-width: var(--max); margin: 0 auto; }
.section { padding: 90px 0 0; scroll-margin-top: 70px; }
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 30px; padding: 80px 0 40px; }
.kicker { color: var(--amber); text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 600; margin-bottom: 16px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: 20px 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art svg { width: 100%; max-width: 440px; display: block; margin: 0 auto; }
.flame { transform-origin: 200px 260px; animation: flicker 2.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04, .97); } }

/* ---------- Highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 30px; }
.highlights div { background: var(--charcoal-2); padding: 22px; display: flex; flex-direction: column; }
.highlights strong { font-family: var(--serif); font-size: 1.15rem; }
.highlights span { color: var(--muted); font-size: .9rem; }

/* ---------- Menu ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tab { font: 600 .9rem var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.tab.active, .tab:hover { color: var(--charcoal); background: var(--amber); border-color: var(--amber); }
.menu-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 40px; }
.dish { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); animation: fadein .35s ease; }
.dish h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; }
.dish .price { color: var(--amber); font-weight: 600; }
.dish p { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
.dish .tag { font-size: .7rem; font-weight: 600; color: var(--olive); margin-left: 6px; }
.note { color: var(--muted); font-size: .8rem; margin-top: 22px; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Hours ---------- */
.hours { width: 100%; border-collapse: collapse; background: var(--charcoal-2); border-radius: var(--radius); overflow: hidden; }
.hours td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; color: var(--muted); }
.hours tr.today td { color: var(--amber); font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status.open::before { background: #6BCB77; box-shadow: 0 0 10px #6BCB77; }
.status.closed::before { background: var(--ember); }

/* ---------- Location ---------- */
address { font-style: normal; color: var(--cream); margin-bottom: 26px; line-height: 1.8; }
.map { width: 100%; height: 340px; border: 1px solid var(--line); border-radius: var(--radius); filter: grayscale(.3) contrast(1.05); }

/* ---------- Footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 90px 16px 40px; display: grid; gap: 8px; }
.footer .logo { font-size: 1.6rem; }

/* ---------- Booking dialog ---------- */
dialog {
  width: min(480px, calc(100vw - 32px));
  margin: auto;
  background: var(--charcoal-2); color: var(--cream);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 30px;
}
dialog::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
dialog form { display: flex; flex-direction: column; gap: 14px; position: relative; }
dialog .sub { margin: 0 0 6px; font-size: .85rem; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
dialog label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
dialog input, dialog select {
  font: inherit; color: var(--cream);
  background: var(--charcoal); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
  color-scheme: dark;
}
dialog input:focus, dialog select:focus { outline: none; border-color: var(--amber); }
.close { position: absolute; top: -14px; right: -10px; background: none; border: 0; color: var(--muted); font-size: 1.8rem; cursor: pointer; }
.form-error { color: var(--amber); font-size: .85rem; min-height: 1.2em; }
.confirm { text-align: center; display: grid; gap: 10px; justify-items: center; }
.check { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--olive); font-size: 1.6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 50px; }
  .hero-art { order: -1; max-width: 260px; margin: 0 auto; }
  .highlights { grid-template-columns: 1fr; }
  .menu-list { grid-template-columns: 1fr; }
  .burger { display: block; }
  .nav nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 18px;
    padding: 24px 16px;
    background: var(--charcoal);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav nav.open { display: flex; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flame, .dish { animation: none; }
}
