/* ==========================================================================
   Lauren's Cafe - "Oat & Sage" design system
   Mobile-first. Tokens first, components second, page layout last.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Colour - claret red and gold, warm neutrals */
  --oat: #FAF5EC;          /* page background */
  --cream: #FFFDF8;        /* cards, header */
  --linen: #EADFCD;        /* hairlines, borders */
  --espresso: #2B211A;     /* primary ink */
  --cocoa: #5C4F44;        /* secondary ink */
  --claret: #9E1F28;       /* brand red - primary action */
  --claret-deep: #7C121B;  /* action hover / focus */
  --claret-tint: #F9EAE7;  /* soft red fill */
  --gold: #C9A227;         /* decorative gold (borders, dashes) */
  --gold-ink: #8A671B;     /* gold that passes AA as text */
  --gold-tint: #F6EDD6;
  --danger: #6E2A15;

  /* Back-compat aliases (older rules reference these) */
  --sage: var(--claret);
  --sage-deep: var(--claret-deep);
  --sage-tint: var(--claret-tint);
  --honey: var(--gold-ink);
  --honey-tint: var(--gold-tint);

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --step--1: clamp(0.85rem, 0.82rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.25vw, 1.1rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.9vw, 1.9rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.6vw, 2.6rem);
  --step-4: clamp(2.25rem, 1.8rem + 2.6vw, 3.5rem);

  /* Space (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  /* Shape and shadow */
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --shadow-1: 0 1px 2px rgba(43, 33, 26, 0.06), 0 4px 14px rgba(43, 33, 26, 0.07);
  --shadow-2: 0 2px 6px rgba(43, 33, 26, 0.09), 0 12px 30px rgba(43, 33, 26, 0.12);

  /* Motion */
  --ease: cubic-bezier(0.25, 0.8, 0.35, 1);
  --dur: 220ms;

  /* Layout */
  --wrap: 72rem;
  --tap: 48px; /* minimum touch target */
}

