/* ==========================================================================
   LE BŒUF — EDITORIAL QUIET LUXURY STYLESHEET
   Palette:
     - Charcoal Base:  #0D0D0D
     - Surface Dark:   #151413
     - Bone Cream:     #F4F1EA
     - Muted Sand:     #A39B8F
     - Burnt Wine:     #8C2D19
     - Warm Copper:    #B8714B
   ========================================================================== */

:root {
  --bg-primary: #0D0D0D;
  --bg-elevated: #141312;
  --bg-panel: #11100F;
  --ink-primary: #F4F1EA;
  --ink-secondary: #A39B8F;
  --ink-muted: #6E675E;
  --accent-wine: #8C2D19;
  --accent-wine-bright: #AD3B22;
  --accent-copper: #B8714B;
  --hairline: rgba(244, 241, 234, 0.12);
  --hairline-strong: rgba(244, 241, 234, 0.24);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-primary);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background-color: var(--bg-primary);
  color: var(--ink-primary);
  overflow-x: hidden;
}

::selection {
  background: var(--accent-wine);
  color: var(--ink-primary);
}

/* Typography Utilities */
.font-serif-editorial {
  font-family: var(--font-serif);
}

.font-sans-ui {
  font-family: var(--font-sans);
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent-copper);
}

.hairline-t { border-top: 1px solid var(--hairline); }
.hairline-b { border-bottom: 1px solid var(--hairline); }
.hairline-r { border-right: 1px solid var(--hairline); }
.hairline-all { border: 1px solid var(--hairline); }

/* Subtle Architectural Film Grain */
.grain-overlay {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 90;
  opacity: 0.036;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 240 240' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* Editorial Entrance Curtain */
.intro-curtain {
  position: fixed;
  inset: 0;
  background: #080808;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.8s var(--ease-editorial), visibility 0.8s;
}

.intro-curtain.is-hidden {
  opacity: 0;
  visibility: hidden;
}

/* Custom Magnetic Cursor (Desktop pointer: fine only) */
.custom-cursor,
.custom-cursor-dot {
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  body.has-custom-cursor {
    cursor: none;
  }
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor select,
  body.has-custom-cursor textarea,
  body.has-custom-cursor [data-cursor] {
    cursor: none;
  }

  .custom-cursor {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(244, 241, 234, 0.42);
    border-radius: 999px;
    pointer-events: none;
    z-index: 150;
    transform: translate(-50%, -50%);
    transition: width 0.35s var(--ease-editorial),
                height 0.35s var(--ease-editorial),
                background-color 0.35s var(--ease-editorial),
                border-color 0.35s var(--ease-editorial),
                opacity 0.25s ease;
  }

  .custom-cursor__label {
    font-family: var(--font-sans);
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ink-primary);
    opacity: 0;
    transition: opacity 0.25s ease;
    white-space: nowrap;
  }

  .custom-cursor.is-expanded {
    width: 84px;
    height: 84px;
    background-color: rgba(140, 45, 25, 0.24);
    border-color: rgba(184, 113, 75, 0.78);
    backdrop-filter: blur(3px);
  }

  .custom-cursor.is-expanded .custom-cursor__label {
    opacity: 1;
  }

  .custom-cursor.is-hover {
    width: 48px;
    height: 48px;
    border-color: var(--accent-copper);
    background-color: rgba(244, 241, 234, 0.06);
  }

  .custom-cursor-dot {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--ink-primary);
    pointer-events: none;
    z-index: 151;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
  }

  .custom-cursor.is-expanded + .custom-cursor-dot {
    opacity: 0;
  }
}

/* ==========================================================================
   FIXED CHROME (Top Minimal Header + Bottom Progress & Chapter Rail)
   ========================================================================== */
.top-chrome {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0.76), rgba(13, 13, 13, 0));
}

.top-chrome > * {
  pointer-events: auto;
}

@media (min-width: 1024px) {
  .top-chrome {
    padding: 1.35rem 2.75rem;
  }
}

/* Discreet Floating Reserve CTA */
.btn-reserve-float {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid rgba(244, 241, 234, 0.26);
  background: rgba(13, 13, 13, 0.72);
  backdrop-filter: blur(10px);
  color: var(--ink-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: border-color 0.35s var(--ease-editorial),
              background-color 0.35s var(--ease-editorial);
}

.btn-reserve-float:hover {
  border-color: var(--accent-copper);
  background: rgba(140, 45, 25, 0.32);
}

.btn-reserve-float__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent-wine-bright);
  box-shadow: 0 0 10px rgba(173, 59, 34, 0.9);
}

