/* ============================================================
   SHARED MILO PRIMITIVES — the cross-cell component kit.

   CLIENT: Milo Coffee House. This file holds ONLY the primitives
   every cell reuses (buttons, ticket card, eyebrow, dividers,
   daypart toggle, menu band, section heads, chrome). Per-cell /
   per-section styling lives in css/cells/cell-N.css — NOT here
   (this is a LOCKED shared surface).

   Identity: buttermilk canvas · Milo Teal + Marigold Clay · DM Serif
   Display / Albert Sans · 14px radius · ticket / order-slip motif.
   Nothing Sharp (no charcoal, no terracotta, no Newsreader/Inter).
   ============================================================ */

/* ============================================================
   0 · CHROME — nav (daypart masthead) + footer. Persistent surfaces.
   ============================================================ */

/* ---- Nav: daypart masthead ---- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition:
    background var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur) var(--ease-out);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.nav__inner {
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-m);
}
/* solidify on scroll past hero */
.nav.is-scrolled {
  background: rgba(247, 241, 231, 0.92);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom-color: var(--paper-line);
  box-shadow: var(--shadow-soft);
}
/* mobile hide-on-scroll-down / reveal-on-scroll-up (STANDING LAW) */
.nav.is-hidden { transform: translateY(-100%); }

.nav__brand { display: inline-flex; align-items: center; }
.nav__brand img { height: 2.1rem; width: auto; }
.nav__center {
  display: inline-flex;
  justify-content: center;
  gap: 0.35rem;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.75em;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--teal-deep); background: var(--teal-soft); }
.nav__right { display: inline-flex; align-items: center; gap: 0.6rem; }
.nav__menu-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.nav__menu-link:hover { color: var(--teal-deep); }
/* the persistent Order Ahead teal pill lives in .nav__right as a .btn--teal */

/* ---- Footer ---- */
.footer {
  background: var(--base);
  color: var(--ink);
  border-top: 1px solid var(--paper-line);
  padding-block: var(--space-xl) var(--space-l);
}
.footer__inner {
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-l);
  align-items: start;
}
.footer__brand img { height: 2.4rem; width: auto; margin-bottom: var(--space-s); }
.footer__descriptor {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: var(--leading-body);
}
.footer__col-head {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  margin-bottom: var(--space-xs);
}
.footer__nav { display: grid; gap: 0.4rem; }
.footer__nav a { color: var(--ink); transition: color var(--dur-fast) var(--ease-out); }
.footer__nav a:hover { color: var(--teal-deep); }
.footer__contact { display: grid; gap: 0.35rem; color: var(--ink-soft); font-size: 0.95rem; }
.footer__contact a { color: var(--ink); }
.footer__contact a:hover { color: var(--teal-deep); }
.footer__bottom {
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid var(--paper-line);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* ============================================================
   1 · BUTTONS — pill actions, press-tactile.
   Primary = MARIGOLD fill (the primary action, WOW §1). Teal = utility.
   Ghost = outline. Cells choose .btn / .btn--teal / .btn--ghost per role.
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 46px;
  padding: 0 1.35em;
  border-radius: 999px;                 /* pill (tile) */
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper-raised);
  background: var(--support-deep);      /* MARIGOLD (deep) — primary action; cream 4.7:1 AA-safe (rest) */
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}
.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  background: #964d22;                   /* deeper on hover (cream ~5.6:1) */
  box-shadow: 0 10px 22px var(--marigold-soft);
  outline: none;
}
.btn:active { transform: translateY(0); }

/* teal utility fill (tile primary pill) — bright teal kept; INK text for AA (5.4:1) */
.btn--teal {
  background: var(--accent);
  color: var(--ink);
}
.btn--teal:hover,
.btn--teal:focus-visible {
  background: #6bc5d5;                   /* lighter teal on hover — ink text ~6.6:1 */
  box-shadow: 0 10px 20px var(--teal-soft);
}

/* ghost / outline */
.btn--ghost {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(76, 181, 200, 0.28);
  color: var(--teal-deep);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: var(--paper-raised);
  border-color: rgba(76, 181, 200, 0.5);
  box-shadow: 0 10px 20px var(--teal-soft);
}

/* small variant */
.btn--sm { min-height: 38px; padding: 0 1.05em; font-size: 0.78rem; }

/* on the espresso seam, ghost flips to light-on-dark */
.section[data-bg="espresso"] .btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--hairline-strong);
  color: var(--text-on-dark);
}

