/* ==========================================================================
   Velvet Roast — Custom styles
   Editorial · Cinematic · Dark Luxury
   Brand palette:
     --espresso #1C1A17 · --velvet #4A3428 · --sand #E9D9C7
     --brass #B8905B · --ivory #FAF7F2
   ========================================================================== */

:root {
  --espresso: #1c1a17;
  --espresso-90: rgba(28, 26, 23, 0.9);
  --velvet: #4a3428;
  --sand: #e9d9c7;
  --brass: #b8905b;
  --brass-soft: rgba(184, 144, 91, 0.16);
  --ivory: #faf7f2;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- Base ----------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background-color: var(--espresso);
  color: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Prevents the scroll chain from bubbling to the page (smoother momentum on iOS) */
  overscroll-behavior-y: none;
}

/* Warm sandstone grain overlaid on the dark base — subtle, performant.
   Promoted to its own compositor layer (translateZ) so it is painted ONCE
   and only composited on scroll, instead of repainting every frame. */
.grain::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Thin brass selection */
::selection {
  background: var(--brass);
  color: var(--espresso);
}

/* --- Typography helpers --------------------------------------------------- */
.font-display { font-family: "Playfair Display", Georgia, serif; }
.font-accent  { font-family: "Cormorant Garamond", Georgia, serif; }
.font-body    { font-family: "Inter", system-ui, sans-serif; }

.eyebrow {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  letter-spacing: 0.02em;
  color: var(--brass);
}

/* Editorial eyebrow with flanking hairlines — magazine-style label */
.eyebrow-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-transform: uppercase;
  font-style: normal;
  font-family: "Inter", sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.32em;
}
.eyebrow-label::before,
.eyebrow-label::after {
  content: "";
  width: clamp(1.5rem, 4vw, 3rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 144, 91, 0.7));
}
.eyebrow-label::after {
  background: linear-gradient(90deg, rgba(184, 144, 91, 0.7), transparent);
}

.kicker {
  font-family: "Inter", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--brass);
}

/* Fluid display scale */
.display-xl { font-size: clamp(3.2rem, 11vw, 9.5rem); line-height: 0.92; }
.display-lg { font-size: clamp(2.4rem, 6vw, 4.5rem);  line-height: 1.02; }
.display-md { font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1.1; }

/* --- Brass hairline divider ---------------------------------------------- */
.hairline {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(184, 144, 91, 0.55) 20%,
    rgba(184, 144, 91, 0.55) 80%,
    transparent
  );
}

/* --- Signature: warm light sheen across the hero wordmark ----------------- */
.sheen {
  background: linear-gradient(
    100deg,
    var(--ivory) 0%,
    var(--ivory) 38%,
    #fff6e6 47%,
    var(--brass) 52%,
    var(--ivory) 60%,
    var(--ivory) 100%
  );
  background-size: 250% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen-sweep 3.6s var(--ease) 0.5s 1 forwards;
}

