/* =============================================================================
   cafe BomBom — Tampines 1 · design system

   MOBILE FIRST, literally: no `max-width` media query exists in this file.
   The base rules describe a phone; desktop is layered on at 720px and 1040px.
   The person this is built for is standing inside Tampines 1 with about thirty
   seconds to decide whether to go up to Level 4, so on a phone the operational
   facts — what it is, what to try, what it costs, which floor, open or not —
   all sit above or immediately below the fold, never underneath the visuals.

   VISUAL SYSTEM — a two-temperature bento.
   The brief asked for HOT/COLD, DARK/LIGHT, COFFEE/DESSERT as an experience.
   Rather than decorating with that idea, the grid is built from it: cold cells
   sit on --frost and carry the bingsu, warm cells sit on --cream and carry the
   coffee, and two --ink cells anchor the dark end. Cells are deliberately NOT
   uniform — the hero spans the full grid, some cells are tall, some are wide
   strips, and the ticker breaks the grid entirely. A page of identical rounded
   rectangles is the failure mode a bento brief invites, so hierarchy is
   enforced by span, not decoration.

   No Korean text is used decoratively. The one Korean word that appears
   (빙수 / bingsu) is the actual product name and is labelled as such.

   CONTRAST — every token checked against WCAG AA on all three surfaces
   (--snow, --frost, --cream). The two that needed solving:
     --ink-3 #586069 → 6.21 / 5.70 / 5.68
     --berry #C42239 → 5.62 / 5.16 / 5.15, white-on-berry 5.78 (button-safe)
   ============================================================================= */

:root {
  --snow:    #FBFCFD;
  --frost:   #EDF3F7;
  --frost-2: #DDE9F0;
  --cream:   #F7F1E9;
  --cream-2: #EFE4D6;
  --ink:     #121519;
  --ink-2:   #454C55;
  --ink-3:   #586069;
  --berry:   #C42239;
  --berry-d: #A5182B;
  --berry-lt:#FF8A9B;   /* on dark only */
  --cocoa:   #6B4A34;
  --muted-d: #A7B0BA;   /* on dark only */
  --line:    #E2E8ED;
  --line-2:  #CBD5DD;

  --wrap: 1180px;
  --r:    18px;
  --r-lg: 26px;

  --shadow-1: 0 1px 2px rgba(18,21,25,.04), 0 6px 20px rgba(18,21,25,.05);
  --shadow-2: 0 2px 8px rgba(18,21,25,.07), 0 24px 50px rgba(18,21,25,.10);

  --ease: cubic-bezier(.2,.7,.3,1);
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --actionbar: 66px;
}

*, *::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(--snow);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--actionbar) + env(safe-area-inset-bottom, 0px));
}

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

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.03em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 11vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 7vw, 2.4rem); }
h3 { font-size: 1.12rem; letter-spacing: -.02em; }

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

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--snow); padding: .9rem 1.2rem; font-weight: 700;
}
.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: cheap, transform+opacity only ---------- */
.js-anim .reveal { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.js-anim .reveal.is-in { opacity: 1; transform: none; }
.js-anim .reveal-d1 { transition-delay: .06s; }
.js-anim .reveal-d2 { transition-delay: .12s; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,252,253,.92);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; gap: .7rem; min-height: 58px; }

.brand { display: flex; align-items: center; gap: .5rem; text-decoration: none; margin-right: auto; min-height: 44px; }
.brand .mark { flex: none; }
.brand-txt { font-family: var(--f-display); font-weight: 700; font-size: 1.1rem; letter-spacing: -.03em; }
.brand-txt i { font-style: normal; color: var(--berry); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  background: none; border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--ink); cursor: pointer;
}
.head-cta { display: none; }

/* drawer, clipped by a viewport-sized shell so an off-canvas panel can never
   widen the document (a translated fixed element still counts toward
   scrollWidth — it is the classic mobile overflow bug) */
