/* ============================================
   lower.bar - Dark Academia Underground Bar
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --deep-ocean: #0c1420;
    --alcove-dark: #081018;
    --mid-depth: #1a3040;
    --gold-accent: #c4a050;
    --ocean-teal: #2a6a6a;
    --text-primary: #c8d0d8;
    --text-secondary: #6a7a88;
    --line-illustration: #2a4050;
    --retro-pattern: #1a2838;
    --candle-glow: #e8c060;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--deep-ocean);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Retro Pattern Background (art-deco fan / diamond) --- */
.module-pattern,
.alcove-pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            var(--retro-pattern) 20px,
            var(--retro-pattern) 21px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 20px,
            var(--retro-pattern) 20px,
            var(--retro-pattern) 21px
        );
}

.module-pattern.visible,
.alcove-pattern.visible {
    opacity: 0.03;
}

/* ============================================
   HERO SECTION
   ============================================ */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-ocean);
    overflow: hidden;
}

#arch-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.arch-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.arch-line.animate {
    animation: drawArch 1.2s ease-out forwards;
}

@keyframes drawArch {
    to { stroke-dashoffset: 0; }
}

#hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

#hero-title-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

#hero-title-lower {
    font-family: 'Vollkorn', serif;
    font-weight: 800;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: 0.08em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#hero-title-lower.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero-gold-line {
    width: 0;
    height: 1px;
    background: var(--gold-accent);
    transition: width 0.6s ease;
    margin: 8px 0;
}

#hero-gold-line.visible {
    width: 100%;
}

#hero-title-bar {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(28px, 5vw, 56px);
    letter-spacing: 0.3em;
    color: var(--text-primary);
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#hero-title-bar.visible {
    opacity: 1;
    transform: translateY(0);
}

#hero-tagline {
    font-family: 'Vollkorn', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(14px, 1.8vw, 20px);
    color: var(--text-secondary);
    margin-top: 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

#hero-tagline.visible {
    opacity: 1;
}

/* ============================================
   THE MENU - MODULAR GRID
   ============================================ */
#menu {
    position: relative;
    padding: 60px 24px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

#menu-heading {
    font-family: 'Vollkorn', serif;
    font-weight: 800;
    font-size: clamp(22px, 3vw, 36px);
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 40px;
    letter-spacing: 0.04em;
}

#menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 2px;
    background: var(--gold-accent);
    border: 1px solid var(--gold-accent);
}

/* Module base */
.module {
    position: relative;
    background: var(--deep-ocean);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease, filter 0.2s ease;
}

.module.visible {
    opacity: 1;
    transform: translateY(0);
}

.module:hover {
    filter: brightness(1.1);
}

/* Module size variants */
.module-tall {
    grid-row: span 2;
}

.module-wide {
    grid-column: span 2;
}

.module-square {
    grid-column: span 1;
    grid-row: span 1;
}

/* Featured module pulse */
.module.featured {
    animation: pulseBorder 3s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%, 100% { box-shadow: inset 0 0 0 0 rgba(196, 160, 80, 0); }
    50% { box-shadow: inset 0 0 8px 2px rgba(196, 160, 80, 0.2); }
}

.module:hover {
    box-shadow: inset 0 0 8px 2px rgba(196, 160, 80, 0.2);
}

/* Module typography */
.module-title {
    font-family: 'Vollkorn', serif;
    font-weight: 600;
    font-size: clamp(18px, 2.5vw, 28px);
    color: var(--text-primary);
    margin-bottom: 12px;
}

.module-body {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.7;
    color: var(--text-secondary);
}

.module-body + .module-body {
    margin-top: 8px;
}

.latin-accent {
    font-family: 'Vollkorn', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--ocean-teal);
}

/* Quote styling */
.module-quote {
    margin-bottom: 16px;
}

.quote-text {
    font-family: 'Vollkorn', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(18px, 2.2vw, 26px);
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.quote-cite {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(12px, 1.2vw, 15px);
    color: var(--text-secondary);
    display: block;
    margin-top: 8px;
}

/* Cocktail SVGs */
.cocktail-svg {
    width: 100px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
}

/* ============================================
   THE ALCOVE - FEATURE SECTION
   ============================================ */
#alcove {
    position: relative;
    background: var(--alcove-dark);
    padding: 80px 24px;
    overflow: hidden;
}

#alcove-arch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    opacity: 0.3;
}

.alcove-arch-line {
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

.alcove-arch-line.animate {
    animation: drawArch 1.5s ease-out forwards;
}

.alcove-pattern {
    width: 120px;
    position: absolute;
    top: 0;
    bottom: 0;
}

#alcove-pattern-left {
    left: 0;
}

#alcove-pattern-right {
    right: 0;
}

#alcove-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

#alcove-heading {
    font-family: 'Vollkorn', serif;
    font-weight: 800;
    font-size: clamp(24px, 3.5vw, 42px);
    color: var(--text-primary);
    margin-bottom: 32px;
    letter-spacing: 0.04em;
}

.alcove-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.5vw, 18px);
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.alcove-text:last-child {
    margin-bottom: 0;
}

.alcove-text.latin-accent {
    font-family: 'Vollkorn', serif;
    font-style: italic;
    color: var(--ocean-teal);
    font-size: clamp(16px, 1.8vw, 21px);
}

/* ============================================
   LAST CALL - FOOTER
   ============================================ */
#last-call {
    position: relative;
    background: var(--deep-ocean);
    padding: 80px 24px 40px;
    text-align: center;
}

#last-call-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

#candle-svg {
    width: 40px;
    height: auto;
    flex-shrink: 0;
}

/* Candle flame animation */
#candle-flame {
    animation: flameWobble 2s ease-in-out infinite;
    transform-origin: 30px 35px;
}

@keyframes flameWobble {
    0% {
        transform: scaleX(1) scaleY(1) translateX(0);
    }
    25% {
        transform: scaleX(0.9) scaleY(1.05) translateX(-1px);
    }
    50% {
        transform: scaleX(1.1) scaleY(0.95) translateX(1px);
    }
    75% {
        transform: scaleX(0.95) scaleY(1.02) translateX(-0.5px);
    }
    100% {
        transform: scaleX(1) scaleY(1) translateX(0);
    }
}

#candle-glow {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.06; }
    50% { opacity: 0.12; }
}

#last-call-text {
    font-family: 'Vollkorn', serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(18px, 2.5vw, 28px);
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

#footer-domain {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(12px, 1.2vw, 15px);
    color: var(--text-secondary);
    letter-spacing: 0.2em;
    text-transform: lowercase;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    #menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-tall {
        grid-row: span 2;
    }

    .module-wide {
        grid-column: span 2;
    }

    .alcove-pattern {
        width: 40px;
    }
}

@media (max-width: 560px) {
    #menu-grid {
        grid-template-columns: 1fr;
    }

    .module-tall,
    .module-wide {
        grid-column: span 1;
        grid-row: span 1;
    }

    .cocktail-svg {
        width: 70px;
    }

    #alcove {
        padding: 60px 20px;
    }

    .alcove-pattern {
        display: none;
    }

    #last-call-content {
        flex-direction: column;
        gap: 16px;
    }
}
