:root {
    --shochu-gold: #d4af37;
    --bar-navy: #050a1a;
    --font-serif: "Sawarabi Mincho", "Noto Serif JP", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: linear-gradient(rgba(15, 15, 20, 0.97), rgba(15, 15, 20, 0.97)), url('../images/oshimat_tsumugi_bg.png');
    background-repeat: repeat;
    background-size: 800px auto;
    background-attachment: fixed;
    color: #fff;
    font-family: "Noto Sans JP", sans-serif;
    overflow-x: hidden;
}

/* Remove component backgrounds for a unified look */
div[style*="background: rgba(255,255,255,0.05)"],
div[style*="background:rgba(255,255,255,0.05)"] {
    background: rgba(255, 255, 255, 0.02) !important; /* Extremely faint for legibility */
}


/* 1. HERO SECTION */
.p-bar-hero {
    position: relative;
    height: 100vh;
    min-height: 800px;
    overflow: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.p-bar-hero__layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center bottom;
    pointer-events: none;
}

.p-bar-hero__layer--back {
    background-image: url('../images/bar_layer_back.png');
    z-index: 1;
    filter: blur(1.5px) saturate(1.3) brightness(0.85);
}

.p-bar-hero__layer--mid {
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.p-bar-bartender-img {
    position: absolute;
    height: 105vh;
    width: auto;
    object-fit: contain;
    bottom: -5vh;
    left: 50%;
    transform: translateX(-50%) translateY(40px); /* Reduced from 110px for a subtler entrance */
    opacity: 0;
    transition: transform 2.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.8s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

/* Remove front image styles as it was deleted */

.p-bar-bartender-img--bow {
    z-index: 6;
}

.p-bar-bartender-img--open {
    z-index: 10;
    /* Match the bow position initially to avoid vertical jump at swap */
    transform: translateX(-50%) translateY(20px); 
    opacity: 0;
}

/* Exclusive State Animation Sequence */

/* State: Bow (Greeting) */
.p-bar-hero.is-state-bow .p-bar-bartender-img--bow {
    transform: translateX(-50%) translateY(20px);
    opacity: 1;
}

/* State: Final (Attentive Eye Contact) */
.p-bar-hero.is-state-final .p-bar-bartender-img--open {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    transition: opacity 1.5s ease-in-out, transform 2.0s cubic-bezier(0.19, 1, 0.22, 1);
}

.p-bar-hero.is-state-final .p-bar-bartender-img--bow {
    opacity: 0;
    transform: translateX(-50%) translateY(20px); /* Maintain position while fading to prevent sinking */
    transition: opacity 1.5s ease-in-out;
}

.p-scene-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: radial-gradient(circle at center, rgba(15, 15, 20, 0.98) 0%, rgba(0, 0, 0, 1) 100%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out;
}

.p-scene-transition.is-active {
    opacity: 1;
    pointer-events: auto;
}

.p-bar-hero__layer--front {
    background-image: url('../images/bar_counter_alpha.png');
    background-color: transparent;
    z-index: 20;
    top: auto; 
    bottom: 0;
    height: 40vh;
    background-size: 100% 100%;
    background-position: center bottom;
}

.p-bar-hero__overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.6) 100%);
    z-index: 15;
    pointer-events: none;
}

/* 2. VISUAL NOVEL DIALOGUE BOX */
.p-vn-box {
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 90%;
    max-width: 800px;
    background: transparent;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 8px;
    padding: 25px 40px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
    cursor: pointer;
}

.p-vn-box.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.p-vn-box__text {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    line-height: 1.8;
    color: #fff;
    min-height: 3.6em;
}

.p-vn-box__cursor {
    position: absolute;
    right: 20px;
    bottom: 15px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid var(--shochu-gold);
    display: none;
    animation: vn-blink 1s infinite;
}

.p-vn-box.is-finished .p-vn-box__cursor {
    display: block;
}

.p-vn-box.is-finished {
    cursor: pointer;
    transition: all 0.3s ease;
}

