html, body {
    overflow-x: clip;
}

body { background: #000; color: #fff; margin: 0; padding: 0; }

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    opacity: .7;
}
#logo {opacity: 1;}

.year-rail a:focus {
    border: none !important;
}

/* LEFT YEAR NAV */
.year-rail-wrapper {
    width: 100%;
    height: 100%;
}
.year-rail::-webkit-scrollbar {
    display: none;
}
.year-rail {
    position: sticky;
    top: 120px;
    width: 90px;
    max-height: 80vh;
    overflow: auto;
    flex-shrink: 0;
    height: max-content;
}

.year-rail ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.year-rail li a {
    color: #fff;
    text-decoration: none;
    /*opacity: 0.25;*/
    transition: opacity 0.3s ease, font-weight 0.3s ease;
    cursor: pointer;
    font-size: 16px;
}

.year-rail li.active a {
    /*opacity: 1;*/
    text-shadow: 0 0 2px #ffffff;
	color: #ffdf00;
	font-weight: 700;
}

.timeline-wrapper {
    position: relative;
    margin: 0 auto;
    padding: 120px 0 200px;
}

html:not(.is-ios-legacy) .timeline-wrapper {
    display: grid;
    grid-template-columns: 120px  1fr;
    gap: 20px;
}

html.is-ios-legacy .year-rail-wrapper {
    display: none;
}


/* TIMELINE CONTENT */
.timeline-content {
    flex: 1;
}

.timeline-panel {
    transition: opacity 0.3s ease;
    position: relative;
}

.timeline-panel.active {
    opacity: 1;
}

.scrolling-panel .timeline-panel.active .panel-year {
    opacity: 1;
    transform: scale(1.05);
}

.timeline-panel.active .panel-image img,
.timeline-panel.active .panel-content {
    opacity: 1;
}

.timeline-panel.active .panel-text {
    opacity: 1;
    transform: translateY(0);
}

.timeline-panel.active .dot-icon {
    opacity:1;
    transform:translate(-50%,-50%) scale(1.15);
    background:#f5c400;

}
.timeline-panel.active .dot-year{
    opacity:1;
}

/* dot item */
.dot-item {
    position: relative;
    height: 100%;
    min-height: 1px;
    display:flex;
    align-items:start;
    justify-content:center;
}

.dot-item:after {
    content: '';
    position: absolute;
    right: 60px;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 1px;
    background: #fff;
}

/* yellow dot on the line */
.dot-icon{
    position:absolute;
    left: calc(50% + 4px);
    top:80px;
    width:20px;
    height:20px;
    border-radius:50%;
    transform:translate(-50%,-50%);
    background:#a48302;
    transition: opacity .3s ease, transform .3s ease;
    z-index: 10;
}

/* small year label near the line (left side like in screenshot) */
.dot-year{
    position:absolute;
    right: calc(50% + 30px);
    top:80px;
    transform: translateY(-50%);
    font-size: 16px;
    letter-spacing: .02em;
    opacity: .65;
    white-space: nowrap;
}


.timeline-panel.active .panel-text{
    opacity: 1;
    transform: translateY(0);
}

.scrolling-panel .timeline-content .panel-year {
    font-size: 80px;
    font-weight: 700;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    text-align: left;
    user-select: none;
    padding-left: 12px;
    color: #383838;
    margin-bottom: 0;
}

html:not(.is-ios-legacy) .panel-image img,
html:not(.is-ios-legacy) .panel-content {
    opacity: 0.2;
    transition: opacity 0.3s, transform 0.3s;
}

.panel-content {
    font-size: 18px;
    line-height: 120%;
    padding-bottom: 40px;
}


.panel-grid{
    display:grid;
    grid-template-columns: minmax(200px, 1fr) 130px 1fr;
    align-items:start;
    gap: 50px;
    max-width: 92%;
}

.panel-image {
    width: 100%;
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
    padding-top: 50px;
    justify-content: flex-end;
}

.panel-image:not(:has(img)) {
    background: #383838;
    min-height: 400px;
}

