/*
Theme Name: Mr. BBQ Jr. — h.wood Edition
Theme URI: https://mrbbq.example
Author: Mr. BBQ Digital
Description: Ultra-luxury cinematic dark theme for Mr. BBQ Jr., a premium fast-casual AYCE Korean BBQ concept at The District at Tustin Legacy. Full-bleed video hero, dual-logo hover header, collapsible dual-taxonomy menu, streetwear mascot micro-interactions, Customizer-driven content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mrbbq
*/

/* ==========================================================================
   1. RESET & BASE  (box-sizing first — horizontal-scroll bug prevention)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #000000;
  color: #f4f1ea;
  font-family: "Jost", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Clip, never scroll, on the x-axis. We also never use 100vw anywhere. */
  overflow-x: clip;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #f4f1ea;
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   2. LAYOUT PRIMITIVES  (width:100% + margin-inline:auto, never 100vw)
   ========================================================================== */
.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.container--narrow {
  max-width: 52rem;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */
h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.08;
  color: #ffffff;
}

.hero__title {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero__tagline {
  font-family: "Jost", sans-serif;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.85);
  margin-top: 1.25rem;
}

.section-title {
  font-size: clamp(1.9rem, 4.5vw, 3.4rem);
  letter-spacing: 0.02em;
}

.manifesto__text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3.2vw, 2.6rem);
  line-height: 1.35;
  font-weight: 300;
  color: #eee9df;
}

/* ==========================================================================
   4. HEADER — fades in after load, transparent → dark blur on scroll
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  /* Fades/slides in on its own via the keyframe below — this can never get
     stuck invisible waiting on JavaScript to add a class. */
  animation: header-reveal 1.1s ease 0.35s both;
  transition:
    background-color 0.45s ease,
    backdrop-filter 0.45s ease,
    border-color 0.45s ease;
  background-color: transparent;
  border-bottom: 1px solid transparent;
}

@keyframes header-reveal {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-header.is-scrolled {
  background-color: rgba(6, 6, 6, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Dual-logo interaction: hover turns the header solid black and swaps logos.
   Declared after .is-scrolled so hover wins while scrolled, too. */
.site-header:hover {
  background-color: #000000;
}

/* Locked box: fixed dimensions + object-fit:contain is what stops the logos
   from stretching, and flex-shrink:0 is what stops them collapsing/stacking
   when the nav gets wide. overflow:hidden is a deliberate second line of
   defense: if anything (a client-pasted Additional CSS rule, a logo SVG
   missing a viewBox, a stray plugin stylesheet) ever overrides the child
   <img> positioning below, the images get clipped to this box instead of
   ballooning to their raw intrinsic size across the page. */
.mrbbq-logo-wrapper {
  width: 220px;
  height: 70px;
  position: relative;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
}

/* These three properties are the load-bearing part of the locked-box
   contract — if any one of them gets overridden, the box above stops being
   able to promise "the logo never exceeds 220x70". !important here is a
   deliberate, narrow exception to keep that contract even against an
   equal-specificity rule loaded later (e.g. Site Identity > Additional CSS),
   not a general-purpose override habit. */
.mrbbq-logo-wrapper img {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.45s ease, filter 0.45s ease;
}

.logo-white {
  opacity: 0;
}

.site-header:hover .logo-color {
  opacity: 0;
}

.site-header:hover .logo-white {
  opacity: 1;
}

/* Fallback when only a color logo has been uploaded: the second <img> is the
   same file, so crossfading alone would be invisible. Invert it to white
   instead, so the hover state always visibly does something. */
.site-header:hover .logo-white--auto {
  opacity: 1;
  filter: brightness(0) invert(1);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: clamp(1rem, 2.5vw, 1.6rem);
}

.site-header__brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
}

.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.site-nav a {
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.85);
  transition: color 0.3s ease;
}

.site-nav a:hover {
  color: #ffffff;
}

/* ==========================================================================
   5. HERO — full-bleed cinematic video, perfectly centered
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* The centering hack: absolute center + object-fit cover + min sizing */
.hero__video,
.hero__fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0.65) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-inline: 1.5rem;
}

