/* ==========================================================================
   La Catorce — Sistema de Diseño Premium (Mobile-First, Lujo & Glassmorphism)
   ========================================================================== */

/* 1. Variables de Diseño (Tokens) */
:root {
    /* Paleta de Colores de Alta Gama */
    --color-bg-base: #050505;
    --color-gold-warm: #c5a059;       /* Oro mate sutil, elegante */
    --color-gold-champagne: #dfba6b;  /* Oro champagne luminoso */
    --color-gold-hover: #e5bf75;      /* Brillo dorado activo */
    --color-text-white: #fdfcf7;      /* Blanco roto premium, reduce fatiga visual */
    --color-text-dim: rgba(255, 255, 255, 0.72);
    --color-text-muted: rgba(255, 255, 255, 0.45);

    /* Efecto Glassmorphism Premium */
    --glass-bg: rgba(18, 18, 18, 0.48);
    --glass-bg-elevated: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.11);
    --glass-border-gold: rgba(223, 186, 107, 0.32);
    --glass-shadow: 0 16px 44px 0 rgba(0, 0, 0, 0.55);

    /* Tipografías */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;

    /* Tiempos de Animación */
    --transition-speed-slow: 1500ms;
    --transition-speed-normal: 380ms;
    --transition-speed-fast: 160ms;
}

/* 2. Reseteo y Ajustes Base (Mobile-First) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

html, body {
    width: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--color-bg-base);
    color: var(--color-text-white);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 3. Slider de Fondo Cinematográfico */
.bg-slider {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity var(--transition-speed-slow) cubic-bezier(0.4, 0, 0.2, 1),
                transform var(--transition-speed-slow) cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.bg-slide.active {
    opacity: 1;
    transform: scale(1);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.58) 0%,
        rgba(0, 0, 0, 0.68) 50%,
        rgba(0, 0, 0, 0.88) 100%
    );
    z-index: 2;
}

/* 4. Contenedor Principal (Mobile-First) */
.main-container {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 24px);
    text-align: center;
}

/* ==========================================================================
   5. PRIMERA PANTALLA (Above the fold - 100dvh)
   ========================================================================== */
.hero-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 100dvh;
    padding: max(28px, env(safe-area-inset-top)) 0 max(20px, env(safe-area-inset-bottom)) 0;
    gap: 16px;
}

/* Cabecera y Logo */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding-top: 1.5dvh;
    gap: 12px;
    animation: fadeInDown 1.1s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 92%;
    padding: clamp(12px, 3.5vw, 16px) clamp(22px, 6.5vw, 30px);
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(18, 17, 15, 0.8) 0%, rgba(8, 8, 8, 0.72) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(223, 186, 107, 0.36);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6),
                0 0 24px rgba(197, 160, 89, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.logo {
    display: block;
    margin: 0 auto;
    width: clamp(180px, 54vw, 236px);
    max-width: 100%;
    max-height: 108px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.75));
}

.logo-subtitle {
    font-size: clamp(0.66rem, 2.2vw, 0.75rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.36em;
    color: var(--color-gold-champagne);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    padding-left: 0.36em;
}

/* Bloque Central Protagonista */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: clamp(18px, 4.5vw, 26px);
    margin: auto 0;
}

.title {
    font-family: var(--font-serif);
    font-size: clamp(1.85rem, 6.8vw, 2.35rem);
    font-weight: 400;
    line-height: 1.18;
    color: var(--color-text-white);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.65);
    letter-spacing: -0.01em;
    animation: fadeInUp 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.1s both;
}

/* Tarjeta Glassmorphism de Calificación por Estrellas */
.rating-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: clamp(22px, 5vw, 28px) clamp(16px, 4.5vw, 22px);
    border-radius: 22px;
    background: var(--glass-bg);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--glass-border-gold);
    box-shadow: var(--glass-shadow),
                0 0 28px rgba(197, 160, 89, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.07);
    gap: clamp(14px, 3.8vw, 18px);
    transition: all var(--transition-speed-normal) cubic-bezier(0.25, 1, 0.5, 1);
    animation: fadeInUp 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.22s both;
}

.rating-instruction {
    font-size: clamp(0.7rem, 2.5vw, 0.78rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--color-gold-champagne);
    margin: 0;
}

/* Contenedor de Estrellas Interactivas */
.stars-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(6px, 2vw, 10px);
    width: 100%;
    padding: 4px 0;
}

.star-btn {
    appearance: none;
    -webkit-appearance: none;
    touch-action: manipulation;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    width: clamp(44px, 12.5vw, 54px);
    height: clamp(44px, 12.5vw, 54px);
    flex-shrink: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
                background 220ms ease,
                border-color 220ms ease,
                box-shadow 220ms ease;
    padding: 0;
}

.star-icon {
    width: clamp(23px, 6.4vw, 28px);
    height: clamp(23px, 6.4vw, 28px);
    fill: rgba(255, 255, 255, 0.14);
    stroke: rgba(223, 186, 107, 0.65);
    stroke-width: 1.5;
    stroke-linejoin: round;
    transition: fill 220ms ease,
                stroke 220ms ease,
                transform 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
                filter 220ms ease;
}

/* Estado iluminado (hover o selección) */
.star-btn.is-active {
    background: rgba(223, 186, 107, 0.15);
    border-color: rgba(223, 186, 107, 0.6);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.22);
    transform: translateY(-3px) scale(1.04);
}

