/* ============================================================
   Spot Coffee Co. - styles
   Design language: candy-pink, playful, hand-made. Espresso ink
   type, hard offset shadows, pill buttons, one blush-coral accent.
   The coffee animation lives inside a dark "stage" panel so it
   blends with the video's own espresso background.
   ============================================================ */

/* ---------- Fonts (self-hosted, work offline) ---------- */
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/poppins-800.woff2") format("woff2");
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("assets/fonts/hanken-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ---------- Design tokens ---------- */
:root {
  /* Palette - derived from the brand cup (blush pink on espresso) */
  --ink: #2b1a13;          /* warm espresso, used for text + borders + hard shadows */
  --ink-soft: #6b554b;     /* muted espresso for secondary text */
  --paper: #fffaf4;        /* lightest warm paper */
  --cream: #fff2e6;        /* warm card surface */
  --blush: #f6c9bd;        /* the cup's pink */
  --peach: #ffd9a8;        /* warm gradient stop */
  --pink: #ff6f8b;         /* THE accent - locked. buttons, highlights, active */
  --pink-deep: #ef4f72;    /* pressed/active accent */
  --espresso: #1d1310;     /* the dark inside the animation stage (matches video bg) */

  /* One radius system (locked):
     pill = full, card = 22px, stage = 30px, input = 14px */
  --r-card: 22px;
  --r-stage: 30px;
  --r-input: 14px;

  /* Hard offset shadow (the playful, hand-stamped look) */
  --shadow-sm: 0 3px 0 var(--ink);
  --shadow:    0 5px 0 var(--ink);
  --shadow-lg: 0 8px 0 var(--ink);

  --border: 2.5px solid var(--ink);

  --maxw: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--blush);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

/* ---------- The living candy gradient (fixed behind everything) ---------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(125deg, #ffd9c6 0%, #ffc1d2 38%, #ffd6a6 72%, #ffcad6 100%);
  background-size: 180% 180%;
  animation: drift 22s ease-in-out infinite;
}
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}
@keyframes drift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---------- Type ---------- */
h1, h2, h3 {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0;
  text-transform: lowercase;
}
.display {
  font-size: clamp(2.9rem, 9vw, 6.6rem);
}
.h2 {
  font-size: clamp(2.1rem, 5.5vw, 3.9rem);
}
.eyebrow {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-deep);
}
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(4.5rem, 10vw, 8rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: var(--border);
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--accent { background: var(--pink); color: #fff; }
.btn--accent:hover { background: var(--pink-deep); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translate(3px, -3px); }

/* ---------- Scroll progress bar (top) ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 5px; z-index: 1200;
  background: transparent;
}
.progress__fill {
  height: 100%; width: 0%;
  background: var(--ink);
  transform-origin: left;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding-top: 1.1rem;
  pointer-events: none;
  /* hidden over the hero (the cup + headline are the brand there); fades in once you scroll into the page */
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.header.show-top { opacity: 1; transform: none; }
.wordmark {
  pointer-events: auto;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: var(--border);
  border-radius: 999px;
  padding: 0.5rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.wordmark .dot { color: var(--pink); }

/* ============================================================
   HERO / SCROLLYTELLING (pinned canvas frame scrub)
   ============================================================ */
.show {
  position: relative;
  height: 560vh;          /* scroll length the cup is scrubbed across - longer = slower, smoother scrub */
}
.show__pin {
  position: sticky; top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* top copy band: both beats share one cell and cross-fade */
.hero-head {
  position: relative;
  z-index: 3;
  flex: none;
  width: 100%;
  max-width: 920px;
  padding: clamp(3.75rem, 7vh, 5.25rem) var(--gutter) 0;
  text-align: center;
  display: grid;
}
.beat {
  grid-area: 1 / 1;
  display: flex; flex-direction: column; align-items: center;
  will-change: opacity, transform;
}
.beat--payoff { opacity: 0; pointer-events: none; }
.beat .display { font-size: min(clamp(2.3rem, 5.6vw, 4.6rem), 7.2vh); line-height: 0.94; text-wrap: balance; }
.beat__row { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; margin-top: 1.4rem; }

/* hero entrance — plays once on page load so the hero arrives instead of
   just sitting there flat. Animates the inner pieces (not the buttons
   themselves, so their hover still works), staggered. */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
.beat--intro .tag-pill  { animation: heroIn 0.85s cubic-bezier(.16,1,.3,1) both; animation-delay: 0.15s; }
.beat--intro .display   { animation: heroIn 0.95s cubic-bezier(.16,1,.3,1) both; animation-delay: 0.32s; }
.beat--intro .beat__row { animation: heroIn 0.85s cubic-bezier(.16,1,.3,1) both; animation-delay: 0.52s; }

.tag-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 999px;
  padding: 0.35rem 0.9rem; font-weight: 600; font-size: 0.9rem;
  box-shadow: var(--shadow-sm); margin-bottom: 1.2rem;
}
.tag-pill .ping { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 0 0 rgba(255,111,139,0.7); animation: ping 1.8s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,111,139,0.6); } 70%,100% { box-shadow: 0 0 0 7px rgba(255,111,139,0); } }

/* the cup band: transparent canvas, cup floats on the gradient */
.hero-cup {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  transform-origin: center bottom;
  will-change: transform;
  /* The cup's flat-cropped base is feathered into the page inside drawFrame()
     (canvas destination-out), proportional to the cup so the dissolve is
     consistent on every screen size. See main.js — no CSS mask needed here. */
}
.stage__loader {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--ink-soft);
  font-family: "Poppins", sans-serif; font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.04em;
  transition: opacity 0.5s ease;
}
.hero-cup.ready .stage__loader { opacity: 0; pointer-events: none; }
/* cup eases in once its first frame has loaded (no flat pop) */
.hero-canvas { opacity: 0; transition: opacity 0.9s ease 0.15s; }
.hero-cup.ready .hero-canvas { opacity: 1; }