/* ---------- Reset and base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--oat);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s-4);
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--s-4); }
a { color: var(--sage-deep); text-underline-offset: 3px; }
a:hover { color: var(--espresso); }
:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--sage-tint); }

.wrap {
  width: min(var(--wrap), 100% - 2.5rem);
  margin-inline: auto;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--espresso);
  color: var(--cream);
  padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--radius-s) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; color: var(--cream); }

.kicker {
  display: inline-block;
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: var(--s-3);
}
.lede { font-size: var(--step-1); color: var(--cocoa); max-width: 38rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--tap);
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:active { transform: scale(0.985); }
.btn-primary { background: var(--sage); color: #fff; }
.btn-primary:hover { background: var(--sage-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--espresso); border-color: var(--espresso); }
.btn-ghost:hover { background: var(--espresso); color: var(--cream); }
.btn-honey { background: var(--honey-tint); color: var(--espresso); border-color: var(--honey); }
.btn-honey:hover { background: var(--honey); color: #fff; }

/* ---------- Header and navigation (mobile-first) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--cream) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linen);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 64px;
  padding-block: var(--s-2);
}
.brand { display: inline-flex; align-items: center; min-height: var(--tap); }
.brand img { height: 40px; width: auto; }
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 0;
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--espresso);
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.site-nav {
  display: none;
  position: absolute;
  inset: 100% 0 auto 0;
  background: var(--cream);
  border-bottom: 1px solid var(--linen);
  box-shadow: var(--shadow-2);
  padding: var(--s-3) var(--s-5) var(--s-5);
}
.site-nav.open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-inline: var(--s-3);
  border-radius: var(--radius-s);
  font-size: var(--step-1);
  font-family: var(--font-display);
  font-weight: 540;
  color: var(--espresso);
  text-decoration: none;
}
.site-nav a:hover { background: var(--sage-tint); }
.site-nav a[aria-current="page"] {
  color: var(--sage-deep);
  background: var(--sage-tint);
}
.nav-order { margin-top: var(--s-4); }
.nav-order .btn { width: 100%; }

/* ---------- Hero with steam signature ---------- */
.hero { padding-block: var(--s-6) var(--s-7); }
.hero-grid { display: grid; gap: var(--s-6); }
.hero-copy { max-width: 40rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.hero-figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.hero-figure img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* Signature: rising steam */
.steam {
  display: flex;
  gap: 10px;
  height: 34px;
  align-items: flex-end;
  margin-bottom: var(--s-3);
}
.steam span {
  display: block;
  width: 3px;
  height: 24px;
  border-radius: 3px;
  background: linear-gradient(to top, transparent, var(--sage));
  opacity: 0.7;
  transform-origin: bottom;
  animation: steam-rise 2.8s var(--ease) infinite;
}
.steam span:nth-child(2) { height: 30px; animation-delay: 0.5s; }
.steam span:nth-child(3) { height: 22px; animation-delay: 1.1s; }
@keyframes steam-rise {
  0% { transform: translateY(4px) scaleY(0.85) skewX(0deg); opacity: 0.25; }
  40% { opacity: 0.75; }
  60% { transform: translateY(-3px) scaleY(1.05) skewX(-5deg); }
  100% { transform: translateY(-7px) scaleY(1) skewX(4deg); opacity: 0.15; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--s-7); }
.section-alt { background: var(--cream); border-block: 1px solid var(--linen); }
.section-head { max-width: 44rem; margin-bottom: var(--s-6); }
/* Signature: dashes of red and gold under every section heading */
.section-head h2::after,
main h1::after {
  content: "";
  display: block;
  width: 84px;
  height: 4px;
  margin-top: var(--s-3);
  border-radius: 2px;
  background: repeating-linear-gradient(90deg,
    var(--claret) 0 18px, transparent 18px 26px,
    var(--gold) 26px 40px, transparent 40px 48px);
}

.card-grid { display: grid; gap: var(--s-5); }
.card {
  background: var(--cream);
  border: 1px solid var(--linen);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.section-alt .card { background: var(--oat); }
.card img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; }
.card-body { padding: var(--s-5); }
.card-body h3 { margin-bottom: var(--s-2); }
.card-body p { margin: 0; color: var(--cocoa); }

/* Opening hours table */
.hours { width: 100%; border-collapse: collapse; max-width: 26rem; }
.hours th, .hours td {
  text-align: left;
  padding: var(--s-3) 0;
  border-bottom: 1px dashed var(--linen);
  font-size: var(--step-0);
}
.hours th { font-weight: 700; padding-right: var(--s-5); white-space: nowrap; }
.hours td { color: var(--cocoa); }
.hours tr.today th, .hours tr.today td { color: var(--sage-deep); font-weight: 700; }
.open-now {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-4);
  padding: var(--s-2) var(--s-4);
  border-radius: 999px;
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-weight: 700;
  font-size: var(--step--1);
}
.open-now::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.open-now.closed { background: var(--honey-tint); color: var(--honey); }

/* Reviews */
.reviews { display: grid; gap: var(--s-5); }
blockquote.review {
  margin: 0;
  padding: var(--s-5);
  background: var(--cream);
  border: 1px solid var(--linen);
  border-radius: var(--radius-m);
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.4;
}
blockquote.review footer {
  margin-top: var(--s-3);
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--cocoa);
}

/* ---------- Menu page ---------- */
.menu-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--oat);
  border-bottom: 1px solid var(--linen);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.menu-nav::-webkit-scrollbar { display: none; }
