/* ============================================
   monopole.bar - Art Deco Speakeasy
   Color Palette:
     Dark Walnut:  #1A1410
     Warm Earth:   #2A2018
     Amber Gold:   #C8A050
     Cream Warm:   #E8D8C0
     Deep Bronze:  #5A4830
     Muted Ochre:  #8A7050
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.75;
    color: #E8D8C0;
    background: #2A2018;
    overflow-x: hidden;
    opacity: 0;
}

body.loaded {
    opacity: 1;
}

/* --- Grain Overlay --- */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transition: opacity 400ms ease;
}

body.loaded #grain-overlay {
    opacity: 1;
}

/* --- Organic Blob Shapes --- */
#blob-container {
    position: fixed;
    top: 0;
    left: 260px;
    width: calc(100% - 260px);
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    background: rgba(26, 20, 16, 0.8);
    border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
    opacity: 0.05;
}

.blob-1 {
    width: 500px;
    height: 500px;
    top: 5%;
    left: 10%;
    animation: blobDrift1 60s ease-in-out infinite alternate;
}

.blob-2 {
    width: 400px;
    height: 350px;
    top: 40%;
    right: 5%;
    border-radius: 55% 45% 40% 60% / 45% 55% 50% 40%;
    animation: blobDrift2 75s ease-in-out infinite alternate;
}

.blob-3 {
    width: 350px;
    height: 300px;
    bottom: 10%;
    left: 30%;
    border-radius: 45% 55% 60% 40% / 60% 45% 40% 55%;
    animation: blobDrift3 90s ease-in-out infinite alternate;
}

@keyframes blobDrift1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.05); }
    100% { transform: translate(-20px, 50px) scale(0.97); }
}

@keyframes blobDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, -20px) scale(1.03); }
    100% { transform: translate(20px, -40px) scale(0.98); }
}

@keyframes blobDrift3 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, -35px) scale(1.04); }
    100% { transform: translate(-15px, 20px) scale(0.96); }
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1A1410;
    border-right: 1px solid rgba(200, 160, 80, 0.2);
    z-index: 100;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 600ms ease;
    overflow-y: auto;
}

body.loaded #sidebar {
    opacity: 1;
}

/* Sidebar chevron background pattern */
#sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 20px,
            rgba(200, 160, 80, 0.03) 20px,
            rgba(200, 160, 80, 0.03) 21px
        ),
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 20px,
            rgba(200, 160, 80, 0.03) 20px,
            rgba(200, 160, 80, 0.03) 21px
        );
    pointer-events: none;
    z-index: 0;
}

/* --- Sidebar Fan Motif --- */
#sidebar-fan {
    padding: 20px 20px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

#fan-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

#fan-svg line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 1.2s ease;
}

body.loaded #fan-svg line {
    stroke-dashoffset: 0;
}

/* --- Logo --- */
#sidebar-logo {
    text-align: center;
    padding: 15px 20px 10px;
    position: relative;
    z-index: 1;
}

#logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 60px;
    background: radial-gradient(ellipse, rgba(200, 160, 80, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

body.loaded #logo-glow {
    animation: glowPulse 1.5s ease-in-out 0.6s forwards;
}

@keyframes glowPulse {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
}

#logotype {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 40px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C8A050;
    position: relative;
    z-index: 1;
    line-height: 1.1;
}

#logo-suffix {
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #8A7050;
    display: block;
    margin-top: 2px;
}

/* --- Deco Divider --- */
.deco-divider {
    padding: 8px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.chevron-divider {
    width: 80%;
    height: auto;
}

/* --- Navigation --- */
#sidebar-nav {
    flex: 1;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.nav-item {
    display: block;
    padding: 12px 30px;
    text-decoration: none;
    color: #8A7050;
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    transition: color 0.3s ease, background 0.3s ease, padding-left 0.3s ease;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #C8A050;
    opacity: 0;
    transition: opacity 0.3s ease;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.nav-item:hover,
.nav-item.active {
    color: #C8A050;
    background: rgba(200, 160, 80, 0.05);
    padding-left: 38px;
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 1;
}

.nav-label {
    position: relative;
}

/* --- Sidebar Footer --- */
#sidebar-footer {
    padding: 15px 20px 25px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* --- Bar Label (Archivo Narrow) --- */
.bar-label {
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8A7050;
}

#sidebar-footer .bar-label {
    margin-top: 6px;
}

/* --- Main Content --- */
#main-content {
    margin-left: 260px;
    padding: 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    opacity: 0;
    transition: opacity 400ms ease 600ms;
}

