/* 
 * Nuestros estilos a medida.
 * Acá manejamos los colores, las sombras y esos efectos de "vidrio" que nos gustan.
 */

html,
body,
#app,
main {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
}

/* --- SCROLL STABILIZER --- */
#platos-marquee-container {
  display: inline-flex !important;
  width: max-content !important;
  white-space: nowrap !important;
  will-change: transform;
}

body.overflow-hidden {
  overflow: hidden !important;
  padding-right: 0px !important;
}

@keyframes scale-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes grain {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-5%, -10%);
  }

  20% {
    transform: translate(-15%, 5%);
  }

  30% {
    transform: translate(7%, -25%);
  }

  40% {
    transform: translate(-5%, 25%);
  }

  50% {
    transform: translate(-15%, 10%);
  }

  60% {
    transform: translate(15%, 0%);
  }

  70% {
    transform: translate(0%, 15%);
  }

  80% {
    transform: translate(3%, 35%);
  }

  90% {
    transform: translate(-10%, 10%);
  }
}

.animate-scale-in {
  animation: scale-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 10001;
}

@keyframes grain-subtle {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-0.5%, -0.5%);
  }

  50% {
    transform: translate(0.5%, 0.5%);
  }

  75% {
    transform: translate(-0.5%, 0.5%);
  }
}

:root {
  --color-primary: #a03f28;
  --color-primary-container: #c0573e;
  --color-on-primary: #ffffff;
  --color-secondary-container: #c5e8cd;
  --color-on-secondary-container: #4b6a54;
  --color-tertiary: #735c00;
  --color-surface: #fbf9f5;
  --color-surface-container-low: #f5f3ef;
  --color-surface-container-highest: #e4e2de;
  --color-on-surface: #1b1c1a;
  --color-on-surface-variant: #56423d;

  /* Animaciones suaves para que navegar sea un placer */
  --easing-editorial: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-standard: 400ms var(--easing-editorial);
}

/* --- CINEMATIC OVERHAUL: GLOBAL WRAPPERS --- */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  /* Base para efectos 3D en toda la web */
  overflow-x: hidden;
}

#main-content {
  position: relative;
  z-index: 10;
  background-color: #0a0a0a;
  /* Fondo sólido por defecto */
}

/* --- STICKY REVEAL FOOTER --- */
#footer-container {
  position: relative;
  z-index: 10;
  width: 100%;
}

/* Asegurar que la última sección del main sea "sólida" y tenga margen para revelar el footer */
#contact-container {
  position: relative;
  z-index: 20;
  background-color: #0a0a0a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  /* Sombra para separar del footer */
}

/* --- PARALLAX & DEPTH UTILS --- */
.parallax-wrapper {
  overflow: hidden;
  position: relative;
}

.parallax-bg {
  height: 120%;
  /* Sobra para que el movimiento no muestre bordes */
  width: 100%;
  position: absolute;
  top: -10%;
  left: 0;
  will-change: transform;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  min-height: max(884px, 100svh);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.font-serif {
  font-family: 'Noto Serif', serif;
  font-weight: 700;
}

/* Los iconos de Google: Desactivamos transiciones manuales para permitir que GSAP maneje la velocidad 'rapidit' */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Solo desactivar transiciones si están dentro de interactivos (evita saltos en carga) */
button .material-symbols-outlined,
a .material-symbols-outlined,
.clickable-icon .material-symbols-outlined {
  transition: none !important;
}


/* --- DETALLES DE DISEÑO --- */

/* Líneas muy sutiles, casi invisibles */
hr,
.border-standard {
  border: none;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Efecto de vidrio esmerilado (Glassmorphism) */
.glass-effect {
  background-color: rgba(251, 249, 245, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* --- PARALLEL DEPTH & PINNING STABILITY --- */
#nosotros {
  overflow: visible !important;
  /* Vital para que las tarjetas 3D no se corten al girar */
  perspective: 1500px;
  transform-style: preserve-3d;
}

#nosotros .pin-spacer {
  overflow: visible !important;
  transform-style: preserve-3d !important;
}

.btn-primary {
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-container));
  color: var(--color-on-primary);
  border: none;
  transition: var(--transition-standard);
  box-shadow: 0 4px 30px -10px rgba(160, 63, 40, 0.3);
}