/* sticker sparkles floating near the cup - they twinkle + drift for life */
.sparkle { position: absolute; z-index: 4; pointer-events: none; color: var(--ink); opacity: 0.8;
  transform-origin: center; animation: twinkle 5s ease-in-out infinite; }
.sparkle--a { top: 30svh; left: 11vw; width: 30px; animation-duration: 4.6s; }
.sparkle--b { top: 46svh; right: 13vw; width: 18px; animation-duration: 6.2s; animation-delay: -2.3s; }
@keyframes twinkle {
  0%, 100% { opacity: 0.32; transform: translateY(0) rotate(0deg) scale(0.85); }
  50%      { opacity: 0.95; transform: translateY(-12px) rotate(45deg) scale(1.15); }
}

/* rotating round brand badge */
.badge {
  position: absolute; z-index: 5;
  right: clamp(0.75rem, 5vw, 3rem); bottom: clamp(2rem, 6svh, 4.5rem);
  width: clamp(84px, 9vw, 116px); height: clamp(84px, 9vw, 116px);
  pointer-events: none;
}
.badge svg { width: 100%; height: 100%; animation: spin 20s linear infinite; }
.badge__core { position: absolute; inset: 0; display: grid; place-items: center; }
.badge__core span { font-size: 1.4rem; color: var(--pink-deep); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   BRAND MARQUEE - two rows scrolling opposite ways. The JS nudges
   their speed with scroll velocity (Web Animations playbackRate).
   ============================================================ */
.mq { overflow: hidden; border-block: var(--border); background: var(--ink); }
.mq__row { overflow: hidden; }
.mq__row--ink  { background: var(--ink); }
.mq__row--pink { background: var(--pink); border-top: var(--border); }
.mq__track { display: flex; width: max-content; will-change: transform; }
.mq__track     { animation: mq-left  26s linear infinite; }
.mq__track--rev{ animation: mq-right 26s linear infinite; }
/* keeps flowing even on hover - never pauses */
.mq__seq {
  flex: none; display: flex; align-items: center; white-space: nowrap;
  font-family: "Poppins", sans-serif; font-weight: 800;
  text-transform: lowercase; letter-spacing: -0.015em;
  font-size: clamp(1.1rem, 2.3vw, 1.85rem);
  padding: 0.55rem 0; color: var(--paper);
}
.mq__row--pink .mq__seq { color: #fff; }
.mq__seq i { color: var(--pink); font-style: normal; font-size: 0.7em; margin: 0 0.85rem; transform: translateY(-0.06em); }
.mq__row--pink .mq__seq i { color: var(--ink); }
@keyframes mq-left  { from { transform: translateX(0); }    to { transform: translateX(-50%); } }
@keyframes mq-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

/* ---------- Reveal on scroll: fade-up, pop-in, plain fade ----------
   Springy easing (slight overshoot) + a soft blur-in for a premium feel. */
.reveal, .pop, .fade {
  opacity: 0;
  filter: blur(7px);
  transition: opacity 0.7s ease, transform 0.85s cubic-bezier(.33,1.4,.5,1), filter 0.7s ease;
}
.reveal { transform: translateY(46px); }                       /* slides up + settles */
.pop    { transform: translateY(40px) scale(0.85); }           /* pops + scales in with bounce */
.fade   { transform: none; filter: blur(9px); }                /* just fades + sharpens */
.reveal.in, .pop.in, .fade.in { opacity: 1; transform: none; filter: blur(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }
.d5 { transition-delay: 0.40s; }

/* ============================================================
   MENU
   ============================================================ */
.menu__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.1rem;
}
.menu-card {
  border: var(--border);
  border-radius: var(--r-card);
  background: var(--cream);
  padding: 1.5rem 1.5rem 1.2rem;
  box-shadow: var(--shadow);
}
.menu-card--lg { grid-column: span 7; }
.menu-card--sm { grid-column: span 5; }
.menu-card--full { grid-column: span 12; }
.menu-card--blush { background: var(--blush); }
.menu-card--ink { background: var(--ink); color: var(--paper); }
.menu-card--ink .price { color: var(--blush); }
.menu-card__title { font-family: "Poppins"; font-weight: 800; font-size: 1.5rem; text-transform: lowercase; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.menu-list { list-style: none; margin: 0; padding: 0; }
.menu-list li {
  display: flex; align-items: baseline; gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1.5px dashed rgba(43,26,19,0.18);
}
.menu-card--ink .menu-list li { border-bottom-color: rgba(255,242,230,0.18); }
.menu-list li:last-child { border-bottom: none; }
.menu-list .name { font-weight: 600; }
.menu-list .leader { flex: 1; }
.price { font-family: "Poppins"; font-weight: 700; color: var(--pink-deep); white-space: nowrap; }
.note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.8rem; }
.menu-card--ink .note { color: rgba(255,242,230,0.7); }

/* playful hover: cards lift + deepen their hard shadow, with a tiny stamped tilt.
   Pointer-only so they never stick in a lifted state on touch screens. The
   transition also carries the .pop reveal (opacity + transform). */
@media (hover: hover) {
  .menu-card, .find-card {
    transition: opacity 0.6s ease, transform 0.45s cubic-bezier(.2,.85,.35,1), box-shadow 0.3s ease, filter 0.6s ease;
  }
  .menu-card:hover, .find-card:hover { transform: translateY(-5px) rotate(-0.5deg); box-shadow: var(--shadow-lg); }
  .menu-card--sm:hover, .find-card--map:hover { transform: translateY(-5px) rotate(0.5deg); }

  /* menu + hours rows glow + nudge as you point at them */
  .menu-list li, .hours-list li {
    transition: background 0.2s ease, padding 0.2s ease, color 0.2s ease;
    border-radius: 9px;
  }
  .menu-list li:hover, .hours-list li:hover {
    background: rgba(255,111,139,0.12);
    padding-left: 0.55rem; padding-right: 0.55rem;
  }
  .menu-card--ink .menu-list li:hover { background: rgba(255,242,230,0.12); }
}

/* ============================================================
   STORY (local & real)
   ============================================================ */
.story__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; perspective: 1100px; }
.story__photo {
  position: relative;
  border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-lg);
  overflow: hidden; aspect-ratio: 4/5; background: var(--blush);
  /* opacity for the .fade reveal, transform for the JS mouse-tilt (main.js) */
  transition: opacity 0.75s cubic-bezier(.16,1,.3,1), transform 0.3s ease, filter 0.75s ease;
  transform-style: preserve-3d;
}
.story__photo img { width: 100%; height: 100%; object-fit: cover; }
.story__photo .cap {
  position: absolute; left: 0.9rem; bottom: 0.9rem;
  background: var(--paper); border: var(--border); border-radius: 999px;
  padding: 0.35rem 0.85rem; font-weight: 600; font-size: 0.85rem; box-shadow: var(--shadow-sm);
}
.story__body p { font-size: clamp(1.05rem, 1.5vw, 1.2rem); color: var(--ink-soft); }
.story__body p strong { color: var(--ink); }
.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.8rem; }
.stat .n { font-family: "Poppins"; font-weight: 800; font-size: 2.2rem; line-height: 1; }
.stat .l { font-size: 0.9rem; color: var(--ink-soft); }