body.loaded #main-content {
    opacity: 1;
}

/* --- Content Sections --- */
.content-section {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease;
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Section Header --- */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-fan-accent {
    width: 200px;
    height: auto;
    margin-bottom: 10px;
}

.section-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: clamp(24px, 3vw, 40px);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C8A050;
}

/* --- Panels (Art Deco Stepped Border) --- */
.deco-panel {
    background: #5A4830;
    padding: 30px;
    margin-bottom: 20px;
    position: relative;
    box-shadow:
        0 0 0 1px #C8A050,
        0 0 0 4px #2A2018,
        0 0 0 5px #C8A050;
}

/* --- Body Text --- */
.body-text {
    font-family: 'EB Garamond', serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: 1.75;
    color: #E8D8C0;
    margin-bottom: 12px;
}

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

/* --- Cards Row --- */
.cards-row {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

/* --- Card (Flip Interaction) --- */
.card {
    perspective: 1000px;
    flex: 1;
    min-width: 250px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    min-height: 280px;
    transition: transform 0.6s ease-in-out;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
    box-shadow:
        0 0 0 1px #C8A050,
        0 0 0 4px #2A2018,
        0 0 0 5px #C8A050;
}

.card-front {
    background: #5A4830;
}

.card-back {
    background: #1A1410;
    transform: rotateY(180deg);
    justify-content: flex-start;
    padding-top: 35px;
}

.card-deco-top {
    margin-bottom: 15px;
}

.card-fan-mini {
    width: 60px;
    height: auto;
}

.card-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C8A050;
    margin-bottom: 8px;
}

.card-subtitle {
    font-family: 'EB Garamond', serif;
    font-size: 16px;
    color: #8A7050;
    margin-bottom: 15px;
    font-style: italic;
}

.card-hint {
    margin-top: auto;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.card:hover .card-hint {
    opacity: 1;
}

.card-back .card-title {
    margin-bottom: 15px;
}

.card-back .body-text {
    font-size: 15px;
    text-align: center;
}

/* --- Cocktail Menu --- */
.cocktail-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cocktail-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cocktail-item:hover {
    transform: translateX(6px);
    box-shadow:
        0 0 0 1px #C8A050,
        0 0 0 4px #2A2018,
        0 0 0 5px #C8A050,
        8px 8px 24px rgba(0, 0, 0, 0.3);
}

.cocktail-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.cocktail-name {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #C8A050;
}

.cocktail-price {
    color: #8A7050;
    white-space: nowrap;
    margin-left: 16px;
}

/* --- Lounge Features --- */
.lounge-panel {
    margin-bottom: 30px;
}

.lounge-features {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    max-width: 200px;
    padding: 20px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-item .bar-label {
    color: #C8A050;
    font-size: 12px;
    margin-bottom: 6px;
}

.feature-detail {
    font-family: 'EB Garamond', serif;
    font-size: 14px;
    color: #8A7050;
    font-style: italic;
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1A1410;
}

::-webkit-scrollbar-thumb {
    background: #5A4830;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C8A050;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    #sidebar {
        width: 200px;
    }

    #main-content {
        margin-left: 200px;
        padding: 30px 20px;
    }

    #blob-container {
        left: 200px;
        width: calc(100% - 200px);
    }

    .cards-row {
        flex-direction: column;
    }

    .card {
        min-width: unset;
    }
}

@media (max-width: 600px) {
    #sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid rgba(200, 160, 80, 0.2);
    }

    #sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 10px;
    }

    .nav-item {
        padding: 8px 15px;
    }

    .nav-item::before {
        display: none;
    }

    .nav-item:hover,
    .nav-item.active {
        padding-left: 15px;
    }

    #sidebar-fan {
        display: none;
    }

    #sidebar-footer {
        display: none;
    }

    #main-content {
        margin-left: 0;
        padding: 25px 15px;
    }

    #blob-container {
        left: 0;
        width: 100%;
    }

    .lounge-features {
        flex-direction: column;
        align-items: center;
    }
}
