/* ═══════════════════════════════════════════════════════
   BOBA BOBA — Granada Hills
   Palette: brown-sugar caramel, tapioca black, taro,
   matcha, milk cream, mango pop, warm oat canvas
   ═══════════════════════════════════════════════════════ */

:root {
  --caramel: #8B4A2B;
  --tapioca: #2A1D18;
  --taro: #B79FC9;
  --matcha: #8FA878;
  --cream: #F5EFE6;
  --mango: #F2994A;
  --oat: #F7F2EA;
  --ink: #2A1D18;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Sora", -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* NOTE: no CSS scroll-behavior:smooth — it corrupts ScrollTrigger's
   position measurements during refresh; JS handles anchor smoothing */
body {
  font-family: var(--sans);
  background: #171009;   /* one continuous dark world — no white/black seams */
  color: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}

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

::selection { background: var(--mango); color: var(--tapioca); }

/* ══════════ CINEMA BACKDROP + WEBGL CANVAS ══════════ */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 100% at 68% 28%, #2e2018 0%, #171009 55%, #0d0908 100%);
}
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ══════════ CUSTOM CURSOR ══════════ */
.cursor, .cursor-drop { display: none; }

@media (pointer: fine) {
  .cursor {
    display: block;
    position: fixed;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #5a4034, var(--tapioca) 70%);
    box-shadow: inset -2px -2px 4px rgba(0,0,0,.5), 0 0 0 1.5px rgba(245,239,230,.45);
    z-index: 9999;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s;
  }
  .cursor.is-link { width: 34px; height: 34px; opacity: .85; }
  .cursor-drop {
    display: block;
    position: fixed;
    width: 7px; height: 9px;
    border-radius: 50% 50% 55% 55% / 40% 40% 60% 60%;
    background: rgba(190, 216, 232, .55);
    backdrop-filter: blur(1px);
    z-index: 9998;
    pointer-events: none;
    transform: translate(-50%, -50%);
  }
  body, a, button { cursor: none; }
}

/* ══════════ NAV ══════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  z-index: 100;
  mix-blend-mode: normal;
  transition: background .4s, box-shadow .4s;
}
.nav {
  color: var(--cream);
  background: linear-gradient(180deg, rgba(13,9,8,.5), transparent);
}
.nav.is-scrolled {
  background: rgba(23, 16, 12, .72);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(245,239,230,.08);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  text-decoration: none;
  letter-spacing: -.02em;
  line-height: .85;
}
.nav__badge {
  width: 42px; height: 42px;
  filter: invert(1) brightness(1.6);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.nav__logo:hover .nav__badge { transform: rotate(-14deg); }
.nav__wordmark span { display: block; padding-left: .9em; }
.nav__right { display: flex; align-items: center; gap: 1.4rem; }
.nav__phone {
  text-decoration: none;
  font-size: .85rem;
  opacity: .7;
}
.nav__phone:hover { opacity: 1; }
.nav__cta {
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--mango);
  color: var(--tapioca);
  padding: .6rem 1.3rem;
  border-radius: 99px;
  transition: transform .25s, box-shadow .25s;
}
.nav__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(242,153,74,.4); }

/* ══════════ SHARED ACT ══════════ */
.act { position: relative; z-index: 2; }

/* ══════════ ACT 1 — HERO (dark cinema) ══════════ */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem clamp(1.4rem, 5vw, 6rem) 3rem;
  z-index: 2;
  color: var(--cream);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  max-width: 1500px;
  margin: 0 auto;
  width: 100%;
}
.hero__kicker {
  font-size: .75rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--mango);
  margin-bottom: 1.2rem;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.6rem, 9.5vw, 8.6rem);
  line-height: .82;
  letter-spacing: -.03em;
  color: var(--cream);
}
.hero__line { display: block; }
.hero__line:nth-child(2) { padding-left: .55em; color: #C98E52; }
.hero__sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  margin-top: 1.6rem;
  color: rgba(245,239,230,.85);
  max-width: 22em;
}
.hero__meta {
  margin-top: .8rem;
  font-size: .82rem;
  letter-spacing: .06em;
  color: rgba(245,239,230,.55);
}
.hero__ctas {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
  flex-wrap: wrap;
}
.btn--ghost {
  color: var(--cream);
  border: 1px solid rgba(245,239,230,.32);
}
.btn--ghost:hover { border-color: var(--mango); color: var(--mango); transform: translateY(-3px); }