.menu-nav ul {
  display: flex;
  gap: var(--s-2);
  list-style: none;
  margin: 0;
  padding: var(--s-3) var(--s-2);
  width: max-content;
}
.menu-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--s-4);
  border-radius: 999px;
  border: 1px solid var(--linen);
  background: var(--cream);
  font-weight: 700;
  font-size: var(--step--1);
  text-decoration: none;
  color: var(--espresso);
  white-space: nowrap;
}
.menu-nav a:hover, .menu-nav a.active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.menu-section {
  background: var(--cream);
  border: 1px solid var(--linen);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: var(--s-5) var(--s-4) var(--s-6);
  margin-top: var(--s-6);
  scroll-margin-top: 130px;
}
.menu-section-head {
  display: flex;
  align-items: baseline;
  gap: var(--s-4);
  flex-wrap: wrap;
  padding-bottom: var(--s-3);
  margin-bottom: var(--s-2);
  border-bottom: 3px dashed var(--gold);
}
.menu-section-head h2 {
  color: var(--claret);
  margin: 0;
  font-size: var(--step-2);
}
.menu-section-note { color: var(--gold-ink); font-weight: 700; font-size: var(--step--1); }

.menu-items { list-style: none; margin: 0; padding: 0; }
.menu-item { padding-block: var(--s-4); }
.menu-item + .menu-item { border-top: 1px dashed var(--linen); }
.menu-item-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.menu-item-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
}
.menu-item-row::after {
  content: "";
  flex: 1;
  border-bottom: 2px dotted var(--linen);
  transform: translateY(6px);
  min-width: 1.5rem;
}
.menu-item-price {
  order: 3;
  font-weight: 700;
  color: var(--claret);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.menu-item-desc { margin: var(--s-2) 0 0; color: var(--cocoa); max-width: 42rem; }

/* Photo button (camera icon) */
.item-photo-btn {
  order: 4;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -4px 0;
  border-radius: 50%;
  border: 1px solid var(--linen);
  background: var(--gold-tint);
  color: var(--espresso);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.item-photo-btn:hover, .item-photo-btn:focus-visible {
  background: var(--claret);
  border-color: var(--claret);
  color: #fff;
}
.item-photo-btn svg { width: 20px; height: 20px; }

/* Photo modal */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  background: rgba(43, 33, 26, 0.62);
}
.photo-modal[hidden] { display: none; }
.photo-modal-card {
  background: var(--cream);
  border-radius: var(--radius-l);
  border-top: 6px solid var(--claret);
  box-shadow: var(--shadow-2);
  max-width: 34rem;
  width: 100%;
  max-height: 88vh;
  overflow: auto;
}
.photo-modal-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: calc(var(--radius-l) - 6px) calc(var(--radius-l) - 6px) 0 0;
}
.photo-modal-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5) var(--s-5);
}
.photo-modal-body h3 { margin: 0; font-size: var(--step-1); }
.photo-modal-body .price { font-weight: 700; color: var(--claret); white-space: nowrap; }
.photo-modal-close {
  position: sticky;
  top: var(--s-2);
  margin-left: auto;
  margin-right: var(--s-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border-radius: 50%;
  border: none;
  background: var(--cream);
  color: var(--espresso);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-1);
}
.photo-modal-close:hover { background: var(--claret); color: #fff; }

.diet-badges { display: inline-flex; gap: var(--s-1); margin-left: var(--s-2); vertical-align: middle; }
.diet-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding-inline: 5px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: help;
  border: 1px solid transparent;
}
.diet-V { background: var(--sage-tint); color: var(--sage-deep); border-color: #C9D6B8; }
.diet-VE { background: #DCEBD3; color: #2F5220; border-color: #B9D3A6; }
.diet-GF { background: var(--honey-tint); color: #8A5D14; border-color: #E8D3A8; }
.diet-DF { background: #E4EEF2; color: #2F5A6B; border-color: #C2D8E1; }
.diet-N { background: #F4E0DB; color: #8A3B28; border-color: #E4BEB4; }

.diet-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--cream);
  border: 1px solid var(--linen);
  border-radius: var(--radius-m);
  margin-top: var(--s-5);
}
.diet-legend li { display: inline-flex; align-items: center; gap: var(--s-2); list-style: none; font-size: var(--step--1); color: var(--cocoa); }
.diet-legend ul { display: contents; margin: 0; padding: 0; }
.allergen-note {
  margin-top: var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: var(--honey-tint);
  border-left: 4px solid var(--honey);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--cocoa);
  font-size: var(--step--1);
}

/* ---------- About page ---------- */
.split { display: grid; gap: var(--s-6); align-items: center; }
.split figure { margin: 0; border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-1); }
.split figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.press {
  display: flex;
  gap: var(--s-3);
  align-items: flex-start;
  padding: var(--s-5);
  border-radius: var(--radius-m);
  background: var(--sage-tint);
  color: var(--sage-deep);
  font-weight: 600;
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: var(--s-6); }
.contact-card {
  background: var(--cream);
  border: 1px solid var(--linen);
  border-radius: var(--radius-m);
  padding: var(--s-5);
  box-shadow: var(--shadow-1);
}
.contact-card h3 { display: flex; align-items: center; gap: var(--s-2); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-3); }
.contact-list a { font-weight: 700; }
.map-frame {
  border: 0;
  width: 100%;
  height: 320px;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-1);
}

