/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    --bg-color: #0b0b0b;
    --text-color: #ffffff;
    --text-muted: #888888;
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #ffffff;
    --accent-hover: #cccccc;
    --font-serif: 'Cinzel', serif;
    --font-sans: 'Montserrat', sans-serif;
    --slide-width: 100vw;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    overflow: hidden; /* Prevent vertical scroll and standard horizontal scrollbars */
    width: 100vw;
    height: 100vh;
}

/* Header styling - Grid aligned for perfect balance */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, rgba(11,11,11,0.9) 0%, rgba(11,11,11,0) 100%);
    backdrop-filter: blur(5px);
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    grid-column: 2;
}

.logo-main {
    font-family: var(--font-sans);
    font-size: 1.8rem;
    font-weight: 300;
    letter-spacing: 12px;
    line-height: 1;
    margin-right: -12px; /* Offsets last letter spacing */
}

.logo-sub {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.3rem;
}

.logo-line {
    width: 25px;
    height: 1px;
    background-color: var(--text-color);
    opacity: 0.6;
}

.logo-since {
    font-family: var(--font-sans);
    font-size: 0.5rem;
    font-weight: 500;
    letter-spacing: 3px;
    opacity: 0.9;
}

.chapter-indicator {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Move to the left */
    gap: 0.2rem;
}

.chapter-indicator span:first-child {
    font-family: var(--font-serif);
    font-size: 0.9rem;
    letter-spacing: 4px;
    font-weight: 600;
}

.chapter-indicator .chapter-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 3px;
}

.nav-right {
    grid-column: 3;
    justify-self: end; /* Push to the right edge */
}

.nav-right .nav-link {
    font-size: 0.8rem;
    letter-spacing: 3px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.5rem;
    border-radius: 0px;
    transition: all 0.4s ease;
}

.nav-right .nav-link:hover {
    background-color: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Hide scrollbars globally on all scrollable views (Desktop & Mobile) */
html, body, .timeline-container, .chapters-overlay {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}
html::-webkit-scrollbar, body::-webkit-scrollbar, .timeline-container::-webkit-scrollbar, .chapters-overlay::-webkit-scrollbar {
    display: none !important;  /* Chrome, Safari, Opera */
}

/* Hide default cursor on timeline areas to showcase drag cursor */
.timeline-container, .slide {
    cursor: none;
}

/* Restores default pointer for standard interactive headers and footer areas */
.header, .timeline-navigation, .chapters-overlay, a, button, .tick, .chapter-trigger-slide {
    cursor: pointer !important;
}

/* Custom cursor formatting */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 999999;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.custom-cursor.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.cursor-ring {
    width: 14px;
    height: 14px;
    border: 1.5px solid #ffffff;
    border-radius: 50%;
}

.cursor-arrow {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #ffffff;
    font-weight: 300;
    user-select: none;
    transition: opacity 0.2s ease;
}

.cursor-arrow.left {
    margin-right: 6px;
}

.cursor-arrow.right {
    margin-left: 6px;
}


/* Large Background Year Indicator - Perfectly Centered */
.background-year-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
}

#bg-year {
    font-family: var(--font-serif);
    font-size: 25vw;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.025); /* Light premium luxury opacity */
    letter-spacing: -2px;
    user-select: none;
    text-align: center;
    line-height: 1;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    transform: scale(1);
    display: inline-block;
}

#bg-year.changing {
    opacity: 0;
    transform: scale(0.95);
}

/* Horizontal Scroll Container */
.timeline-container {
    display: flex;
    flex-direction: row;
    width: 100vw; /* Restricted to viewport width to allow horizontal overflow scroll */
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: auto;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

.timeline-container::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

/* Standard Slide Layout */
.slide {
    width: var(--slide-width);
    height: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 8rem 6rem;
    position: relative;
    z-index: 2;
}

/* Intro & Outro Slide Layouts */
.intro-slide, .outro-slide {
    justify-content: center;
    text-align: center;
}

.intro-content, .outro-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.intro-content .tagline {
    font-size: 0.9rem;
    letter-spacing: 6px;
    color: var(--text-muted);
}

.main-title, .outro-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: 4px;
    font-weight: 400;
}

.intro-desc, .outro-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    margin-top: 1rem;
}

.scroll-prompt {
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.6;
}

.scroll-prompt span {
    font-size: 0.7rem;
    letter-spacing: 3px;
}

.scroll-arrow {
    font-size: 1.5rem;
    animation: bounceRight 2s infinite ease-in-out;
}

@keyframes bounceRight {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.outro-btn {
    margin-top: 2rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 3px;
    color: var(--bg-color);
    background-color: var(--text-color);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.4s ease;
}

.outro-btn:hover {
    background-color: transparent;
    color: var(--text-color);
    box-shadow: inset 0 0 0 1px var(--text-color);
}

/* Story Slides Layout */
.story-slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.slide-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 420px;
}