.btn-primary:hover {
  transform: none;
  box-shadow: 0 6px 28px -12px rgba(160, 63, 40, 0.34);
  opacity: 0.98;
}

/* Botón con una rayita que crece al pasar el mouse */
.btn-tertiary {
  color: var(--color-primary);
  padding-bottom: 2px;
  position: relative;
  transition: var(--transition-standard);
}

.btn-tertiary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 99px;
  transition: var(--transition-standard);
}

.btn-tertiary:hover::after {
  width: 100%;
}

/* Sombras suaves que no molestan */
.shadow-ambient {
  box-shadow: 0 10px 40px -10px rgba(27, 28, 26, 0.06);
}

/* El recorte de foto "mancha" orgánica */
.organic-shape {
  border-radius: 80% 20% 70% 30% / 30% 80% 20% 70%;
  overflow: hidden;
  transition: var(--transition-standard);
}

/* Scroll que no salta, se desliza */
html {
  scroll-behavior: smooth;
}

/* Mix de colores para que el logo se funda con el fondo si es necesario */
/* Mix de colores para que el logo se funda con el fondo si es necesario */
.multiply-blend {
  mix-blend-mode: multiply;
  filter: contrast(1.1);
}

/* --- BENTO GRID SECCIÓN PLATOS --- */

.bento-grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.bento-grid::-webkit-scrollbar {
  display: none;
}

.bento-grid>.bento-item {
  flex: 0 0 70vw;
  scroll-snap-align: center;
}

@media (min-width: 768px) {
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 150px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .bento-grid>.bento-item {
    flex: unset;
  }

  .bento-item.large {
    grid-column: span 8;
    grid-row: span 4;
  }

  .bento-item.tall {
    grid-column: span 4;
    grid-row: span 4;
  }

  .bento-item.wide {
    grid-column: span 6;
    grid-row: span 2;
  }

  .bento-item.square {
    grid-column: span 3;
    grid-row: span 2;
  }
}

#platos {
  z-index: 10;
  padding-bottom: 0 !important;
}

#cta-container {
  z-index: 100;
  position: relative;
  transition: all 0.8s var(--easing-editorial);
  will-change: transform, opacity;
}

.cinematic-stage {
  width: 100%;
  position: relative;
  overflow: visible !important;
}


.bento-grid {
  width: 100%;
  max-width: 1400px;
}

@media (min-width: 768px) {
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
  }
}

.bento-item {
  position: relative;
  border-radius: 1.25rem;
  background: var(--color-surface-container-low);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  min-height: 220px;
  will-change: transform, filter;
  opacity: 1 !important;
  /* Force visibility for nuclear fix */
}

@media (min-width: 768px) {
  .bento-item {
    min-height: auto;
    border-radius: 1.5rem;
  }
}

.bento-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 1;
}

.bento-content {
  transform: translateY(0);
}

/* Botón flotante en bento */
.add-to-cart-bento {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.add-to-cart-bento:hover {
  transform: scale(1.01);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

/* 
 * Nuestros estilos a medida.
 * Acá manejamos los colores, las sombras y esos efectos de "vidrio" que nos gustan.
 */

html,
body,
#app,
main {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
}

/* --- SCROLL STABILIZER --- */
#platos-marquee-container {
  display: inline-flex !important;
  width: max-content !important;
  white-space: nowrap !important;
  will-change: transform;
}

body.overflow-hidden {
  overflow: hidden !important;
  padding-right: 0px !important;
  /* Evitamos el salto del scrollbar en desktop */
}

@keyframes scale-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes grain {

  0%,
  100% {
    transform: translate(0, 0);
  }

  10% {
    transform: translate(-5%, -10%);
  }

  20% {
    transform: translate(-15%, 5%);
  }

  30% {
    transform: translate(7%, -25%);
  }

  40% {
    transform: translate(-5%, 25%);
  }

  50% {
    transform: translate(-15%, 10%);
  }

  60% {
    transform: translate(15%, 0%);
  }

  70% {
    transform: translate(0%, 15%);
  }

  80% {
    transform: translate(3%, 35%);
  }

  90% {
    transform: translate(-10%, 10%);
  }
}

.animate-scale-in {
  animation: scale-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 10001;
}

@keyframes grain-subtle {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-0.5%, -0.5%);
  }

  50% {
    transform: translate(0.5%, 0.5%);
  }

  75% {
    transform: translate(-0.5%, 0.5%);
  }
}