/* Primary Editorial Button */
.btn-editorial {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.85rem 1.65rem;
  border: 1px solid rgba(244, 241, 234, 0.3);
  background: transparent;
  color: var(--ink-primary);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  overflow: hidden;
  z-index: 1;
  transition: border-color 0.4s var(--ease-editorial), color 0.4s var(--ease-editorial);
}

.btn-editorial::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-wine);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-editorial);
  z-index: -1;
}

.btn-editorial:hover:not(:disabled) {
  border-color: var(--accent-wine-bright);
}

.btn-editorial:hover:not(:disabled)::before {
  transform: scaleX(1);
}

.btn-editorial:disabled {
  opacity: 0.34;
  cursor: not-allowed;
}

.btn-editorial--solid {
  background: var(--accent-wine);
  border-color: var(--accent-wine-bright);
}

.btn-editorial--solid::before {
  background: var(--accent-wine-bright);
}

/* Bottom Progress Bar & Navigation Rail */
.bottom-chrome {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.94), rgba(13, 13, 13, 0.55) 68%, transparent);
  padding: 0.75rem 1.4rem 0.9rem;
}

@media (min-width: 1024px) {
  .bottom-chrome {
    padding: 0.8rem 2.75rem 0.95rem;
  }
}

.progress-track {
  position: relative;
  width: 100%;
  height: 1px;
  background: rgba(244, 241, 234, 0.14);
  overflow: hidden;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent-wine), var(--accent-copper), var(--ink-primary));
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

.chapter-link {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color 0.3s ease;
  background: none;
  border: none;
  padding: 0.2rem 0;
}

.chapter-link:hover,
.chapter-link.is-active {
  color: var(--ink-primary);
}

.chapter-link.is-active::before {
  content: '— ';
  color: var(--accent-copper);
}

/* ==========================================================================
   HORIZONTAL GALLERY STAGE (Desktop >= 1024px) & VERTICAL STACK (Mobile)
   ========================================================================== */
.horizontal-stage {
  position: relative;
  width: 100%;
}

.horizontal-track {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.gallery-panel {
  position: relative;
  width: 100%;
  min-height: 100svh;
  flex-shrink: 0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .horizontal-stage {
    height: 100vh;
    overflow: hidden;
  }

  .horizontal-track {
    flex-direction: row;
    flex-wrap: nowrap;
    height: 100vh;
    width: max-content;
    will-change: transform;
  }

  .gallery-panel {
    height: 100vh;
    min-height: 100vh;
    border-right: 1px solid var(--hairline);
  }

  .panel-hero {
    width: 100vw;
  }
  .panel-dish {
    width: 106vw;
    min-width: 1180px;
  }
  .panel-bar {
    width: 102vw;
    min-width: 1140px;
  }
  .panel-reserve {
    width: 116vw;
    min-width: 1260px;
  }
  .panel-events {
    width: 114vw;
    min-width: 1240px;
    border-right: none;
  }
}

/* Image Treatments & Parallax Frames */
.editorial-frame {
  position: relative;
  overflow: hidden;
  background-color: #151413;
}

.editorial-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.86) brightness(0.86);
  transition: transform 1.1s var(--ease-editorial), filter 0.8s var(--ease-editorial);
}

.editorial-frame:hover img {
  filter: contrast(1.06) saturate(0.95) brightness(0.93);
}

.parallax-img {
  width: 114% !important;
  max-width: none !important;
  margin-left: -7%;
  will-change: transform;
}

/* ==========================================================================
   PANEL 3 — SIGNATURE DRINKS LIST
   ========================================================================== */
.drink-row {
  position: relative;
  border-top: 1px solid var(--hairline);
  padding: 0.95rem 0;
  transition: border-color 0.35s ease, padding-left 0.4s var(--ease-editorial);
  text-align: left;
  width: 100%;
  background: transparent;
}

.drink-row:last-child {
  border-bottom: 1px solid var(--hairline);
}

.drink-row:hover,
.drink-row.is-active {
  border-top-color: rgba(184, 113, 75, 0.55);
  padding-left: 0.7rem;
}

.drink-row .drink-indicator {
  width: 0;
  height: 1px;
  background: var(--accent-copper);
  transition: width 0.4s var(--ease-editorial);
}

.drink-row.is-active .drink-indicator,
.drink-row:hover .drink-indicator {
  width: 1.35rem;
}

/* ==========================================================================
   PANEL 4 — INTERACTIVE FLOOR PLAN & RESERVATION CONTROLS
   ========================================================================== */
.pill-option {
  padding: 0.46rem 0.78rem;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
  color: var(--ink-secondary);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  transition: all 0.25s var(--ease-editorial);
}

