/* ============================================================
   Adam's Kitchen — design system
   Palette echoes the restaurant's printed parchment menu:
   warm ink, aged paper, brass-gold, bottle green.
   ============================================================ */

/* Fonts are self-hosted (2026-09 SEO audit): loading them from
   fonts.googleapis.com made every visitor's browser open a second
   connection before it could render any text, and was the one
   render-blocking third party on this otherwise fast page (LCP was
   already 843ms without it). Both families are variable fonts, trimmed to
   latin+latin-ext, matching the weight/style combinations actually used in
   this file (Cormorant Garamond 300–700 normal+italic, Jost 300–700
   normal). font-display is `optional`, not `swap` — see the sibling
   tomekktattoo.co.uk project, where `swap` cost ~850ms of blocking
   relayout when the real face arrived mid-load; `optional` accepts the
   fallback for that one visit and uses the cached real face after. */
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/cormorant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/cormorant-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/cormorant-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/cormorant-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 300 700;
  font-display: optional;
  src: url("/assets/fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #171310;
  --ink-soft: #262019;
  --char: #1f1a15;
  --paper: #f1e8d8;          /* aged parchment */
  --paper-deep: #e7dcc6;
  --cream: #faf5ea;
  --gold: #b9892f;
  --gold-bright: #d4a94c;
  --green: #2e4a38;
  --wine: #7a3030;
  --text-on-paper: #2b241c;
  --muted-on-paper: #6d6252;
  --text-on-ink: #efe7d6;
  --muted-on-ink: #b3a893;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
/* Available to assistive tech and crawlers, invisible on screen. Only for
   non-focusable content — a focusable element clipped to 1px makes browsers
   scroll to "reveal" it. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
/* Author display rules (flex/grid on overlays) must never beat the hidden attribute. */
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text-on-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: .01em;
}
.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 14px;
}
.section-title { font-size: 2.4rem; font-size: clamp(2rem, 4.5vw, 3rem); font-style: italic; }

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; right: 0; left: 0; z-index: 50;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(23,19,16,.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(212,169,76,.18);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1220px; margin: 0 auto;
}
.wordmark {
  font-family: var(--font-display); font-style: italic; font-weight: 700;
  font-size: 1.45rem; color: var(--cream); white-space: nowrap;
}
.wordmark span { color: var(--gold-bright); }
.site-nav { display: flex; align-items: center; gap: 30px; }
/* :not(.btn) matters. As a bare `.site-nav a` this rule (0,1,1) outranked
   `.btn-gold` (0,1,0), so the header's ORDER ONLINE button rendered muted grey
   on gold — about 1.07:1, far under the 4.5:1 WCAG AA needs. Excluding buttons
   fixes it at the source instead of bolting on a more specific override. */
.site-nav a:not(.btn) { font-size: .92rem; letter-spacing: .06em; color: var(--muted-on-ink); transition: color .2s; }
.site-nav a:not(.btn):hover { color: var(--cream); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: none; /* <button> UA default is light gray — kills contrast on dark sheets */
  padding: 14px 30px; border-radius: 999px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s;
}
.btn:active { transform: scale(.97); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #1d1508; box-shadow: 0 6px 24px rgba(185,137,47,.35);
}
.btn-gold:hover { box-shadow: 0 10px 32px rgba(185,137,47,.5); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(239,231,214,.35); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold-bright); color: var(--gold-bright); }
.btn-sm { padding: 10px 22px; font-size: .82rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(185,137,47,.16), transparent 60%),
    radial-gradient(900px 500px at 85% 110%, rgba(46,74,56,.35), transparent 60%),
    var(--ink);
}
.hero::before { /* film grain */
  content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; opacity: .05; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.6'/%3E%3C/svg%3E");
}
.hero-inner { position: relative; padding: 140px 24px 90px; max-width: 860px; }
.hero .crest {
  width: 74px; height: 74px; margin: 0 auto 26px; border-radius: 50%;
  border: 1px solid rgba(212,169,76,.5); display: grid; place-items: center;
  background: #f1e8d8; overflow: hidden;
}
.hero .crest img { width: 76%; display: block; }
.hero h1 {
  font-size: 3.4rem; font-size: clamp(3rem, 9vw, 5.6rem); font-style: italic; color: var(--cream);
}
.hero .tagline {
  margin: 22px auto 8px; max-width: 560px;
  font-size: 1.1rem; font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: var(--muted-on-ink); font-weight: 300;
}
.hero .ratings {
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  margin: 30px 0 38px; font-size: .9rem; color: var(--muted-on-ink);
}
.hero .ratings strong { color: var(--gold-bright); font-weight: 600; }
.hero .cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero .scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  color: var(--muted-on-ink); font-size: 1.4rem; animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* --- Sections ------------------------------------------------------------- */
section { padding: 96px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p { color: var(--muted-on-ink); margin-top: 14px; font-weight: 300; }

/* Story */
.story { background: var(--char); }
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }
.story-copy p { color: var(--muted-on-ink); font-weight: 300; margin-bottom: 18px; font-size: 1.05rem; }
.story-copy p strong { color: var(--cream); font-weight: 500; }
.story-facts { display: grid; gap: 18px; }
.fact {
  border: 1px solid rgba(212,169,76,.22); border-radius: var(--radius);
  padding: 22px 26px; background: rgba(212,169,76,.04);
}
.fact .n { font-family: var(--font-display); font-style: italic; font-size: 2rem; color: var(--gold-bright); }
.fact .l { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-on-ink); }