:root {
  --color-primary: #a03f28;
  --color-primary-container: #c0573e;
  --color-on-primary: #ffffff;
  --color-secondary-container: #c5e8cd;
  --color-on-secondary-container: #4b6a54;
  --color-tertiary: #735c00;
  --color-surface: #fbf9f5;
  --color-surface-container-low: #f5f3ef;
  --color-surface-container-highest: #e4e2de;
  --color-on-surface: #1b1c1a;
  --color-on-surface-variant: #56423d;

  /* Animaciones suaves para que navegar sea un placer */
  --easing-editorial: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-standard: 400ms var(--easing-editorial);
}

/* --- CINEMATIC OVERHAUL: GLOBAL WRAPPERS --- */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  /* Base para efectos 3D en toda la web */
  overflow-x: hidden;
}

#main-content {
  position: relative;
  z-index: 10;
  background-color: #0a0a0a;
  /* Fondo sólido por defecto */
}

/* --- STICKY REVEAL FOOTER --- */
#footer-container {
  position: sticky;
  bottom: 0;
  z-index: -1;
  width: 100%;
}

/* Asegurar que la última sección del main sea "sólida" y tenga margen para revelar el footer */
#contact-container {
  position: relative;
  z-index: 20;
  background-color: #0a0a0a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  /* Sombra para separar del footer */
}

/* --- PARALLAX & DEPTH UTILS --- */
.parallax-wrapper {
  overflow: hidden;
  position: relative;
}

.parallax-bg {
  height: 120%;
  /* Sobra para que el movimiento no muestre bordes */
  width: 100%;
  position: absolute;
  top: -10%;
  left: 0;
  will-change: transform;
}

body {
  font-family: 'Manrope', sans-serif;
  color: var(--color-on-surface);
  background-color: var(--color-surface);
  min-height: max(884px, 100svh);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.font-serif {
  font-family: 'Noto Serif', serif;
  font-weight: 700;
}

/* Los iconos de Google: Desactivamos transiciones manuales para permitir que GSAP maneje la velocidad 'rapidit' */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* Solo desactivar transiciones si están dentro de interactivos (evita saltos en carga) */
button .material-symbols-outlined,
a .material-symbols-outlined,
.clickable-icon .material-symbols-outlined {
  transition: none !important;
}


/* --- DETALLES DE DISEÑO --- */

/* Líneas muy sutiles, casi invisibles */
hr,
.border-standard {
  border: none;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.05);
}

/* Efecto de vidrio esmerilado (Glassmorphism) */
.glass-effect {
  background-color: rgba(251, 249, 245, 0.8) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.btn-primary {
  background: linear-gradient(to right, var(--color-primary), var(--color-primary-container));
  color: var(--color-on-primary);
  border: none;
  transition: var(--transition-standard);
  box-shadow: 0 4px 30px -10px rgba(160, 63, 40, 0.3);
}

.btn-primary:hover {
  transform: none;
  box-shadow: 0 6px 28px -12px rgba(160, 63, 40, 0.34);
  opacity: 0.98;
}

/* Botón con una rayita que crece al pasar el mouse */
.btn-tertiary {
  color: var(--color-primary);
  padding-bottom: 2px;
  position: relative;
  transition: var(--transition-standard);
}

.btn-tertiary::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40%;
  height: 2px;
  background-color: var(--color-primary);
  border-radius: 99px;
  transition: var(--transition-standard);
}

.btn-tertiary:hover::after {
  width: 100%;
}

/* Sombras suaves que no molestan */
.shadow-ambient {
  box-shadow: 0 10px 40px -10px rgba(27, 28, 26, 0.06);
}

