/* =========================================================
   Café Zest — brand tokens (charcoal + saffron)
   ========================================================= */
:root {
  --ink:      #141414;   /* deepest charcoal: menu, footer */
  --charcoal: #1e1e1e;   /* logo, panels, text */
  --charcoal-2: #2c2c2c;
  --paper:    #f7f5f0;   /* light background */
  --paper-2:  #ebe7df;
  --saffron:  #f2a44e;   /* accent: headings, prices */
  --saffron-deep: #c96d12; /* saffron for use on light backgrounds */
  --muted:    #b4b1aa;
  --line:     rgba(242, 164, 78, .35);

  --display: "Baloo 2", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(20, 20, 20, .45);
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--charcoal);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 24px;
  padding: 12px var(--gutter);
  background: rgba(247, 245, 240, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.nav.is-scrolled { border-color: var(--paper-2); box-shadow: 0 6px 24px -16px rgba(20, 20, 20,.4); }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--display); }
.nav__brand img { width: auto; height: 40px; }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { text-decoration: none; font-weight: 700; position: relative; padding: 4px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--saffron-deep); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav__links a:hover::after { transform: scaleX(1); }

.lang { display: flex; background: var(--paper-2); border-radius: 999px; padding: 4px; }
.lang button {
  border: 0; background: transparent; color: var(--charcoal); font-weight: 800; font-size: .85rem;
  padding: 6px 12px; border-radius: 999px; transition: background .25s, color .25s;
}
.lang button[aria-pressed="true"] { background: var(--charcoal); color: var(--paper); }

.social { display: flex; gap: 6px; }
.social a {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--charcoal); color: var(--paper); transition: background .2s, color .2s, transform .2s;
}
.social svg { width: 19px; height: 19px; }
.social a:hover { background: var(--saffron); color: var(--ink); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: calc(100svh - 64px);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--ink); color: var(--paper);
  overflow: hidden;
}
.hero__inner { text-align: center; padding: 48px var(--gutter) 96px; }
.hero__logo { position: relative; width: clamp(240px, 42vw, 520px); margin: 0 auto 18px; animation: float 6s ease-in-out infinite; }
.logo-glow { color: var(--paper); position: relative; z-index: 1; display: block; width: 100%; height: auto; overflow: visible; }

/* Final (resting) state is the default, so reduced-motion users just see the glowing logo. */
.lg-trace path { stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0; }
.lg-steam { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 2.6s ease-in-out infinite; }
.lg-steam--2 { animation-delay: -1.3s; }

/* Neon switch-on: outline draws in, solid logo fades up, outline hands off to the glow */
.lg-trace path { animation: trace 1.6s cubic-bezier(.6,0,.3,1) .2s both, traceOut .6s ease 1.9s forwards; }
.lg-solid { animation: solidIn .8s ease 1.3s both; }
.hero__kicker { margin: 4px 0 0; color: var(--saffron); font-weight: 800; letter-spacing: .32em; font-size: clamp(.8rem, 1.6vw, 1rem); }
.hero__kicker i { font-style: normal; margin: 0 .3em; }
.divider { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 18px auto; color: var(--saffron-deep); }
.divider span { width: 64px; height: 1.5px; background: currentColor; opacity: .7; }
.divider b { font-size: .8rem; }
.hero__tagline { font: 600 clamp(1.3rem, 3vw, 2rem)/1.2 var(--display); margin: 0 0 28px; }
.hero__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: 999px; font-weight: 800; text-decoration: none;
  border: 2px solid var(--charcoal); transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--charcoal); color: var(--paper); box-shadow: var(--shadow); }
.btn--primary:hover { background: var(--ink); }
.btn--ghost { background: transparent; color: var(--charcoal); }
.btn--ghost:hover { background: var(--charcoal); color: var(--paper); }
.btn--small { padding: 8px 18px; font-size: .9rem; }