/* Menu — parchment, echoing the printed menu */
.menu-section {
  background: var(--paper);
  color: var(--text-on-paper);
  background-image:
    radial-gradient(800px 400px at 20% 0%, rgba(185,137,47,.10), transparent 60%),
    radial-gradient(700px 500px at 90% 100%, rgba(46,74,56,.08), transparent 60%);
}
.menu-section .eyebrow { color: var(--gold); }
.menu-section .section-head p { color: var(--muted-on-paper); }
.menu-tabs {
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 48px;
}
.menu-tab {
  padding: 10px 22px; border-radius: 999px; font-size: .88rem; letter-spacing: .04em;
  border: 1px solid rgba(43,36,28,.25); background: transparent; color: var(--text-on-paper);
  transition: all .2s;
}
.menu-tab:hover { border-color: var(--gold); color: var(--gold); }
.menu-tab.active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 56px; max-width: 980px; margin: 0 auto; }
/* One group per category, all of them present so crawlers see the whole menu;
   display:contents keeps the dishes as direct grid items, and the global
   [hidden] rule above (with !important) still wins for inactive groups. */
.menu-cat { display: contents; }
.menu-item { padding: 16px 0; border-bottom: 1px dotted rgba(43,36,28,.28); }
.menu-item .row { display: flex; align-items: baseline; gap: 10px; }
.menu-item .name { font-family: var(--font-display); font-weight: 700; font-style: italic; font-size: 1.22rem; }
.menu-item .dots { flex: 1; border-bottom: 1px dotted rgba(43,36,28,.4); transform: translateY(-4px); }
.menu-item .price { font-weight: 600; color: var(--green); white-space: nowrap; }
.menu-item .desc { font-size: .92rem; color: var(--muted-on-paper); margin-top: 4px; font-weight: 300; }
.menu-item .desc.allergens { font-size: .78rem; font-style: italic; }
.menu-item .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor;
  /* A pill badge should never break its own text mid-word (e.g. "★ Popular"
     wrapping to two lines) — the row it sits in wraps as a whole instead. */
  white-space: nowrap; flex-shrink: 0;
}
/* Tag text is small, so every colour here has to clear 4.5:1 against --paper
   (#f1e8d8). veg/gf/popular used to sit at 4.21/4.15/2.74 and were darkened;
   the rest already passed. Re-check with a contrast calculator before
   restyling any of them. */