/* El recorte de foto "mancha" orgánica */
.organic-shape {
  border-radius: 80% 20% 70% 30% / 30% 80% 20% 70%;
  overflow: hidden;
  transition: var(--transition-standard);
}

/* Scroll que no salta, se desliza */
html {
  scroll-behavior: smooth;
}

/* Mix de colores para que el logo se funda con el fondo si es necesario */
/* Mix de colores para que el logo se funda con el fondo si es necesario */
.multiply-blend {
  mix-blend-mode: multiply;
  filter: contrast(1.1);
}

/* --- BENTO GRID SECCIÓN PLATOS --- */

.bento-grid {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.bento-grid::-webkit-scrollbar {
  display: none;
}

.bento-grid>.bento-item {
  flex: 0 0 70vw;
  scroll-snap-align: center;
}

@media (min-width: 768px) {
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 150px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .bento-grid>.bento-item {
    flex: unset;
  }

  .bento-item.large {
    grid-column: span 8;
    grid-row: span 4;
  }

  .bento-item.tall {
    grid-column: span 4;
    grid-row: span 4;
  }

  .bento-item.wide {
    grid-column: span 6;
    grid-row: span 2;
  }

  .bento-item.square {
    grid-column: span 3;
    grid-row: span 2;
  }
}

.cinematic-stage {
  width: 100%;
  position: relative;
  overflow: visible !important;
}


.bento-grid {
  width: 100%;
  max-width: 1400px;
}

@media (min-width: 768px) {
  .bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
  }
}

.bento-item {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--color-surface-container-low);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  min-height: 220px;
  will-change: transform, opacity;
  opacity: 1 !important;
  /* Force visibility for nuclear fix */
}

@media (min-width: 768px) {
  .bento-item {
    min-height: auto;
    border-radius: 1.5rem;
  }
}

.bento-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bento-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 1;
}

.bento-content {
  transform: translateY(0);
}