.p-vn-box.is-finished:hover {
    background: rgba(5, 10, 26, 0.95);
    border-color: var(--shochu-gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
}

.p-vn-box.is-finished:hover .p-vn-box__text {
    color: var(--shochu-gold);
}

@keyframes vn-blink {
    0%, 100% { opacity: 0; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(5px); }
}

.p-bar-hero__content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding-top: 35vh;
}

.p-bar-hero__copy {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.6;
    margin-bottom: 40px;
    letter-spacing: 0.2em;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9);
    color: #fff;
}

.p-bar-hero__btn {
    display: inline-block;
    padding: 18px 50px;
    border: 1px solid var(--shochu-gold);
    color: var(--shochu-gold);
    text-decoration: none;
    font-weight: bold;
    letter-spacing: 0.2em;
    background: rgba(0,0,0,0.4);
    transition: all 0.4s;
    backdrop-filter: blur(5px);
}

.p-bar-hero__btn:hover {
    background: var(--shochu-gold);
    color: #000;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212,175,55,0.3);
}

/* 2. TASTE MAP SECTION */
.p-search-map { padding: 120px 0; background: transparent; }
.p-search-map__inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.p-search-map__grid {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 80px auto;
    aspect-ratio: 1 / 1;
    border: 2px solid rgba(212,175,55,0.3);
    background: rgba(255,255,255,0.02);
    display: flex;
    flex-wrap: wrap;
}
.p-search-map__grid::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 2px; background: rgba(212,175,55,0.2); z-index: 1; }
.p-search-map__grid::after { content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 100%; background: rgba(212,175,55,0.2); z-index: 1; }

.p-search-map__markers {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.p-taste-marker {
    position: absolute;
    width: 12px; height: 12px;
    background: var(--shochu-gold);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 0 15px var(--shochu-gold);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.p-taste-marker:hover {
    transform: translate(-50%, -50%) scale(2);
    background: #fff;
    box-shadow: 0 0 25px #fff;
    z-index: 100;
}

.p-taste-marker__tooltip {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #050a1a;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.p-taste-marker:hover .p-taste-marker__tooltip {
    opacity: 1;
    visibility: visible;
    bottom: 35px;
}

.p-search-map__axis-label {
    position: absolute;
    width: 110px; height: 110px;
    background: #0a0e1a;
    border: 1px solid var(--shochu-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--shochu-gold);
    font-family: var(--font-serif);
    font-size: 1rem;
    z-index: 10;
    text-align: center;
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}
.p-search-map__axis-label.is-top { top: -55px; left: 50%; transform: translateX(-50%); }
.p-search-map__axis-label.is-bottom { bottom: -55px; left: 50%; transform: translateX(-50%); }
.p-search-map__axis-label.is-left { left: -55px; top: 50%; transform: translateY(-50%); }
.p-search-map__axis-label.is-right { right: -55px; top: 50%; transform: translateY(-50%); }

.p-search-map__quadrant {
    width: 50%; height: 50%; float: left;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.4s;
    text-align: center; padding: 20px;
}
.p-search-map__quadrant:hover { background: rgba(212,175,55,0.1); }
.p-search-map__quadrant-desc { 
    font-size: 1.4rem; 
    color: #fff; 
    font-family: var(--font-serif);
    line-height: 1.6;
    transition: all 0.3s ease;
    padding: 0 15px;
}
.p-search-map__quadrant:hover .p-search-map__quadrant-desc {
    color: var(--shochu-gold);
}

/* 3. BREWERY MAP SECTION */
/* Styles moved to components/brewery-map.php for better encapsulation */

/* UTIL */
.is-fullwidth { width: 100%; max-width: 100% !important; }

@media (max-width: 768px) {
    .p-search-map__grid { max-width: 90%; }
    .p-search-map__axis-label { width: 85px; height: 85px; font-size: 0.85rem; }
    .p-brewery-map__wrapper { aspect-ratio: 1 / 1; }
    .p-bar-hero__copy { font-size: 1.8rem; }
}

/* 4. FOOD PAIRING */
.p-food-pairing { padding: 120px 0; background: transparent; }

/* 5. HOW TO ENJOY */
.p-how-to-enjoy { padding: 120px 0; }

