/* ==========================================================================
   MEM PATISSERIE — INDEX (MAIN) PAGE STYLES
   Hero · Drinks showcase · Food showcase · Menu horizontal scroll
   ========================================================================== */

/* ==========================================================================
   1. HERO SECTION
   Full-viewport dark brown. Pinyon Script headline. Floating drink PNG.
   ========================================================================== */

.hero {
  min-height: 100vh;
  background:
    /* Text protection — deep shadow on the left */
    linear-gradient(to right, rgba(20, 7, 3, 0.96) 0%, rgba(20, 7, 3, 0.88) 22%, rgba(20, 7, 3, 0.5) 42%, transparent 58%),
    /* Champagne glow on the right where the cup lives */
    radial-gradient(ellipse 55% 90% at 95% 50%,  rgba(247, 231, 206, 0.65) 0%, rgba(154, 88, 42, 0.35) 38%, transparent 62%),
    radial-gradient(ellipse 45% 45% at 60% 15%,  rgba(180, 110, 50, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 35% 30% at 15% 85%,  rgba(100, 45, 15, 0.4)   0%, transparent 60%),
    linear-gradient(160deg, #1a0b06 0%, #2C1810 45%, #321a0c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-32) var(--space-8) var(--space-16);
}

.hero__inner {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  max-width: 560px;
}

/* ── Hero splash image ──────────────────────────────────────────────────── */
.hero__splash {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 82vw;
  max-width: 1100px;
  min-width: 400px;
  height: auto;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0;
}

.hero__splash.is-loaded {
  animation: splashFadeIn 1.4s ease-out 0.1s both;
}

@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .hero__splash {
    width: 130vw;
    right: -40px;
    bottom: -20px;
    opacity: 0.25;
  }
}

.hero__eyebrow {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--copper);
  /* Starts invisible — animated via scrolltrigger.js / GSAP on load */
  opacity: 0;
  transform: translateY(12px);
}

/* GSAP adds .is-animated class to trigger the state */
.hero__eyebrow.is-animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms ease-out, transform 600ms ease-out;
}

.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(4rem, 7vw, 8rem);
  color: var(--text-light);
  line-height: 1;
  letter-spacing: 0.01em;
  opacity: 0;
  transform: translateY(20px);
}

.hero__headline.is-animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease-out 100ms, transform 700ms ease-out 100ms;
}

.hero__headline span {
  color: var(--copper);
}

.hero__sub {
  font-family: var(--font-body);
  font-size: 1.125rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 42ch;
  line-height: 1.8;
  opacity: 0;
  transform: translateY(16px);
}

.hero__sub.is-animated {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease-out 200ms, transform 700ms ease-out 200ms;
}

.hero__cta {
  margin-top: var(--space-4);
  opacity: 0;
}

.hero__cta.is-animated {
  opacity: 1;
  transition: opacity 600ms ease-out 350ms;
}

/* Hero drink image — floats gently via scrolltrigger.js [data-float] */
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__drink-img {
  width: 100%;
  max-width: 420px;
  height: auto;
  position: relative;
  z-index: 2;   /* cup in front of hero swirl */
  opacity: 0;
}

.hero__drink-img.is-animated {
  opacity: 1;
  transition: opacity 1000ms ease-out 400ms;
  animation: heroFloat 4s ease-in-out 1.2s infinite;
}

.hero__drink-swirl {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 420px;
  height: auto;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

.hero__drink-swirl--back  { z-index: 1; }
.hero__drink-swirl--front { z-index: 3; }

@keyframes heroFloat {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50%       { transform: translateY(-16px) rotate(1deg); }
}

/* Generic float for [data-float] elements */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Scroll indicator */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  opacity: 0;
  animation: fadeInUp 600ms ease-out 1500ms forwards;
}

.hero__scroll-hint-text {
  font-family: var(--font-heading);
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--copper), transparent);
  animation: scrollPulse 2s ease-in-out 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ==========================================================================
   2. DRINKS SHOWCASE
   Three drink cards. ScrollTrigger pins and sequences them on scroll.
   Three.js liquid swirl added per card via drinks.js.
   ========================================================================== */

.drinks-section {
  background-color: var(--dark-brown);
  padding: var(--space-32) var(--space-8);
  position: relative;
}

.drinks-section__header {
  text-align: center;
  margin-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.drinks-section__headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  color: var(--text-light);
  line-height: 1.1;
}

.drinks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: 1200px;
  margin: 0 auto;
}

/* Each [data-drink] card */
.drink-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--copper-dim);
  border-radius: var(--radius);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  cursor: pointer;
  transition: border-color var(--transition), background-color var(--transition);
  position: relative;
  overflow: hidden;
}

.drink-card:hover {
  border-color: var(--copper);
  background-color: rgba(184, 115, 51, 0.05);
}

.drink-card__img-wrap {
  width: 200px;
  height: 200px;
  position: relative;
  flex-shrink: 0;
}

.drink-cup {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
  will-change: transform;
}

/* Shared swirl base */
.drink-swirl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  will-change: clip-path;
}

.drink-swirl--back  { z-index: 1; }
.drink-swirl--front { z-index: 3; }

