/* ==========================================================================
   GLOBAL ARCHITECTURE & LAYOUT (SPLIT-SCREEN SYSTEM)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  background: var(--bg-main);
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Modern Typography Legibility */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}
p, blockquote, li {
  text-wrap: pretty;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-focus);
}

/* Main Split-Screen Container */
.layout-wrapper {
  display: flex;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  position: relative;
  padding: 1.25rem;
  gap: 1.25rem;
  box-sizing: border-box;
}

/* Left Panel (Hero / Brand Showcase - Fills All Blank Space) */
/* Widths are calc()'d against the 1.25rem flex gap so left + right + gap
   never exceeds the container's content box (a plain 65%/35% split silently
   ate the wrapper's right padding, since flexbox adds `gap` on top of the
   items' own widths). */
.left-panel {
  width: calc(65% - 0.8125rem);
  flex: none;
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  border: 1px solid var(--border-color);
  background-color: var(--bg-main);
}

.hero-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
  z-index: 1;
  opacity: 0;
}

.hero-bg-layer.active {
  opacity: 1;
}

.hero-bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 13, 18, 0.35) 0%, rgba(10, 13, 18, 0.88) 100%);
}

.main-header,
.hero-content {
  position: relative;
  z-index: 5;
}

/* Right Panel (Content Views & Bento Stack - 35% Width) */
.right-panel {
  width: calc(35% - 0.4375rem);
  flex: none;
  height: 100%;
  overflow-y: auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scroll-behavior: smooth;
  background-color: #080808;
}

/* --------------------------------------------------------------------------
   EVEN SPLIT (running-text pages)
   The default 65/35 split is for photo-led pages. Pages whose right panel
   carries running text (menu, the two venue detail pages, reservation,
   about, blog) opt into an even 50/50 split instead via
   class="layout-wrapper split-even" — one rule instead of duplicating a
   50/50 override with !important on every one of those pages.
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
  .layout-wrapper.split-even > .left-panel,
  .layout-wrapper.split-even > .right-panel {
    width: calc(50% - 0.625rem);
  }

  .layout-wrapper.split-even .page-view {
    display: flex;
    flex-direction: column;
    flex: 1;
  }
}

/* The narrower 50/50 hero has less room for the header at medium desktop
   widths — compact it down until there's space again. */
@media (min-width: 1025px) and (max-width: 1300px) {
  .layout-wrapper.split-even .main-header {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }
  .layout-wrapper.split-even .logo { font-size: 1.1rem; }
  .layout-wrapper.split-even .nav-links { gap: 0.5rem; }
  .layout-wrapper.split-even .nav-links a { font-size: 0.6rem; letter-spacing: 0.02em; }
  .layout-wrapper.split-even .btn-book { padding: 0.5rem 0.8rem; font-size: 0.6rem; }
  .layout-wrapper.split-even .burger-menu-btn { padding: 0.2rem; }
}

/* --------------------------------------------------------------------------
   RESPONSIVE LAYOUT BREAKPOINTS (TABLET & PHONE MATCHING REFERENCE PHOTO)
   -------------------------------------------------------------------------- */

/* TABLET LAYOUT (769px - 1024px - FILL 100% VIEWPORT DIMENSIONS) */
@media (max-width: 1024px) and (min-width: 769px) {
  .layout-wrapper {
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    padding: 1.25rem;
    gap: 1.25rem;
    box-sizing: border-box;
  }

  .left-panel {
    width: 100%;
    flex: 1 1 0;
    min-height: 300px;
    border-radius: 24px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
  }

  .right-panel {
    width: 100%;
    height: auto;
    min-height: 190px;
    max-height: 46%;
    flex: 0 0 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
  }

  /* --------------------------------------------------------------------------
     TABLET-FLOW (opt-in): pages whose right-panel content can run longer
     than a 46%-tall box — a form, a list of posts, running text — need the
     whole page to scroll as one, the same way phone already does, instead
     of a static hero above a cramped internal scroll box. class="tablet-flow"
     on .layout-wrapper switches to that: the wrapper stops being locked to
     viewport height, the hero becomes a banner that scrolls with the page,
     and the content section is free to take whatever height it needs.
     -------------------------------------------------------------------------- */
  .layout-wrapper.tablet-flow {
    height: auto;
    overflow: visible;
  }
  .layout-wrapper.tablet-flow .left-panel {
    /* Scales with the device's actual height instead of one fixed number —
       a flat 400px left a large empty gap below short content on tall
       tablets (e.g. iPad Pro's 1366px-tall viewport). 48vh keeps it
       proportional; the clamp keeps it sane on very short/tall screens. */
    height: clamp(340px, 55vh, 720px);
    min-height: 340px;
    flex: none;
  }
  .layout-wrapper.tablet-flow .right-panel {
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
}

/* PHONE LAYOUT (<= 768px) */
@media (max-width: 768px) {
  .layout-wrapper {
    flex-direction: column;
    height: auto;
    overflow-x: hidden;
    padding: 0.75rem;
    gap: 0.85rem;
  }

  .left-panel {
    width: 100%;
    height: 380px;
    min-height: 340px;
    border-radius: 20px;
    padding: 1rem 1.25rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    text-align: left;
  }

  .right-panel {
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 0;
  }
}