.pill-option:hover {
  border-color: var(--hairline-strong);
  color: var(--ink-primary);
}

.pill-option.is-active {
  border-color: var(--accent-copper);
  background: rgba(140, 45, 25, 0.28);
  color: var(--ink-primary);
}

.editorial-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--hairline);
  color: var(--ink-primary);
  padding: 0.58rem 0.82rem;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
  color-scheme: dark;
}

.editorial-input:focus {
  border-color: var(--accent-copper);
  background: rgba(255, 255, 255, 0.045);
}

/* Floor Plan Container — 16:9 exact match to plano-mesas.jpg */
.floorplan-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #100F0E;
  border: 1px solid var(--hairline);
  overflow: hidden;
  user-select: none;
}

.floorplan-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Architectural Zone Labels (subtle) */
.zone-tag {
  position: absolute;
  font-size: 0.5625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.34);
  pointer-events: none;
  z-index: 4;
}

/* Floor Plan Table Pin */
.table-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(244, 241, 234, 0.62);
  background: rgba(13, 13, 13, 0.88);
  color: var(--ink-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  transition: transform 0.3s var(--ease-editorial),
              background-color 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease,
              opacity 0.3s ease;
  z-index: 10;
}

@media (max-width: 640px) {
  .table-pin {
    width: 32px;
    height: 32px;
  }
}

.table-pin__code {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
}

.table-pin__cap {
  font-size: 0.52rem;
  color: var(--ink-secondary);
  margin-top: 2px;
  line-height: 1;
}

/* State: Available */
.table-pin--available:hover {
  transform: translate(-50%, -50%) scale(1.16);
  border-color: var(--ink-primary);
  background: rgba(244, 241, 234, 0.16);
  box-shadow: 0 0 0 6px rgba(244, 241, 234, 0.08);
  z-index: 20;
}

/* State: Capacity mismatch for selected guests */
.table-pin--capacity-mismatch {
  opacity: 0.3;
  border-style: dashed;
}

/* State: Occupied (disabled) */
.table-pin--occupied {
  background: rgba(18, 17, 16, 0.78);
  border-color: rgba(244, 241, 234, 0.18);
  color: rgba(244, 241, 234, 0.3);
  cursor: not-allowed !important;
  opacity: 0.5;
}

.table-pin--occupied::after {
  content: '';
  position: absolute;
  width: 72%;
  height: 1px;
  background: rgba(244, 241, 234, 0.34);
  transform: rotate(-45deg);
}

/* State: Selected */
.table-pin--selected {
  background: var(--accent-wine);
  border-color: #E39B76;
  color: var(--ink-primary);
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 6px rgba(140, 45, 25, 0.36), 0 0 24px rgba(173, 59, 34, 0.6);
  z-index: 25;
}

.table-pin--selected .table-pin__cap {
  color: rgba(244, 241, 234, 0.9);
}

.table-pin--selected::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1px solid rgba(184, 113, 75, 0.65);
  animation: pinPulse 2.2s infinite cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pinPulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  100% { transform: scale(1.38); opacity: 0; }
}

/* Coordinate Picker Banner (active only with ?editar-plano=1) */
.coord-helper-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 35;
  padding: 0.4rem 0.75rem;
  background: rgba(140, 45, 25, 0.92);
  border: 1px solid #E39B76;
  font-size: 0.7rem;
  color: var(--ink-primary);
  letter-spacing: 0.04em;
}

/* ==========================================================================
   MODALS (Confirmation & Private Buyout)
   ========================================================================== */
.editorial-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(6, 6, 6, 0.84);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-editorial), visibility 0.35s;
}

.editorial-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.editorial-modal__dialog {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: #121110;
  border: 1px solid var(--hairline-strong);
  padding: 2rem;
  transform: translateY(18px);
  transition: transform 0.45s var(--ease-editorial);
}

.editorial-modal.is-open .editorial-modal__dialog {
  transform: translateY(0);
}

/* Scroll Cue Animation */
@keyframes nudgeRight {
  0%, 100% { transform: translateX(0); opacity: 0.6; }
  50% { transform: translateX(6px); opacity: 1; }
}

.scroll-cue-arrow {
  display: inline-block;
  animation: nudgeRight 2.2s ease-in-out infinite;
}

/* Thin custom scrollbars inside modals */
.editorial-modal__dialog::-webkit-scrollbar { width: 4px; }
.editorial-modal__dialog::-webkit-scrollbar-track { background: #121110; }
.editorial-modal__dialog::-webkit-scrollbar-thumb { background: rgba(244, 241, 234, 0.22); }
