/* ---------------------------------------------------------
   The Rich Kitchen — shared styles
   Design language borrowed from the "Il Palazzo" reference:
   full-bleed hero, thin gold accents, dark overlay, serif titles.
--------------------------------------------------------- */

:root {
  --gold: #c9a24b;
  --gold-light: #e2c47e;
  --ink: #141210;
  --cream: #f6efe4;
  --overlay-dark: rgba(10, 8, 6, 0.55);
  --font-en-display: 'Playfair Display', 'Noto Serif Thai', serif;
  --font-en-body: 'Poppins', 'Prompt', sans-serif;
  --font-th-display: 'Noto Serif Thai', 'Playfair Display', serif;
  --font-th-body: 'Prompt', 'Poppins', sans-serif;

  /* Site theme (default: black/dark). The nav and footer always stay
     dark — only page content panels (About text, Menu panel) flip. */
  --bg: var(--ink);
  --text: var(--cream);
  --muted: rgba(246, 239, 228, 0.72);
  --panel-bg: #1c1712;
  --panel-text: var(--cream);
  --panel-muted: rgba(246, 239, 228, 0.62);
  --divider: rgba(246, 239, 228, 0.14);
  --tab-border: rgba(246, 239, 228, 0.3);
}

:root[data-theme="light"] {
  --bg: #fbf8f3;
  --text: #1c1712;
  --muted: #6b6156;
  --panel-bg: #ffffff;
  --panel-text: #1c1712;
  --panel-muted: #7a746c;
  --divider: rgba(20, 18, 16, 0.12);
  --tab-border: rgba(20, 18, 16, 0.2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-th-body);
}

html[lang="en"] body { font-family: var(--font-en-body); }

h1, h2, h3, .display {
  font-family: var(--font-th-display);
  letter-spacing: 0.04em;
}

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] .display {
  font-family: var(--font-en-display);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

/* ---------- Top nav (shared across pages) ---------- */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 5%;
  color: var(--cream);
}

/* Inner pages (About/Menu): the nav sits as a solid bar above the page
   content instead of floating over a hero photo. It stays dark in both
   themes so its gold/cream text always has contrast. */
.site-header--solid {
  position: relative;
  background: var(--ink);
  border-bottom: 1px solid rgba(226, 196, 126, 0.15);
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-en-display);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.brand-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--gold-light);
  margin-top: 2px;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding-bottom: 6px;
  color: var(--cream);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.socials {
  display: flex;
  gap: 16px;
}

.socials a {
  width: 16px;
  height: 16px;
  color: var(--gold-light);
}

.socials svg { width: 100%; height: 100%; fill: currentColor; }

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid rgba(226, 196, 126, 0.5);
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.lang-toggle button {
  background: transparent;
  border: none;
  color: var(--cream);
  padding: 6px 14px;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
}

.lang-toggle button.active {
  background: var(--gold);
  color: var(--ink);
  font-weight: 600;
}

.theme-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(226, 196, 126, 0.5);
  background: transparent;
  color: var(--cream);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.theme-toggle:hover { border-color: var(--gold); color: var(--gold-light); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- Hero (home page — fills the viewport, no scroll) ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-slide.active { opacity: 1; }

/* Gradient fallback shows immediately; swap in real photos at
   images/hero-1.jpg, hero-2.jpg, hero-3.jpg and the background-image
   layers underneath will take over once those files exist. */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay-dark);
}

#hero-slide-1 { background-image: linear-gradient(rgba(10,8,6,0.15), rgba(10,8,6,0.15)), url('../images/hero-1.jpg'), radial-gradient(circle at 30% 20%, #3a2a1a, #14100c 70%); }
#hero-slide-2 { background-image: linear-gradient(rgba(10,8,6,0.15), rgba(10,8,6,0.15)), url('../images/hero-2.jpg'), radial-gradient(circle at 70% 30%, #3a2a1a, #14100c 70%); }
#hero-slide-3 { background-image: linear-gradient(rgba(10,8,6,0.15), rgba(10,8,6,0.15)), url('../images/hero-3.jpg'), radial-gradient(circle at 50% 80%, #3a2a1a, #14100c 70%); }

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 780px;
  padding: 0 24px;
}

.hero-eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  margin: 0 0 20px;
  color: var(--cream);
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.6vw, 1.15rem);
  line-height: 1.7;
  color: rgba(246, 239, 228, 0.88);
  margin: 0 auto 34px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 30px;
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 2px;
  cursor: pointer;
  border: 1px solid var(--gold);
  transition: all 0.25s ease;
}

.btn-solid {
  background: var(--gold);
  color: var(--ink);
}

.btn-solid:hover { background: var(--gold-light); }

.btn-outline {
  background: transparent;
  color: var(--cream);
}

.btn-outline:hover {
  background: rgba(201, 162, 75, 0.15);
}

.hero-arrow,
.menu-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(246, 239, 228, 0.5);
  background: rgba(10, 8, 6, 0.35);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.hero-arrow.prev { left: 4%; }
