/* Maple & Thyme — Tier 1 "Starter"
   Identity: butter & thyme. Kitchen-ticket signature. */

:root {
  --butter: #f4e3bf;
  --butter-deep: #eed9a8;
  --linen: #fcf7ea;
  --thyme: #23402c;
  --thyme-deep: #182e1f;
  --maple: #b4661f;
  --maple-bright: #d17f2e;
  --sage: #7e9678;
  --charwood: #221b10;
  --paper: #fffdf6;

  --font-display: "Young Serif", Georgia, serif;
  --font-ui: "Gabarito", system-ui, sans-serif;
  --font-body: "Newsreader", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --pad: clamp(20px, 5vw, 72px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--butter);
  color: var(--thyme);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.mono, .mono-tag { font-family: var(--font-mono); }

.mono-tag {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
}

.eyebrow {
  /* warm handwritten-menu voice, not machine label */
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--maple);
  margin-bottom: 18px;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--butter) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid color-mix(in srgb, var(--thyme) 18%, transparent);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.amp { color: var(--maple); }

.header-nav {
  display: flex;
  gap: 22px;
  margin-inline: auto;
}

.header-nav a {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s;
}

.header-nav a:hover { border-color: var(--maple); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.open-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--thyme);
  background: var(--linen);
  border: 1.5px solid var(--thyme);
  border-radius: 999px;
  padding: 6px 12px;
  white-space: nowrap;
}

.ticket-btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  background: var(--thyme);
  color: var(--linen);
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.15s, background 0.2s;
}

.ticket-btn:hover { background: var(--thyme-deep); transform: translateY(-1px); }

.ticket-count {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--maple-bright);
  color: var(--charwood);
  border-radius: 999px;
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

.ticket-count.pulse { animation: pulse 0.4s ease; }

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vh, 110px) var(--pad) clamp(40px, 6vh, 80px);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(33px, 4.7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 26px;
}

.hero-title .line { display: block; overflow: hidden; }

.hero-title em {
  font-style: normal;
  color: var(--maple);
}

.maple-dot { color: var(--maple); }

.hero-sub {
  font-size: clamp(18px, 1.6vw, 22px);
  max-width: 46ch;
  color: color-mix(in srgb, var(--thyme) 82%, var(--sage));
  margin-bottom: 32px;
}

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: 10px;
  padding: 14px 26px;
  cursor: pointer;
  border: 2px solid var(--thyme);
  transition: transform 0.15s, background 0.2s, color 0.2s;
  display: inline-block;
  text-align: center;
}

.btn-solid { background: var(--thyme); color: var(--linen); }
.btn-solid:hover { background: var(--thyme-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--thyme); }
.btn-ghost:hover { background: color-mix(in srgb, var(--thyme) 10%, transparent); }

.hero-photo {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 12px 14px 0 color-mix(in srgb, var(--maple) 32%, var(--butter));
}

.hero-photo img { aspect-ratio: 4 / 3.4; object-fit: cover; width: 100%; }

.hero-photo .mono-tag {
  position: absolute;
  bottom: 12px;
  left: 14px;
  background: var(--charwood);
  color: var(--butter);
  padding: 5px 10px;
  border-radius: 6px;
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  background: var(--thyme);
  color: var(--butter);
  padding: 13px 0;
  border-block: 2px solid var(--thyme-deep);
}

.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  will-change: transform;
}

.ticker-track span { display: inline-block; }
.ticker-track .leaf { color: var(--maple-bright); }

/* ---------- menu ---------- */

.menu-section { padding: clamp(56px, 9vh, 110px) var(--pad); }

.section-head { margin-bottom: 34px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 58px);
  letter-spacing: -0.012em;
}

.section-note {
  color: var(--sage);
  font-style: italic;
  margin-top: 6px;
}

.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.cat-tab {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  background: var(--linen);
  color: var(--thyme);
  border: 1.5px solid color-mix(in srgb, var(--thyme) 35%, transparent);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cat-tab:hover { border-color: var(--thyme); }

.cat-tab[aria-selected="true"] {
  background: var(--thyme);
  color: var(--linen);
  border-color: var(--thyme);
}

.dish-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 22px;
}

.dish-card {
  background: var(--paper);
  border: 1.5px solid color-mix(in srgb, var(--thyme) 16%, transparent);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s, box-shadow 0.18s;
}

.dish-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--thyme) 45%, transparent);
}

.dish-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.dish-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }

.dish-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
}

.dish-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17.5px;
  letter-spacing: -0.01em;
}

.dish-price {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--maple);
  white-space: nowrap;
}

.dish-desc {
  font-size: 15.5px;
  color: color-mix(in srgb, var(--thyme) 75%, var(--sage));
  flex: 1;
  margin-bottom: 14px;
}

.dish-tags { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }

.dish-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--sage);
  color: var(--sage);
  border-radius: 4px;
  padding: 2px 6px;
}

.dish-tag.signature { border-color: var(--maple); color: var(--maple); }

.add-btn {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 15px;
  background: var(--butter-deep);
  border: 1.5px solid var(--thyme);
  color: var(--thyme);
  border-radius: 8px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.add-btn:hover { background: var(--thyme); color: var(--linen); }

.add-btn.added { background: var(--thyme); color: var(--linen); }

/* ---------- story ---------- */

.story {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  background: var(--linen);
  padding: clamp(56px, 9vh, 120px) var(--pad);
  border-block: 1.5px solid color-mix(in srgb, var(--thyme) 14%, transparent);
}

.story-photo {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: -12px 14px 0 color-mix(in srgb, var(--sage) 45%, var(--linen));
}

.story-photo img { aspect-ratio: 4 / 3; object-fit: cover; }

.story-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.012em;
  margin-bottom: 22px;
}

.story-text { max-width: 56ch; margin-bottom: 16px; }

/* ---------- visit ---------- */

.visit {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(28px, 5vw, 80px);
  padding: clamp(56px, 9vh, 110px) var(--pad);
}

.visit-address {
  font-style: normal;
  font-size: 19px;
  line-height: 1.7;
  margin: 18px 0 26px;
}

.hours-table { border-collapse: collapse; }

.hours-table caption {
  caption-side: bottom;
  text-align: left;
  padding-top: 10px;
}

.hours-table th, .hours-table td {
  text-align: left;
  padding: 8px 26px 8px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--thyme) 30%, transparent);
  font-weight: 500;
}

.visit-map iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  border-radius: 16px;
  filter: sepia(0.25) saturate(0.85);
}

/* ---------- footer ---------- */

.site-footer {
  background: var(--charwood);
  color: var(--butter);
  text-align: center;
  padding: 56px var(--pad) 48px;
}

.footer-mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  margin-bottom: 8px;
}

.footer-line { font-style: italic; color: color-mix(in srgb, var(--butter) 70%, transparent); }

.footer-demo {
  margin-top: 26px;
  font-size: 14px;
  color: color-mix(in srgb, var(--butter) 55%, transparent);
  max-width: 60ch;
  margin-inline: auto;
}

/* ---------- ticket drawer (signature) ---------- */

.drawer-scrim, .modal-scrim {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--charwood) 55%, transparent);
  z-index: 60;
}

.ticket-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(400px, 100vw);
  z-index: 70;
  transform: translateX(105%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  padding: 18px;
  display: flex;
}

.ticket-drawer.open { transform: translateX(0); }

.ticket-paper {
  background: var(--paper);
  width: 100%;
  border-radius: 4px;
  padding: 26px 22px 22px;
  font-family: var(--font-mono);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: -18px 0 40px -18px rgba(0,0,0,0.5);
  /* perforated top edge */
  --notch: 10px;
  mask:
    radial-gradient(circle at 50% 0, transparent 0 5px, black 5.5px) 50% 0 / var(--notch) 100% repeat-x,
    linear-gradient(black, black);
  mask-composite: intersect;
}

.ticket-head {
  text-align: center;
  border-bottom: 2px solid var(--charwood);
  padding-bottom: 14px;
  margin-bottom: 14px;
  position: relative;
}

.ticket-brand {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.28em;
  color: var(--charwood);
}

.ticket-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #8a8177;
  margin-top: 6px;
  line-height: 1.6;
}

.ticket-close {
  position: absolute;
  top: -6px;
  right: -4px;
  background: none;
  border: 1.5px solid var(--charwood);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-family: inherit;
  color: var(--charwood);
}

.ticket-lines { flex: 0 0 auto; }

.ticket-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  color: var(--charwood);
  padding: 7px 0;
}

.ticket-line .qty-controls {
  display: inline-flex;
  gap: 2px;
  margin-right: 4px;
}