/* ============================================================
   2 · TICKET — the signature notched-corner order-slip card frame.
   Milo's DNA: soft 14px radius, warm soft shadow, a subtle
   perforated top edge. Clean + reusable across every cell.
   ============================================================ */
.ticket {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%),
    var(--paper-raised);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
/* perforated top edge — the order-slip tear line */
.ticket::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 0;
  height: 1px;
  background-image: radial-gradient(circle, var(--paper-line-strong) 0 1px, transparent 1.5px);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  opacity: 0.9;
  pointer-events: none;
}
/* ticket-stub tab — the little "MILO" tab */
.ticket-stub {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.75em;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ============================================================
   3 · EYEBROW / DISPLAY / EM / DIVIDERS — editorial primitives.
   (.eyebrow, .display, .em base rules live in base.css; these add
   the Milo divider marks + the marigold hand-line eyebrow lead.)
   ============================================================ */
/* marigold hand-line lead before an eyebrow (tile) */
.eyebrow--lined {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow--lined::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

/* teal star divider — the ticket-motif rhythm mark */
.star-div {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  line-height: 1;
}
.star-div::before { content: "✦"; font-size: 1em; }

/* a full-width star rule: hairline — star — hairline */
.star-rule {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75em;
  color: var(--accent);
}
.star-rule::before,
.star-rule::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-soft), transparent);
}
.star-rule > span::before { content: "✦"; }

/* dashed order-slip rule — the perforation divider */
.perf-rule {
  height: 0;
  border: 0;
  border-top: 1px dashed var(--paper-line-strong);
  margin-block: var(--space-s);
}

/* ============================================================
   4 · DAYPART TOGGLE / CHIP — Morning / Brunch / Lunch pills.
   Active = teal (tile). The nav center anchors + the hero toggle
   both reuse these. State shift is a menu-chip micro-interaction.
   ============================================================ */
.daypart-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.daypart-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 36px;
  padding: 0 0.85em;
  border-radius: 999px;
  border: 1px solid var(--paper-line);
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition:
    background var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.daypart-chip:hover { transform: translateY(-1px); }
.daypart-chip.is-active,
.daypart-chip[aria-selected="true"] {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: rgba(76, 181, 200, 0.34);
}

/* ============================================================
   5 · SECTION HEADS — shared head layout.
   ============================================================ */
.sec-head {
  display: grid;
  gap: var(--space-xs);
  margin-bottom: var(--space-m);
}
.sec-head__title {
  font-family: var(--font-display);
  font-size: var(--step-section);
  line-height: var(--leading-display);
  color: var(--ink);
}
.sec-head__lede {
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: var(--step-0);
  line-height: var(--leading-body);
}
.sec-head--center { justify-items: center; text-align: center; }
.sec-head--center .sec-head__lede { margin-inline: auto; }

/* ============================================================
   6 · MENU BAND — the bottom "VIEW MENU" ticket band primitive.
   (WOW §C6: cells VARY or drop this — it is NOT stamped identically
   site-wide. This is the base; cells override to earn variation.)
   ============================================================ */
.menu-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) var(--space-m);
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%),
    var(--paper-raised);
  box-shadow: var(--shadow-soft);
}
.menu-band__label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ============================================================
   7 · IMAGE FRAMING — the shared tray/card photo frame.
   A <picture>/<img> covers an aspect-ratio box via inset:0.
   Bright daytime grade — warm, edible, not faux-cinematic (DESIGN.md).
   ============================================================ */
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--paper-line);
  background: var(--paper-soft);
  box-shadow: var(--shadow-soft);
}
.frame > img,
.frame > picture,
.frame > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.03) contrast(1.02) brightness(1.02);
}

/* ============================================================
   8 · TEXT HELPERS — used across cells.
   ============================================================ */
.lede {
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: var(--leading-body);
}
.muted { color: var(--ink-soft); }
.section[data-bg="espresso"] .muted,
.section[data-bg="espresso"] .lede { color: var(--text-on-dark-muted); }

/* ============================================================
   9 · CHROME RESPONSIVE — mobile nav (sticky two-row, action pinned).
   Per-cell responsive lives in each cell-N.css.
   ============================================================ */
@media (max-width: 860px) {
  .nav__center { display: none; }         /* daypart anchors move into cells / menu on mobile */
  .nav__menu-link { display: none; }
  .nav__inner { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-m); }
}