.slide-date {
    font-family: var(--font-serif);
    font-size: 5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.slide-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 4px;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.slide-title {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    letter-spacing: 3px;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.slide-text {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
    font-weight: 300;
}

.slide-visual {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.watch-svg {
    max-width: 400px;
    max-height: 400px;
    animation: rotateSlow 40s linear infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.7));
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Slide Image Styles (replaces SVG watch graphics) */
.slide-image {
    width: 100%;
    max-width: 420px;
    height: auto;
    max-height: 75vh;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.5s ease;
}

/* Specific size for extra wide landscape images */
.large-landscape-image {
    max-width: 600px !important;
}

/* Specific smaller size for 2003 image */
.image-2003-small {
    max-width: 200px !important;
}

/* Specific smaller size for 1970 tall image */
.image-1970-small {
    max-width: 260px !important;
}



.back-to-start-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    padding: 15px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.back-to-start-btn .btn-icon {
    font-size: 18px;
    transition: transform 0.4s ease;
}

/* Hover Effects */
.back-to-start-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.back-to-start-btn:hover .btn-icon {
    transform: rotate(-360deg);
}

.back-to-start-btn:active {
    transform: scale(0.95);
}

.slide-image:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Smaller variant for images that appear too large */
.slide-image--sm {
    max-width: 400px;
    max-height: 60vh;
}

/* Vertical Sidebar Next/Prev Chapter Trigger Slide */
.chapter-trigger-slide {
    width: 320px;
    height: 100%;
    background-color: #ffffff; /* Contrast white for Next Chapter */
    color: #0b0b0b; /* Deep black text */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.4s ease, color 0.4s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
    padding: 0 2rem;
}

.chapter-trigger-slide:hover {
    /* background-color: #e5e5e5; */
}

.trigger-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    pointer-events: none;
}

.trigger-label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
}

.trigger-years {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    line-height: 1.4;
    word-spacing: 100vw; /* Forces years to wrap and stack vertically like the screenshot */
}

/* Previous Chapter Trigger Slide specific rules */
.prev-trigger {
    background-color: #ffffff; /* Faint charcoal for Prev Chapter */
    color: #000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
}
.prev-trigger:hover {
    /* background-color: #222222; */
}


/* Screen Sweep Panel Overlay */
.screen-sweep-overlay {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100%;
    background-color: #0b0b0b;
    z-index: 99999;
    pointer-events: none;
}

/* Animating classes for JS sweep */
.screen-sweep-overlay.sweep-in {
    left: 0;
    transition: left 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.screen-sweep-overlay.sweep-out {
    left: -100%;
    transition: left 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}


/* Bottom Timeline Navigation */
.timeline-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 4rem;
    background: linear-gradient(to top, rgba(11,11,11,0.9) 0%, rgba(11,11,11,0) 100%);
    z-index: 100;
}

.timeline-progress-wrapper {
    position: relative;
    width: 100%;
}

.timeline-progress-bg {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.15);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.1s ease-out;
}

.timeline-ticks {
    position: relative;
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tick {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transform: translateX(-50%);
}

.tick-mark {
    width: 2px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.tick:hover .tick-mark, .tick.active .tick-mark {
    background-color: var(--accent-color);
    height: 18px;
    width: 2px;
}

.tick-year {
    position: absolute;
    top: 22px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 1px;
    transition: color 0.3s ease, font-weight 0.3s ease;
}

.tick:hover .tick-year, .tick.active .tick-year {
    color: var(--text-color);
    font-weight: 600;
}

/* Chapters Overlay Menu */
.chapters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(11, 11, 11, 0.98);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    backdrop-filter: blur(10px);
}

.chapters-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.close-overlay-btn {
    position: absolute;
    top: 2.5rem;
    right: 4rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 3rem;
    cursor: pointer;
    font-weight: 300;
    line-height: 1;
}

.overlay-content {
    display: flex;
    gap: 8rem;
    max-width: 1000px;
    width: 90%;
}

.overlay-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.overlay-num {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: block;
}

.overlay-column h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    letter-spacing: 4px;
    font-weight: 400;
    margin-bottom: 0.2rem;
}

.overlay-years {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-bottom: 3rem;
}

.chapter-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chapter-links li a {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
}

.chapter-links li a:hover {
    color: var(--text-color);
    padding-left: 10px;
}

/* Mobile Timeline Drawer - Hidden on Desktop */
.mobile-timeline-drawer {
    display: none;
}