/* ============================================================
   GALLERY (real photos, bento)
   ============================================================ */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(150px, 17vw, 232px);
  gap: 1rem;
  grid-template-areas:
    "store store latte counter"
    "inside beans latte matcha";
}
.g {
  margin: 0;
  border: var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--cream);
}
.g img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(.16,1,.3,1); }
@media (hover: hover) { .g:hover img { transform: scale(1.06); } }
.g--store { grid-area: store; }
.g--latte { grid-area: latte; }
.g--counter { grid-area: counter; }
.g--inside { grid-area: inside; }
.g--beans { grid-area: beans; }
.g--matcha { grid-area: matcha; }

/* ============================================================
   FIND US
   ============================================================ */
.find__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.find-card { border: var(--border); border-radius: var(--r-card); background: var(--cream); padding: 1.8rem; box-shadow: var(--shadow); }
.find-card--map { padding: 0; overflow: hidden; min-height: 320px; position: relative; }
.find-map { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.find-map__cta {
  position: absolute; left: 0.9rem; bottom: 0.9rem; z-index: 2;
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 999px;
  padding: 0.55rem 1rem; font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: 0.95rem; text-transform: lowercase; text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease, color 0.18s ease;
}
.find-map__cta:hover { transform: translateY(-2px); box-shadow: var(--shadow); background: var(--pink); color: #fff; }
.find-map__cta .pin { font-size: 1.1rem; }
.hours-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.hours-list li { display: flex; justify-content: space-between; padding: 0.45rem 0; border-bottom: 1.5px dashed rgba(43,26,19,0.18); }
.hours-list li:last-child { border-bottom: none; }
.hours-list .day { font-weight: 600; }
.hours-list .open-now { color: var(--pink-deep); font-weight: 700; }
.find-meta { margin-top: 1.2rem; display: grid; gap: 0.5rem; }
.find-meta a { font-weight: 600; text-decoration: none; }
.find-meta a:hover { color: var(--pink-deep); }

/* ============================================================
   CTA BAND
   ============================================================ */
.cta { text-align: center; }
.cta .display { margin-bottom: 1.6rem; }
.cta__row { display: inline-flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

/* ============================================================
   REVIEWS - fanned "deck" of cards (vanilla port of display-cards)
   ============================================================ */
.reviews__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.reviews__score {
  display: inline-flex; flex-direction: column; align-items: flex-end; gap: 0.1rem;
  text-decoration: none; color: var(--ink);
  border: var(--border); border-radius: var(--r-card); background: var(--cream);
  padding: 0.9rem 1.3rem; box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.reviews__score:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.reviews__num { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 2rem; line-height: 1; }
.reviews__stars { color: var(--pink-deep); font-size: 1rem; letter-spacing: 2px; }
.reviews__count { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }

.rcards {
  position: relative; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  margin-top: 3.5rem;
}
.rcard {
  position: absolute; width: min(350px, 84vw);
  background: var(--cream); border: var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow); padding: 1.6rem 1.7rem;
  --tx: 0px; --ty: 0px; --rot: 0deg;
  transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
  transition: transform 0.5s cubic-bezier(.16,1,.3,1), box-shadow 0.45s ease, background 0.3s ease;
}
.rcard--1 { --tx: -150px; --ty: 14px; --rot: -7deg; z-index: 1; }
.rcard--2 { --tx: 0px;    --ty: -10px; --rot: -1deg; z-index: 2; }
.rcard--3 { --tx: 150px;  --ty: 14px; --rot: 6deg; z-index: 3; }
.rcard__stars { color: var(--pink-deep); font-size: 1rem; letter-spacing: 2px; margin-bottom: 0.7rem; }
.rcard blockquote { margin: 0; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 1.12rem; line-height: 1.35; text-wrap: balance; }
.rcard figcaption { margin-top: 0.9rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
@media (hover: hover) {
  .rcard:hover { transform: translate(var(--tx), -20px) rotate(0deg) scale(1.05); box-shadow: var(--shadow-lg); background: var(--paper); z-index: 6; }
}
/* phones: forget the fan, just stack them as a readable list */
@media (max-width: 760px) {
  .rcards { flex-direction: column; gap: 1.1rem; min-height: 0; margin-top: 2.2rem; }
  .rcard { position: relative; width: 100%; --tx: 0px; --ty: 0px; --rot: 0deg; transform: none; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--paper); padding-block: clamp(3rem, 7vw, 5rem) 7rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer .wordmark { background: var(--paper); }
.footer h4 { font-family: "Poppins"; font-weight: 700; text-transform: lowercase; margin: 0 0 0.9rem; font-size: 1.05rem; }
.footer a { color: rgba(255,242,230,0.82); text-decoration: none; display: block; padding: 0.22rem 0; }
.footer a:hover { color: var(--blush); }
.footer__legal { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,242,230,0.18); font-size: 0.85rem; color: rgba(255,242,230,0.6); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.socials { display: flex; gap: 0.6rem; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; padding: 0;
  background: rgba(255,242,230,0.08); border: 1.5px solid rgba(255,242,230,0.25);
  transition: background 0.18s ease, transform 0.12s ease;
}
.socials a:hover { background: var(--pink); transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* ============================================================
   FLOATING BOTTOM PILL NAV
   ============================================================ */
.dock {
  position: fixed; left: 50%; bottom: 1rem; translate: -50% 0;
  z-index: 1100;
  display: flex; align-items: center; gap: 0.2rem;
  background: var(--paper); border: var(--border); border-radius: 999px;
  padding: 0.35rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(140%);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.16,1,.3,1);
}
.dock.show-dock { opacity: 1; transform: none; }
.dock a {
  font-family: "Poppins"; font-weight: 700; font-size: 0.92rem;
  text-decoration: none; color: var(--ink);
  padding: 0.5rem 0.95rem; border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.dock a:hover { background: var(--cream); }
.dock a.active { background: var(--ink); color: var(--paper); }
.dock a.dock__cta { background: var(--pink); color: #fff; }
.dock a.dock__cta:hover { background: var(--pink-deep); }

/* ============================================================
   FLOATING SHARE BUTTON (fades in after the hero, like the dock)
   ============================================================ */
.fab {
  position: fixed; left: clamp(1rem, 3vw, 1.5rem); bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 1150;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 0.95rem;
  text-transform: lowercase; letter-spacing: -0.01em;
  color: #fff; background: var(--pink);
  border: var(--border); border-radius: 999px;
  padding: 0.7rem 1.15rem; cursor: pointer;
  box-shadow: var(--shadow), 0 8px 24px rgba(255,111,139,0.45);
  opacity: 0; transform: translateY(150%);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.16,1,.3,1), background 0.18s ease, box-shadow 0.18s ease;
}
.fab.show-fab { opacity: 1; transform: none; }
.fab:hover { background: var(--pink-deep); transform: translateY(-2px); box-shadow: var(--shadow-lg), 0 10px 28px rgba(239,79,114,0.5); }
.fab:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.fab svg { width: 18px; height: 18px; }
@media (max-width: 520px) { .fab { padding: 0.75rem; } .fab__label { display: none; } }   /* icon-only on small phones */

/* tiny toast for the copy-link fallback */
.toast {
  position: fixed; left: 50%; bottom: 5.5rem; z-index: 1200;
  transform: translate(-50%, 1rem);
  background: var(--ink); color: var(--paper);
  font-family: "Poppins", sans-serif; font-weight: 600; font-size: 0.9rem;
  padding: 0.6rem 1.1rem; border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.toast.show-toast { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   AI CHAT ASSISTANT (floating button bottom-right + slide-up panel)
   ============================================================ */
.chat-fab {
  position: fixed; right: clamp(1rem, 3vw, 1.5rem); bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 1160;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: "Poppins", sans-serif; font-weight: 700; font-size: 0.95rem;
  text-transform: lowercase; letter-spacing: -0.01em;
  color: #fff; background: var(--ink);
  border: var(--border); border-radius: 999px;
  padding: 0.7rem 1.15rem; cursor: pointer;
  box-shadow: var(--shadow), 0 8px 26px rgba(255,111,139,0.55);   /* warm pink glow */
  opacity: 0; transform: translateY(150%);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(.16,1,.3,1), background 0.18s ease, box-shadow 0.2s ease;
}
.chat-fab.show-fab { opacity: 1; transform: none; }
.chat-fab:hover { transform: translateY(-2px); background: #3a2419; box-shadow: var(--shadow-lg), 0 12px 32px rgba(255,111,139,0.7); }
.chat-fab.hidden { opacity: 0; pointer-events: none; transform: scale(0.9); }
.chat-fab svg { width: 19px; height: 19px; }
/* attention pulse ring — periodically draws the eye to the live assistant */
.chat-fab::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 999px; border: 2.5px solid var(--pink);
  opacity: 0; pointer-events: none;
}
.chat-fab.show-fab:not(.hidden)::after { animation: chatPing 2.8s cubic-bezier(.16,1,.3,1) infinite 1.2s; }
@keyframes chatPing {
  0%        { opacity: 0.8; transform: scale(1); }
  60%, 100% { opacity: 0; transform: scale(1.45); }
}

.chat-panel {
  position: fixed; right: clamp(1rem, 3vw, 1.5rem); bottom: clamp(1rem, 3vw, 1.5rem);
  z-index: 1161;
  width: min(380px, calc(100vw - 2rem)); height: min(540px, calc(100dvh - 6rem));
  background: var(--paper); border: var(--border); border-radius: 24px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 70px rgba(43,26,19,0.34);
  transform: translateY(16px) scale(0.98); opacity: 0; pointer-events: none;
  transition: transform 0.4s cubic-bezier(.16,1,.3,1), opacity 0.35s ease;
}
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.15rem; background: var(--pink); color: #fff;
}
.chat-head__title { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 1.05rem; text-transform: lowercase; }
.chat-head__title small { display: block; font-family: "Hanken Grotesk", sans-serif; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.92; margin-top: 3px; font-weight: 600; }
.chat-close { background: none; border: none; color: #fff; cursor: pointer; font-size: 1.4rem; line-height: 1; padding: 2px 6px; border-radius: 8px; }
.chat-close:hover { opacity: 0.75; }
.chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem; background: var(--cream); }
.chat-msg { max-width: 85%; padding: 0.6rem 0.85rem; border-radius: 16px; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.chat-msg--bot { align-self: flex-start; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.chat-msg--user { align-self: flex-end; background: var(--pink); color: #fff; border-bottom-right-radius: 5px; }
.chat-msg--typing { color: var(--ink-soft); letter-spacing: 0.12em; }
.chat-form { flex: 0 0 auto; display: flex; gap: 0.5rem; padding: 0.75rem; border-top: 2.5px solid var(--ink); background: var(--paper); }
.chat-form input { flex: 1; font-family: "Hanken Grotesk", sans-serif; font-size: 0.92rem; border: var(--border); border-radius: 999px; padding: 0.6rem 1rem; outline: none; color: var(--ink); background: var(--paper); transition: border-color 0.2s ease; }
.chat-form input:focus { border-color: var(--pink); }
.chat-send { background: var(--pink); color: #fff; border: var(--border); border-radius: 50%; width: 44px; height: 44px; flex: 0 0 auto; cursor: pointer; display: grid; place-items: center; font-size: 1.15rem; font-weight: 700; transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), background 0.2s ease; }
.chat-send:hover { transform: scale(1.08); background: var(--pink-deep); }
.chat-send:disabled { opacity: 0.5; cursor: default; transform: none; }
@media (max-width: 520px) {
  .chat-fab__label { display: none; }
  .chat-fab { padding: 0.75rem; }
  .chat-panel { right: 0.5rem; bottom: 0.5rem; width: calc(100vw - 1rem); height: calc(100dvh - 5rem); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .menu-card--lg, .menu-card--sm, .menu-card--full { grid-column: span 12; }
  .story__grid { grid-template-columns: 1fr; }
  .find__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; }

  /* gallery: 2-column bento on phones */
  .gallery__grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: clamp(140px, 42vw, 200px);
    grid-template-areas:
      "store store"
      "latte counter"
      "inside beans"
      "matcha matcha";
  }

  /* hero: copy on top, big cup fills the rest */
  .show { height: 460vh; }
  .hero-head { max-width: 100%; padding-top: clamp(3.25rem, 9vh, 4.5rem); }
  .badge { display: none; }
  .sparkle--a { left: 6vw; top: 33svh; }
  .sparkle--b { display: none; }
  .dock a:not(.dock__cta):not(.active) { display: none; } /* condense on phones */
}
@media (max-width: 520px) {
  .dock a { padding: 0.5rem 0.8rem; font-size: 0.88rem; }
}

/* ============================================================
   REDUCED MOTION - collapse the scroll-scrub to a calm static hero
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .bg-gradient { animation: none; }
  .badge svg { animation: none; }
  .sparkle { animation: none; opacity: 0.6; }
  .mq__track { animation: none; }
  .beat--intro .tag-pill, .beat--intro .display, .beat--intro .beat__row { animation: none; }
  .hero-canvas { opacity: 1; transition: none; }
  .chat-fab::after { animation: none; }
  .reveal, .pop, .fade { opacity: 1; transform: none; transition: none; }
}
/* JS adds .static-hero when reduce-motion is on: no pinning, calm static hero */
.show.static-hero { height: auto; }
.show.static-hero .show__pin { position: relative; height: auto; min-height: 100svh; padding-block: 7rem 3rem; }
.show.static-hero .beat--payoff { display: none; }
