/* ------------------------------------------------------------------
   BRAND TOKENS: swap these for the official Bug & Bean palette.
   The 3D scenes read --espresso, --roast, --caramel, --cream, --bug
   from here at startup, so one edit re-themes the whole site.
------------------------------------------------------------------- */
:root {
  --espresso: #1f130d;   /* darkest background */
  --roast:    #3b2418;   /* cards on dark */
  --mocha:    #6b4430;
  --caramel:  #d9a066;   /* primary accent */
  --crema:    #f0cf9e;
  --cream:    #f6ecdf;   /* light background */
  --milk:     #fffaf3;
  --bug:      #8fd694;   /* terminal-green secondary accent */
  --nv:       #d4533b;   /* non-veg marker */

  --ink:      #2b1a12;
  --ink-soft: #6e5647;
  --on-dark:  #f6ecdf;
  --on-dark-soft: #c9b3a0;

  --gutter: clamp(16px, 5vw, 96px); /* left/right inset for nav + hero */
  --radius: 18px;
  --shadow: 0 20px 50px -20px rgba(31, 19, 13, .45);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font: 400 16px/1.6 var(--font-body);
  color: var(--ink); background: var(--cream);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.mono { font-family: var(--font-mono); }
.eyebrow { color: var(--caramel); font-size: .85rem; letter-spacing: .02em; margin-bottom: .8rem; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--bug); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.6em; border-radius: 999px; border: 2px solid var(--caramel);
  background: var(--caramel); color: var(--espresso); font-weight: 600; text-decoration: none;
  cursor: pointer; font-size: 1rem; font-family: inherit;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--caramel); }