/* Buttons + divider on the dark hero */
.hero .divider { color: var(--saffron); }
.hero .btn--primary { background: var(--saffron); border-color: var(--saffron); color: var(--ink); box-shadow: 0 14px 34px -12px rgba(242,164,78,.55); }
.hero .btn--primary:hover { background: #f6b66c; border-color: #f6b66c; }
.hero .btn--ghost { border-color: var(--paper); color: var(--paper); }
.hero .btn--ghost:hover { background: var(--paper); color: var(--ink); }

.marquee {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: var(--saffron); color: var(--ink); overflow: hidden; padding: 14px 0;
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__track span { font: 700 1.1rem/1 var(--display); white-space: nowrap; padding-right: 2.2rem; }
.marquee__track span::after { content: "◆"; margin-left: 2.2rem; font-size: .6rem; vertical-align: middle; color: var(--ink); opacity: .45; }

/* ---------- Section heads ---------- */
section { padding: clamp(64px, 9vw, 112px) var(--gutter); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--saffron-deep); }
.section-head p { margin: 10px 0 0; color: #5c5a55; font-size: 1.05rem; }
.section-head--light h2 { color: var(--saffron); }
.section-head--light p { color: var(--muted); }

/* ---------- Menu (light, so it contrasts with the dark hero above) ---------- */
.menu { background: var(--paper); color: var(--charcoal); position: relative; }
.menu::before {
  content: ""; position: absolute; inset: 18px; border: 1.5px solid rgba(201, 109, 18, .28);
  border-radius: 22px; pointer-events: none;
}
.menu .section-head h2 { color: var(--saffron-deep); }
.menu .section-head p { color: #5c5a55; }

.tabs {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
  max-width: 900px; margin: 0 auto 40px;
}
.tab {
  border: 1.5px solid #d6d1c6; background: #fff; color: var(--charcoal);
  padding: 10px 18px; border-radius: 999px; font-weight: 700; transition: all .25s;
}
.tab:hover { border-color: var(--charcoal); }
.tab[aria-selected="true"] { background: var(--charcoal); color: var(--paper); border-color: var(--charcoal); }

.menu__grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 18px; max-width: 1160px; margin: 0 auto;
}
.item {
  position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; align-content: start;
  padding: 22px 22px 20px; border-radius: var(--radius);
  background: #fff; border: 1px solid #ebe7df;
  box-shadow: 0 10px 30px -22px rgba(20, 20, 20, .45);
  transition: transform .3s, border-color .3s, box-shadow .3s;
  animation: pop .45s both;
}
.item:hover { transform: translateY(-4px); border-color: var(--saffron); box-shadow: 0 18px 36px -20px rgba(201, 109, 18, .45); }
.item__cat { grid-column: 1 / -1; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--saffron-deep); font-weight: 800; }
.item__name { font: 800 1.35rem/1.15 var(--display); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge {
  font: 800 .62rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase;
  background: var(--saffron); color: var(--ink); padding: 5px 8px; border-radius: 999px;
}
.item__price { font: 800 1.35rem/1.15 var(--display); color: var(--saffron-deep); white-space: nowrap; }
.item__desc { grid-column: 1 / -1; margin: 0; color: #4a4844; font-size: .95rem; }
.item__extra { grid-column: 1 / -1; margin: 0; color: #75726c; font-style: italic; font-size: .85rem; }
.item__options { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  border: 1px solid #d6d1c6; background: transparent; color: var(--charcoal);
  padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; transition: all .2s;
}
.chip:hover { border-color: var(--charcoal); }
.chip[aria-pressed="true"] { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }
.add {
  grid-column: 1 / -1; justify-self: start; margin-top: 10px;
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--charcoal); color: var(--paper);
  padding: 8px 16px 8px 10px; border-radius: 999px; font-weight: 800; font-size: .9rem;
  transition: background .2s, color .2s, transform .15s;
}
.add:hover { background: var(--saffron); color: var(--ink); }
.add:active { transform: scale(.95); }
.add b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: currentColor; }
.add b::before { content: "+"; color: var(--charcoal); font-size: 1rem; line-height: 1; }
.add:hover b::before { color: var(--saffron); }
.menu__note { text-align: center; color: #75726c; margin: 40px 0 0; font-size: .95rem; }

/* ---------- Glossary term (e.g. "Tapri") ---------- */
.term {
  position: relative; cursor: help; outline: none;
  text-decoration: underline dotted var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.term::after {               /* small "?" marker */
  content: "?"; display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 3px;
  border-radius: 50%; background: var(--saffron); color: var(--ink);
  font: 800 .62rem/1 var(--body); vertical-align: super;
}
.term__tip {
  position: absolute; left: -6px; top: calc(100% + 10px); z-index: 20;
  width: max-content; max-width: min(280px, 78vw); padding: 12px 14px; border-radius: 12px;
  background: var(--ink); color: var(--paper); box-shadow: 0 16px 30px -12px rgba(20,20,20,.6);
  font: 400 .88rem/1.45 var(--body); letter-spacing: 0; text-transform: none; text-align: left; white-space: normal;
  display: none;
}
.term__tip::before {         /* arrow (JS moves it when the tip is nudged on-screen) */
  content: ""; position: absolute; left: var(--arrow, 18px); top: -6px; width: 12px; height: 12px;
  background: var(--ink); transform: rotate(45deg); border-radius: 2px;
}
.term__tip b { color: var(--saffron); }
.term:hover .term__tip, .term:focus .term__tip, .term:focus-within .term__tip { display: block; animation: tipIn .2s ease both; }
@keyframes tipIn { from { opacity: 0; transform: translateY(-4px); } }
.term:focus-visible { border-radius: 4px; box-shadow: 0 0 0 3px rgba(242,164,78,.5); }
.item:has(.term:hover, .term:focus) { z-index: 5; }
.combo:has(.term:hover, .term:focus) { z-index: 5; }

/* ---------- Combos ---------- */
.combos { background: var(--charcoal); color: var(--paper); }
.combos__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 22px; max-width: 1100px; margin: 0 auto;
}
.combo {
  position: relative; padding: 30px 26px 26px; border-radius: 24px;
  background: var(--paper); color: var(--charcoal); box-shadow: 0 30px 50px -30px rgba(0,0,0,.6);
  display: flex; flex-direction: column; gap: 10px;
}
.combo::after {               /* saffron corner arc, drawn inside the card */
  content: ""; position: absolute; right: 0; top: 0; width: 100px; height: 100px;
  border-radius: 0 24px 0 100%; background: rgba(242, 164, 78,.18); pointer-events: none;
}
.combo__save {
  align-self: flex-start; background: var(--saffron-deep); color: var(--paper);
  font-weight: 800; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
}
.combo h3 { font-size: 1.9rem; }
.combo__items { margin: 0; color: #5c5a55; }
.combo__price { display: flex; align-items: baseline; gap: 10px; margin-top: auto; padding-top: 10px; }
.combo__price strong { font: 800 2.2rem/1 var(--display); color: var(--saffron-deep); }
.combo__price s { color: #8f8c86; }
.combo .add { align-self: flex-start; position: relative; z-index: 1; background: var(--charcoal); color: var(--paper); }
.combo .add b::before { color: var(--charcoal); }
.combo .add:hover { background: var(--saffron-deep); }
.combo .add:hover b::before { color: var(--saffron-deep); }

/* ---------- Story ---------- */
.story {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 80px);
  align-items: center; max-width: 1160px; margin: 0 auto;
}
.story h2 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); color: var(--saffron-deep); margin-bottom: 18px; }
.story p { font-size: 1.1rem; margin: 0 0 14px; }
.story__stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.story__stats li {
  display: flex; align-items: center; gap: 18px; padding: 18px 22px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
}
.story__stats strong { font: 800 2.4rem/1 var(--display); color: var(--saffron-deep); min-width: 92px; }

/* ---------- Visit ---------- */
.visit { background: var(--paper-2); }
.visit__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 18px; max-width: 1100px; margin: 0 auto;
}
.visit__card { background: var(--paper); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); }
.visit__card h3 { font-size: 1.5rem; color: var(--saffron-deep); margin-bottom: 10px; }
.visit__card p { margin: 0 0 8px; }
.link { font-weight: 700; text-decoration-color: var(--saffron); text-underline-offset: 3px; }
.hours { list-style: none; margin: 0; padding: 0; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed #d6d1c6; }
.hours li.is-today { font-weight: 800; color: var(--saffron-deep); }
.open-status { margin-top: 12px !important; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.open-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #8f8c86; }
.open-status.is-open::before { background: #3fa35b; box-shadow: 0 0 0 4px rgba(63,163,91,.2); }

/* ---------- Footer ---------- */
.footer {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 32px var(--gutter) 100px; background: var(--ink); color: var(--muted); text-align: center;
}
.footer img { width: auto; height: 44px; }
.footer p { margin: 0; }

/* ---------- Order tray ---------- */
.tray-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 14px 22px; border: 0; border-radius: 999px;
  background: var(--saffron); color: var(--ink); font-weight: 800;
  box-shadow: 0 16px 30px -10px rgba(20, 20, 20,.55);
  transition: transform .25s;
}
.tray-btn:hover { transform: translateY(-3px); }
.tray-btn.bump { animation: bump .45s; }
.tray-btn__count {
  display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-size: .85rem;
}
.tray {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(420px, 100%); background: var(--paper); color: var(--charcoal);
  display: flex; flex-direction: column; box-shadow: -20px 0 50px -20px rgba(0,0,0,.4);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.tray.is-open { transform: none; }
.tray__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--paper-2); }
.tray__head h2 { font-size: 1.8rem; color: var(--saffron-deep); }
.tray__close { border: 0; background: var(--paper-2); width: 40px; height: 40px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--charcoal); }
.tray__suggest {
  margin: 16px 24px 0; padding: 14px 16px; border-radius: 14px;
  background: rgba(242, 164, 78,.2); border: 1px dashed var(--saffron-deep); font-size: .92rem;
}
.tray__suggest button { margin-top: 8px; }
.tray__list { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; flex: 1; }
.tray__list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px dashed #d6d1c6; }
.tray__list .name { font: 700 1.1rem/1.2 var(--display); }
.tray__list .opt { grid-column: 1; color: #75726c; font-size: .82rem; }
.tray__list .line { font-weight: 800; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 4px; grid-column: 2; justify-self: end; }
.qty button { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--charcoal); background: transparent; color: var(--charcoal); font-weight: 800; line-height: 1; }
.qty button:hover { background: var(--charcoal); color: var(--paper); }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }
.tray__empty { padding: 24px; color: #75726c; margin: 0; flex: 1; }
.tray__foot { padding: 20px 24px 26px; border-top: 1px solid var(--paper-2); background: #fff; }
.tray__total { display: flex; justify-content: space-between; align-items: baseline; font: 700 1.2rem var(--display); }
.tray__total strong { font-size: 1.8rem; color: var(--saffron-deep); }
.tray__note { color: #75726c; font-size: .85rem; margin: 4px 0 12px; }
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(20, 20, 20,.45); backdrop-filter: blur(2px); }

.toast {
  position: fixed; left: 50%; bottom: 90px; z-index: 70;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 999px;
  font-weight: 700; transition: all .3s; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal + language fade ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s, transform .7s; }
.reveal.is-in { opacity: 1; transform: none; }
body.lang-switching [data-i18n], body.lang-switching .menu__grid, body.lang-switching .combos__grid { opacity: 0; }
[data-i18n], .menu__grid, .combos__grid { transition: opacity .18s; }

/* ---------- Animations ---------- */
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes trace { from { stroke-dashoffset: 1; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes traceOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes solidIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes flicker {
  0%, 100% { opacity: 1; transform: translateY(0) scaleY(1); }
  30% { opacity: .55; transform: translateY(-1.5px) scaleY(1.06); }
  55% { opacity: .9; } 70% { opacity: .65; transform: translateY(-.5px) scaleY(.97); }
}
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes bump { 30% { transform: scale(1.15); } 60% { transform: scale(.95); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .lang { margin-left: auto; }
  .story { grid-template-columns: 1fr; }
  .menu::before { inset: 8px; }
}