/* Tablet Responsiveness */
@media(max-width: 1024px) {
    .header {
        padding: 2rem;
    }
    .slide {
        padding: 6rem 3rem;
    }
    .story-slide {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    .slide-info {
        max-width: 100%;
        align-items: center;
    }
    .slide-date {
        font-size: 4rem;
    }
    .watch-svg {
        max-width: 300px;
        max-height: 300px;
    }
    .slide-image {
        max-width: 400px;
        max-height: 55vh;
    }
    .slide-image--sm {
        max-width: 300px;
        max-height: 45vh;
    }
    .overlay-content {
        flex-direction: column;
        gap: 4rem;
    }
    .timeline-navigation {
        padding: 2rem;
    }
}

/* Mobile & Small Screen Responsiveness */
@media(max-width: 768px) {
    body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto;
    }
    
    /* Disable mouse custom pointer on touchscreen devices */
    .custom-cursor {
        display: none !important;
    }
    
    .timeline-container {
        flex-direction: column;
        width: 100vw;
        height: auto;
        overflow-y: visible !important;
        overflow-x: hidden !important;
    }

    .slide {
        width: 100vw;
        height: auto;
        min-height: 100vh;
        padding: 10rem 1.5rem 5rem 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        cursor: auto;
    }
    
    .story-slide {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .slide-info {
        max-width: 100%;
        align-items: center;
    }
    
    .slide-visual {
        order: -1; /* Show watch graphics above the text on mobile */
        margin-bottom: 1rem;
        width: 100%;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .watch-svg {
        max-width: 250px;
        max-height: 250px;
    }
    .slide-image {
        max-width: 100%;
        max-height: 60vh;
        height: auto;
        object-fit: contain;
        border-radius: 4px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    }
    .slide-image--sm {
        max-width: 85%;
        max-height: 45vh;
    }
    
    .slide-date {
        font-size: 3.2rem;
        margin-bottom: 0.2rem;
    }
    
    .slide-subtitle {
        margin-bottom: 1.2rem;
    }

    .slide-title {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .slide-text {
        font-size: 0.85rem;
        line-height: 1.7;
    }
    
    /* Next/Prev Chapter Trigger Sidebar stacks as a block */
    .chapter-trigger-slide {
        width: 100vw;
        height: auto;
        padding: 5rem 1.5rem;
        writing-mode: horizontal-tb; /* Stack normal direction */
        border-left: none;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .trigger-years {
        word-spacing: normal; /* Normal wrap flow */
        font-size: 2rem;
    }

    .prev-trigger {
        border-right: none;
        border-left: none;
    }

    /* Fixed Header Responsive Alignment */
    .header {
        padding: 1rem 1.5rem;
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }
    
    .logo-main {
        font-size: 1.2rem;
        letter-spacing: 6px;
        margin-right: -6px;
    }
    
    .logo-line {
        display: none; /* Remove line details to fit on small mobile screens */
    }
    
    .chapter-indicator span:first-child {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    
    .chapter-indicator .chapter-subtitle {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
    
    .nav-right .nav-link {
        font-size: 0.65rem;
        padding: 0.4rem 0.8rem;
        letter-spacing: 1px;
    }

    /* Hide horizontal timeline bar on mobile */
    .timeline-navigation {
        display: none !important;
    }

    /* Large Background Year Indicator stays centered behind text */
    #bg-year {
        font-size: 35vw;
        opacity: 0.015;
    }

    /* Mobile Drawer Layout */
    .mobile-timeline-drawer {
        display: block;
        position: fixed;
        top: 0; /* Aligned to the very top, gap removed */
        left: 0;
        width: 100%;
        z-index: 999;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mobile-drawer-toggle {
        width: 100%;
        background-color: #161616; /* Clean B&W theme dark grey */
        color: #ffffff;
        border: none;
        padding: 0.8rem;
        font-family: var(--font-sans);
        font-size: 0.75rem;
        letter-spacing: 2px;
        font-weight: 600;
        cursor: pointer;
        text-align: center;
        text-transform: uppercase;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .mobile-drawer-content {
        display: none;
        height: calc(100vh - 7.6rem); /* Full height overlay below toggle */
        max-height: none;
        overflow-y: auto;
        background-color: #0b0b0b;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        /* Hide scrollbar */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    .mobile-drawer-content::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    
    .mobile-drawer-content.open {
        display: block;
    }
    
    .drawer-item {
        padding: 0.8rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }
    
    .drawer-item:active {
        background-color: #161616;
    }
    
    .drawer-item-year {
        font-family: var(--font-serif);
        font-size: 1.1rem;
        font-weight: 600;
        color: #ffffff;
    }
    
    .drawer-item-title {
        font-size: 0.7rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 1px;
        text-align: right;
        max-width: 60%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Responsive Chapters Overlay for Mobile */
    .chapters-overlay {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        overflow-y: auto !important;
        padding: 5rem 1.5rem 3rem 1.5rem !important;
    }
    
    .overlay-content {
        flex-direction: column !important;
        gap: 3rem !important;
        width: 100% !important;
    }

    .close-overlay-btn {
        position: fixed !important;
        top: 1rem !important;
        right: 1.5rem !important;
        z-index: 10001;
    }
}