/* — the 3D stage — */
.hero__stage {
  position: relative;
  perspective: 1100px;
}
.hero__tilt {
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 34px 90px rgba(242,153,74,.2));
}
.hero__render {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  -webkit-mask-image: radial-gradient(76% 86% at 50% 49%, #000 50%, transparent 82%);
  mask-image: radial-gradient(76% 86% at 50% 49%, #000 50%, transparent 82%);
}
.fpearl {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #6b4c3b, #1d120c 72%);
  box-shadow: inset -3px -4px 8px rgba(0,0,0,.6), 0 10px 24px rgba(0,0,0,.5), 0 0 0 1px rgba(242,153,74,.06);
  will-change: transform;
}
.fpearl--1 { width: 30px; height: 30px; top: 12%; left: -2%; }
.fpearl--2 { width: 18px; height: 18px; top: 68%; left: 6%; }
.fpearl--3 { width: 40px; height: 40px; top: 24%; right: -3%; }
.fpearl--4 { width: 14px; height: 14px; top: 82%; right: 10%; }
.hero__scroll {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.hero__scroll-pearl {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--cream);
  animation: pearl-fall 1.8s ease-in-out infinite;
}
@keyframes pearl-fall {
  0% { transform: translateY(-8px); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateY(14px); opacity: 0; }
}
.hero__scroll-text {
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .55;
}
.hero__seal {
  position: absolute;
  bottom: 2.4rem;
  right: clamp(1.4rem, 5vw, 5rem);
  width: clamp(72px, 8vw, 108px);
  opacity: .8;
  filter: invert(1) brightness(1.75);
  animation: seal-spin 28s linear infinite;
}
@keyframes seal-spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) { .hero__seal { display: none; } }

/* ══════════ ACT 2 — CRAFT (dark photo cinematic) ══════════ */
.craft { height: 320vh; color: var(--cream); }
.craft__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 5rem clamp(1.4rem, 5vw, 6rem) 2rem;
  overflow: hidden;
}
.craft__stage {
  position: relative;
  height: min(74vh, 640px);
  perspective: 1200px;
}
.craft__card {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
}
.craft__card img {
  max-height: 100%;
  max-width: min(100%, 480px);
  border-radius: 2rem;
  object-fit: cover;
  box-shadow: 0 40px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(245,239,230,.07);
}
.craft__card--2, .craft__card--3 { opacity: 0; }
.craft__copy { max-width: 30rem; text-align: right; justify-self: end; }
.craft__kicker {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mango);
  margin-bottom: 1rem;
}
.craft__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-bottom: 1.6rem;
  color: var(--cream);
}
.craft__lines { display: grid; }
.craft__line {
  grid-area: 1 / 1;
  font-size: clamp(.95rem, 1.6vw, 1.12rem);
  opacity: 0;
  color: rgba(245,239,230,.78);
}
/* floating pearls, CSS-driven (the hero's are JS-driven) */
.fpearl--css { animation: pearl-bob 5.5s ease-in-out infinite alternate; }
.fpearl--c1 { width: 26px; height: 26px; top: 6%; left: 4%; animation-duration: 6.2s; }
.fpearl--c2 { width: 14px; height: 14px; top: 78%; left: -1%; animation-duration: 4.8s; }
.fpearl--c3 { width: 34px; height: 34px; top: 14%; right: 2%; animation-duration: 7s; }
@keyframes pearl-bob {
  from { transform: translateY(-10px); }
  to   { transform: translateY(12px); }
}

/* ══════════ ACT 3 — MENU SHELF ══════════ */
.menu {
  background: linear-gradient(180deg, #1d130d, #171009 30%);
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
}
.menu__head { padding: 0 clamp(1.4rem, 6vw, 7rem); margin-bottom: 3rem; }
.menu__kicker {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mango);
  margin-bottom: .9rem;
}
.menu__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: -.02em;
  color: var(--cream);
}
.menu__sub { margin-top: .6rem; color: rgba(245,239,230,.6); }
.menu__shelf {
  display: flex;
  gap: clamp(1.2rem, 2.5vw, 2.2rem);
  overflow-x: auto;
  padding: 2rem clamp(1.4rem, 6vw, 7rem) 2.5rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.menu__shelf::-webkit-scrollbar { display: none; }
.menu__hint {
  text-align: center;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  opacity: .4;
}

.card {
  flex: 0 0 clamp(240px, 26vw, 310px);
  scroll-snap-align: center;
  background: linear-gradient(180deg, #241812, #191009);
  color: var(--cream);
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0,0,0,.4), 0 0 0 1px rgba(245,239,230,.07);
  transition: box-shadow .35s;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover { box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(242,153,74,.25); }
.card__img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #120c08;
}
.card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.card:hover .card__img img { transform: scale(1.06); }
.card__body { padding: 1.2rem 1.4rem 1.5rem; }
.card__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.14rem;
  line-height: 1.2;
}
.card__note { font-size: .84rem; color: rgba(245,239,230,.62); margin-top: .5rem; }

