/* Ember & Oak — warm editorial theme
   Fonts: Fraunces (display serif) + Karla (body)
   Motion: slow fades, soft parallax, gentle ribbon marquee */

:root {
  --cream: #f6efe4;
  --paper: #fbf7f0;
  --ink: #2b1d14;
  --ink-soft: #5b4636;
  --terra: #c4572e;
  --terra-deep: #9e3f1d;
  --olive: #6b6a3a;
  --line: rgba(43, 29, 20, 0.15);
  --radius: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Karla", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
main { overflow-x: clip; }
a { color: inherit; }
em { font-style: italic; }

/* placeholder backgrounds when images are offline */
.ph { position: relative; overflow: hidden; background: var(--terra); }
.ph-warm { background: radial-gradient(circle at 30% 30%, #e08a4c, #9e3f1d 60%, #3b2216); }
.ph-clay { background: radial-gradient(circle at 70% 20%, #d9b58a, #8a5a3b 60%, #2b1d14); }
.ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 6px 6px;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 2rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  transition: background .5s var(--ease), padding .5s var(--ease), color .5s;
  color: var(--paper);
}
.nav.scrolled { background: rgba(246, 239, 228, .94); color: var(--ink); padding-block: .7rem; backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.logo { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; text-decoration: none; letter-spacing: -.01em; }
.logo em { color: var(--terra); font-weight: 300; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: .95rem; position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; background: none; border: 0; color: inherit; width: 32px; height: 32px; cursor: pointer; }
.burger span { display: block; height: 2px; background: currentColor; margin: 7px 0; transition: transform .4s var(--ease); }

.btn {
  display: inline-block; background: var(--terra); color: var(--paper);
  padding: .9rem 1.6rem; border: 0; border-radius: var(--radius);
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.btn:hover { background: var(--terra-deep); transform: translateY(-2px); }
.btn-small { padding: .55rem 1.1rem; font-size: .9rem; }
.link-arrow { text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .75rem; font-weight: 700; color: var(--terra); margin-bottom: 1rem; }
h1, h2, h3, blockquote { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 1.2rem; }
h2 em, h1 em { color: var(--terra); font-weight: 300; }
section { padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 5vw, 4rem); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 3rem; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; padding-bottom: 12vh; color: var(--paper); overflow: hidden; }
.hero-media { position: absolute; inset: -10% 0 0 0; height: 120%; }
.hero-media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20,12,8,.35), rgba(20,12,8,.75)); }
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.hero h1 { font-size: clamp(3.2rem, 9vw, 7.5rem); font-weight: 300; margin-bottom: 1.5rem; }
.hero h1 em { color: #f0a273; }
.hero .eyebrow { color: #f0a273; }
.lede { font-size: 1.2rem; max-width: 520px; margin-bottom: 2rem; opacity: .9; }
.hero-cta { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.hero-badge { position: absolute; right: 6vw; bottom: 12vh; z-index: 2; width: 130px; height: 130px; display: grid; place-items: center; }
.hero-badge svg { position: absolute; inset: 0; animation: spin 24s linear infinite; fill: var(--paper); font: 600 10px var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.hero-badge span { font-size: 2rem; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- STORY ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.story-text p:not(.eyebrow) { font-size: 1.1rem; color: var(--ink-soft); max-width: 520px; }
.stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; flex-wrap: wrap; }
.stat strong { display: block; font-family: var(--serif); font-size: 3rem; font-weight: 300; color: var(--terra); line-height: 1; }
.stat span { font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.story-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.story-images .tall { height: 460px; border-radius: 200px 200px var(--radius) var(--radius); }
.story-images .short { height: 320px; margin-top: 6rem; border-radius: var(--radius); }

/* ---------- MENU ---------- */
.menu { background: var(--paper); }
.tabs { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 3rem; }
.tab { background: none; border: 1px solid var(--line); padding: .6rem 1.3rem; border-radius: 99px; font: 500 .95rem var(--sans); cursor: pointer; color: var(--ink); transition: all .4s var(--ease); }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.menu-list { max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0 3rem; }
.dish { padding: 1.3rem 0; border-bottom: 1px dashed var(--line); opacity: 0; transform: translateY(12px); animation: dishIn .7s var(--ease) forwards; }
@keyframes dishIn { to { opacity: 1; transform: none; } }
.dish-top { display: flex; align-items: baseline; gap: .6rem; }
.dish-name { font-family: var(--serif); font-size: 1.3rem; }
.dish-dots { flex: 1; border-bottom: 1px dotted var(--ink-soft); transform: translateY(-4px); opacity: .4; }
.dish-price { font-family: var(--serif); font-size: 1.15rem; color: var(--terra); }
.dish p { color: var(--ink-soft); font-size: .95rem; }
.menu-note { text-align: center; margin-top: 2.5rem; font-size: .85rem; color: var(--ink-soft); }

/* ---------- RIBBON ---------- */
.ribbon { background: var(--terra); color: var(--paper); overflow: hidden; padding: 1.2rem 0; transform: rotate(-1.5deg); margin: -1rem -2rem; }
.ribbon-track { display: flex; gap: 3rem; width: max-content; animation: ribbon 40s linear infinite; font-family: var(--serif); font-size: 1.8rem; font-style: italic; font-weight: 300; white-space: nowrap; }
@keyframes ribbon { to { transform: translateX(-50%); } }

/* ---------- CHEF ---------- */
.chef { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.chef-img { height: 560px; border-radius: var(--radius); }
blockquote { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-style: italic; font-weight: 300; margin-bottom: 1rem; }
.sig { color: var(--ink-soft); margin-bottom: 2.5rem; }
.timeline { list-style: none; border-left: 1px solid var(--line); }
.timeline li { padding: 0 0 1.4rem 1.5rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: .45rem; width: 9px; height: 9px; border-radius: 50%; background: var(--terra); }
.timeline b { font-family: var(--serif); font-weight: 500; margin-right: .5rem; color: var(--terra); }

/* ---------- REVIEWS ---------- */
.reviews { background: var(--ink); color: var(--paper); }
.reviews h2 { color: var(--paper); }
.review-slider { max-width: 820px; margin: 0 auto; overflow: hidden; }
.review-track { display: flex; transition: transform .9s var(--ease); }
.review { min-width: 100%; text-align: center; padding: 0 1rem; }
.review p { font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.9rem); font-weight: 300; line-height: 1.35; margin-bottom: 1.5rem; }
.review .stars { color: #f0a273; letter-spacing: .2em; margin-bottom: 1rem; }
.review cite { font-style: normal; font-size: .9rem; opacity: .7; }
.review-dots { display: flex; justify-content: center; gap: .6rem; margin-top: 2.5rem; }
.review-dots button { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--paper); background: none; cursor: pointer; transition: all .4s; }
.review-dots button.active { background: var(--paper); width: 28px; border-radius: 10px; }

/* ---------- RESERVE ---------- */
.reserve { background: linear-gradient(rgba(43,29,20,.55), rgba(43,29,20,.55)), radial-gradient(circle at 20% 30%, #e08a4c, #9e3f1d 50%, #2b1d14); display: grid; place-items: center; }
.reserve-card { background: var(--paper); padding: clamp(1.5rem, 5vw, 3.5rem); max-width: 640px; width: 100%; border-radius: var(--radius); box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.reserve-card > p { color: var(--ink-soft); margin-bottom: 1.8rem; }
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 1.1rem; }
input, select { font: 400 1rem var(--sans); padding: .8rem; border: 1px solid var(--line); background: var(--cream); border-radius: var(--radius); color: var(--ink); text-transform: none; letter-spacing: 0; }
input:focus, select:focus { outline: 2px solid var(--terra); outline-offset: 1px; }
input.invalid { border-color: var(--terra); background: #fbe7de; }
fieldset { border: 0; margin-bottom: 1.5rem; }
legend { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: .5rem; }
.slots { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot { padding: .5rem .9rem; border: 1px solid var(--line); background: none; border-radius: 99px; cursor: pointer; font: 500 .9rem var(--sans); color: var(--ink); transition: all .3s; }
.slot:hover:not(:disabled) { border-color: var(--ink); }
.slot.active { background: var(--terra); color: var(--paper); border-color: var(--terra); }
.slot:disabled { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.form-msg { margin-top: 1rem; font-weight: 500; min-height: 1.5em; }
.form-msg.ok { color: var(--olive); }
.form-msg.err { color: var(--terra-deep); }

/* ---------- VISIT ---------- */
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; max-width: 1000px; margin: 0 auto; }
.visit h3 { font-size: 2rem; margin-bottom: 1rem; }
.hours { list-style: none; }
.hours li { display: flex; justify-content: space-between; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.hours li.today { font-weight: 700; color: var(--terra); }
.open-pill { margin-left: .5rem; padding: .15rem .6rem; border-radius: 99px; font-size: .7rem; letter-spacing: .05em; }
.open-pill.open { background: #dfe6c7; color: var(--olive); }
.open-pill.closed { background: #f3d6ca; color: var(--terra-deep); }

.footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 2rem clamp(1rem, 5vw, 4rem); border-top: 1px solid var(--line); font-size: .85rem; color: var(--ink-soft); }

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav { gap: 1rem; }
  .nav .btn-small { margin-left: auto; }
  .burger { display: block; }
  /* explicit 100vh: .nav.scrolled's backdrop-filter makes the nav the containing block, so inset:0 would shrink to the bar */
  .nav-links { position: fixed; inset: 0 0 auto 0; height: 100vh; height: 100dvh; background: var(--ink); color: var(--paper); flex-direction: column; justify-content: center; align-items: center; gap: 2rem; font-size: 1.6rem; transform: translateY(-100%); visibility: hidden; transition: transform .6s var(--ease), visibility 0s .6s; margin: 0; z-index: -1; }
  .nav.open .nav-links { visibility: visible; transition: transform .6s var(--ease), visibility 0s; }
  .nav-links a { font-family: var(--serif); font-size: 2rem; }
  .nav.open .nav-links { transform: none; }
  .nav.open { color: var(--paper); }
  .nav.open .burger span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .nav.open .burger span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .story, .chef, .visit { grid-template-columns: 1fr; }
  .menu-list { grid-template-columns: 1fr; }
  .chef-img { height: 380px; }
  .story-images .tall { height: 320px; }
  .story-images .short { height: 240px; margin-top: 3rem; }
  .hero-badge { display: none; }
  form .row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