/* Botón flotante en bento */
.add-to-cart-bento {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.add-to-cart-bento:hover {
  transform: scale(1.01);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}

/* --- ANIMACIONES DE REVELACIÓN --- */

.reveal-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.reveal-card {
  opacity: 0;
  transform: translateY(50px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.reveal-fade-up.active,
.reveal-card.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* --- OFFBRAND PREMIUM ANIMATIONS --- */

/* Lenis Smooth Scroll Support */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* Magazine Cover Preloader (Tapa Editorial) */
.preloader-magazine {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  z-index: 100000;
  background-color: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: left center;
  will-change: transform, opacity;
  box-shadow: 15px 0 35px rgba(0, 0, 0, 0.15);
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 3rem;
  padding: 2rem;
}

.preloader-logo {
  transform: translateY(20px);
  will-change: transform, opacity;
}

.preloader-count {
  font-family: 'Noto Serif', serif;
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.preloader-label {
  font-family: 'Manrope', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.45em;
  font-size: 10px;
  opacity: 0.5;
  font-weight: 700;
}

/* Custom Magnetic Cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 30000;
  transform: translate(-50%, -50%);
  transition: width 0.8s var(--easing-editorial), height 0.8s var(--easing-editorial), background-color 0.8s var(--easing-editorial);
}

body:hover #custom-cursor,
body:hover #cursor-follower {
  opacity: 1;
}

/* Cursor States */
.cursor-active #custom-cursor {
  width: 40px;
  height: 40px;
  background-color: rgba(160, 63, 40, 0.1);
  backdrop-filter: invert(1);
}

/* Text Splitting Reveal */
.split-line {
  overflow: hidden;
  display: block;
}

.split-char {
  display: inline-block;
  transform: translateY(105%);
}

/* Advanced 3D Transforms Support */
.bento-item {
  transform-origin: center center;
  transition: transform 0.1s var(--easing-editorial);
  will-change: transform;
}

.section-mask {
  transform: translateY(30px) scale(0.98);
  opacity: 0;
  transition: none;
  /* Handled by GSAP */
}

.hud-frame {
  position: fixed;
  inset: 16px;
  pointer-events: none;
  z-index: 9000;
  border: 1px solid rgba(160, 63, 40, 0.15);
  /* color-primary border */
  outline: 16px solid var(--color-surface);
  /* Solid frame */
}

@media (min-width: 768px) {
  .hud-frame {
    inset: 24px;
    outline-width: 24px;
  }
}

.hud-plus {
  position: absolute;
  width: 24px;
  height: 24px;
}

.hud-plus::before,
.hud-plus::after {
  content: '';
  position: absolute;
  background-color: var(--color-primary);
  opacity: 0.2;
}

.hud-plus-tl {
  top: -12px;
  left: -12px;
}

.hud-plus-tr {
  top: -12px;
  right: -12px;
}

.hud-plus-bl {
  bottom: -12px;
  left: -12px;
}

.hud-plus-br {
  bottom: -12px;
  right: -12px;
}

.hud-plus::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.hud-plus::after {
  left: 50%;
  top: 0;
  height: 100%;
  width: 1px;
}

/* Custom Cursor Disabled On Mobile (Touch) */
@media (pointer: coarse),
(max-width: 768px) {

  #custom-cursor,
  #cursor-follower {
    display: none !important;
  }
}

/* --- NUESTRA ALMA: ROBUST STACKING (GSAP DRIVEN) --- */
#nosotros {
  height: 100svh;
  overflow: hidden !important;
  background-color: #0a0a0a;
  position: relative;
}

.values-sticky-side {
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
}

.values-sticky-side>div {
  pointer-events: auto;
}

.values-scroll-side {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.value-card-item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 10%;
  opacity: 0;
  pointer-events: none;
  background: transparent;
  will-change: transform, opacity;
}

/* Rediseño Desktop: 2 columnas reales */
@media (min-width: 768px) {
  .values-sticky-side {
    width: 45%;
  }

  .values-scroll-side {
    width: 55%;
  }

  .value-card-item {
    align-items: flex-start;
    padding: 0;
    padding-left: 20%;
  }
}

/* Rediseño Mobile: Stack centralizado */
@media (max-width: 767px) {
  .values-sticky-side {
    position: absolute;
    top: 5svh;
    left: 0;
    height: auto;
    padding: 2rem;
    background: linear-gradient(to bottom, #0a0a0a 40%, transparent);
  }

  .value-card-item {
    align-items: flex-start;
    padding: 2rem;
    padding-top: 25svh;
    /* Debajo del título */
  }
}

/* Ghost background text (Filosofía editorial) */
#nosotros::after {
  content: 'FILOSOFÍA';
  position: absolute;
  bottom: -4svh;
  right: -2vw;
  font-size: 25vw;
  font-family: var(--font-headline);
  font-weight: 900;
  color: white;
  opacity: 0.02;
  pointer-events: none;
  line-height: 1;
  z-index: 1;
}


/* --- EDITORIAL FORM SYSTEM --- */
.input-editorial {
  width: 100%;
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid rgba(160, 63, 40, 0.1) !important;
  padding: 1.25rem 0 !important;
  font-family: var(--font-body);
  font-size: 1.1rem;
  transition: all 0.4s var(--easing-editorial);
  outline: none !important;
  border-radius: 0 !important;
  color: var(--color-on-surface);
}

.input-editorial:focus {
  border-bottom-color: var(--color-primary) !important;
  padding-left: 1rem !important;
  /* Efecto sutil de desplazamiento al enfocar */
}

.input-editorial::placeholder {
  color: #a8a29e;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.label-editorial {
  display: block;
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.65rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

@media (max-width: 767px) {
  .input-editorial {
    font-size: 16px !important;
    /* Prevents iOS auto-zoom on focus */
    padding: 0.6rem 0 !important;
  }
}

/* --- FAQ & WATERMARKS --- */
.faq-ghost-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-headline);
  font-size: 25vw;
  font-weight: 900;
  color: var(--color-primary);
  opacity: 0.03;
  letter-spacing: -0.05em;
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}

@media (max-width: 767px) {
  .faq-ghost-text {
    font-size: 32vw;
    opacity: 0.02;
  }
}