/* — typographic dessert cards — */
.card--type .card__word {
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1.4rem;
  background:
    radial-gradient(circle 10px at 82% 16%, rgba(242,153,74,.55) 96%, transparent),
    radial-gradient(circle 6px at 88% 26%, rgba(183,159,201,.45) 96%, transparent),
    radial-gradient(circle 14px at 12% 84%, rgba(245,239,230,.08) 96%, transparent),
    linear-gradient(180deg, #241812, #150d09);
}
.card__word span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(2.6rem, 3.6vw, 3.4rem);
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--cream);
}
.card__word span:nth-child(2) { color: var(--mango); padding-left: .8em; }
.card__word--alt span:nth-child(2) { color: var(--taro); }

/* ══════════ ACT 4 — GALLERY (symmetric rows on dark) ══════════ */
.gallery {
  background: #150d08;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.2rem, 5vw, 5rem);
}
.gallery__head {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.gallery__kicker {
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--mango);
  margin-bottom: .9rem;
}
.gallery__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  letter-spacing: -.02em;
  color: var(--cream);
}
.gallery__row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.8rem);
  max-width: 1240px;
  margin: 0 auto;
}
.gallery__item {
  margin: 0;
  border-radius: 1.6rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(245,239,230,.07);
}
.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 5;   /* uniform tiles — reserved space also prevents scroll-anchor jumps */
  object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.gallery__item:hover img { transform: scale(1.045); }
.gallery__quote {
  text-align: center;
  max-width: 42rem;
  margin: clamp(3rem, 6vw, 5rem) auto;
}
.gallery__quote p {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.18;
  color: #D98E5F;
}
.gallery__quote--soft { margin-bottom: 0; }
.gallery__quote--soft p { font-size: clamp(1.2rem, 2.2vw, 1.7rem); color: var(--taro); }

.reveal { opacity: 0; transform: translateY(40px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }

/* ══════════ ACT 5 — NEIGHBORHOOD ══════════ */
.hood {
  background: var(--tapioca);
  color: var(--cream);
  padding: clamp(4.5rem, 10vw, 9rem) clamp(1.4rem, 6vw, 7rem);
  border-radius: 3rem 3rem 0 0;
}
.hood__inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.hood__map svg { width: 100%; height: auto; }
.map-road {
  stroke: rgba(245,239,230,.28);
  stroke-width: 3;
  stroke-linecap: round;
}
.map-road--main { stroke: var(--cream); stroke-width: 7; }
.map-road--diag { stroke-dasharray: 2 14; stroke-width: 2; }
.map-label {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: .22em;
  fill: rgba(245,239,230,.55);
}
.map-label--soft { fill: rgba(245,239,230,.32); }
.map-pin__dot { fill: var(--mango); }
.map-pin__pulse {
  fill: none;
  stroke: var(--mango);
  stroke-width: 2;
  opacity: .6;
  transform-origin: 300px 210px;
  animation: pin-pulse 2.4s ease-out infinite;
}
@keyframes pin-pulse {
  0% { transform: scale(.4); opacity: .8; }
  100% { transform: scale(1.4); opacity: 0; }
}
.hood__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin-bottom: 1.8rem;
}
.hood__address {
  font-style: normal;
  font-size: 1.15rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}
.hood__hours { opacity: .75; margin-bottom: .4rem; }
.hood__phone { margin-bottom: 2rem; }
.hood__phone a { text-decoration: none; opacity: .75; }
.hood__phone a:hover { opacity: 1; }

