/* =============================================================================
   TIMESTEALER CAFÉ — design system

   Warm parchment ground, deep roasted ink, one ember accent. The whole thing is
   built to feel like a small neighbourhood kitchen rather than a chain: soft
   serif display, generous leading, nothing that glows.

   Every colour token below was checked against WCAG AA on both surface tones
   (--paper and --paper-2). --ink-3 is the muted tone and the one that usually
   fails; #6E5F51 clears 5.46:1 on paper and 4.96:1 on paper-2.
   ============================================================================= */

/* ---------- tokens ---------- */
:root {
  --paper:   #F7F1E6;
  --paper-2: #EFE6D5;
  --paper-3: #E7DAC4;
  --ink:     #2A231E;
  --ink-2:   #5C4F44;
  --ink-3:   #6E5F51;
  --ember:   #A24A16;
  --ember-d: #E08A4C;
  --leaf:    #3F5B3C;
  --line:    #E0D3BC;
  --line-2:  #D3C2A6;
  --muted-d: #B9A992;

  --wrap: 1180px;
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;

  --shadow-1: 0 1px 2px rgba(42, 35, 30, .06), 0 4px 14px rgba(42, 35, 30, .05);
  --shadow-2: 0 2px 6px rgba(42, 35, 30, .08), 0 18px 40px rgba(42, 35, 30, .10);

  --ease: cubic-bezier(.22, .68, .32, 1);

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-text: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
figure { margin: 0; }

/* Standalone editorial image — same rounding/lift as the hero figure. */
.fig-round {
  width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  aspect-ratio: 16 / 10; object-fit: cover;
}

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-variation-settings: "SOFT" 40, "WONK" 1;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); font-weight: 700; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: .8rem 1.2rem; border-radius: 0 0 var(--r-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- reveals ----------
   Gated on .js-anim, which js/ui.js adds. Without JS every .reveal stays at its
   natural position — a stalled observer can never serve a blank page. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .reveal-d1 { transition-delay: .08s; }
.js-anim .reveal-d2 { transition-delay: .16s; }
.js-anim .reveal-d3 { transition-delay: .24s; }

/* ---------- top note ---------- */
.top-note {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  font-size: .82rem;
  letter-spacing: .04em;
  padding: .55rem 1rem;
}
.top-note strong { color: #fff; }
.top-note .dot { color: var(--muted-d); margin: 0 .5rem; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 230, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }

.brand {
  display: flex; align-items: center; gap: .7rem;
  text-decoration: none; color: var(--ink); margin-right: auto;
}
.brand .mark { color: var(--ember); flex: none; }
.brand-txt { display: grid; line-height: 1.05; }
.brand-txt b {
  font-family: var(--f-display); font-weight: 700; font-size: 1.12rem;
  letter-spacing: .10em; text-transform: uppercase;
}
.brand-txt small {
  font-size: .62rem; letter-spacing: .34em; text-transform: uppercase;
  color: var(--ink-3); padding-left: .12em;
}

.site-nav { display: flex; gap: 1.7rem; }
.site-nav a {
  text-decoration: none; font-weight: 500; font-size: .95rem;
  color: var(--ink-2); padding: .3rem 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--ember); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); padding: .5rem; color: var(--ink); cursor: pointer;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-text); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-primary { background: var(--ember); color: #fff; box-shadow: var(--shadow-1); }
.btn-primary:hover { background: #8E3F11; box-shadow: var(--shadow-2); }

.btn-outline { border-color: var(--line-2); color: var(--ink); background: transparent; }
.btn-outline:hover { border-color: var(--ink); background: var(--paper-2); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #1B1613; }

.btn-sm { padding: .58rem 1.1rem; font-size: .88rem; }

/* ---------- open-now pill ---------- */
.open-pill {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .84rem; font-weight: 600; color: var(--ink-2);
}
.open-pill .led {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none;
}
.open-pill.is-open .led { background: #3E7A46; box-shadow: 0 0 0 3px rgba(62, 122, 70, .18); }
.open-pill.is-shut .led { background: #A5563F; box-shadow: 0 0 0 3px rgba(165, 86, 63, .16); }

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt { background: var(--paper-2); }
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink h2, .section-ink h3 { color: var(--paper); }
.section-ink p { color: var(--muted-d); }

.eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--ember); margin: 0 0 1rem;
}
.section-ink .eyebrow { color: var(--ember-d); }

.lede { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 62ch; }
.section-ink .lede { color: var(--muted-d); }

.head-2col {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 3.5rem; align-items: end; margin-bottom: clamp(2rem, 4vw, 3.2rem);
}

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero h1 { margin-bottom: .35em; }
.hero h1 em {
  font-style: italic; color: var(--ember); font-variation-settings: "SOFT" 60, "WONK" 1;
}
.hero-sub { font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--ink-2); max-width: 46ch; }
.hero-acts { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; margin-top: 1.9rem;
  padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: .88rem; color: var(--ink-3);
}
.hero-meta b { color: var(--ink); font-weight: 600; }

.hero-fig { position: relative; }
.hero-fig img {
  width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow-2);
  aspect-ratio: 16 / 11; object-fit: cover;
}
.hero-stamp {
  position: absolute; right: -14px; bottom: -18px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: .85rem 1.1rem; box-shadow: var(--shadow-2); max-width: 220px;
}
.hero-stamp b {
  display: block; font-family: var(--f-display); font-size: 1.05rem; line-height: 1.2;
}
.hero-stamp span { font-size: .78rem; line-height: 1.45; color: var(--ink-3); display: block; margin-top: .2rem; }

/* ---------- dish / category cards ---------- */
.grid-3 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 1.9rem);
}
.grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 2rem);
}