.nav-shell { position: fixed; inset: 0; z-index: 150; overflow: hidden; visibility: hidden; }
.nav-open .nav-shell { visibility: visible; }
.scrim { position: absolute; inset: 0; background: rgba(18,21,25,.45); opacity: 0; transition: opacity .28s var(--ease); }
.nav-open .scrim { opacity: 1; }
.site-nav {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 2;
  width: min(80vw, 310px); background: var(--snow);
  padding: 4.6rem 1.3rem 2rem; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s var(--ease);
  box-shadow: var(--shadow-2);
}
.nav-open .site-nav { transform: none; }
.site-nav a {
  text-decoration: none; font-family: var(--f-display); font-weight: 700;
  font-size: 1.05rem; color: var(--ink-2);
  min-height: 54px; display: flex; align-items: center; border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--berry); }
.nav-close {
  position: absolute; top: .9rem; right: .9rem; width: 44px; height: 44px;
  border-radius: 12px; background: none; border: 1px solid var(--line-2);
  color: var(--ink); cursor: pointer; display: grid; place-items: center;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem;
  min-height: 50px; padding: .5rem 1.35rem; border-radius: 999px;
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .12s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--berry); color: #fff; }
.btn-ink { background: var(--ink); color: var(--snow); }
.btn-outline { border-color: var(--line-2); color: var(--ink); }
.btn-on-dark { color: var(--snow); border-color: rgba(251,252,253,.4); }
.btn-wide { width: 100%; }

/* ---------- sticky action bar (the 30-second decision) ---------- */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
  padding: .55rem .75rem calc(.55rem + env(safe-area-inset-bottom, 0px));
  background: rgba(251,252,253,.97); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.actionbar .btn { min-height: 46px; font-size: .9rem; padding-inline: .5rem; }

