/* =====================================================================
   LAUGHING BUDDHA BALI | css/styles.css
   SETTINGS YOU CAN EDIT: everything inside :root just below
   (fonts, colours, widths, spacing). The rest is layout.
   ===================================================================== */
:root {
  /* FONTS (loaded from Google Fonts in index.html) */
  --font-heading: "Playfair Display", Georgia, serif;
  --font-body: "Work Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* COLOURS */
  --rust: #a8431b;          /* signature colour, solid buttons */
  --rust-dark: #8a3513;     /* button hover */
  --espresso: #2b1a12;      /* headings, footer, dark areas */
  --brown: #5a3a28;         /* body text on light backgrounds */
  --cream: #f7f0e4;
  --sand: #eadbc4;
  --terracotta: #c4704b;    /* muted accent */
  --olive: #5b5d2e;         /* small labels */
  --whatsapp: #168a4d;      /* floating WhatsApp button */

  /* SIZES AND SPACING */
  --header-h: 68px;
  --max-w: 1100px;          /* widest content */
  --w-narrow: 40rem;        /* reading width for text */
  --gutter: 1.25rem;
  --radius: 6px;            /* button corners */
  --carousel-gap: 1rem;
  --wa-size: 60px;          /* floating WhatsApp button */
  --wa-offset: 20px;
  --hero-focus: 50% 40%;    /* which part of the hero photo/video stays in view */
}
@media (min-width: 900px) {
  :root { --header-h: 80px; --gutter: 2rem; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: var(--header-h); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: hidden;
  background: var(--cream); color: var(--brown);
  font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
}
@media (min-width: 768px) { body { font-size: 1.125rem; } }
img, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2 {
  margin: 0 0 1.25rem; color: var(--espresso);
  font-family: var(--font-heading); font-weight: 500; line-height: 1.15; text-wrap: balance;
}
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 0; box-shadow: 0 0 0 4px var(--espresso); }