.dish {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              border-color .35s var(--ease);
}
.section-alt .dish { background: var(--paper); }
a.dish { text-decoration: none; color: inherit; }
a.dish:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); }

.dish-img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-3); }
.dish-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
a.dish:hover .dish-img img { transform: scale(1.045); }

.dish-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.dish-body h3 { margin-bottom: .35rem; }
.dish-body p { font-size: .93rem; color: var(--ink-2); }
.dish-foot {
  margin-top: auto; padding-top: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: .85rem; color: var(--ink-3);
}
.dish-foot .price { font-family: var(--f-display); font-weight: 700; color: var(--ink); font-size: 1.05rem; }

/* ---------- the menu ---------- */
.menu-tools {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
  padding-bottom: 1.4rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line);
}
.menu-search { position: relative; flex: 1 1 260px; min-width: 0; }
.menu-search svg {
  position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--ink-3); pointer-events: none;
}
.menu-search input {
  width: 100%; font-family: var(--f-text); font-size: .95rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 999px;
  padding: .72rem 1rem .72rem 2.7rem;
}
.menu-search input::placeholder { color: var(--ink-3); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-family: var(--f-text); font-size: .87rem; font-weight: 600; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line-2); border-radius: 999px;
  padding: .5rem 1rem; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.menu-count { font-size: .85rem; color: var(--ink-3); margin: 0 0 1.6rem; }

.menu-group { margin-bottom: 3rem; }
.menu-group:last-child { margin-bottom: 0; }
.menu-group > h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem); margin-bottom: .2rem;
  display: flex; align-items: baseline; gap: .8rem;
}
.menu-group > h2::after {
  content: ""; flex: 1; height: 1px; background: var(--line-2);
}
.menu-group .group-note { font-size: .88rem; color: var(--ink-3); margin-bottom: 1.4rem; }