/* ---------- open-now ---------- */
.open-pill {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 700; font-family: var(--f-display);
}
.open-pill .led { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.open-pill.is-open .led { background: #2E8B57; box-shadow: 0 0 0 3px rgba(46,139,87,.2); }
.open-pill.is-shut .led { background: var(--berry); box-shadow: 0 0 0 3px rgba(196,34,57,.16); }

/* ---------- sections ---------- */
.section { padding: 2.8rem 0; }
.section-frost { background: var(--frost); }
.section-cream { background: var(--cream); }
.section-ink { background: var(--ink); color: var(--snow); }
.section-ink h2, .section-ink h3 { color: var(--snow); }
.section-ink p { color: var(--muted-d); }

.eyebrow {
  font-family: var(--f-display); font-size: .79rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--berry); margin: 0 0 .6rem;
}
.section-ink .eyebrow { color: var(--berry-lt); }
.lede { font-size: 1.03rem; color: var(--ink-2); max-width: 58ch; }
.section-ink .lede { color: var(--muted-d); }

/* =============================================================================
   THE BENTO
   One grid, cells that span differently. On a phone it is 2 columns so the
   rhythm survives; the hero and the wide strips span both.
   ============================================================================= */
.bento { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }

.cell {
  position: relative; overflow: hidden; border-radius: var(--r);
  background: var(--frost); min-height: 0;
}
/* several cells are links; without this every caption inside them underlines */
a.cell { text-decoration: none; color: inherit; }
.cell-2 { grid-column: span 2; }
.cell img { width: 100%; height: 100%; object-fit: cover; }

/* hero cell — dominates the viewport, breaks out of the uniform rhythm */
.cell-hero { grid-column: span 2; }
.cell-hero .cell-media { position: relative; }
.cell-hero img { aspect-ratio: 4 / 5; }
.cell-hero .cell-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 4.5rem 1.1rem 1.1rem;
  background: linear-gradient(180deg, rgba(18,21,25,0) 0%, rgba(18,21,25,.82) 60%, rgba(18,21,25,.92) 100%);
  color: var(--snow);
}
.cell-hero h2 { color: var(--snow); margin-bottom: .2rem; }
.cell-hero p { color: #DCE4EA; font-size: .93rem; margin: 0; }

/* a cell that is purely a label + number */
.cell-stat {
  background: var(--ink); color: var(--snow);
  padding: 1.1rem; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 128px;
}
.cell-stat b { font-family: var(--f-display); font-size: 2rem; line-height: 1; letter-spacing: -.04em; display: block; }
.cell-stat span { font-size: .82rem; color: var(--muted-d); }
.cell-stat.is-berry { background: var(--berry); }
.cell-stat.is-berry span { color: #FFE0E4; }

/* product cell — image + caption strip */
.cell-prod { background: var(--snow); border: 1px solid var(--line); display: flex; flex-direction: column; }
.cell-prod img { aspect-ratio: 1 / 1; }
.cell-prod.is-tall img { aspect-ratio: 4 / 5; }
.cell-prod .cell-body { padding: .75rem .85rem .9rem; display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.cell-prod h3 { margin: 0; font-size: 1rem; }
.cell-prod .price { font-family: var(--f-display); font-weight: 700; color: var(--berry); font-size: .95rem; }
.cell-prod .note { font-size: .82rem; color: var(--ink-3); }

/* wide texture strip */
.cell-strip { grid-column: span 2; }
.cell-strip img { aspect-ratio: 3 / 1; }

/* a text-only cell in the warm half */
.cell-note { background: var(--cream); padding: 1.1rem; display: flex; flex-direction: column; justify-content: center; }
.cell-note b { font-family: var(--f-display); font-size: 1.05rem; display: block; margin-bottom: .25rem; }
.cell-note span { font-size: .88rem; color: var(--ink-2); }

/* ---------- ticker — deliberately breaks the grid ---------- */
.ticker {
  overflow: hidden; background: var(--ink); color: var(--snow);
  padding: .7rem 0; margin: 0;
}
.ticker-track {
  display: flex; gap: 2.4rem; width: max-content;
  font-family: var(--f-display); font-weight: 700; font-size: .9rem;
  letter-spacing: .04em; text-transform: uppercase;
  animation: ticker 32s linear infinite;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 2.4rem; white-space: nowrap; }
.ticker-track i { font-style: normal; color: var(--berry-lt); }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- menu list ---------- */
.menu-tools { display: grid; gap: .65rem; padding-bottom: 1rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; min-height: 50px; font-family: var(--f-text); font-size: 1rem; color: var(--ink);
  background: var(--snow); border: 1.5px solid var(--line-2); border-radius: 14px; padding: .5rem 1rem .5rem 2.7rem;
}
.search input::placeholder { color: var(--ink-3); }

.chips {
  display: flex; gap: .45rem; overflow-x: auto; padding-bottom: .25rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent);
          mask-image: linear-gradient(90deg, #000 90%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center;
  font-family: var(--f-display); font-size: .87rem; font-weight: 700; color: var(--ink-2);
  background: var(--snow); border: 1.5px solid var(--line-2); border-radius: 999px;
  padding: 0 .95rem; cursor: pointer; white-space: nowrap;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--snow); }

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

.mgroup { margin-bottom: 2rem; }
.mgroup:last-child { margin-bottom: 0; }
.mgroup h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.mgroup .note { font-size: .86rem; color: var(--ink-3); margin-bottom: .8rem; }

.mlist { list-style: none; margin: 0; padding: 0; }
.mrow {
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .15rem .8rem;
  align-items: baseline; padding: .8rem 0; border-bottom: 1px solid var(--line);
}
.mrow:last-child { border-bottom: 0; }
.mrow .nm { font-weight: 600; font-size: .99rem; }
.mrow .pr { font-family: var(--f-display); font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mrow .pr.ask { font-family: var(--f-text); font-size: .82rem; font-weight: 600; color: var(--ink-3); }
.mrow .ds { grid-column: 1 / -1; font-size: .86rem; color: var(--ink-2); }
.mrow .tag {
  display: inline-block; margin-left: .4rem; vertical-align: middle;
  font-family: var(--f-display); font-size: .64rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--berry); background: #FBE7EA;
  padding: .12rem .4rem; border-radius: 5px;
}
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty b { display: block; font-family: var(--f-display); font-size: 1.1rem; color: var(--ink); margin-bottom: .2rem; }

/* small layout utilities, so no inline styles are needed in the markup */
.pill-row { margin-top: 1.3rem; }
.act-row { margin-top: 1.6rem; }
.bento-pair { margin-top: 1.6rem; }
/* Korean product name shown once beside its English name, not decoration */
.kr { font-family: var(--f-text); font-weight: 400; font-size: .62em; color: var(--ink-3); letter-spacing: 0; }

/* ---------- facts ---------- */
.facts { display: grid; gap: 1.1rem; }
.fact dt { font-family: var(--f-display); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .25rem; }
.fact dd { margin: 0; font-size: 1rem; }
.fact dd a { color: var(--berry); font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }

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

/* ---------- faq ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; position: relative;
  padding: 1.1rem 2.5rem 1.1rem 0; min-height: 44px;
  font-family: var(--f-display); font-size: 1.03rem; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; margin-top: -6px;
  width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg); transition: transform .22s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 1.1rem; color: var(--ink-2); font-size: .94rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--ink); color: var(--muted-d); padding: 2.6rem 0 1.8rem; }
.site-foot .brand { color: var(--snow); margin-bottom: .9rem; }
.foot-grid { display: grid; gap: 1.6rem; padding-bottom: 1.6rem; border-bottom: 1px solid rgba(167,176,186,.22); }
.site-foot h4 { font-family: var(--f-display); font-size: .76rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--snow); margin: 0 0 .6rem; }
.foot-list { list-style: none; margin: 0; padding: 0; display: grid; font-size: .93rem; }
.foot-list a, .foot-list span { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--muted-d); }
.foot-bottom { padding-top: 1.3rem; font-size: .79rem; display: grid; gap: .25rem; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--actionbar) + 16px); transform: translate(-50%, 170%);
  background: var(--ink); color: var(--snow); padding: .75rem 1.2rem; border-radius: 999px;
  font-size: .88rem; font-weight: 700; z-index: 300; box-shadow: var(--shadow-2);
  transition: transform .32s var(--ease); max-width: calc(100vw - 2rem);
}
.toast.is-up { transform: translate(-50%, 0); }

/* =============================================================================
   DESKTOP LAYERS
   ============================================================================= */
@media (min-width: 720px) {
  body { font-size: 17px; padding-bottom: 0; }
  .actionbar { display: none; }
  .toast { bottom: 24px; }
  .head-cta { display: block; }
  .head-cta .btn { min-height: 44px; font-size: .9rem; }
  .section { padding: 4rem 0; }

  .bento { grid-template-columns: repeat(4, 1fr); gap: .85rem; }
  .cell-hero { grid-column: span 4; }
  .cell-hero .cell-media img { aspect-ratio: 21 / 9; }
  .cell-hero .cell-cap { padding: 6rem 1.8rem 1.6rem; }
  .cell-2 { grid-column: span 2; }
  .cell-strip { grid-column: span 4; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 1.4rem 2rem; }
  .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .menu-tools { grid-template-columns: minmax(0,300px) 1fr; align-items: center; gap: 1rem; }
  .chips { -webkit-mask-image: none; mask-image: none; flex-wrap: wrap; overflow: visible; }
  .visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; }
}

@media (min-width: 1040px) {
  .nav-toggle, .nav-close, .scrim { display: none; }
  .nav-shell { position: static; overflow: visible; visibility: visible; z-index: auto; }
  .site-nav {
    position: static; width: auto; padding: 0; transform: none;
    flex-direction: row; gap: 1.5rem; background: none; box-shadow: none;
  }
  .site-nav a { min-height: 0; border: 0; font-size: .95rem; }
  .site-nav a[aria-current="page"] { color: var(--ink); }
  .bar { min-height: 72px; gap: 1.5rem; }

  /* hierarchy: the hero stops being a full-width band and becomes a large cell
     with two supporting cells beside it — the grid earns its keep here */
  .cell-hero { grid-column: span 2; grid-row: span 2; }
  .cell-hero .cell-media img { aspect-ratio: 1 / 1; }
  .cell-hero h2 { font-size: 2.1rem; }
  .menu-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.6rem; align-items: start; }
}

/* ---------- feedback: hover only where a cursor exists ---------- */
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn-primary:hover { background: var(--berry-d); }
  .btn-ink:hover { background: #000; }
  .btn-outline:hover { border-color: var(--ink); background: var(--frost); }
  .chip:hover { border-color: var(--ink-3); color: var(--ink); }
  .site-nav a:hover { color: var(--berry); }
  .cell-prod:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
  .cell-prod:hover img { transform: scale(1.03); }
  .cell-prod img { transition: transform .5s var(--ease); }
}

/* touch: hover never fires, so presses carry the feedback */
@media (pointer: coarse) {
  .btn:active, .chip:active { transform: scale(.97); }
  .cell-prod:active { background: var(--frost); }
  .faq summary { padding-block: 1.2rem; }
}