.panel-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.panel-text {
    /*opacity: 0;*/
    /*transform: translateY(40px);*/
    transition: opacity 0.4s ease,
    transform 0.4s ease;
    font-size: 16px;
    line-height: 1.6;
    color: #ddd;
    padding: 10px 0;
}

html:not(.is-ios-legacy) .panel-text {
    opacity: 0;
    transform: translateY(40px);
}


.panel-text ul {padding-left: 18px;}


html:not(.is-ios-legacy) .panel-image {
    opacity: 0;
    transform: translateX(-60px);
    will-change: transform, opacity;
}


@media (min-width: 1440px) {
    .scrolling-panel .timeline-content .panel-year {
        font-size: 120px;
    }
}


#preloader {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #fff;
    border-top: 4px solid #FFDF00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.scrolling-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 60px 30px;
    will-change: transform, opacity;
}

/* Initial animation styles */

.animate-subtitle {
    opacity: 0;
    transform: translateY(50px);
}

.scrolling-panel {width: 100%; height: 100vh; display: flex; align-items: center; flex-wrap: wrap; padding: 50px; overflow: visible;}
.scrolling-panel.black {background: #000;}
.scrolling-panel.black * {color: #FFF;}
.scrolling-panel h1 {font-weight: 700 !important; font-size: 90px; line-height: 100%;}

.scrolling-panel .header {text-align: left;}

.animate-subtitle {
    opacity: 0;
    transform: translateY(-50px);
}

.scrolling-panel p {font-size: 22px;}

.scrolling-panel.intro-panel {display: block; height: auto !important;}
.scrolling-panel.intro-panel h1 {font-weight: 700 !important; font-size: 78px; line-height: 115%; margin: 40px 0 0;}
.scrolling-panel.intro-panel .header p {max-width: 700px; font-size: 18px; font-weight: 300; opacity: 0;}


/* ============================================
TABLET STYLES (768px - 1024px)
============================================ */
/* RESPONSIVE */
@media (max-width: 1023px) {
    .scrolling-panel {
        padding: 40px 30px;
    }

    .scrolling-panel h1 {
        font-size: 60px;
    }

    .scrolling-panel div.timeline-wrapper {
        display: flex;
        flex-direction: column;
        padding: 0 20px 60px;
    }

    .scrolling-panel .year-rail-wrapper {
        position: sticky;
        top: 130px;
        padding-top: 0;
        height: max-content;
        background: #000;
        z-index: 100;
        padding-bottom: 10px;
        opacity: 0.7;
    }


    .scrolling-panel .year-rail {
        position: static;
        width: 100%;
        transform: none;
        margin-bottom: 0;
        padding-top: 0;
        top: 0;
        opacity: 0.7;
    }
    .scrolling-panel .year-rail ul { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 16px; }
    /*.timeline-content { max-width: 100%; }*/
    /*.panel-grid { grid-template-columns: 1fr; gap: 40px; }*/

    .timeline-wrapper .panel-text {
        padding: 60px 0;
    }

    .timeline-wrapper .panel-grid {
        gap: 30px;
    }

    html.is-ios-legacy .panel-image,
    html.is-ios-legacy .panel-text,
    html.is-ios-legacy .panel-image img,
    html.is-ios-legacy .panel-content{
        opacity: 1;
    }
}

@media (min-width: 768px) {
    .panel-image img {
        width: 100%;
        height: 100%;
        /*height: auto;*/
        display: block;
        object-fit: cover;
        max-width: 400px;
        aspect-ratio: 10/9;
        border-radius: 12px;
        overflow: hidden;
    }
}


/* ============================================
MOBILE STYLES (max-width: 767px)
============================================ */
@media (max-width: 767px) {

    .scrolling-panel p {
        font-size: 16px;
    }

    .panel-content {
        padding-bottom: unset;
    }
    /* dot item */
    .dot-item {
        align-items:center;
    }
    .panel-grid{
        align-items:center;
    }

    .panel-image {
        padding-top: unset;
    }

    /* Intro panel mobile */
    .scrolling-panel.intro-panel {
        padding: 80px 20px 40px;
    }

    .scrolling-panel.intro-panel h1 {
        font-size: 32px;
        margin: 50px 0 20px;
        transform: translateY(0px);
        opacity: 1;
    }

    .scrolling-panel.intro-panel .header p.subtitle {
        font-size: 18px;
        max-width: 100%;
        opacity: 1;
    }

    html.is-ios-legacy .timeline-wrapper .panel-text {
        transform: translateY(0);
    }

    .timeline-wrapper .panel-grid{
        grid-template-columns: 60px 1fr;
        grid-template-areas:
      "axis image"
      "axis text";
        gap: 0 16px;
        max-width: 100%;
        align-items: start;
    }

    html:not(.is-ios-legacy) .timeline-wrapper .panel-grid{
        grid-template-columns: 0 1fr;
    }

    .timeline-wrapper .panel-image{
        grid-area: image;
        max-height: 200px;
        justify-content: flex-start;
    }

    .timeline-wrapper .panel-text{ grid-area: text; padding: 24px 0 40px; }

    .timeline-wrapper .dot-item{
        grid-area: axis;
        align-self: stretch;
        justify-content: center;
        min-height: 100%;
    }

    html:not(.is-ios-legacy) .timeline-wrapper .dot-item{
        display: none;
    }

    .timeline-wrapper .dot-item::after{
        left: 50%;
        top: 0;
        bottom: 0;
    }

    .timeline-wrapper .dot-icon{
        top: 28px;
        left: 50%;
    }

    .timeline-wrapper .dot-year{
        top: 18px;
        right: auto;
        left: 10px;
        transform: translate(-100%, 0);
    }


    .timeline-wrapper .panel-image{
        min-height: 220px;
    }

    .timeline-wrapper .panel-image img{
        width: 100%;
        height: auto;
        display: block;
    }

    .timeline-wrapper .year-rail-wrapper {
        position: static;
        padding-top: 0;

    }

    html:not(.is-ios-legacy) .scrolling-panel .timeline-wrapper .year-rail {
        opacity: 1;
        height: calc(100vh - 70px);
        overflow-y: auto;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper {
        display: grid;
        grid-template-columns: 80px 1fr;
        gap: 0 16px;
        max-width: 100%;
        align-items: start;
        padding-left: 0;
        padding-right: 0;
    }

    /*.timeline.scrolling-panel .year-rail-wrapper{*/
    /*    position: sticky;*/
    /*    top: 70px;*/
    /*    height: calc(100vh - 70px);*/
    /*    overflow: hidden;*/
    /*    padding-top: 0;*/
    /*}*/

    html:not(.is-ios-legacy) .timeline.scrolling-panel .year-rail-wrapper{
        position: sticky;
        top: 130px;
        height: calc(100vh - 130px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    html:not(.is-ios-legacy) .scrolling-panel .timeline-wrapper .year-rail {
        height: auto;
        overflow: visible;
    }
    html:not(.is-ios-legacy) .timeline.scrolling-panel .year-rail-wrapper::-webkit-scrollbar { display: none; }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper ul {
        position: relative;
        height: min-content;
        padding: 30px 8px;
        right: 15px;
        min-height: 1px;
        display: grid;
        /*flex-direction: column;*/
        /*align-items: center;*/
        /*justify-content: center;*/
        gap: 22vh;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper ul:after  {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        height: 100%;
        width: 1px;
        background: #fff;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper ul li {
        position: relative;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper ul li:after {
        content: '';
        position: absolute;
        right: -31px;
        top: 0;
        bottom: 0;
        width: 20px;
        height: 20px;
        min-width: 20px;
        background: #a48302;
        border-radius: 50%;
        transition: opacity 0.3s ease, transform 0.3s ease;
        z-index: 10;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper .year-rail li a {
        padding-left: 4px;
    }

    html:not(.is-ios-legacy) .timeline.scrolling-panel .timeline-wrapper .year-rail-wrapper ul li.active:after {
        transform: scale(1.15);
        background: #f5c400;
    }

}

@media (max-width: 400px) {
    .scrolling-panel .timeline-panel.active .panel-year {
        font-size: 60px;
    }
}

@media (min-width: 1024px) {
    .year-rail li a:hover {
        text-shadow: 0 0 2px #ffffff
    }
}