.drink-card__name {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-light);
  text-align: center;
}

.drink-card__desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.7;
  max-width: 28ch;
}

.drink-card__price {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--copper);
  border: 1px solid var(--copper-dim);
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius);
  text-transform: uppercase;
}

/* ==========================================================================
   3. FOOD SHOWCASE
   Four food cards with canvas brush stroke hover via food.js.
   ========================================================================== */

.food-section {
  background-color: var(--cream);
  padding: var(--space-32) var(--space-8);
}

.food-section__header {
  text-align: center;
  margin-bottom: var(--space-16);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.food-section__headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 4.5rem);
  color: var(--text-dark);
  line-height: 1.1;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  max-width: 1280px;
  margin: 0 auto;
}

/* .food-card class is what food.js targets */
.food-card {
  background-color: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-8) var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  will-change: transform;
  transition:
    box-shadow   400ms ease,
    border-color var(--transition);
}

.food-card.is-magnetic {
  border-color: var(--copper);
  box-shadow:
    0 24px 48px rgba(44, 24, 16, 0.14),
    0  8px 16px rgba(44, 24, 16, 0.08),
    0  0   0  1px var(--copper-dim);
}

/* Copper underline draws in from centre on hover */
.food-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--copper);
  transition: width 380ms cubic-bezier(0.76, 0, 0.24, 1) 80ms;
}

.food-card.is-magnetic::after {
  width: 56%;
}

.food-card__img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  position: relative;
  z-index: 3;
}

.food-card__name {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dark);
  text-align: center;
  position: relative;
  z-index: 3;
}

.food-card__desc {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-muted-light);
  text-align: center;
  line-height: 1.6;
  max-width: 22ch;
  font-style: italic;
  position: relative;
  z-index: 3;
}

.food-card__price {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  color: var(--copper);
  text-transform: uppercase;
  position: relative;
  z-index: 3;
}

/* ==========================================================================
   4. MENU HORIZONTAL SCROLL SECTION
   Vertical scroll drives horizontal panel movement via GSAP ScrollTrigger.
   Three panels: Drinks / Food / Specials.
   ========================================================================== */

.menu-section {
  background-color: var(--dark-brown-2);
  position: relative;
  /* Prevent browser from intercepting vertical scroll while GSAP drives the pin */
  touch-action: pan-y;
  /* iOS Safari: prevent rubber-band bounce from breaking the GSAP pin */
  overscroll-behavior-y: none;
}

.menu-section__header {
  text-align: center;
  padding: var(--space-8) var(--space-8) var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.menu-section__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 3rem);
  color: var(--text-light);
}

/* Horizontal scroll container — GSAP pins and moves .menu-track */
.menu-scroll-container {
  overflow: hidden;
  position: relative;
}

.menu-track {
  display: flex;
  width: 300%;   /* 3 panels × 100% each */
  will-change: transform;
}

.menu-panel {
  width: calc(100vw);
  min-height: 55vh;
  padding: var(--space-8) var(--space-16);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
  flex-shrink: 0;
  border-right: 1px solid var(--copper-dim);
}

.menu-panel__label {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--copper);
}

.menu-panel__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 3.5rem);
  color: var(--text-light);
  line-height: 1.1;
}

.menu-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4) var(--space-8);
  max-width: 640px;
}

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--copper-dim);
}

.menu-item__name {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  font-style: italic;
}

.menu-item__price {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  color: var(--copper);
  white-space: nowrap;
}

/* Menu progress dots */
.menu-progress {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
}

.menu-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--copper-dim);
  transition: background-color var(--transition), transform var(--transition);
  cursor: pointer;
  /* Expand touch target to 44×44px without affecting visual layout */
  position: relative;
}

.menu-dot::before {
  content: '';
  position: absolute;
  inset: -19px; /* (44px - 6px) / 2 = 19px on each side */
}

.menu-dot.is-active {
  background-color: var(--copper);
  transform: scale(1.4);
}

/* ==========================================================================
   5. MARQUEE STRIP
   Infinite scrolling text between sections.
   ========================================================================== */

.marquee-strip {
  background-color: var(--copper);
  overflow: hidden;
  padding: var(--space-3) 0;
  border-top: 1px solid rgba(0,0,0,0.1);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.marquee-inner {
  display: flex;
  white-space: nowrap;
  animation: marquee 20s linear infinite;
  width: max-content;
}

.marquee-text {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--dark-brown);
  padding: 0 var(--space-8);
  flex-shrink: 0;
}

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

/* ==========================================================================
   6. RESPONSIVE
   ========================================================================== */

@media (max-width: 1023px) {
  .food-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .drinks-grid {
    grid-template-columns: repeat(1, 1fr);
    max-width: 480px;
  }
}

@media (max-width: 767px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__drink-img {
    max-width: 280px;
  }

  .hero__sub {
    margin: 0 auto;
  }

  .food-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }

  .menu-items {
    grid-template-columns: 1fr;
  }

  .menu-panel {
    padding: var(--space-8) var(--space-6);
  }
}

@media (max-width: 479px) {
  .food-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }
}