@keyframes sheen-sweep {
  0%   { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

/* --- Logo monogram (nav + mobile menu) ----------------------------------- */
.logo-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.75rem;
  width: 2.75rem;
  flex-shrink: 0;
  border: 1px solid rgba(184, 144, 91, 0.55);
  border-radius: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--brass);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.group:hover .logo-monogram {
  background-color: var(--brass);
  color: var(--espresso);
}

/* --- Navbar state --------------------------------------------------------- */
.nav-shell {
  transition: background-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
    border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav-shell.scrolled {
  background-color: var(--espresso-90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(184, 144, 91, 0.18);
}
/* backdrop-filter is GPU-expensive to recomposite while scrolling on phones.
   Below the desktop breakpoint, drop the live blur and use a near-opaque
   solid fill instead — visually similar, dramatically cheaper. */
@media (max-width: 1023px) {
  .nav-shell.scrolled {
    background-color: rgba(28, 26, 23, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.nav-link {
  position: relative;
  color: var(--sand);
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover,
.nav-link:focus-visible { color: var(--ivory); }
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.95rem 1.9rem;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease),
    color 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn-primary {
  background: var(--brass);
  color: var(--espresso);
  box-shadow: 0 8px 24px -14px rgba(184, 144, 91, 0.7);
}
/* Premium lift: a small upward nudge, no layout shift (transform-only) */
.btn-primary:hover {
  background: #c89a63;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -14px rgba(184, 144, 91, 0.85);
}
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(233, 217, 199, 0.3);
}
.btn-ghost:hover {
  border-color: var(--brass);
  color: var(--brass);
  transform: translateY(-2px);
}
.btn-ghost:active { transform: translateY(0); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--espresso), 0 0 0 4px var(--brass);
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover,
  .btn-ghost:hover { transform: none; }
}

/* --- Cards ---------------------------------------------------------------- */
.feature-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(184, 144, 91, 0.18);
  background: linear-gradient(180deg, rgba(74, 52, 40, 0.35), rgba(28, 26, 23, 0.2));
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}
.feature-card:hover {
  border-color: rgba(184, 144, 91, 0.55);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.feature-card img {
  transition: transform 0.8s var(--ease);
}
.feature-card:hover img { transform: scale(1.06); }

/* Feature-card price: a touch larger, never crowding the title */
.feature-card .menu-price {
  font-size: 1.6rem;
  font-weight: 500;
  padding-left: 0.75rem;
}

/* --- Menu dotted leaders -------------------------------------------------- */
.menu-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(184, 144, 91, 0.12);
}
.menu-leader {
  flex: 1;
  border-bottom: 1px dotted rgba(184, 144, 91, 0.45);
  transform: translateY(-0.3rem);
  min-width: 1.5rem;
}
.menu-price {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  color: var(--brass);
  white-space: nowrap;
}

/* --- Gallery -------------------------------------------------------------- */
.gallery-item {
  overflow: hidden;
  position: relative;
}
.gallery-item img {
  transition: transform 0.9s var(--ease), filter 0.6s var(--ease);
}
@media (hover: hover) {
  .gallery-item img { filter: saturate(0.92); }
  .gallery-item:hover img {
    transform: scale(1.08);
    filter: saturate(1.05);
  }
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 26, 23, 0.55));
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.gallery-item:hover::after { opacity: 1; }

/* --- Steam (hero ambient detail) ----------------------------------------- */
.steam {
  position: absolute;
  bottom: 0;
  width: 9px;
  height: 90px;
  background: linear-gradient(to top, rgba(233, 217, 199, 0), rgba(233, 217, 199, 0.45));
  border-radius: 50%;
  filter: blur(7px);
  opacity: 0;
  animation: rise 6s ease-in-out infinite;
}
@keyframes rise {
  0%   { transform: translateY(0) scaleX(1);   opacity: 0; }
  20%  { opacity: 0.5; }
  100% { transform: translateY(-150px) scaleX(2.4); opacity: 0; }
}

/* --- Scroll reveal -------------------------------------------------------- */
/* No persistent `will-change` here: it is a one-time transition, and leaving
   will-change on ~20 elements keeps that many compositor layers alive,
   which actually hurts scroll performance on mobile. */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }
.reveal[data-delay="4"] { transition-delay: 0.48s; }

/* --- Mobile menu ---------------------------------------------------------- */
.mobile-menu {
  transition: opacity 0.4s var(--ease), visibility 0.4s var(--ease);
}
.mobile-menu.hidden-menu {
  opacity: 0;
  visibility: hidden;
}

/* --- Scroll cue ----------------------------------------------------------- */
.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.scroll-cue span {
  display: block;
  width: 1px;
  height: 54px;
  background: linear-gradient(to bottom, var(--brass), transparent);
  margin: 0 auto;
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* --- Visit Us: full-section editorial photo background ------------------- */
.visit-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.visit-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* Mobile: form sits over the photo full-width, so keep a stronger, even scrim. */
  background:
    linear-gradient(180deg, rgba(20, 18, 16, 0.88) 0%, rgba(20, 18, 16, 0.78) 100%),
    url("../assets/coffe-bg1.png") center / cover no-repeat;
}
@media (min-width: 768px) {
  .visit-bg {
    /* Desktop: dark on the left (text/form), photo reads clearly toward the
       right where the cup sits; gentle top/bottom fade blends into the page. */
    background:
      linear-gradient(180deg, rgba(28, 26, 23, 0.7) 0%, rgba(28, 26, 23, 0.15) 16%, rgba(28, 26, 23, 0.15) 82%, var(--espresso) 100%),
      linear-gradient(90deg, rgba(18, 16, 14, 0.94) 0%, rgba(18, 16, 14, 0.78) 26%, rgba(18, 16, 14, 0.38) 55%, rgba(18, 16, 14, 0.12) 100%),
      url("../assets/coffe-bg1.png") center / cover no-repeat;
  }
}
/* The café card reads as a calm dark panel floating on the photo.
   Restrained (light blur only where supported) — fill + brass border. */
.visit-panel {
  background: rgba(22, 20, 17, 0.85);
}
@supports (backdrop-filter: blur(6px)) {
  .visit-panel {
    background: rgba(22, 20, 17, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

/* Café recommendation rows */
.cafe-row {
  border-radius: 12px;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
  transition: background-color 0.25s var(--ease);
}
.cafe-row:hover { background-color: rgba(184, 144, 91, 0.06); }
.cafe-thumb {
  width: 6rem;
  height: 5rem;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
@media (min-width: 640px) {
  .cafe-thumb { width: 7rem; height: 5.5rem; }
}
@media (hover: hover) {
  .cafe-row:hover .cafe-thumb { transform: scale(1.04); }
}

/* --- Café explore chips (Maps / Swiggy / Zomato quick links) -------------- */
.cafe-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(184, 144, 91, 0.28);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--sand);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}
.cafe-chip:hover,
.cafe-chip:focus-visible {
  border-color: var(--brass);
  color: var(--brass);
  background-color: var(--brass-soft);
  outline: none;
}

/* --- Hero: scroll-driven video reveal ------------------------------------- */
/* Outer container's height controls how much scrolling drives the effect.
   150vh = the animation completes within ~half a screen of scrolling — snappy. */
.hero-scroll {
  position: relative;
  width: 100%;
  min-height: 150vh;
}
/* Inner content pins to the viewport while the outer container scrolls past. */
.hero-sticky {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100svh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  overflow: hidden;
  padding: 6rem 1.25rem 3rem;
  text-align: center;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 18%, rgba(74, 52, 40, 0.55) 0%, rgba(28, 26, 23, 0) 70%),
    linear-gradient(160deg, var(--velvet) 0%, var(--espresso) 45%, var(--espresso) 100%);
}
.hero-copy {
  position: relative;
  z-index: 10;
  max-width: 46rem;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), filter 0.7s var(--ease), transform 0.7s var(--ease);
}
.hero-copy.in {
  opacity: 1;
  filter: blur(0px);
  transform: none;
}
.hero-inset {
  position: relative;
  z-index: 5;
  width: min(92vw, 1080px);
  max-height: 64vh;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  transform: scale(0.85);
  transform-origin: center;
  will-change: transform, border-radius;
}
.hero-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.hero-cta {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.hero-cta.in {
  opacity: 1;
  transform: none;
}
/* When the video can't load, the poster fills the box. */
.hero-video {
  background: var(--espresso) url("../assets/hero.png") center / cover no-repeat;
}
/* Behind the rest of the page sections so they scroll over cleanly. */
.hero-scroll + section,
#featured {
  position: relative;
  z-index: 10;
}

/* --- Hero on mobile/tablet: static, single-viewport (no scroll animation) -
   The scroll-driven clip-path + video scale is the single biggest scroll-jank
   source on phones (clip-path repaints aren't GPU-accelerated and the video is
   decoding at the same time). Below 1024px we show the final revealed state as
   a normal hero — cheaper, calmer, and far less cramped than 3 screens of
   sticky scroll. JS also skips all scroll math at this width. */
@media (max-width: 1023px) {
  .hero-scroll { min-height: 130vh; }
  .hero-sticky {
    gap: 1.5rem;
    padding: 7rem 1.25rem 3.5rem;
  }
  .hero-inset {
    width: min(100%, 560px);
    max-height: 52vh;
    border-radius: 20px;
    transform: scale(0.8);
  }
  /* Tighten the oversized display heading so it doesn't dominate small screens */
  .display-xl { font-size: clamp(2.9rem, 14vw, 4.5rem); }
  .scroll-cue { display: none; }
}

/* --- Reduced motion: honor user preference globally ----------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sheen {
    -webkit-text-fill-color: var(--ivory);
    color: var(--ivory);
    background: none;
  }
  .steam, .scroll-cue span { display: none; }
  /* Collapse the scroll-driven hero into a static, fully-revealed state */
  .hero-scroll { min-height: 100svh; }
  .hero-sticky { position: relative; }
  .hero-copy { opacity: 1; filter: none; transform: none; }
  .hero-cta { opacity: 1; transform: none; }
  .hero-inset { clip-path: inset(0 0 0 0 round 16px); }
  .hero-video { transform: none; }
}
