/* =========================================================
   MAISON BRÛLOT — Premium Café Landing Page
   ========================================================= */

:root {
  --espresso: #3B2A20;
  --mocha: #6F4E37;
  --cream: #F5EDE0;
  --latte: #E8D9C4;
  --caramel: #C68B59;
  --gold: #B08968;
  --offwhite: #FAF7F2;
  --charcoal: #1C1917;
}

* { -webkit-tap-highlight-color: transparent; }

html {
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  cursor: none;
}
@media (max-width: 1023px) {
  body { cursor: auto; }
}

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.cursor {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--caramel);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  mix-blend-mode: difference;
}
.cursor.hover {
  width: 64px;
  height: 64px;
  background: rgba(198, 139, 89, 0.2);
  border-color: var(--cream);
}
.cursor-dot {
  position: fixed;
  width: 4px;
  height: 4px;
  background: var(--caramel);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
#nav.scrolled {
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
}
#nav.scrolled .nav-text {
  color: var(--charcoal);
}
.nav-text {
  color: var(--cream);
  transition: color 0.4s ease;
}
.nav-link {
  position: relative;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s ease;
}
.nav-link:hover::after { width: 100%; }

#mobile-menu.open { transform: translateX(0); }
.mobile-link {
  position: relative;
  font-style: italic;
}
.mobile-link:hover { color: var(--caramel); }

/* =========================================================
   HERO — WebGL mesh gradient + particles
   ========================================================= */

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroZoom 22s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroZoom {
  from { transform: scale(1.05); }
  to   { transform: scale(1.14); }
}

.glass-light {
  background: rgba(245, 237, 224, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(245, 237, 224, 0.18);
}

.split-line {
  overflow: hidden;
  display: block;
}
.split-line > span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
}
.split-line.in > span {
  animation: lineIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes lineIn {
  to { transform: translateY(0); opacity: 1; }
}

.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.fade-up.in {
  opacity: 1;
  transform: translateY(0);
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  animation: float 12s ease-in-out infinite;
}
.orb-1 {
  width: 320px; height: 320px;
  background: var(--caramel);
  top: 15%; left: 8%;
}
.orb-2 {
  width: 260px; height: 260px;
  background: var(--mocha);
  bottom: 12%; right: 6%;
  animation-delay: -4s;
  animation-duration: 14s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -40px) scale(1.08); }
}


/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-image: linear-gradient(to bottom, var(--mocha) 50%, var(--espresso) 50%);
  background-size: 100% 200%;
  background-position: 0% 0%;
  color: var(--cream);
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: background-position 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-primary:hover { background-position: 0% 100%; }
.btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--mocha);
  color: var(--cream);
  padding: 0.95rem 1.8rem;
  border-radius: 999px;
  border: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.3s ease;
}
.btn-ghost:hover {
  background: var(--espresso);
}

.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--mocha);
  color: var(--cream);
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.btn-dark:hover {
  background: var(--espresso);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(59, 42, 32, 0.4);
}

/* =========================================================
   MARQUEE
   ========================================================= */
.marquee {
  animation: marquee 30s linear infinite;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =========================================================
   STORY SECTION
   ========================================================= */
.reveal-up,
.reveal-img {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-up.in,
.reveal-img.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-img img {
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-img.in img {
  animation: imgReveal 1.6s ease-out;
}

/* =========================================================
   MENU
   ========================================================= */
.menu-tabs .tab {
  padding: 0.5rem 1.4rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--charcoal);
  background: transparent;
  border: 1px solid rgba(28, 25, 23, 0.15);
  transition: all 0.3s ease;
  cursor: pointer;
}
.menu-tabs .tab:hover {
  border-color: var(--espresso);
}
.menu-tabs .tab.active {
  background: var(--espresso);
  color: var(--cream);
  border-color: var(--espresso);
}

.menu-card {
  position: relative;
  background: var(--offwhite);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(28, 25, 23, 0.06);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease,
              opacity 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
}
.menu-card.show {
  opacity: 1;
  transform: translateY(0);
}
.menu-card.hide {
  display: none;
}
.menu-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -20px rgba(59, 42, 32, 0.25);
}
.menu-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.menu-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-card:hover .menu-img img {
  transform: scale(1.08);
}
.menu-body {
  padding: 1.5rem 1.5rem 1.75rem;
}
.menu-body h3 {
  color: var(--espresso);
  letter-spacing: -0.01em;
}
.price {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  color: var(--caramel);
  font-weight: 500;
}
.tag {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mocha);
  padding: 0.3rem 0.8rem;
  background: var(--latte);
  border-radius: 999px;
}
.ribbon {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background: var(--espresso);
  color: var(--cream);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

/* =========================================================
   MENU MARQUEE — auto-scrolling card carousel
   ========================================================= */
.menu-marquee-wrap {
  position: relative;
  overflow: hidden;
  /* Edge fade so cards smoothly enter/exit */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.menu-marquee {
  display: flex;
  width: max-content;
  animation: menu-marquee-scroll 60s linear infinite;
  will-change: transform;
  padding: 1rem 0; /* breathing room for hover lift shadow */
}
.menu-marquee:hover { animation-play-state: paused; }

@keyframes menu-marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.menu-mcard {
  position: relative;
  flex-shrink: 0;
  width: 280px;
  margin-right: 1.5rem; /* margin-based gap so -50% loops seamlessly */
  background: var(--offwhite);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(28, 25, 23, 0.06);
  box-shadow: 0 4px 14px -6px rgba(28, 25, 23, 0.08);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s ease,
              border-color 0.4s ease;
}
.menu-mcard:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -16px rgba(28, 25, 23, 0.22);
  border-color: rgba(198, 139, 89, 0.45);
}
.menu-mcard .img-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--latte);
}
.menu-mcard .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-mcard:hover .img-wrap img { transform: scale(1.06); }