.hero-arrow.next { right: 4%; }
.menu-arrow.prev { left: 2%; }
.menu-arrow.next { right: 2%; }

.hero-dots,
.menu-dots {
  position: absolute;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 10px;
}

.hero-dots button,
.menu-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(246, 239, 228, 0.5);
  cursor: pointer;
  padding: 0;
}

.hero-dots button.active,
.menu-dots button.active {
  background: var(--gold);
  width: 24px;
  border-radius: 5px;
  transition: width 0.25s ease;
}

/* ---------- Inner pages (About / Menu) ---------- */

.page-hero {
  position: relative;
  height: 40vh;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(rgba(10,8,6,0.55), rgba(10,8,6,0.55)), url('../images/page-banner.jpg'), radial-gradient(circle at 50% 30%, #3a2a1a, #14100c 70%);
  background-size: cover;
  background-position: center;
}

.page-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0; }
.page-hero p { color: var(--gold-light); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.75rem; margin-top: 10px; }

main.page-body {
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 70px 8% 90px;
}

main.page-body h2 {
  color: var(--panel-text);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  text-align: center;
  margin-bottom: 8px;
}

.section-eyebrow {
  text-align: center;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.section-lead {
  max-width: 680px;
  margin: 0 auto 50px;
  text-align: center;
  color: var(--panel-muted);
  line-height: 1.8;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 60px;
}

.about-grid img {
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.about-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  background: linear-gradient(rgba(10,8,6,0.1), rgba(10,8,6,0.1)), url('../images/about.jpg'), radial-gradient(circle at 40% 30%, #4a3a26, #1c1712 75%);
  background-size: cover;
  background-position: center;
}

.about-grid p { line-height: 1.9; color: var(--panel-muted); }

.info-strip {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  text-align: center;
  border-top: 1px solid var(--divider);
  padding-top: 46px;
}

.info-strip h3 {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.info-strip p { color: var(--panel-muted); line-height: 1.7; margin: 0; }

.menu-item {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px dashed var(--divider);
}

.menu-item:last-child { border-bottom: none; }

.menu-item-name { font-weight: 600; margin: 0 0 6px; }
.menu-item-desc { margin: 0; color: var(--panel-muted); font-size: 0.88rem; line-height: 1.6; }
.menu-item-price { font-family: var(--font-en-display); color: var(--gold); font-size: 1.1rem; white-space: nowrap; }

/* ---------- Menu page: split image / list browser ---------- */

.menu-page { height: 100%; overflow: hidden; }

.menu-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.menu-browser {
  position: relative;
  flex: 1;
  display: flex;
  min-height: 0;
}

.menu-visual {
  position: relative;
  flex: 1 1 55%;
  overflow: hidden;
}

.menu-visual-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.menu-visual-slide.active { opacity: 1; }

.menu-visual-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,8,6,0) 45%, rgba(10,8,6,0.8) 100%);
}

#visual-mains    { background-image: url('../images/menu-mains.jpg'), radial-gradient(circle at 30% 30%, #4a3320, #14100c 70%); }
#visual-starters { background-image: url('../images/menu-starters.jpg'), radial-gradient(circle at 60% 25%, #4a3320, #14100c 70%); }
#visual-drinks   { background-image: url('../images/menu-drinks.jpg'), radial-gradient(circle at 45% 60%, #4a3320, #14100c 70%); }

.menu-visual-label {
  position: absolute;
  left: 28px;
  bottom: 26px;
  z-index: 2;
  font-family: var(--font-th-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--cream);
  letter-spacing: 0.04em;
}

html[lang="en"] .menu-visual-label { font-family: var(--font-en-display); }

.menu-panel {
  flex: 1 1 45%;
  max-width: 560px;
  background: var(--panel-bg);
  color: var(--panel-text);
  padding: 60px 48px;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.menu-close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: none;
  border: none;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--panel-muted);
  cursor: pointer;
  padding: 4px;
}

.menu-close:hover { color: var(--gold); }

.menu-panel-category { display: none; }
.menu-panel-category.active { display: block; }

.menu-panel-eyebrow {
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin: 0 0 16px;
}

.menu-panel-eyebrow::after {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  background: var(--gold);
  margin-top: 12px;
}

@media (max-width: 860px) {
  .menu-page { overflow: visible; }

  .menu-browser { flex-direction: column; }

  .menu-visual { flex: none; height: 42vh; }

  .menu-panel {
    max-width: none;
    padding: 40px 6% 60px;
    justify-content: flex-start;
  }

  .menu-arrow { top: 21vh; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: rgba(246,239,228,0.7);
  text-align: center;
  padding: 36px 5%;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.site-footer .brand-name { justify-content: center; margin-bottom: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .about-grid, .info-strip { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .socials { display: none; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 8, 6, 0.95);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .main-nav.open { max-height: 240px; }

  .main-nav a {
    padding: 16px 5%;
    border-bottom: 1px solid rgba(246,239,228,0.1);
  }
}