.star-btn.is-active .star-icon {
    fill: var(--color-gold-champagne);
    stroke: var(--color-gold-hover);
    filter: drop-shadow(0 0 8px rgba(223, 186, 107, 0.55));
    transform: scale(1.08);
}

.star-btn:active {
    transform: scale(0.92);
}

.star-btn.pop-anim {
    animation: starPop 380ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes starPop {
    0% { transform: scale(0.9); }
    50% { transform: scale(1.16) translateY(-4px); }
    100% { transform: scale(1.05) translateY(-2px); }
}

.rating-feedback {
    font-size: 0.82rem;
    font-weight: 300;
    color: var(--color-text-dim);
    min-height: 1.3em;
    line-height: 1.45;
    transition: color 250ms ease, opacity 250ms ease;
}

.rating-feedback.is-redirecting {
    color: var(--color-gold-champagne);
    font-weight: 400;
}

/* Indicador Sutil de Scroll Hacia Abajo */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: var(--color-text-dim);
    padding: 8px 16px;
    margin-top: 8px;
    opacity: 0;
    animation: fadeInUp 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.45s forwards;
    transition: color var(--transition-speed-normal) ease;
}

.scroll-text {
    font-size: 0.66rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.26em;
    color: rgba(255, 255, 255, 0.55);
    padding-left: 0.26em;
}

.scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 26px;
    position: relative;
}

.chevron-arrow {
    width: 20px;
    height: 20px;
    color: var(--color-gold-champagne);
    animation: chevronWave 2s infinite ease-in-out;
}

.chevron-arrow.arrow-2 {
    margin-top: -11px;
    animation-delay: 0.25s;
}

@keyframes chevronWave {
    0%, 100% {
        opacity: 0.25;
        transform: translateY(-2px);
    }
    50% {
        opacity: 0.95;
        transform: translateY(4px);
    }
}

/* ==========================================================================
   6. SECCIÓN INFERIOR — DESCUBRE MÁS (Instagram oficial)
   ========================================================================== */
.second-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 32px 0 max(40px, env(safe-area-inset-bottom)) 0;
    gap: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.section-subtitle {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--color-gold-champagne);
    margin: 0;
    padding-left: 0.28em;
}

/* Botón CTA Elegante de Instagram */
.instagram-cta-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 18px;
    touch-action: manipulation;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border-gold);
    color: var(--color-text-white);
    text-decoration: none;
    box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all var(--transition-speed-normal) cubic-bezier(0.25, 1, 0.5, 1);
    text-align: left;
}

.instagram-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(223, 186, 107, 0.14);
    border: 1px solid rgba(223, 186, 107, 0.35);
    color: var(--color-gold-champagne);
    flex-shrink: 0;
}

.instagram-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

.instagram-btn-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.instagram-btn-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-white);
    letter-spacing: 0.02em;
}

.instagram-btn-handle {
    font-size: 0.76rem;
    font-weight: 300;
    color: var(--color-gold-champagne);
    letter-spacing: 0.03em;
}

.instagram-external-arrow {
    width: 18px;
    height: 18px;
    color: var(--color-gold-champagne);
    flex-shrink: 0;
    transition: transform var(--transition-speed-normal) ease;
}

@media (hover: hover) {
    .instagram-cta-btn:hover {
        background: linear-gradient(135deg, rgba(223, 186, 107, 0.2) 0%, rgba(18, 18, 18, 0.65) 100%);
        border-color: var(--color-gold-champagne);
        transform: translateY(-2px);
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5), 0 0 18px rgba(223, 186, 107, 0.16);
    }

    .instagram-cta-btn:hover .instagram-external-arrow {
        transform: translate(2px, -2px);
    }
}

.instagram-cta-btn:active {
    transform: scale(0.98);
}

/* Pie de página discreto: Atención del mesero */
.waiter-footer {
    width: 100%;
    padding-top: 2px;
    text-align: center;
}

.waiter-note {
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-style: italic;
}

/* ==========================================================================
   7. Animaciones de Entrada y Media Queries Responsivas
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pantallas móviles compactas en altura */
@media (max-height: 680px) {
    .hero-screen {
        padding: 20px 0 14px 0;
    }
    .logo-frame {
        padding: 10px 20px;
    }
    .logo {
        width: clamp(160px, 48vw, 200px);
        max-height: 82px;
    }
    .logo-subtitle {
        font-size: 0.64rem;
        letter-spacing: 0.28em;
        padding-left: 0.28em;
    }
    .title {
        font-size: 1.75rem;
    }
    .rating-card {
        padding: 20px 16px 18px 16px;
        gap: 14px;
    }
    .star-btn {
        width: 46px;
        height: 46px;
    }
    .star-icon {
        width: 24px;
        height: 24px;
    }
}

/* Pantallas muy estrechas (<= 350px) */
@media (max-width: 350px) {
    .star-btn {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }
    .stars-container {
        gap: 6px;
    }
}

/* Tablets y Desktop */
@media (min-width: 768px) {
    .main-container {
        max-width: 480px;
        padding: 0 32px;
    }
    .title {
        font-size: 2.45rem;
    }
    .star-btn {
        width: 56px;
        height: 56px;
    }
    .star-icon {
        width: 30px;
        height: 30px;
    }
}
