/* Braise — edit colours and fonts here */
:root {
  --paper: #f3ede3;
  --paper-2: #e9e1d4;
  --ink: #1f1a16;
  --muted: #645b53;
  --charcoal: #171310;
  --charcoal-2: #241e19;
  --on-dark: #efe6d8;
  --on-dark-muted: #a89c8e;
  --ember: #c4501d;
  --ember-text: #a84218;    /* ember for text and buttons on light backgrounds (AA contrast) */
  --ember-on-dark: #e86d3f; /* ember for text on dark backgrounds (AA contrast) */
  --ember-hot: #f08a3c;
  --line: #cfc4b4;
  --serif: "Young Serif", Georgia, serif;
  --sans: "Instrument Sans", system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --radius: 2px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

.kicker { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ember-text); margin-bottom: 18px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px;
  border-radius: var(--radius); border: 1px solid transparent; font: 500 15px var(--sans);
  text-decoration: none; cursor: pointer;
}
.btn-ember { background: var(--ember-text); color: #fbf6ee; }
.btn-ember:hover { background: #8f3814; }
.btn-line { border-color: currentColor; }
.btn-line:hover { background: var(--on-dark); color: var(--charcoal); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 16px var(--pad); color: var(--on-dark); transition: background-color .4s, color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: var(--paper); color: var(--ink); border-color: var(--line); }
.logo { font: 26px var(--serif); text-decoration: none; }
.nav nav { display: flex; gap: 24px; margin-left: 12px; }
.nav nav a { font-size: 15px; text-decoration: none; }
.nav nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--on-dark-muted); }
.status.open .status-dot { background: var(--ember-hot); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: 1fr; align-content: end; gap: 56px;
  padding: 140px var(--pad) 48px; background: var(--charcoal); color: var(--on-dark); overflow: clip;
}
/* 3D hearth: the canvas sticks behind the hero and "The fire" */
.hearth3d { position: relative; background: var(--charcoal); }
.hearth3d > .scene { position: sticky; top: 0; display: block; width: 100%; height: 100svh; margin-bottom: -100svh; pointer-events: none; }
.hearth3d > section { background: transparent; }
.has-3d .hearth svg { visibility: hidden; }
/* Box the 3D scene fits into in the hero (scene.js reads its position) */
.hero-stage { display: none; }
.webgl .hero-stage { display: block; position: absolute; top: 110px; bottom: 150px; left: 56%; right: var(--pad); pointer-events: none; }
@media (max-width: 1100px) {
  .webgl .hero-stage { position: relative; inset: auto; height: clamp(220px, 34svh, 380px); margin: -60px 0 -20px; }
}
.hero-copy, .hero-facts { position: relative; }
.hero h1 { font-size: clamp(44px, 7.4vw, 112px); max-width: 13ch; letter-spacing: -.01em; }
.hero .lede { max-width: 46ch; margin-top: 28px; font-size: clamp(17px, 1.4vw, 20px); color: var(--on-dark-muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-facts { display: flex; gap: clamp(28px, 6vw, 96px); margin: 0; padding-top: 24px; border-top: 1px solid #3a3029; }
.hero-facts dt { font-size: 13px; color: var(--on-dark-muted); }
.hero-facts dd { margin: 4px 0 0; font: 26px var(--serif); }

/* ---------- The fire (pinned sequence) ---------- */
.fire { height: var(--len); background: var(--charcoal-2); color: var(--on-dark); }
.hero .kicker, .fire .kicker, .book .kicker { color: var(--ember-on-dark); }
.fire-sticky {
  position: sticky; top: 0; height: 100svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: 4vw; padding: 80px var(--pad) 40px;
}
.stages { list-style: none; margin: 0; padding: 0; display: grid; }
.stage { grid-area: 1 / 1; opacity: 0; translate: 0 24px; transition: opacity .6s var(--ease), translate .6s var(--ease); }
.stage.on { opacity: 1; translate: none; }
.stage h2 { font-size: clamp(48px, 7vw, 104px); }
.stage p { max-width: 38ch; margin-top: 20px; font-size: 19px; color: var(--on-dark-muted); }

.hearth { margin: 0; display: grid; justify-items: center; gap: 20px; --heat: 1; }
.hearth svg { width: min(100%, 460px); overflow: visible; }
.flames { transform-origin: 200px 300px; transform: scale(calc(.25 + var(--heat) * .75), calc(.1 + var(--heat) * .9)); transition: transform .3s linear; }
.f { transform-origin: 200px 300px; animation: flicker 1.6s ease-in-out infinite alternate; }
.f1 { fill: var(--ember); opacity: calc(.4 + var(--heat) * .6); }
.f2 { fill: var(--ember-hot); animation-duration: 1.1s; animation-delay: -.4s; }
.f3 { fill: #ffd8a3; animation-duration: .8s; animation-delay: -.2s; }
@keyframes flicker { from { transform: scale(1, 1) skewX(0deg); } to { transform: scale(.96, 1.06) skewX(2deg); } }
.coals ellipse { fill: var(--ember); opacity: calc(.25 + (1 - var(--heat)) * .6); }
.logs rect { fill: #3a2c22; }
.floor { stroke: #4a3d33; stroke-width: 2; }
.readout { display: grid; justify-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.clock { font: 56px var(--serif); }
.temp { font-size: 15px; color: var(--on-dark-muted); }
.temp b { color: var(--ember-hot); font-weight: 600; }
.gauge { width: 220px; height: 2px; background: #3a3029; margin-top: 8px; }
.gauge i { display: block; height: 100%; width: calc(var(--heat) * 100%); background: var(--ember-hot); }

/* ---------- Sections communes ---------- */
.menu, .producers, .visit { padding: clamp(80px, 12vw, 160px) var(--pad); }
.section-head { max-width: 900px; margin-bottom: 56px; }
.section-head h2, .visit h2 { font-size: clamp(36px, 5vw, 68px); }

/* ---------- Menu ---------- */
.menu-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--ink); }
.tabs { display: flex; flex-wrap: wrap; }
.tabs button {
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  padding: 12px 18px 12px 0; margin-right: 18px; font: 500 16px var(--sans); color: var(--muted); cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--ember); }
.filters { display: flex; gap: 8px; padding-bottom: 10px; align-self: center; }
.chip { background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 12px; font: 14px var(--sans); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.panel:not([hidden]) { animation: panel .5s var(--ease); }
@keyframes panel { from { opacity: 0; translate: 0 12px; } }
.dishes { list-style: none; margin: 0; padding: 0; columns: 2 420px; column-gap: 64px; }
.dishes li {
  break-inside: avoid; display: grid; grid-template-columns: 1fr auto; column-gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line); transition: opacity .3s;
}
.dishes h3 { font-size: 22px; }
.dishes p { grid-column: 1; margin-top: 4px; font-size: 15px; color: var(--muted); }
.price { grid-row: 1; grid-column: 2; font: 22px var(--serif); font-variant-numeric: tabular-nums; }
.dishes li.dim { opacity: .22; }
.menu-note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* ---------- Producteurs ---------- */
.producers { background: var(--paper-2); }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 16px 14px 0; border-bottom: 1px solid var(--ink); }
.table td { padding: 18px 16px 18px 0; border-bottom: 1px solid var(--line); }
.table td:first-child { font: 20px var(--serif); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Visit & booking ---------- */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start; }
address { font-style: normal; margin-top: 32px; font-size: 18px; }
.hours { margin-top: 40px; border-collapse: collapse; width: 100%; max-width: 420px; }
.hours caption { text-align: left; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 10px; }
.hours th, .hours td { text-align: left; font-weight: 400; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; white-space: pre-line; }
.hours .today th, .hours .today td { color: var(--ember-text); font-weight: 600; }
.hours .closed td { color: var(--muted); }

.book { display: grid; gap: 18px; padding: clamp(24px, 4vw, 44px); background: var(--charcoal); color: var(--on-dark); border-radius: var(--radius); }
.book h2 { font-size: 36px; }
.form-note { color: var(--on-dark-muted); font-size: 15px; margin-top: -6px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.book label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
.opt { font-weight: 400; color: var(--on-dark-muted); }
.book input, .book select, .book textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #4a3d33; border-radius: var(--radius);
  background: var(--charcoal-2); color: var(--on-dark); font: 16px var(--sans); color-scheme: dark;
}
.book textarea { resize: vertical; }
.book input:hover, .book select:hover, .book textarea:hover { border-color: var(--on-dark-muted); }
.book [aria-invalid="true"] { border-color: var(--ember-hot); }
.form-error { min-height: 1.4em; color: var(--ember-hot); font-size: 14px; }
.form-error:empty { display: none; }
.book .btn { justify-self: start; }
.confirm { border-top: 1px solid #4a3d33; padding-top: 18px; }
.confirm h3 { font-size: 26px; color: var(--ember-hot); }
.confirm p { margin-top: 6px; color: var(--on-dark-muted); }

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; padding: 40px var(--pad); background: var(--charcoal); color: var(--on-dark); }
.foot .small { width: 100%; font-size: 13px; color: var(--on-dark-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav nav, .status { display: none; }
  .nav .btn { margin-left: auto; }
  .fire-sticky { grid-template-columns: 1fr; align-content: center; gap: 24px; padding-top: 72px; }
  .hearth { order: -1; }
  .hearth svg { width: min(70%, 280px); }
  .clock { font-size: 40px; }
  .stage h2 { font-size: 44px; }
  .stage p { font-size: 16px; margin-top: 10px; }
  .visit { grid-template-columns: 1fr; }
  .table thead { display: none; }
  .table tr { display: grid; grid-template-columns: 1fr auto; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .table td:nth-child(2), .table td:nth-child(3) { grid-column: 1; font-size: 14px; color: var(--muted); }
  .table td.num { grid-row: 1; grid-column: 2; }
}
@media (max-width: 520px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs button { flex: none; margin-right: 12px; padding-right: 8px; }
  .row { grid-template-columns: 1fr; }
  .hero-facts dd { font-size: 21px; }
  .dishes h3, .price { font-size: 19px; }
}