.faq-item-editorial {
  border-bottom: 1px solid rgba(160, 63, 40, 0.1) !important;
  background: transparent !important;
  transition: background-color 0.4s var(--easing-editorial);
}

.faq-item-editorial:hover {
  background-color: rgba(160, 63, 40, 0.02) !important;
}

/* Specific overrides for dark sections */
.bg-neutral-900 .faq-item-editorial,
.bg-neutral-950 .faq-item-editorial {
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

/* REFINAMIENTO GLOBAL: ICONOS */
button:not(#back-to-top-btn) .material-symbols-outlined,
a .material-symbols-outlined,
.clickable-icon .material-symbols-outlined {
  transition: none !important;
}

/* --- THEME-AWARE EDITORIAL INPUTS --- */
.input-editorial {
  color: var(--color-on-surface) !important;
  border-bottom: 2px solid rgba(160, 63, 40, 0.1) !important;
}

@media (max-width: 767px) {
  .input-editorial {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    font-size: 16px !important;
    /* Must be >= 16px to prevent iOS auto-zoom */
  }

  .label-editorial {
    font-size: 9px !important;
  }
}

.bg-neutral-950 .input-editorial,
.bg-neutral-900 .input-editorial {
  color: white !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

.bg-neutral-950 .input-editorial::placeholder,
.bg-neutral-900 .input-editorial::placeholder {
  color: #57534e !important;
}

.bg-neutral-950 .label-editorial {
  color: rgba(255, 255, 255, 0.3) !important;
}

/* The main contact form sits on a dark surface; modal inputs remain light-themed. */
#main-contact-form .input-editorial {
  color: #f2f0ed !important;
  border-bottom-color: #78716c !important;
  caret-color: currentColor;
}

#main-contact-form .input-editorial:focus {
  border-bottom-color: #ffb4a3 !important;
}

#main-contact-form .label-editorial {
  color: #d6d3d1;
}

/* --- ATMOSPHERIC TRANSITIONS --- */
#nosotros {
  transition: background-color 1.5s var(--ease-expo);
  will-change: background-color;
}

.atmos-earth {
  background-color: #141210 !important;
}

.atmos-nature {
  background-color: #0e1210 !important;
}

.atmos-void {
  background-color: #0a0a0a !important;
}

/* HUD Peek-a-boo + Ease Expo */
.ease-expo {
  transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
}

/* HUD Fold Effect */
#main-header .rounded-l-sm {
  box-shadow: -15px 0 45px rgba(0, 0, 0, 0.15), inset -2px 0 5px rgba(160, 63, 40, 0.05);
  border-right: none !important;
}

/* Pestaña persistente del menú (Handle) */
#main-header #hud-handle {
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

#main-header:not(.hud-open) {
  transform: translateX(calc(100% - 52px)) !important;
}

#main-header.hud-open #hud-handle {
  border-radius: 0;
  opacity: 0.8;
}

/* Bookmark Ribbon Bottom (Marcador Inferior) */
#back-to-top-btn {
  background-color: var(--color-primary) !important;
  color: white !important;
  border-bottom: none !important;
  box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.18);
  transition: all 0.4s ease-out;
  z-index: 10000 !important;
  /* Por encima de TODO */
  will-change: transform, opacity;
}

#back-to-top-btn:hover {
  height: 5rem !important;
}

#back-to-top-btn span {
  color: inherit !important;
}

@media (min-width: 768px) {
  #back-to-top-btn span {
    margin-bottom: 1.5rem;
    display: none;
  }

  #back-to-top-btn:hover span {
    display: block;
  }
}

@media (max-width: 767px) {
  #main-header:not(.hud-open) {
    transform: translateX(calc(100% - 48px)) !important;
  }

  #main-header.hud-open {
    transform: translateX(0) !important;
  }
}

/* Ghost Text dark-section overrides */
.bg-neutral-950 .faq-ghost-text,
.bg-neutral-900 .faq-ghost-text {
  color: white;
  opacity: 0.02;
}

.faq-ghost-text {
  will-change: transform, opacity;
}

.parallax-bg,
.bg-image,
.organic-shape {
  will-change: transform;
}

/* --- MOBILE MODAL / DRAWER POLISH --- */