.menu-mcard .body {
  padding: 1.1rem 1.25rem 1.4rem;
}
.menu-mcard .head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.menu-mcard h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--espresso);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.menu-mcard .price {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  color: var(--caramel);
  font-weight: 500;
  white-space: nowrap;
}
.menu-mcard .desc {
  font-size: 0.78rem;
  color: rgba(28, 25, 23, 0.6);
  margin-top: 0.4rem;
  line-height: 1.5;
}
.menu-mcard .tag {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mocha);
  padding: 0.3rem 0.7rem;
  background: var(--latte);
  border-radius: 999px;
}
.menu-mcard .ribbon {
  font-size: 0.6rem;
  padding: 0.3rem 0.7rem;
}

/* Reduced-motion: stop animation, wrap into a static centered layout */
@media (prefers-reduced-motion: reduce) {
  .menu-marquee {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .menu-marquee-wrap {
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--latte);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(59, 42, 32, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.gallery-item:hover::after { opacity: 1; }

/* =========================================================
   REVIEWS
   ========================================================= */
.review {
  position: absolute;
  inset: 0;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.review.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.stars {
  color: var(--caramel);
  letter-spacing: 0.4em;
  font-size: 0.95rem;
}
.quote {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.4;
  margin: 2rem auto;
  max-width: 800px;
}
.reviewer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2rem;
}
.reviewer img {
  width: 50px; height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--caramel);
}
.reviewer > div { text-align: left; }
.rev-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245, 237, 224, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: all 0.3s ease;
}
.rev-btn:hover {
  background: var(--caramel);
  border-color: var(--caramel);
  color: var(--charcoal);
}
.rev-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(245, 237, 224, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}
.rev-dot.active {
  background: var(--caramel);
  width: 24px;
  border-radius: 999px;
}

/* Entropy particle background — sits behind the radial-gradient overlay */
.entropy-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
  z-index: 0;
}
.entropy-bg.ready { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .entropy-bg { display: none; }
}

/* =========================================================
   VISIT
   ========================================================= */
.visit-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--latte);
  color: var(--espresso);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* COBE Globe — café & origin map */
.globe-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 30% 30%, rgba(198, 139, 89, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 70% 75%, rgba(176, 137, 104, 0.08) 0%, transparent 55%),
    linear-gradient(135deg, #1C1917 0%, #2A1F18 50%, #1C1917 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px -25px rgba(28, 25, 23, 0.4);
}
.globe-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 60%, rgba(28, 25, 23, 0.5) 100%);
  pointer-events: none;
  z-index: 1;
}
#globe-canvas {
  width: 92%;
  aspect-ratio: 1 / 1;
  cursor: grab;
  opacity: 0;
  transition: opacity 1.2s ease;
  touch-action: none;
  user-select: none;
  contain: strict;
}
#globe-canvas.ready { opacity: 1; }
.globe-caption {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  z-index: 2;
  color: var(--cream);
}
.globe-hint {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245, 237, 224, 0.4);
  padding: 0.4rem 0.8rem;
  border: 1px solid rgba(245, 237, 224, 0.15);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* =========================================================
   RESERVATION FORM
   ========================================================= */
.float-field {
  position: relative;
}
.float-field input {
  width: 100%;
  padding: 1.25rem 1.1rem 0.6rem;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--charcoal);
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.float-field input:focus {
  outline: none;
  border-color: var(--caramel);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(198, 139, 89, 0.15);
}
.float-field label {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(28, 25, 23, 0.5);
  font-size: 0.95rem;
  pointer-events: none;
  transition: all 0.25s ease;
}
.float-field input:focus + label,
.float-field input:not(:placeholder-shown) + label,
.float-field label.static-label {
  top: 0.55rem;
  transform: translateY(0);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--caramel);
}

/* =========================================================
   ACCESSIBILITY & MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-img { animation: none; }
  .orb { animation: none; }
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--caramel);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection */
::selection {
  background: var(--caramel);
  color: var(--charcoal);
}

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
