@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;700&family=Noto+Sans+TC:wght@300;400&display=swap');

:root {
    --gold: #d4af37;
    --navy-dark: #0a1118;
    --text-light: #f5eedc;
}

body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--navy-dark);
    font-family: 'Noto Sans TC', sans-serif;
    color: var(--text-light);
    /* The Magic: Forces cinematic snapping section by section */
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Noto Serif TC', serif;
    font-weight: 300;
}

/* --- Global Ambient Audio Button --- */
.ambient-audio {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: rgba(10, 17, 24, 0.6);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    font-size: 0.8rem;
}

.ambient-audio:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

/* --- Cinematic Sections --- */
.scene {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Parallax Backgrounds --- */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1;
}

.parallax-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 17, 24, 0.9) 0%, rgba(10, 17, 24, 0.3) 50%, rgba(10, 17, 24, 0.8) 100%);
}

/* --- Narrative Content Boxes --- */
.scene-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    padding: 40px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeUp 1.5s forwards;
    animation-delay: 0.5s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scene-subtitle {
    font-size: 1rem;
    letter-spacing: 8px;
    color: var(--gold);
    text-transform: uppercase;
    display: block;
    margin-bottom: 20px;
}

.scene-title {
    font-size: 4rem;
    margin: 0 0 30px 0;
    letter-spacing: 5px;
    line-height: 1.2;
}

.scene-text {
    font-size: 1.2rem;
    line-height: 2;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-align: center;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-15px) translateX(-50%);
    }

    60% {
        transform: translateY(-7px) translateX(-50%);
    }
}

/* --- Immersive Hotel Accordion (CSS Only) --- */
.hotel-gallery {
    display: flex;
    width: 100vw;
    height: 100vh;
    z-index: 2;
}

.hotel-panel {
    flex: 1;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: flex 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    overflow: hidden;
}

.hotel-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: background 0.6s ease;
}

.hotel-panel:hover {
    flex: 4;
    /* Expands dynamically on hover */
}

.hotel-panel:hover::before {
    background: rgba(0, 0, 0, 0.2);
}

.hotel-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    right: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease 0.2s;
}

.hotel-panel:hover .hotel-info {
    opacity: 1;
    transform: translateY(0);
}

/* --- Split-Screen Editorial Grid --- */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100vw;
    height: 100vh;
}

.split-image {
    background-size: cover;
    background-position: center;
}

.split-text-box {
    background: #0f1922;
    padding: 10% 12%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    border-left: 1px solid rgba(212, 175, 55, 0.2);
}

/* --- CSS-Only Logistics Accordion --- */
.logistics-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.accordion-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.accordion-trigger {
    display: none;
    /* Hide standard checkbox */
}

.accordion-label {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    font-family: 'Noto Serif TC', serif;
    font-size: 1.2rem;
    color: var(--gold);
    cursor: pointer;
}