.btn-ghost { background: transparent; color: var(--caramel); }
.btn-sm { padding: .5em 1.1em; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 1rem;
  background: var(--espresso); color: var(--on-dark-soft); transition: opacity .6s, visibility .6s;
}
#loader img { width: 84px; animation: bob 1.4s ease-in-out infinite; }
#loader.done { opacity: 0; visibility: hidden; }
.dots::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: 68px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
  color: var(--on-dark); transition: background .3s, box-shadow .3s;
}
.nav.scrolled { background: rgba(31, 19, 13, .88); backdrop-filter: blur(12px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.brand em { color: var(--caramel); font-style: normal; }
.nav nav { display: flex; align-items: center; gap: 1.6rem; }
.nav nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .85; }
.nav nav a:not(.btn):hover { opacity: 1; color: var(--crema); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--on-dark); transition: transform .3s; }
.nav-toggle span:first-child { top: 17px; } .nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  background: radial-gradient(ellipse at 70% 40%, #4a2c1d 0%, var(--espresso) 65%); color: var(--on-dark); overflow: hidden;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; z-index: 2; width: 100%; padding: 110px var(--gutter) 80px; pointer-events: none; }
.hero-copy > * { max-width: 560px; }
.hero-copy a { pointer-events: auto; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); letter-spacing: -.02em; }
.hero h1 span { color: var(--caramel); font-style: italic; font-weight: 500; }
.lede { font-size: 1.15rem; color: var(--on-dark-soft); }
.hero .eyebrow { color: var(--bug); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0; }
.hero-facts { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--crema); }
.hero-facts span { font-size: .85rem; color: var(--on-dark-soft); }
.scroll-hint { position: absolute; bottom: 24px; left: 50%; translate: -50% 0; width: 26px; height: 42px; border: 2px solid var(--on-dark-soft); border-radius: 20px; z-index: 2; }
.scroll-hint span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--caramel); animation: scroll 1.6s infinite; }
@keyframes scroll { to { transform: translateY(14px); opacity: 0; } }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about p { color: var(--ink-soft); font-size: 1.08rem; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.features li { display: flex; gap: 16px; align-items: flex-start; background: var(--milk); padding: 18px 20px; border-radius: var(--radius); box-shadow: 0 1px 0 rgba(43,26,18,.06); transition: transform .25s; }
.features li:hover { transform: translateX(6px); }
.features .ico { font-size: 1.6rem; width: 48px; height: 48px; display: grid; place-items: center; background: var(--cream); border-radius: 14px; flex: none; }
.features h3 { margin: 0 0 .2em; }
.features p { margin: 0; font-size: .95rem; }

/* ---------- signatures ---------- */
.signatures { background: var(--espresso); color: var(--on-dark); }
.sig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 2.5rem; }
.sig { background: var(--roast); border-radius: var(--radius); padding: 18px 18px 22px; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.sig p { color: var(--on-dark-soft); font-size: .92rem; margin: 0; }
.sig-art { aspect-ratio: 1; border-radius: 14px; margin-bottom: 16px; position: relative; overflow: hidden;
  background: radial-gradient(circle at 50% 110%, var(--c2) 0 38%, transparent 39%), linear-gradient(160deg, var(--c1), color-mix(in srgb, var(--c1) 60%, var(--c2))); }
.sig-art::before { /* glass */
  content: ''; position: absolute; left: 30%; right: 30%; top: 18%; bottom: 12%;
  border-radius: 6px 6px 18px 18px; background: linear-gradient(to top, var(--c2) 0 55%, var(--c1) 55% 70%, rgba(255,255,255,.35) 70%);
  box-shadow: inset 6px 0 0 rgba(255,255,255,.18), 0 18px 30px -10px rgba(0,0,0,.4); transform: translateZ(30px);
}
.sig-art::after { content: ''; position: absolute; left: 52%; top: 6%; width: 5px; height: 34%; background: var(--milk); border-radius: 3px; transform: rotate(12deg); opacity: .8; }

/* ---------- menu ---------- */
.menu-tools { display: flex; flex-direction: column; gap: 16px; margin: 2rem 0 1.5rem; }
.tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 1.5px solid rgba(43,26,18,.15); background: var(--milk); color: var(--ink); padding: .55em 1.1em; border-radius: 999px; font: 500 .95rem var(--font-body); cursor: pointer; transition: all .2s; }
.tab[aria-selected="true"] { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }
.menu-filters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.search input { width: min(340px, 100%); padding: .7em 1.1em; border-radius: 999px; border: 1.5px solid rgba(43,26,18,.15); background: var(--milk); font: inherit; color: var(--ink); }
.search { flex: 1; min-width: 200px; }
.veg-toggle { display: inline-flex; align-items: center; gap: .6em; cursor: pointer; font-weight: 500; user-select: none; }
.veg-toggle input { position: absolute; opacity: 0; }
.switch { width: 44px; height: 24px; border-radius: 12px; background: rgba(43,26,18,.2); position: relative; transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; }
.veg-toggle input:checked + .switch { background: #3f8f4a; }
.veg-toggle input:checked + .switch::after { transform: translateX(20px); }
.veg-toggle input:focus-visible + .switch { outline: 3px solid var(--bug); outline-offset: 2px; }
.menu-list { columns: 3 280px; column-gap: 24px; }
.menu-cat { break-inside: avoid; background: var(--milk); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 24px; animation: rise .45s both; }
.menu-cat h3 { font-size: 1.35rem; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px dashed rgba(43,26,18,.2); padding-bottom: .5em; margin-bottom: .7em; }
.menu-cat h3 small { font: 500 .75rem var(--font-mono); color: var(--ink-soft); }
.menu-cat ul { list-style: none; margin: 0; padding: 0; }
.menu-cat li { padding: .38em 0; display: flex; gap: .6em; align-items: baseline; }
.menu-cat li .nm { flex: 1; }
.menu-cat li .ds { display: block; font-size: .82rem; color: var(--ink-soft); }
.menu-cat li .pr { font-family: var(--font-mono); font-size: .9rem; }
.dot { display: inline-block; width: 10px; height: 10px; border: 1.5px solid #3f8f4a; position: relative; flex: none; transform: translateY(1px); }
.dot::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #3f8f4a; }
.dot.nv { border-color: var(--nv); } .dot.nv::after { background: var(--nv); }
.menu-empty { font-family: var(--font-mono); color: var(--ink-soft); padding: 2rem 0; }
.note { color: var(--ink-soft); font-size: .9rem; display: flex; align-items: center; gap: .4em; flex-wrap: wrap; }
mark { background: var(--crema); color: inherit; border-radius: 3px; padding: 0 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* ---------- booking ---------- */
.book { background: var(--espresso); color: var(--on-dark); }
.book .sub { color: var(--on-dark-soft); max-width: 560px; }
.book-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; margin-top: 2.4rem; align-items: stretch; }
.floor { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 480px; background: radial-gradient(ellipse at 50% 35%, #3a2419, #140b07 75%); box-shadow: var(--shadow); }
#floor-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
.floor-labels { position: absolute; inset: 0; pointer-events: none; }
.t-label { pointer-events: none; }
.t-label > span { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 250, 243, .94); color: var(--ink); font: 500 11px/1.2 var(--font-body); white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.35); transition: background .2s, color .2s, transform .2s; }
.t-label b { font-weight: 700; }
.t-label i { font-style: normal; opacity: .65; }
.t-label.hover > span { background: var(--caramel); transform: scale(1.08); }
.t-label.sel > span { background: var(--bug); transform: scale(1.12); }
.t-label.taken > span { background: rgba(40, 32, 28, .88); color: #d9cfc6; }
.t-label.small > span { opacity: .45; }
.floor-hint { position: absolute; right: 14px; top: 12px; margin: 0; font-size: .72rem; color: var(--on-dark-soft); background: rgba(20,11,7,.6); padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px); pointer-events: none; }
#floor-canvas:active { cursor: grabbing; }
.floor-legend { position: absolute; left: 14px; top: 12px; z-index: 1; display: flex; gap: 14px; font-size: .8rem; background: rgba(31,19,13,.7); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }
.floor-legend span { display: flex; align-items: center; gap: 6px; }
.lg { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg.free { background: #fffaf3; } .lg.sel { background: var(--bug); } .lg.taken { background: #3a302b; border: 1px solid #8a7d74; }
.floor-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--milk); color: var(--ink); padding: 6px 12px; border-radius: 10px; font-size: .85rem; font-weight: 500; transform: translate(-50%, -130%); white-space: nowrap; box-shadow: var(--shadow); }
.booking { background: var(--roast); border-radius: var(--radius); padding: 26px; display: grid; gap: 16px; align-content: start; box-shadow: var(--shadow); }
.booking .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.booking label { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--on-dark-soft); }
.booking small { font-weight: 400; opacity: .7; }
.booking input, .booking select, .booking textarea {
  width: 100%; font: 400 1rem var(--font-body); color: var(--on-dark); background: rgba(0,0,0,.25);
  border: 1.5px solid rgba(246,236,223,.12); border-radius: 12px; padding: .7em .9em; color-scheme: dark; min-height: 46px;
}
.booking textarea { resize: vertical; }
.booking input:focus, .booking select:focus, .booking textarea:focus { outline: none; border-color: var(--caramel); }
.booking [aria-invalid="true"] { border-color: var(--nv); }
.stepper { display: flex; align-items: stretch; }
.stepper input { text-align: center; border-radius: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper button { width: 44px; flex: none; background: rgba(0,0,0,.35); border: 1.5px solid rgba(246,236,223,.12); color: var(--caramel); font-size: 1.2rem; cursor: pointer; }
.stepper button:first-child { border-radius: 12px 0 0 12px; border-right: 0; }
.stepper button:last-child { border-radius: 0 12px 12px 0; border-left: 0; }
.form-error { color: #ff9b85; min-height: 1.2em; margin: 0; font-size: .9rem; }
.form-error:empty { display: none; }
.fine { font-size: .8rem; color: var(--on-dark-soft); margin: 0; text-align: center; }
.my-bookings { margin-top: 28px; background: var(--roast); border-radius: var(--radius); padding: 20px 24px; }
.my-bookings ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.my-bookings li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(246,236,223,.1); padding-top: 10px; }
.my-bookings li button { background: none; border: 1px solid var(--on-dark-soft); color: var(--on-dark-soft); border-radius: 999px; padding: .3em .9em; cursor: pointer; font: inherit; font-size: .85rem; }
.my-bookings code { font-family: var(--font-mono); color: var(--bug); }

/* ---------- order ---------- */
.order { padding: 72px 0; background: linear-gradient(120deg, var(--caramel), var(--crema)); color: var(--espresso); }
.order .eyebrow { color: var(--espresso); opacity: .7; }
.order-inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.order-inner h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); max-width: 560px; }
.order-inner p { margin: 0; }
.order-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.order-btn { border: 0; color: #fff; }
.order-btn.zomato { background: #e23744; } .order-btn.swiggy { background: #fc8019; }

/* ---------- visit ---------- */
.visit-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.info { margin: 1.5rem 0 0; display: grid; gap: 18px; }
.info dt { font: 500 .8rem var(--font-mono); color: var(--caramel); text-transform: uppercase; letter-spacing: .06em; }
.info dd { margin: .2em 0 0; font-size: 1.05rem; }
.badge { display: inline-block; margin-left: .5em; font: 600 .75rem var(--font-mono); padding: .15em .6em; border-radius: 999px; vertical-align: middle; }
.badge.open { background: #d6f2d9; color: #22662c; } .badge.closed { background: #f7d9d2; color: #8d2f1c; }
.visit .btn-ghost { color: var(--mocha); border-color: var(--mocha); }
.map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; background: var(--milk); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- footer ---------- */
.footer { background: var(--espresso); color: var(--on-dark-soft); padding: 36px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .85rem; }
.footer .brand { color: var(--on-dark); }
.footer p { margin: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--milk); color: var(--ink); padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow); max-width: min(460px, calc(100% - 32px)); border-left: 4px solid var(--bug); animation: rise .3s; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .about-grid, .book-grid, .visit-grid { grid-template-columns: 1fr; }
  .floor { min-height: 0; aspect-ratio: 4 / 3; }
  .sig-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .nav-toggle { display: block; }
  .nav nav {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(31,19,13,.97); padding: 8px 16px 20px; transform: translateY(-120%); transition: transform .35s; z-index: -1;
  }
  .nav nav.open { transform: none; }
  .nav nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid rgba(246,236,223,.08); }
  .nav nav .btn { margin-top: 14px; }
  .hero h1 { font-size: clamp(2.3rem, 10.5vw, 3.4rem); }
  .lede { font-size: 1.05rem; }
  .hero-cta .btn { flex: 1 1 auto; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: .8rem; }
  .hero-facts strong { font-size: clamp(.85rem, 4.2vw, 1.1rem); white-space: nowrap; }
  .hero-facts span { font-size: .78rem; }
  .floor { min-height: 0; aspect-ratio: 1 / 1.05; }
  .booking .row { grid-template-columns: 1fr; }
}
/* narrow or portrait: the cup gets its own band under the nav and the copy stacks below it.
   hero3d.js reads --cup-zone to place the cup inside that band. */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .hero { align-items: flex-start; --cup-zone: clamp(210px, 58vw, 320px); }
  .hero-copy { padding-top: calc(68px + var(--cup-zone)); padding-bottom: 56px; }
  .scroll-hint { display: none; }
}
@media (max-width: 480px) {
  .sig-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .sig { padding: 12px 12px 16px; }
  .sig h3 { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