.container { width: 100%; max-width: var(--max-w); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: calc(var(--w-narrow) + 2 * var(--gutter)); }
.section { padding-block: clamp(4rem, 9vw, 7rem); text-align: center; }
.welcome, .info { background: var(--cream); }
.menu-teaser { background: var(--sand); }
.welcome p { margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: .7rem 1.6rem;
  border: 1px solid currentColor; border-radius: var(--radius);
  background: transparent; color: inherit;
  font: 500 .9rem/1.2 var(--font-body); letter-spacing: .08em; text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn-solid { border-color: var(--rust); background: var(--rust); color: #fff; }
.btn-solid:hover { border-color: var(--rust-dark); background: var(--rust-dark); }
.btn-outline { color: var(--espresso); }
.btn-outline:hover { border-color: var(--espresso); background: var(--espresso); color: var(--cream); }
.btn-header:hover { background: var(--fg); color: var(--inv); }

/* ---------- Header (fixed) ---------- */
.site-header {
  --fg: #fff; --inv: #000;                       /* see-through state: white text */
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent; color: var(--fg);
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-solid {                           /* after about 60px of scrolling */
  --fg: #000; --inv: #fff;
  background: #fff; box-shadow: 0 2px 16px rgba(43, 26, 18, .12);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); max-width: 1280px; margin-inline: auto; padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-text { display: none; font-family: var(--font-heading); font-size: 1.25rem; line-height: 1.1; }
.logo-missing .brand-logo { display: none; }
.logo-missing .brand-text { display: inline; }

/* Hamburger (phones) */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -10px; padding: 0;
  border: 0; background: none; color: var(--fg); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 24px; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform .25s ease, top .25s ease, background-color .3s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { top: 0; transform: rotate(-45deg); }

/* Mobile panel: solid background, dark text */
.site-nav {
  position: absolute; top: 100%; left: 0; right: 0;
  display: flex; flex-direction: column; gap: 1rem;
  padding: .5rem var(--gutter) 1.5rem;
  background: #fff; color: #000; box-shadow: 0 12px 24px rgba(43, 26, 18, .12);
  visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.nav-open .site-nav {
  visibility: visible; opacity: 1; transform: none; pointer-events: auto;
  transition: opacity .25s ease, transform .25s ease, visibility 0s;
}
@media (max-width: 899.98px) {
  .site-header.nav-open { --fg: #000; --inv: #fff; background: #fff; }
}
.nav-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.nav-link {
  display: flex; align-items: center; min-height: 48px;
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  color: inherit; font-size: 1.05rem; font-weight: 500; text-decoration: none;
}
.nav-link:hover { color: var(--rust); }

/* Desktop navigation (900px and up) */
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static; flex-direction: row; align-items: center; gap: 2rem; padding: 0;
    background: none; color: inherit; box-shadow: none;
    visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: none;
  }
  .nav-list { flex-direction: row; gap: 2rem; }
  .nav-link { min-height: 0; padding: .4rem 0; border-bottom: 1px solid transparent; font-size: .95rem; letter-spacing: .04em; }
  .nav-link:hover { border-bottom-color: currentColor; color: inherit; }
}

/* If JavaScript is off: show the links, keep the header solid */
.no-js .nav-toggle { display: none; }
.no-js .site-header { --fg: #000; --inv: #fff; background: #fff; }
.no-js .header-inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); padding-block: .5rem; }
.no-js .site-nav {
  position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; padding: 0;
  background: none; box-shadow: none; visibility: visible; opacity: 1; transform: none; pointer-events: auto;
}
.no-js .nav-list { flex-direction: row; gap: 1.5rem; }
.no-js .nav-link { min-height: 44px; border-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; place-items: center;
  min-height: 100vh; min-height: 100svh;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 3rem;
  overflow: hidden; color: #fff; text-align: center;
  background: var(--espresso) url("../assets/images/hero-live-music.jpg") var(--hero-focus) / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: var(--hero-focus); pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(28, 17, 10, .68), rgba(28, 17, 10, .5) 50%, rgba(28, 17, 10, .68));
}
.hero-content { position: relative; z-index: 1; max-width: 56rem; }
.hero-title {
  margin: 0 0 1rem; color: #fff;
  font-size: clamp(2.75rem, 9vw, 5.75rem); line-height: 1.05; letter-spacing: .01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.hero-slogan { margin: 0; font-size: clamp(1.05rem, 2.8vw, 1.6rem); font-weight: 400; letter-spacing: .03em; line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .hero-content { animation: rise .9s ease-out .15s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Menu carousel ---------- */
.carousel { position: relative; margin-top: 2.5rem; }
.carousel-track {
  display: flex; gap: var(--carousel-gap); min-width: 0;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-slide { flex: 0 0 100%; scroll-snap-align: start; }
.frame {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px;
  background: linear-gradient(160deg, #ecd6bb, #d79a74);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame.is-missing::after {
  content: "Photo coming soon"; position: absolute; inset: 0;
  display: grid; place-items: center; padding: 1rem; color: var(--espresso); font-size: .95rem;
}
.carousel-btn {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--espresso); border-radius: var(--radius);
  background: rgba(247, 240, 228, .92); color: var(--espresso); cursor: pointer;
  transition: background-color .3s ease, color .3s ease, opacity .3s ease;
}
.carousel-prev { left: .5rem; }
.carousel-next { right: .5rem; }
.carousel-btn:hover:not(:disabled) { background: var(--espresso); color: var(--cream); }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.no-js .carousel-btn { display: none; }
.menu-cta { margin: 2.5rem 0 0; }
@media (min-width: 768px) {
  .carousel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; }
  .carousel-btn { position: static; transform: none; background: transparent; }
  .carousel-slide { flex-basis: calc((100% - 2 * var(--carousel-gap)) / 3); }
}

/* ---------- Closing banner ---------- */
.closing-banner {
  padding-block: clamp(5rem, 12vw, 9rem); text-align: center; color: #fff;
  background: linear-gradient(rgba(28, 17, 10, .62), rgba(28, 17, 10, .62)),
              url("../assets/images/closing-banner.jpg") center / cover no-repeat var(--espresso);
}
.closing-banner h2 { margin-bottom: 2rem; color: #fff; font-size: clamp(1.9rem, 5vw, 3.25rem); }

/* ---------- Info ---------- */
.info-list { display: grid; gap: 1.5rem; margin: 2rem 0 0; }
.info-item dt { margin-bottom: .1rem; color: var(--olive); font-size: .95rem; font-weight: 500; }
.info-item dd { margin: 0; }
.info-item a { color: var(--rust-dark); }
address { font-style: normal; }
.info-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 2.5rem 0 0; }

/* ---------- Footer (extra bottom padding keeps the WhatsApp button off the links) ---------- */
.site-footer {
  padding: 3.5rem 0 calc(2rem + var(--wa-size) + var(--wa-offset) + env(safe-area-inset-bottom, 0px));
  background: var(--espresso); color: var(--cream); text-align: center;
}
.footer-inner { display: grid; justify-items: center; gap: 1.25rem; }
.footer-brand { color: var(--cream); }
.footer-brand .brand-logo { height: 56px; }
.footer-slogan { margin: 0; color: var(--sand); }
.footer-links, .social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.5rem; margin: 0; padding: 0; list-style: none; }
.footer-links a, .social-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding-inline: .25rem;
  color: var(--cream); text-decoration: none;
}
.footer-links a:hover, .social-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.copyright { margin: 0; color: #cdbfa9; font-size: .875rem; }

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed; z-index: 90;
  right: calc(var(--wa-offset) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--wa-offset) + env(safe-area-inset-bottom, 0px));
  display: grid; place-items: center; width: var(--wa-size); height: var(--wa-size);
  border-radius: 50%; background: var(--whatsapp); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
  transition: transform .2s ease, background-color .3s ease;
}
.wa-float:hover { background: #0f6e3c; transform: scale(1.05); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html, .carousel-track { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .hero-video { display: none; }   /* shows the hero photo instead of the video */
}