.accordion-label::after {
    content: '＋';
    transition: transform 0.3s;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* The Magic Trick: When checked, expand content and rotate icon */
.accordion-trigger:checked~.accordion-content {
    max-height: 1000px;
    padding-bottom: 20px;
}

.accordion-trigger:checked~.accordion-label::after {
    content: '－';
}

@media (max-width: 768px) {
    .split-grid {
        grid-template-columns: 1fr;
    }

    .split-image {
        height: 35vh;
    }

    .split-text-box {
        padding: 30px;
        height: 65vh;
    }
}

/* --- Micro-Timeline (At a Glance) --- */
.timeline-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.timeline-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.timeline-badge:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

/* --- Gastronomy Feature Grid --- */
.taste-card {
    background: #0d161f;
    border: 1px solid #1a2633;
    border-radius: 8px;
    padding: 25px;
    text-align: left;
}

.taste-meta {
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Self-Hosted Download Portal --- */
.download-box {
    background: linear-gradient(135deg, #111c26 0%, #080f14 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 12px;
    padding: 40px;
    max-width: 700px;
    margin: 40px auto 0 auto;
    display: flex;
    align-items: center;
    gap: 30px;
    text-align: left;
}

.download-icon {
    font-size: 3rem;
    color: var(--gold);
}

.btn-outline {
    border: 1px solid var(--gold);
    color: var(--gold);
    background: transparent;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-outline:hover {
    background: var(--gold);
    color: var(--navy-dark);
}

@media (max-width: 768px) {
    .download-box {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
}

/* --- Long-Scrolling Scene Override --- */
.scene-long {
    min-height: 100vh;
    /* Allows content to push height beyond 1 screen */
    height: auto;
    width: 100vw;
    scroll-snap-align: start;
    position: relative;
    background-color: #080f14;
    padding: 100px 0;
    box-sizing: border-box;
}

.scene-long::before {
    content: '';
    position: absolute;
    inset: 0;
    /* This gradient creates a vignette: solid dark at the top/bottom, semi-transparent in the middle */
    background: linear-gradient(to bottom, #080f14 0%, rgba(8, 15, 20, 0.5) 15%, rgba(8, 15, 20, 0.5) 85%, #080f14 100%);
    z-index: 0;
    pointer-events: none;
}

.scene-long>div {
    position: relative;
    z-index: 1;
    /* Pops the text and timeline above the background overlay */
}

/* --- Vertical Timeline Structure (FLEXBOX FIX) --- */
.timeline-container {
    max-width: 1000px;
    margin: 60px auto 0;
    position: relative;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* The Glowing Central Line */
.timeline-container::after {
    content: '';
    position: absolute;
    width: 2px;
    background: rgba(212, 175, 55, 0.2);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    /* Perfectly centers the line */
    z-index: 0;
}

/* Timeline Nodes (Flex Containers) */
.timeline-node {
    display: flex;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
    z-index: 1;
}

.timeline-node:nth-child(odd) {
    justify-content: flex-start;
    /* Aligns left side */
}

.timeline-node:nth-child(even) {
    justify-content: flex-end;
    /* Aligns right side */
}

/* The Content Cards Wrapper */
.timeline-card-wrapper {
    width: 50%;
    position: relative;
    padding: 0 40px;
    /* Safe padding away from the line */
    box-sizing: border-box;
}

/* The Gold Marker Dots */
.timeline-card-wrapper::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: #080f14;
    border: 3px solid var(--gold);
    border-radius: 50%;
    top: 45px;
    z-index: 2;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.timeline-node:nth-child(odd) .timeline-card-wrapper::after {
    right: -11px;
    /* Centers dot on the right edge of the 50% wrapper */
}

.timeline-node:nth-child(even) .timeline-card-wrapper::after {
    left: -11px;
    /* Centers dot on the left edge of the 50% wrapper */
}

/* Timeline Content Cards */
.timeline-content-card {
    background: linear-gradient(145deg, #111c26 0%, #0d161f 100%);
    border: 1px solid #1a2633;
    border-radius: 8px;
    padding: 30px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.timeline-content-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.4);
}

.timeline-date {
    color: var(--gold);
    font-family: 'Noto Serif TC', serif;
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: block;
}

.timeline-location {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* Gastronomy Highlight Tag inside Timeline */
.gastronomy-highlight {
    background: rgba(212, 175, 55, 0.08);
    border-left: 3px solid var(--gold);
    padding: 12px 15px;
    margin-top: 20px;
    border-radius: 0 4px 4px 0;
}

.gastronomy-highlight strong {
    color: var(--gold);
    font-size: 0.85rem;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .timeline-container::after {
        left: 30px;
        transform: none;
    }

    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        justify-content: flex-end;
        /* Force everything to the right side */
    }

    .timeline-card-wrapper {
        width: 100%;
        padding-left: 60px;
        /* Make room for the line on the left */
        padding-right: 0;
    }

    .timeline-node:nth-child(odd) .timeline-card-wrapper::after,
    .timeline-node:nth-child(even) .timeline-card-wrapper::after {
        left: 19px;
        /* Align all dots over the left-aligned line */
        right: auto;
    }
}

/* =========================================
   VERTICAL DOT NAVIGATOR
   ========================================= */
.vertical-nav {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(212, 175, 55, 0.5);
    /* Faded Gold */
    position: relative;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-dot:hover,
.nav-dot:active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.2);
}

/* Hover Label (Tooltip) */
.nav-dot::before {
    content: attr(data-label);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 0.85rem;
    font-family: 'Noto Serif TC', serif;
    letter-spacing: 2px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.nav-dot:hover::before {
    opacity: 1;
    right: 30px;
    /* Slides in slightly on hover */
}

/* Active State for the Current Section */
.nav-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.2);
}

/* Keep the label permanently visible for the active section */
.nav-dot.active::before {
    opacity: 1;
    right: 30px;
}

/* Hide on Mobile (Screen is too narrow for a right-side panel) */
@media (max-width: 768px) {
    .vertical-nav {
        display: none;
    }
}

/* =========================================
   FLOATING AUDIO CONTROLLER
   ========================================= */
.audio-toggle-btn {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 9999;
    background: rgba(13, 22, 31, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 30px;
    padding: 10px 20px;
    color: var(--gold);
    /* --- NEW FONT SETTINGS --- */
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    /* Makes it say "SOUND ON" instead of "Sound On" */
    /* ------------------------- */
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-toggle-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
}

.audio-icon {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .audio-toggle-btn {
        top: auto;
        right: auto;
        bottom: 20px;
        left: 20px;
        padding: 8px 15px;
        font-size: 0.75rem;
    }
}

/* =========================================
   SITE FOOTER / DISCLAIMER
   ========================================= */
.site-footer {
    background-color: #05090c;
    /* Slightly darker than the main background */
    text-align: center;
    padding: 40px 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    /* THE SCROLL BUG FIX */
    scroll-snap-align: end;
}

.site-footer p {
    color: rgba(255, 255, 255, 0.3);
    /* Muted so it doesn't distract */
    font-size: 0.75rem;
    letter-spacing: 1px;
    margin: 0;
    line-height: 1.6;
    font-family: 'Noto Serif TC', serif;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 15px;
    }

    .site-footer p {
        font-size: 0.7rem;
    }
}

/* =========================================
   FIXED MINI DISCLAIMER
   ========================================= */
.fixed-disclaimer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
    background: rgba(8, 15, 20, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2px;
    font-family: 'Noto Serif TC', serif;
    pointer-events: none;
    /* Prevents it from blocking clicks on elements underneath it */
    white-space: nowrap;
    /* NEW: Add smooth transition for the fade effect */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 1;
    visibility: visible;
}

/* NEW: The class JavaScript will apply when the footer is visible */
.fixed-disclaimer.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* =========================================
   HIDDEN YOUTUBE PLAYER
   ========================================= */
#youtube-audio-player {
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* Mobile Adjustment: Move it to the top so it doesn't crowd the audio button */
@media (max-width: 768px) {
    .fixed-disclaimer {
        top: 15px;
        right: 15px;
        left: auto;
        transform: none;
        bottom: auto;
        padding: 4px 10px;
        font-size: 0.6rem;
    }
}

/* =========================================
   FIXED MOMENTS BUTTON
   ========================================= */
.moments-btn {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 9999;
    background: linear-gradient(135deg, #5c3a21, #3b2210);
    border: 2px solid #a67c52;
    border-radius: 8px;
    padding: 10px 18px;
    color: #fcece1;
    font-family: 'Noto Serif TC', serif;
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    transition: all 0.3s ease;
}

.moments-btn:hover {
    background: linear-gradient(135deg, #744b2c, #4a2d17);
    border-color: #d4af37;
    transform: translateY(-2px) rotate(-1deg);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .moments-btn {
        top: 15px;
        left: 15px;
        padding: 8px 12px;
        font-size: 0.75rem;
    }
}

/* =========================================
   MOBILE OPTIMIZATION (Max Width: 768px)
   ========================================= */
@media (max-width: 768px) {

    /* 1. Viewport Fix & Typography */
    .scene,
    .hotel-gallery,
    .split-grid {
        height: 100vh;
        height: 100svh;
        /* Fixes mobile address bar jumping */
    }

    .scene-title {
        font-size: 2.2rem !important;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .scene-text {
        font-size: 1rem;
        line-height: 1.7;
    }

    .scene-subtitle {
        font-size: 0.8rem;
        letter-spacing: 4px;
    }

    /* 2. Override Inline Cinematic Alignments for Readability */
    .scene-content {
        padding: 20px !important;
        width: 100%;
        box-sizing: border-box;
        text-align: center !important;
        /* Forces all text to center on mobile */
        margin: 0 auto !important;
    }

    /* 3. Touch-Friendly Hotel Accordion */
    .hotel-gallery {
        flex-direction: column;
        /* Stacks the hotels vertically */
    }

    .hotel-panel {
        flex: 1;
        /* Gives them equal height */
    }

    .hotel-panel:hover,
    .hotel-panel:active {
        flex: 1.5;
        /* Subtle expansion on tap rather than huge jump */
    }

    .hotel-info {
        bottom: 15px;
        left: 15px;
        right: 15px;
        opacity: 1;
        /* Always show text because there is no hover on mobile */
        transform: translateY(0);
    }

    .hotel-info h3 {
        font-size: 1.3rem;
        margin: 5px 0;
    }

    .hotel-info p {
        font-size: 0.8rem;
        display: none;
        /* Hides the paragraph to save space */
    }

    .hotel-panel:hover .hotel-info p,
    .hotel-panel:active .hotel-info p {
        display: block;
        /* Reveals paragraph only when tapped */
    }

    /* 4. Split-Screen Editorial Fix */
    .split-grid {
        display: flex;
        flex-direction: column;
    }

    .split-image {
        height: 35vh;
    }

    .split-text-box {
        height: 65vh;
        padding: 30px 20px;
        text-align: center;
        border-left: none;
        border-top: 1px solid rgba(212, 175, 55, 0.2);
    }

    .split-text-box h3 {
        font-size: 1.6rem;
    }

    .split-text-box p {
        font-size: 0.9rem;
    }

    /* 5. Timeline Formatting Enhancements */
    .timeline-container {
        margin-top: 30px;
    }

    .timeline-content-card {
        padding: 20px;
    }

    .timeline-date {
        font-size: 1.2rem;
    }

    .gastronomy-highlight {
        padding: 10px;
        margin-top: 15px;
    }

    /* 6. Pricing & Download Box */
    .download-box {
        padding: 25px 15px;
    }

    .btn-outline {
        font-size: 0.85rem;
        padding: 12px 15px;
        white-space: normal;
    }

    /* Disable fixed background attachment for mobile */
    .parallax-bg {
        background-attachment: scroll !important;
    }

    .scene-long {
        background-attachment: scroll !important;
    }

    /* Unshackle the booking section height constraint */
    #booking {
        height: auto !important;
        min-height: 100svh;
        overflow: visible !important;
        padding: 60px 0 40px 0 !important;
        /* Adds breathing room at top and bottom */
    }

    /* Target and scale down the heavy inline elements within booking */
    #booking .scene-content {
        display: flex;
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}