/* ══════════ BUTTONS ══════════ */
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: .95rem 2.1rem;
  border-radius: 99px;
  transition: transform .25s, box-shadow .25s;
}
.btn--pop {
  background: var(--mango);
  color: var(--tapioca);
}
.btn--pop:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(242,153,74,.45); }
.btn--delivery {
  background: var(--oat);
  color: var(--tapioca);
  box-shadow: 0 8px 22px rgba(42,29,24,.14);
  font-size: 1.05rem;
}
.btn--delivery:hover { transform: translateY(-3px); background: var(--mango); }

/* ══════════ ACT 6 — ORDER ══════════ */
.order {
  background: linear-gradient(180deg, var(--tapioca), #1d130f);
  color: var(--cream);
  text-align: center;
  padding: clamp(5rem, 11vw, 9rem) clamp(1.4rem, 5vw, 4rem) 2.4rem;
}
.order__seal {
  width: clamp(110px, 14vw, 160px);
  height: clamp(110px, 14vw, 160px);
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 2.2rem;
  display: block;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), 0 0 0 1px rgba(245,239,230,.06);
  transition: transform .6s cubic-bezier(.2,.7,.2,1);
}
.order__seal:hover { transform: rotate(8deg) scale(1.04); }
.order__title {
  font-family: var(--serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  letter-spacing: -.02em;
}
.order__sub { margin-top: 1rem; opacity: .7; }
.order__ctas {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2.8rem 0 4rem;
}
.order__catering {
  max-width: 34rem;
  margin: 0 auto 5rem;
  padding: 1.8rem 2rem;
  border: 1px solid rgba(245,239,230,.18);
  border-radius: 1.4rem;
}
.order__catering h3 {
  font-family: var(--serif);
  font-weight: 600;
  margin-bottom: .6rem;
  color: var(--taro);
}
.order__catering p { font-size: .92rem; opacity: .8; }
.order__catering a { color: var(--mango); }

.footer {
  border-top: 1px solid rgba(245,239,230,.14);
  padding-top: 1.6rem;
  font-size: .85rem;
  opacity: .75;
  display: flex;
  gap: .8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--mango); }
.footer__fine {
  flex-basis: 100%;
  margin-top: .6rem;
  font-size: .72rem;
  opacity: .6;
}

/* ══════════ MOBILE ══════════ */
@media (max-width: 760px) {
  .nav__phone { display: none; }
  .hero { text-align: center; padding-top: 5rem; }
  .hero__grid { grid-template-columns: 1fr; gap: .6rem; }
  .hero__stage { max-width: 340px; margin: 0 auto; }
  .hero__render { max-height: 46vh; }
  .hero__ctas { justify-content: center; }
  .hero__sub { max-width: 90vw; margin-left: auto; margin-right: auto; }
  .hero__line:nth-child(2) { padding-left: .35em; }
  .craft { height: 280vh; }
  .craft__sticky { grid-template-columns: 1fr; padding-top: 4.2rem; gap: .8rem; align-content: center; }
  .craft__stage { height: 46vh; }
  .craft__card img { max-width: min(100%, 320px); }
  .craft__copy { text-align: center; justify-self: center; }
  .hood__inner { grid-template-columns: 1fr; }
  .hood__map { max-width: 420px; margin: 0 auto; }
  .gallery__row { grid-template-columns: 1fr; max-width: 420px; }
}

/* ══════════ REDUCED MOTION / FALLBACK ══════════ */
@media (prefers-reduced-motion: reduce) {
  #scene, .cursor, .cursor-drop, .hero__scroll, .backdrop { display: none !important; }
  .hero__seal { animation: none; }
  body, a, button { cursor: auto; }
  .hero { background: radial-gradient(120% 100% at 68% 28%, #2e2018 0%, #171009 55%, #0d0908 100%); }
  .craft { height: auto; padding: 5rem 0; background: #171009; }
  .craft__sticky { position: static; height: auto; }
  .craft__stage { height: auto; }
  .craft__card--1, .craft__card--2 { display: none; }
  .craft__card--3 { position: relative; opacity: 1; }
  .fpearl--css { animation: none; }
  .craft__line, .reveal { opacity: 1 !important; transform: none !important; }
  .craft__lines { display: block; }
  .map-pin__pulse, .hero__scroll-pearl { animation: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

body.no-webgl #scene, body.no-webgl .backdrop { display: none; }
body.no-webgl .hero {
  background: radial-gradient(120% 100% at 68% 28%, #2e2018 0%, #171009 55%, #0d0908 100%);
}