.qty-btn {
  font-family: inherit;
  font-size: 12px;
  border: 1px solid var(--charwood);
  background: none;
  border-radius: 4px;
  width: 20px;
  height: 20px;
  cursor: pointer;
  line-height: 1;
  color: var(--charwood);
}

.qty-btn:hover { background: var(--butter); }

.ticket-line .dots {
  border-bottom: 2px dotted #b9ae9d;
  transform: translateY(-4px);
}

.ticket-line .li-price { font-size: 13.5px; }

.ticket-empty {
  text-align: center;
  color: #8a8177;
  font-size: 13px;
  line-height: 1.8;
  padding: 34px 0;
}

.ticket-tear {
  border-top: 2px dashed #b9ae9d;
  margin: 14px -22px 14px;
  position: relative;
}

.ticket-tear::before {
  content: "✂";
  position: absolute;
  left: 14px;
  top: -11px;
  color: #b9ae9d;
  font-size: 14px;
  background: var(--paper);
  padding: 0 4px;
}

.ticket-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 16px;
  color: var(--charwood);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.ticket-checkout { width: 100%; font-family: var(--font-display); }

/* ---------- checkout modal ---------- */

.modal-scrim {
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.checkout {
  background: var(--paper);
  border-radius: 14px;
  width: min(420px, 100%);
  padding: 30px 28px;
  position: relative;
}

.checkout h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--thyme);
}

.checkout-note { font-size: 14.5px; color: var(--sage); margin-bottom: 20px; }

.checkout form { display: flex; flex-direction: column; gap: 14px; }

.checkout label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checkout input {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 11px 12px;
  border: 1.5px solid color-mix(in srgb, var(--thyme) 30%, transparent);
  border-radius: 8px;
  background: var(--linen);
  color: var(--thyme);
}

.checkout input:focus { outline: 2px solid var(--maple); outline-offset: 1px; }

.checkout input[readonly] { color: #9a9080; }

.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

#checkout-done-view { text-align: center; padding: 8px 0; }

#checkout-done-view h3 { margin: 18px 0 8px; }

#checkout-done-view .btn { margin-top: 18px; width: 100%; }

.stamp {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.3em;
  color: #a8331f;
  border: 4px double #a8331f;
  border-radius: 8px;
  padding: 10px 22px;
  transform: rotate(-8deg) scale(1);
  opacity: 0.9;
  text-transform: uppercase;
}

.stamp.slam { animation: slam 0.45s cubic-bezier(0.2, 1.6, 0.4, 1); }

@keyframes slam {
  0% { transform: rotate(-8deg) scale(2.6); opacity: 0; }
  60% { transform: rotate(-8deg) scale(0.94); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: 0.9; }
}

/* ---------- reveals ---------- */

.reveal { opacity: 0; transform: translateY(22px); }

.no-js .reveal, .reveal.shown { opacity: 1; transform: none; }

/* ---------- focus + motion ---------- */

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--maple);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .story { grid-template-columns: 1fr; }
  .visit { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .open-pill { display: none; }
}

/* ---------- multi-page additions ---------- */

.header-nav a[aria-current="page"] { border-bottom: 2px solid var(--maple); }

.page-intro {
  background: var(--linen);
  border-bottom: 1.5px solid color-mix(in srgb, var(--thyme) 15%, transparent);
  padding: 52px 5vw 40px;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.2vw, 58px);
  letter-spacing: -0.01em;
  color: var(--thyme);
  margin: 10px 0 0;
}

.page-sub {
  font-style: italic;
  color: var(--sage);
  max-width: 60ch;
  margin-top: 8px;
}

.teaser-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.story-flip { border-top: 1.5px solid color-mix(in srgb, var(--thyme) 15%, transparent); }

.visit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 46px 5vw;
}

.visit-strip .section-title { margin-bottom: 8px; }

@media (max-width: 900px) {
  /* pages must stay reachable on mobile: nav wraps instead of hiding */
  .header-nav { display: flex; gap: 14px; font-size: 14px; }
}

/* ---------- warmth pass: friendlier chrome, mono stays on ticket/prices ---------- */

.visit-strip .mono-tag {
  font-family: var(--font-ui);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 14px;
}

.open-pill {
  font-family: var(--font-ui);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ---------- mobile header: nav wraps to its own row, nothing overflows ---------- */

@media (max-width: 640px) {
  .site-header { flex-wrap: wrap; row-gap: 4px; }
  .header-nav { order: 3; width: 100%; gap: 16px; padding-top: 2px; }
  .header-actions { margin-left: auto; }
}