.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: .3rem 1.5rem; align-items: baseline;
  padding: .95rem 0; border-bottom: 1px dashed var(--line);
}
.menu-row:last-child { border-bottom: 0; }
.menu-row .name {
  font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.menu-row .price {
  font-family: var(--f-display); font-weight: 700; font-size: 1.08rem;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.menu-row .price.is-daily { font-size: .85rem; font-weight: 600; color: var(--ink-3); font-family: var(--f-text); }
.menu-row .desc {
  grid-column: 1 / -1; font-size: .92rem; color: var(--ink-2); max-width: 62ch;
}
.menu-row .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; }

.tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .55rem; border-radius: 4px;
  background: var(--paper-3); color: var(--ink-2);
}
.tag-veg { background: #DDE7DA; color: #33502F; }
.tag-new { background: #F3DECB; color: #8E3F11; }

.menu-empty {
  text-align: center; padding: 3rem 1rem; color: var(--ink-3);
  border: 1px dashed var(--line-2); border-radius: var(--r);
}
.menu-empty b { display: block; font-family: var(--f-display); font-size: 1.2rem; color: var(--ink); margin-bottom: .3rem; }

/* ---------- band with photo ---------- */
.band { position: relative; overflow: hidden; }
.band-img { position: absolute; inset: 0; }
.band-img img { width: 100%; height: 100%; object-fit: cover; }
.band-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(42, 35, 30, .90) 0%, rgba(42, 35, 30, .78) 45%, rgba(42, 35, 30, .45) 100%);
}
.band-in { position: relative; padding: clamp(3.5rem, 8vw, 6rem) 0; color: var(--paper); }
.band-in h2 { color: var(--paper); max-width: 18ch; }
.band-in p { color: #E4D9C7; max-width: 50ch; }

/* ---------- story chapters ---------- */
/* minmax floor of 320px lands the six chapters as a clean 3x2 at desktop
   width rather than 4-then-2, which left a hole in the second row. */
.chapters { display: grid; gap: clamp(1.2rem, 2.5vw, 1.8rem); grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.chapter {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.6rem 1.5rem 1.7rem; position: relative;
}
.chapter .n {
  font-family: var(--f-display); font-weight: 900; font-size: 2.6rem; line-height: 1;
  color: var(--paper-3); display: block; margin-bottom: .5rem;
}
.chapter h3 { margin-bottom: .5rem; }
.chapter p { font-size: .95rem; color: var(--ink-2); margin: 0; }

.pull {
  border-left: 3px solid var(--ember); padding: .3rem 0 .3rem 1.4rem;
  font-family: var(--f-display); font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.35; color: var(--ink); font-style: italic;
}

/* ---------- facts / info ---------- */
.facts { display: grid; gap: 1.5rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.fact dt {
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .4rem;
}
.fact dd { margin: 0; font-size: 1rem; color: var(--ink); }
.fact dd a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.hours-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.hours-table th, .hours-table td { text-align: left; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.hours-table th { font-weight: 600; color: var(--ink-2); }
.hours-table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table tr.is-today th, .hours-table tr.is-today td { color: var(--ember); font-weight: 700; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }

.note-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 1.4rem 1.5rem;
}
.note-card h3 { font-size: 1.15rem; }
.note-card p { font-size: .94rem; color: var(--ink-2); margin: 0; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-family: var(--f-display); font-weight: 600; font-size: 1.08rem; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%;
  width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details p { padding: 0 0 1.2rem; color: var(--ink-2); font-size: .96rem; max-width: 68ch; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: var(--muted-d); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.foot-grid {
  display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr;
  padding-bottom: 2.5rem; border-bottom: 1px solid rgba(185, 169, 146, .22);
}
.site-foot .brand { color: var(--paper); margin-bottom: 1rem; }
.site-foot .brand .mark { color: var(--ember-d); }
.site-foot .brand-txt small { color: var(--muted-d); }
.site-foot h4 {
  font-family: var(--f-text); font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--paper); margin-bottom: .9rem;
}
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .93rem; }
.foot-list a { color: var(--muted-d); text-decoration: none; }
.foot-list a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.foot-bottom {
  padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem;
  justify-content: space-between; font-size: .82rem;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 140%);
  background: var(--ink); color: var(--paper); padding: .8rem 1.3rem;
  border-radius: 999px; font-size: .9rem; font-weight: 600; z-index: 300;
  box-shadow: var(--shadow-2); transition: transform .4s var(--ease);
  max-width: calc(100vw - 2rem);
}
.toast.is-up { transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-fig { order: -1; }
  .hero-stamp { right: 8px; bottom: -14px; }
  .head-2col { grid-template-columns: 1fr; align-items: start; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .head-cta { display: none; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: var(--paper);
    border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-2);
    display: none;
  }
  .site-head.nav-open .site-nav { display: flex; }
  .site-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .band-img::after {
    background: linear-gradient(180deg, rgba(42, 35, 30, .82) 0%, rgba(42, 35, 30, .92) 100%);
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-stamp { position: static; margin-top: 1rem; max-width: none; }
}

/* ===================================================== touch targets ====
   Thumb, not cursor. Chips were 104x35 and footer links 31x18 — 15 of this
   page's 16 interactive elements missed the 44px threshold. :hover never
   fires on touch, so the press state carries the feedback. */
@media (pointer: coarse) {
  .chip { min-height: 44px; }
  .btn { min-height: 44px; }
  .site-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  /* footer links were only 31px wide — a thumb needs the whole row, not the
     width of the word, so these stretch to fill their column. */
  .foot-list a { min-height: 44px; display: flex; align-items: center; }
  .nav-toggle { width: 46px; height: 46px; }
  .menu-search input { min-height: 46px; }
  .chips { gap: .65rem; }

  .chip:active, .btn:active { transform: scale(.96); }
  .faq summary { padding-block: 1.3rem; }
}