.tag.veg    { color: #35704a; } /* 4.84:1 */
.tag.vegan  { color: #2e6b3e; } /* 5.25:1 */
.tag.gf     { color: #7d5f18; } /* 4.90:1 */
.tag.spicy  { color: #a04a2a; } /* 4.92:1 */
.tag.soldout{ color: #a03030; } /* 5.84:1 */
.tag.dinein { color: #6b5a8a; } /* 5.00:1 */
.tag.popular{ color: #855e1c; } /* 4.78:1 */
.menu-cta { text-align: center; margin-top: 54px; }
.menu-note { text-align: center; color: var(--muted-on-paper); font-size: .85rem; margin-top: 22px; }

/* Gallery */
.gallery-section { background: var(--ink); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(239,231,214,.12); }
.gallery-item img { width: 100%; height: 240px; object-fit: cover; }
.gallery-item figcaption { padding: 12px 16px; font-size: .85rem; color: var(--muted-on-ink); background: var(--char); }

/* Awards */
.awards-section { background: var(--char); }
.awards-list { list-style: none; display: grid; gap: 14px; max-width: 640px; margin: 0 auto; }
.awards-list li {
  text-align: center; font-family: var(--font-display); font-style: italic; font-size: 1.25rem;
  color: var(--cream); padding: 16px 20px; border: 1px solid rgba(212,169,76,.22); border-radius: var(--radius);
  background: rgba(212,169,76,.04);
}

/* Reviews */
.reviews { background: var(--ink); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.review-card {
  border: 1px solid rgba(239,231,214,.12); border-radius: var(--radius);
  padding: 30px; background: var(--char); display: flex; flex-direction: column; gap: 16px;
}
.review-card .stars { color: var(--gold-bright); letter-spacing: .2em; }
.review-card blockquote {
  font-family: var(--font-display); font-style: italic; font-size: 1.25rem; line-height: 1.45;
  color: var(--cream);
}
.review-card cite { font-style: normal; font-size: .82rem; color: var(--muted-on-ink); letter-spacing: .08em; }
.badges-row {
  display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; margin-top: 56px; text-align: center;
}
.badge-score .s { font-family: var(--font-display); font-style: italic; font-size: 2.6rem; color: var(--gold-bright); }
.badge-score .t { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-on-ink); }

/* Visit */
.visit { background: var(--char); }
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.visit-block h3 { font-size: 1.5rem; font-style: italic; color: var(--cream); margin-bottom: 18px; }
.visit-block p, .visit-block li { color: var(--muted-on-ink); font-weight: 300; }
.visit-block ul { list-style: none; display: grid; gap: 10px; }
.visit-block a.link { color: var(--gold-bright); border-bottom: 1px solid rgba(212,169,76,.4); }
.visit-block a.link:hover { border-color: var(--gold-bright); }
.hours-box {
  border: 1px solid rgba(212,169,76,.25); border-radius: var(--radius);
  padding: 24px 28px; background: rgba(212,169,76,.05); margin-top: 8px; white-space: pre-line;
}

/* FAQ */
.faq { background: var(--ink); }
.faq-list { display: grid; gap: 12px; max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid rgba(239,231,214,.12); border-radius: var(--radius);
  background: var(--char); padding: 4px 24px;
}
.faq-item summary {
  padding: 18px 0; color: var(--cream); font-weight: 500; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--gold-bright); font-size: 1.3rem; flex-shrink: 0; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { color: var(--muted-on-ink); font-weight: 300; padding-bottom: 20px; margin: 0; }
.faq-item a.link { color: var(--gold-bright); border-bottom: 1px solid rgba(212,169,76,.4); }

/* Footer */
.site-footer { background: var(--ink); border-top: 1px solid rgba(239,231,214,.08); padding: 46px 0; }
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer p { color: var(--muted-on-ink); font-size: .85rem; font-weight: 300; }
.site-footer .credit a { color: var(--gold-bright); }

/* Floating order button (mobile) */
.fab-order {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 40; display: none;
}
@media (max-width: 760px) {
  .site-nav a:not(.btn) { display: none; }
  .story-grid, .visit-grid, .menu-grid { grid-template-columns: 1fr; }
  .review-grid, .gallery-grid { grid-template-columns: 1fr; }
  section { padding: 68px 0; }
  .fab-order { display: block; }
}

/* ---------------------------------------------------------------------------
   Old iOS Safari fallbacks (roughly iPhone 6–8 on iOS 12–14.0).
   `gap` inside a FLEX container only works from Safari 14.1 — before that it
   is ignored entirely and the items sit flush against each other. Grid gap is
   fine much earlier, so only flex rows need this.
   `inset` also landed in 14.1, which makes it a reliable stand-in for the
   version test; browsers that understand inset skip this whole block.
   Spacing is applied as margins, so it stacks harmlessly if a browser somehow
   supports one but not the other.
   --------------------------------------------------------------------------- */
@supports not (inset: 0) {
  .site-nav > * + * { margin-left: 30px; }
  .hero .ratings > * { margin: 0 13px 8px; }
  .hero .cta-row > * { margin: 0 8px 12px; }
  .btn > * + * { margin-left: 10px; }
  .story-facts > * + * { margin-top: 18px; }
  .footer-grid > * + * { margin-top: 8px; }
}

/* Keyboard users get a visible way past the header straight to the content
   (same pattern as the order app's skip link). */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold-bright); color: #1d1508; padding: 10px 16px;
  border-radius: 0 0 8px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