.hero__scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: 3.25rem;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.75));
  animation: cue-drop 2.4s ease-in-out infinite;
}

@keyframes cue-drop {
  0%   { transform: translateX(-50%) scaleY(0); transform-origin: top; }
  55%  { transform: translateX(-50%) scaleY(1); transform-origin: top; }
  100% { transform: translateX(-50%) scaleY(0); transform-origin: bottom; }
}

/* ==========================================================================
   6. COLLAPSIBLE MENU (accordion + nested tabs)
   ========================================================================== */
.menu-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   MASCOTS — streetwear art drops on stark black, neon drop-shadow glows
   -------------------------------------------------------------------------- */
.mascot {
  width: clamp(6rem, 12vw, 10rem);
}

.mascot--stupig {
  filter: drop-shadow(0 0 22px rgba(247, 143, 176, 0.55));
}

.mascot--supercow {
  filter: drop-shadow(0 0 22px rgba(90, 123, 216, 0.55));
}

.mascot--wonderchicken {
  filter: drop-shadow(0 0 22px rgba(255, 210, 63, 0.5));
}

/* Supercow hides behind the right edge of the menu container and slides
   into view while the menu area is hovered. Decorative only (aria-hidden). */
.mascot--menu-peek {
  position: absolute;
  top: 50%;
  right: 0;
  width: clamp(7rem, 13vw, 11rem);
  transform: translate(105%, -50%) rotate(8deg);
  transition: transform 0.55s cubic-bezier(0.34, 1.3, 0.5, 1);
  pointer-events: none;
  z-index: 1;
}

.menu-section:hover .mascot--menu-peek {
  transform: translate(12%, -50%) rotate(-3deg);
}

/* Footer row: clean horizontal flex, snappy hover pop */
.mascot-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(2.5rem, 8vw, 6rem);
  padding-block: clamp(4rem, 10vw, 7rem);
}

.mascot-row__item {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mascot-row__item:hover {
  transform: scale(1.1) rotate(3deg);
}

.menu-accordion__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding-block: clamp(1.5rem, 3.5vw, 2.4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.menu-accordion__label {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
}

/* Minimalist plus / minus icon drawn in CSS */
.menu-accordion__icon {
  position: relative;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
}

.menu-accordion__icon::before,
.menu-accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1px;
  background-color: #f4f1ea;
  transform: translate(-50%, -50%);
  transition: transform 0.4s ease;
}

.menu-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.menu-accordion__toggle[aria-expanded="true"] .menu-accordion__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

/* Smooth expand/collapse via the grid-rows technique (no jumpy max-height) */
.menu-accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-accordion__panel.is-open {
  grid-template-rows: 1fr;
}

.menu-accordion__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.menu-accordion__panel-pad {
  padding-block: clamp(1rem, 3vw, 2.5rem) clamp(2.5rem, 5vw, 4rem);
}

/* Level 1 tabs: Lunch / Dinner */
.menu-tabs--time {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.menu-tab--time {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 2.8vw, 2rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.4);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid transparent;
  transition: color 0.35s ease, border-color 0.35s ease;
}

.menu-tab--time[aria-selected="true"] {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Level 2 tabs: AYCE / PAYCE */
.menu-tabs--tier {
  display: flex;
  justify-content: center;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.menu-tab--tier {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.45);
  padding: 0.55rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: color 0.35s ease, border-color 0.35s ease, background-color 0.35s ease;
}

.menu-tab--tier[aria-selected="true"] {
  color: #000000;
  background-color: #f4f1ea;
  border-color: #f4f1ea;
}

/* Panels — only the group matching both active tabs is shown */
.menu-group {
  display: none;
}

.menu-group.is-active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 5vw, 4.5rem);
  row-gap: clamp(1.5rem, 3vw, 2.25rem);
  animation: group-fade 0.55s ease both;
}

@keyframes group-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.menu-item__head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.menu-item__name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: 0.04em;
  color: #ffffff;
}

.menu-item__leader {
  flex: 1;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.25);
  transform: translateY(-0.3em);
}