/* Safe area support for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Prevent scroll bleed on all modal/drawer scrollable areas */
[data-lenis-prevent] {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* Cart drawer mobile: slide from bottom */
@media (max-width: 767px) {
  #cart-drawer {
    transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1) !important;
    /* iOS-style spring curve */
  }
}

/* Smooth GPU-composited transitions for overlays */
#cart-overlay,
#catalog-modal,
#contact-modal-overlay,
#modal-overlay {
  will-change: opacity;
}

/* Address suggestions dropdown: ensure it floats above scrollable parent */
#address-suggestions {
  -webkit-overflow-scrolling: touch;
}

/* Prevent double-tap zoom on interactive elements */
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}

/* Custom scrollbar hidden on mobile for cleaner look */
@media (max-width: 767px) {
  .custom-scrollbar::-webkit-scrollbar {
    display: none;
  }

  .custom-scrollbar {
    scrollbar-width: none;
  }
}

/* Ocultar scrollbar del menú mobile (siempre) */
#mobile-menu-content::-webkit-scrollbar {
  display: none;
}

#mobile-menu-content {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --- UNIFIED BOUNCE CARDS (MOBILE & DESKTOP) --- */
.bounce-cards-wrapper {
  perspective: 1500px;
  transform-style: preserve-3d;
  -webkit-overflow-scrolling: touch;
}

.bounce-cards-wrapper::-webkit-scrollbar {
  display: none;
}

.bounce-card {
  will-change: transform, filter;
  backface-visibility: hidden;
  transition: filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bounce-card img {
  pointer-events: none;
  user-select: none;
}

@media (max-width: 768px) {
  .cinematic-stage {
    padding-top: 0.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  #bounce-cards-container {
    padding: 2rem 0;
    margin-bottom: -1rem;
  }

  .bounce-card {
    border-width: 4px !important;
    border-radius: 16px !important;
  }
}

/* Mobile grid adjustments for dishes */
.mobile-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  width: 100%;
  padding-bottom: 2rem;
}

.mobile-dish-card {
  transition: transform 0.3s var(--easing-editorial), box-shadow 0.3s ease;
  will-change: transform, opacity;
}

.mobile-dish-card:active {
  transform: scale(0.98);
}

/* --- MODAL & OVERLAY ANIMATIONS --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s var(--easing-editorial) forwards;
}

/* Global Modal Containers (Direct children of body) */
#cart-drawer-container,
#catalog-modal-container,
#contact-modal-container,
#photo-modal-container,
#mobile-menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 20000;
  pointer-events: none;
}

#cart-drawer-container>*,
#catalog-modal-container>*,
#contact-modal-container>*,
#photo-modal-container>*,
#mobile-menu-container>* {
  pointer-events: auto;
}

/* Z-Index Overrides for absolute certainty */
#cart-overlay,
#cart-drawer {
  z-index: 20001 !important;
}

#catalog-modal {
  z-index: 30000 !important;
}

#contact-modal-overlay {
  z-index: 40000 !important;
}


/* HUD Header Toggle State */
#main-header.hud-open {
  transform: translateX(0) !important;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.25) !important;
}

/* HUD completamente oculto cuando hay overlays abiertos */
#main-header.hud-hidden {
  transform: translateX(100%) !important;
  pointer-events: none !important;
  transition: transform 0.3s ease !important;
}

/* Visibility Fixes for Drawers/Menus when closed */
#cart-overlay.opacity-0,
#mobile-menu-overlay.pointer-events-none,
#catalog-modal.hidden,
#contact-modal-overlay.hidden {
  visibility: hidden !important;
}

#cart-overlay,
#mobile-menu-overlay,
#catalog-modal,
#contact-modal-overlay {
  visibility: visible;
}

/* =====================================================
   PERFORMANCE: content-visibility para secciones off-screen
   Reduce el tiempo de renderizado inicial significativamente
   ====================================================== */
#faq,
#contacto {
  content-visibility: auto;
  contain-intrinsic-size: 0 600px;
}

/* Reduce repaint en grain overlay */
.grain-overlay {
  contain: strict;
}
