/* 2Roots Bali — responsive overrides on top of page.css */

html, body { overflow-x: hidden; max-width: 100vw; }
img, video { max-width: 100%; height: auto; }

/* ============================================================
   Hamburger + slide-in drawer (mobile only).
   Desktop keeps the inline .nav-links + .lang-toggle exactly as
   designed. Below 700px the inline links/toggle hide, the burger
   appears, and a sage-deep drawer slides in from the right with
   the same nav links (Instrument Serif scale) plus the EN/ID
   toggle pinned to the bottom. Backdrop closes on tap; Escape
   closes too. Body scroll-lock is handled in the JSX.
   ============================================================ */
.nav-burger {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  cursor: pointer; padding: 0;
  z-index: 1001;
  color: var(--cream);
}
.nav-burger span {
  display: block;
  width: 22px; height: 1.5px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.32s cubic-bezier(.65,.05,.3,1), opacity 0.2s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-backdrop {
  position: fixed; inset: 0;
  background: rgba(20,28,18,0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed; top: 0; right: 0;
  height: 100dvh; height: 100vh;
  width: min(86vw, 360px);
  background: var(--sage-deep);
  color: var(--cream);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.42s cubic-bezier(.7,.05,.3,1), box-shadow 0.3s ease;
  display: none;
  overflow-y: auto;
}
.nav-drawer.open {
  transform: translateX(0);
  /* box-shadow only when open — prevents the offscreen drawer from
     casting a thin dark stripe down the right edge of the page */
  box-shadow: -24px 0 48px -12px rgba(0,0,0,0.4);
}

.nav-drawer-inner {
  padding: 96px 32px 40px;
  display: flex; flex-direction: column;
  min-height: 100%;
}
.nav-drawer-eyebrow {
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase;
  opacity: 0.55; margin-bottom: 36px;
}
.nav-drawer-links {
  display: flex; flex-direction: column;
  gap: 28px; flex: 1;
}
.nav-drawer-links a {
  font-family: 'Instrument Serif', serif;
  font-size: 36px; line-height: 1; letter-spacing: -0.01em;
  color: var(--cream);
  text-decoration: none;
  width: max-content; max-width: 100%;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(.7,.05,.3,1);
}
.nav-drawer.open .nav-drawer-links a { opacity: 1; transform: translateX(0); }
.nav-drawer-links a:hover { opacity: 0.7; }
.nav-drawer-foot {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid rgba(245,239,226,0.18);
}
.nav-drawer .lang-toggle {
  display: inline-flex;
  background: rgba(245,239,226,0.12);
  border-radius: 999px; padding: 4px;
  border: 1px solid rgba(245,239,226,0.18);
}
.nav-drawer .lang-toggle button {
  background: transparent; border: 0;
  color: var(--cream); opacity: 0.6;
  font: 500 12px/1 'Inter Tight', sans-serif;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  transition: all 0.2s ease;
}
.nav-drawer .lang-toggle button.active {
  background: var(--cream); color: var(--sage-deep); opacity: 1;
}

@media (max-width: 700px) {
  .nav-drawer { display: block; }
  .nav-burger {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
  }
  .nav .nav-links,
  .nav .nav-right { display: none !important; }
}

/* Gallery strip is horizontal-scroll by design — keep it from pushing body width */
.gallery-strip { max-width: 100vw; }

/* Map wrapper added in Phase 6.5 — sane heights */
.baliole-map-wrap { width: 100%; min-height: 420px; }
@media (max-width: 720px) {
  .baliole-map-wrap, .baliole-map-wrap iframe { min-height: 320px !important; }
}

/* Footer credit row inside .site-footer */
.foot-credit {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.10);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.foot-credit a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s ease;
}
.foot-credit a:hover { color: #f4ead3; }
.foot-credit .foot-heart { color: #d8633a; vertical-align: middle; flex-shrink: 0; }

/* Phone tweaks beyond what page.css already handles */
@media (max-width: 500px) {
  .nav { padding: 14px 18px; }
  .nav-links { gap: 18px; font-size: 12px; }
  .nav-logo img { height: 48px; }
  .lang-toggle button { font-size: 11px; padding: 4px 8px; }

  .hero-fb-title { font-size: clamp(38px, 12vw, 60px) !important; line-height: 1 !important; }
  .hero-fb-sub  { font-size: 15px !important; }
  .hero-fb-meta { gap: 18px !important; padding: 14px 18px 22px !important; }

  .section-title { font-size: clamp(28px, 8vw, 42px) !important; line-height: 1.05 !important; }

  .visit-grid .visit-info { padding: 24px 20px !important; }
}

/* ============================================================
   Hero contrast — mobile
   The 2Roots interior photo is bright and creamy; the original
   .hero-veil dips to 0.15 alpha at the 35% mark which leaves the
   title colliding with the wall-light glow. On mobile we pull a
   deep sage gradient up from the bottom so the text region is
   reliably dark, plus a soft localized vignette behind the headline
   block, and a faint sage text-shadow on the title for insurance
   against any future hero photo. The photo's daylight character
   stays — only the text-bearing band darkens.
   ============================================================ */
@media (max-width: 640px) {
  .hero-fullbleed .hero-veil {
    background:
      radial-gradient(ellipse 88% 48% at 22% 62%, rgba(28,34,24,0.55) 0%, rgba(28,34,24,0.0) 70%),
      linear-gradient(180deg,
        rgba(42,46,37,0.30) 0%,
        rgba(42,46,37,0.45) 45%,
        rgba(28,34,24,0.78) 85%,
        rgba(20,28,18,0.92) 100%) !important;
  }
  .hero-fb-title {
    text-shadow:
      0 1px 2px rgba(20,28,18,0.55),
      0 8px 32px rgba(20,28,18,0.45);
  }
  .hero-fb-sub {
    text-shadow: 0 1px 2px rgba(20,28,18,0.55);
    opacity: 0.95 !important;
  }
  .time-greeting,
  .hero-fb-meta { text-shadow: 0 1px 2px rgba(20,28,18,0.5); }
}

/* ============================================================
   Menu tabs — mobile single-row scroll ribbon
   Stops 8 long-form labels from breaking into a ragged 2+1+1
   wrap. Carries the same horizontal-scroll language already used
   by .gallery-strip. Edge-fade masks signal "more →"; scroll-snap
   keeps swipes landing cleanly; active tab is auto-scrolled into
   view by a small useEffect in the JSX.
   ============================================================ */
@media (max-width: 700px) {
  .menu-tabs {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    /* break out of the section's 20px container padding so the
       ribbon can run flush to the screen edges */
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    scroll-padding-inline: 24px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* edge-fade masks — paper bg fades out toward both edges */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  }
  .menu-tabs::-webkit-scrollbar { display: none; }
  .menu-tab {
    scroll-snap-align: center;
    padding: 14px 16px !important;
    font-size: 12px !important;
    letter-spacing: 0.10em !important;
    white-space: nowrap;
  }
}