.menu-item__price {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: rgba(244, 241, 234, 0.8);
  white-space: nowrap;
}

.menu-item__desc {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: rgba(244, 241, 234, 0.6);
  max-width: 34rem;
}

.menu-group__empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(244, 241, 234, 0.5);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

/* ==========================================================================
   7. MANIFESTO
   ========================================================================== */
.manifesto {
  padding-block: clamp(5rem, 12vw, 10rem);
  text-align: center;
}

.manifesto__kicker {
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.55);
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ==========================================================================
   8. LOCATIONS — alternating split-screen rows
   ========================================================================== */
.locations {
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.locations__heading {
  text-align: center;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.location-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
}

.location-row__media {
  position: relative;
  min-height: clamp(20rem, 55vh, 38rem);
  overflow: hidden;
}

.location-row__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s ease;
}

.location-row:hover .location-row__media img {
  transform: scale(1.04);
}

.location-row__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(2.5rem, 6vw, 5rem);
  background-color: #060606;
}

/* Alternate: even rows put media on the right */
.location-row:nth-child(even) .location-row__media {
  order: 2;
}

.location-row__city {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.location-row__address {
  font-style: normal;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  color: rgba(244, 241, 234, 0.65);
}

.location-row__link {
  align-self: flex-start;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  transition: border-color 0.3s ease;
}

.location-row__link:hover {
  border-color: #ffffff;
}

/* ==========================================================================
   9. CULINARY SHOWCASE — full-width image blocks
   ========================================================================== */
.showcase__block {
  position: relative;
  width: 100%;
  min-height: clamp(24rem, 78vh, 46rem);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.showcase__block img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 55%);
}

.showcase__caption {
  position: relative;
  z-index: 1;
  padding: clamp(2rem, 5vw, 4rem);
  max-width: 40rem;
}

.showcase__title {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.showcase__desc {
  margin-top: 0.75rem;
  color: rgba(244, 241, 234, 0.75);
  font-size: 0.95rem;
}

/* ==========================================================================
   10. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-footer__brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer__meta {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: rgba(244, 241, 234, 0.5);
}

/* ==========================================================================
   11. SCROLL REVEAL
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   12. RESPONSIVE — graceful single-column stacking
   ========================================================================== */
@media (max-width: 860px) {
  .mascot--menu-peek {
    display: none;
  }

  .mascot-row {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .location-row {
    grid-template-columns: 1fr;
  }

  /* On mobile the media always leads, regardless of alternation */
  .location-row:nth-child(even) .location-row__media {
    order: 0;
  }

  .menu-group.is-active {
    grid-template-columns: 1fr;
  }

  .site-nav ul {
    gap: 1rem;
  }
}

@media (max-width: 560px) {
  /* The 220x70 box is locked by design, but at ~320px wide it would crowd the
     nav. Scale the box down proportionally; object-fit:contain keeps the
     artwork's aspect ratio intact, so it still never stretches. */
  .mrbbq-logo-wrapper {
    width: 150px;
    height: 48px;
  }

  .site-nav a {
    font-size: 0.7rem;
    letter-spacing: 0.16em;
  }
}

/* ==========================================================================
   13. ENTRY CONTENT — spacing for real WP post/page content (the global
   reset above zeroes every margin, so anything rendered through
   the_content() needs it restored here).
   ========================================================================== */
.entry-content {
  color: rgba(244, 241, 234, 0.85);
}

.entry-content > * + * {
  margin-top: 1.4em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.8em;
  line-height: 1.2;
}

.entry-content h1:first-child,
.entry-content h2:first-child,
.entry-content h3:first-child {
  margin-top: 0;
}

.entry-content p {
  max-width: 42rem;
}

.entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  color: #ffffff;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.4em;
}

.entry-content li + li {
  margin-top: 0.4em;
}

.entry-content img {
  margin-block: 1.4em;
}

/* ==========================================================================
   14. REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .site-header,
  .mrbbq-logo-wrapper img,
  .menu-accordion__panel,
  .mascot--menu-peek,
  .mascot-row__item,
  .location-row__media img {
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .site-header {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .hero__scroll-cue {
    animation: none;
  }
}