/* ---------- Order banner (when ordering is off) ---------- */
.order-off-note {
  background: var(--honey-tint);
  border: 1px solid var(--honey);
  border-radius: var(--radius-s);
  padding: var(--s-3) var(--s-4);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--cocoa);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--s-7);
  background: var(--espresso);
  color: #EFE7DA;
  padding-block: var(--s-7) var(--s-6);
}
.site-footer a { color: #EFE7DA; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: var(--s-6); }
.footer-brand { font-family: var(--font-display); font-size: var(--step-2); }
.footer-heading {
  font-size: var(--step--1);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C9BBA6;
  margin-bottom: var(--s-3);
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.footer-meta {
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid rgba(239, 231, 218, 0.18);
  font-size: var(--step--1);
  color: #C9BBA6;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  flex-wrap: wrap;
}
.footer-meta p { margin: 0; }
.footer-credit { text-align: right; margin-left: auto; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { padding-top: var(--s-5); font-size: var(--step--1); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--s-2); color: var(--linen); }
.breadcrumb a { color: var(--cocoa); }
.breadcrumb [aria-current="page"] { color: var(--espresso); font-weight: 700; }

/* ---------- Utility ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Tablet: 640px ---------- */
@media (min-width: 40em) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .map-frame { height: 380px; }
}

/* ---------- Desktop: 960px ---------- */
@media (min-width: 60em) {
  .brand img { height: 46px; }
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important;
    position: static;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    align-items: center;
    gap: var(--s-4);
  }
  .site-nav ul { display: flex; gap: var(--s-2); }
  .site-nav a { min-height: var(--tap); font-size: var(--step-0); font-family: var(--font-body); font-weight: 700; padding-inline: var(--s-4); }
  .nav-order { margin: 0; }
  .nav-order .btn { width: auto; }

  .hero { padding-block: var(--s-8); }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: var(--s-8); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-8); }
  .split.reverse figure { order: 2; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
  .menu-section { scroll-margin-top: 140px; }
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@media print {
  .site-header, .site-footer, .menu-nav, .hero-actions, .nav-order { display: none; }
  body { background: #fff; }
}

/* Light scheme only: stops mobile auto-dark from inverting brand colours into dark-on-dark */
:root { color-scheme: light only; }

/* Footer design credit */
.footer-credit { font-size: var(--step--1); color: #CDBFA9; }
.footer-credit a { color: #EFE7DA; text-decoration: underline; }
.footer-credit a:hover { color: #fff; }

/* Extra separation for the primary button on any surface */
.btn-primary { border-color: var(--gold); }
.btn-primary:hover, .btn-primary:focus-visible { border-color: var(--gold); }
