:root {
    --masan-blue: #00447C;
    --masan-white: #FFFFFF;
    --masan-font-display: 'Bodoni Moda', serif;
    --masan-font-sans: 'Arial', sans-serif;
    --masan-font-mono: 'Courier Prime', monospace;
    --masan-font-cursive: 'Mrs Saint Delafield', cursive;
    --section-height: 100vh;
}

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

body {
    font-family: var(--masan-font-sans);
    color: var(--masan-white);
    background: #000;
    overflow-x: hidden;
    line-height: 1.4;
}

/* Full Viewport Sections */
.slide {
    height: var(--section-height);
    width: 100%;
    position: relative;
    background-size: 120% 120%;
    /* Increased bleed for stronger parallax */
    background-position: center center;
    background-repeat: no-repeat;
    scroll-snap-align: start;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

@media (max-width: 1024px) {
    .slide {
        height: auto;
        min-height: 100vh;
        scroll-snap-align: none;
        overflow-x: hidden;
        background-size: cover;
    }

    .content {
        height: auto;
        min-height: 100vh;
    }

    .left-bar-panel {
        height: auto;
        /*min-height: 100vh;*/
    }
}




.content {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    padding: 6rem 4rem;
}

/* Backgrounds */
#section-1 {
    background-image: url('assets/slide1.jpg');
}

#section-2 {
    background-image: url('assets/slide2.jpg');
}

#section-3 {
    background-image: url('assets/slide3.jpg');
}

#section-4 {
    background-color: var(--masan-blue);
}

#section-5 {
    background-image: url('assets/slide5.jpg');
}

#section-6 {
    background-image: url('assets/slide6.jpg');
}

#section-7 {
    background-color: var(--masan-blue);
}

/* Slide 1 Layout */
.slide-1-layout {
    padding: 0;
    max-width: 100%;
}

.left-bar-panel {
    background-color: rgba(255, 255, 255, 0.7);
    width: 38%;
    height: 100%;
    padding: 5rem 4rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.logo-placeholder {
    width: 65%;
    margin-bottom: auto;
}

.timeline-container {
    display: flex;
    align-items: center;
    position: absolute;
    bottom: 5rem;
    left: 4rem;
    width: calc(100vw * 0.7);
    z-index: 10;
}

.timeline-line {
    height: 2px;
    background-color: var(--masan-white);
    flex-grow: 1;
    margin: 0 1rem;
    position: relative;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: 0.8s;
}

.slide.visible .timeline-line {
    transform: scaleX(1);
}

.timeline-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid var(--masan-white);
}

/* Slide 2 Layout */
.split-vertical {
    flex-direction: row;
    justify-content: space-between;
}

.left-col {
    justify-content: flex-start;
    margin-top: 10vh;
}

.right-col {
    justify-content: flex-start;
    margin-top: 30vh;
    text-align: right;
}

.bottom-center {
    position: absolute;
    bottom: 4rem;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.pill-badge {
    background-color: var(--masan-blue);
    color: var(--masan-white);
    font-family: var(--masan-font-mono);
    font-size: 1.2rem;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    letter-spacing: 0.1em;
}

.slide-1-label-pos {
    bottom: 7rem;
    /* Clear the timeline */
}

/* Slide 3 Layout */
.slide-3-layout {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.slide-3-layout .left-box {
    width: 50%;
}

.slide-3-layout .right-box {
    width: 40%;
}

/* Slide 4 Layout */
.slide-align-top {
    justify-content: flex-start;
    align-items: center;
    padding-top: 8rem;
}

.full-width {
    max-width: 1000px;
}

/* Slide 4 Layout */
.slider-viewport {
    position: relative;
    width: calc(100% + (100vw - 100%) / 2 + 4rem);
    margin-right: calc((100vw - 100%) / -2 - 4rem);
}

.polaroid-row {
    display: flex;
    justify-content: flex-start;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 4rem;
    /* Snapping padding */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    padding: 1rem 10vw 3rem 0;
    /* Huge padding on the right to allow final card to clear */
    cursor: grab;
}

.polaroid-row:active {
    cursor: grabbing;
}

.polaroid-row.is-dragging {
    scroll-snap-type: none;
    scroll-behavior: auto;
}

.polaroid-row::after {
    content: '';
    flex: 0 0 1px;
    /* Empty spacer to help with padding-right bug in some browsers */
}

/* Hide scrollbar */
.polaroid-row::-webkit-scrollbar {
    display: none;
}

.polaroid-row {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.polaroid-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    background: white;
    padding: 15px 15px 30px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 320px;
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-user-drag: none;
}

.polaroid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.polaroid-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #eee;
    overflow: hidden;
}

.polaroid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10;
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slider-btn svg {
    transition: transform 0.3s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.slider-btn.prev:hover svg {
    transform: translateX(2px);
}

.slider-btn.next:hover svg {
    transform: translateX(2px);
}

.slider-btn.prev {
    left: -80px;
}

.slider-btn.next {
    right: -80px;
}

@media (max-width: 1600px) {
    .slider-btn.prev {
        left: -40px;
    }
    .slider-btn.next {
        right: -40px;
    }
}

.mobile-slider-nav {
    display: none;
}

@media (max-width: 1024px) {
    .slider-btn {
        display: none;
    }

    /* Use touch scroll on mobile/tablet */
    .polaroid-row {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .mobile-slider-nav {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .mobile-slider-btn {
        background: rgba(255, 255, 255, 0.2);
        border: none;
        color: white;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        backdrop-filter: blur(8px);
        transition: all 0.3s ease;
    }

    .mobile-slider-btn:active {
        background: rgba(255, 255, 255, 0.4);
        transform: scale(0.9);
    }
}



/* Slide 5 Layout */
.blue-polygon {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: var(--masan-blue);
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
    z-index: 1;
}

.slide-5-layout {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.left-polygon-content {
    width: 40%;
    padding-left: 2rem;
}

.right-polaroids {
    width: 50%;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.small-polaroid {
    width: 240px;
}

.small-polaroid .polaroid-img {
    aspect-ratio: 1 / 1;
    height: auto;
}

.offset-y {
    transform: translateY(40px);
}

.dark-text {
    color: #333;
}

.fade-more {
    opacity: 0.5;
}

/* Slide 6 Layout */
.slide-6-layout {
    justify-content: space-between;
}

.top-title {
    margin-top: 5vh;
}

.bottom-split {
    display: flex;
    justify-content: space-between;
    width: 100%;
    bottom: 4rem;
}

.bottom-split-left {
    width: 45%;
}

.bottom-split-right {
    width: 45%;
    text-align: right;
}

/* Typography Enhancements */
.display-title {
    font-family: var(--masan-font-display);
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.1;
}

.display-title-md {
    font-family: var(--masan-font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    max-width: 18ch;
}

.display-giant {
    font-family: var(--masan-font-display);
    font-size: 6rem;
    font-weight: 700;
    line-height: 1.1;
    max-width: 12ch;
}

.subtitle {
    font-size: 1.5rem;
    font-weight: 700;
}

.mono-label {
    font-family: var(--masan-font-mono);
    font-size: 1.2rem;
    line-height: 1.3;
    max-width: 20ch;
    margin-left: 0;
    margin-right: auto;
}

.body-text {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.5;
    max-width: 40ch;
}

.body-text-left {
    margin-left: 0;
    margin-right: auto;
}

.body-text-right {
    margin-left: auto;
    margin-right: 0;
}

.body-text-center {
    margin-left: auto;
    margin-right: auto;
}

.lg-text {
    font-size: 1.5rem;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5), 0 4px 15px rgba(0, 0, 0, 0.4);
}

.signature-text {
    font-family: var(--masan-font-cursive);
    font-size: 6.5rem;
    margin-top: 1.5rem;
    max-width: 15ch;
    font-weight: 400;
    line-height: 80%;

}

.normal-weight {
    font-weight: 400;
}

.bold {
    font-weight: 700;
}

.blue {
    color: var(--masan-blue);
}

.white {
    color: var(--masan-white);
}

.center-text {
    text-align: center;
    margin: 0 auto;
}

.text-right {
    text-align: right;
}

/* Utilities */
.col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 3rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 3rem;
}

.mb-auto {
    margin-bottom: auto;
}

.absolute-bottom {
    position: absolute;
    bottom: 4rem;
    width: calc(100% - 8rem);
}

.left-aligned {
    text-align: left;
}

.slide-align-center {
    justify-content: center;
    align-items: center;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.slide .content>div {
    opacity: 0;
}

.slide.visible .content>div {
    animation: fadeIn 1s ease-out forwards;
}


/* Snapshot Scroll */
html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

@media (max-width: 1024px) {
    html {
        scroll-snap-type: none;
    }
}


/* Responsive */
@media (max-width: 1024px) {
    .left-bar-panel {
        width: 50%;
        padding: 4rem 2rem;
    }

    .display-title {
        font-size: 3.5rem;
    }

    .display-title-md {
        font-size: 2.8rem;
    }

    .display-giant {
        font-size: 4rem;
    }

    .polaroid-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2rem;
    }


    .slide-5-layout {
        flex-direction: column;
    }

    .left-polygon-content,
    .right-polaroids {
        width: 100%;
        padding: 0;
    }

    .blue-polygon {
        width: 100%;
        clip-path: polygon(0 0, 100% 0, 100% 60%, 0 80%);
    }

    .right-col {
        text-align: left;
        margin-top: 2rem;
    }

    .split-vertical {
        flex-direction: column;
    }

    /* Section 3 Mobile */
    .slide-3-layout {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 2rem;
    }

    .slide-3-layout .left-box,
    .slide-3-layout .right-box {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .content {
        padding: 4rem 1.5rem;
    }

    .bottom-label-container {
        display: none;
    }

    /* Section 1 Mobile */
    .left-bar-panel {
        width: 100%;
        padding: 3rem 1.5rem;
        background-color: rgba(255, 255, 255, 0.85);
        /* More opaque */
    }

    .logo-placeholder {
        width: 140px;
        margin-bottom: 2rem;
    }

    .timeline-container {
        position: relative;
        bottom: auto;
        left: 0;
        width: 100%;
        margin-top: 2rem;
        padding: 0 1.5rem;
    }

    .timeline-start,
    .timeline-end {
        font-size: 1rem;
    }

    /* Section 4 Mobile Cards */
    .polaroid-row {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.5rem;
    }


    .polaroid-card {
        width: 100%;
        max-width: 300px;
    }

    /* Section 5 Mobile Polygon */
    .blue-polygon {
        height: 65%;
        clip-path: polygon(0 0, 100% 0, 100% 85%, 0% 100%);
    }

    .left-polygon-content {
        padding: 0 0 2rem;
        z-index: 2;
    }

    .right-polaroids {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 1rem;
        margin-top: 2rem;
    }

    .small-polaroid {
        width: 42%;
        max-width: 170px;
    }

    .offset-y {
        transform: translateY(20px) rotate(3deg);
    }


    /* Section 6 Mobile Readability */
    .slide-6-layout {
        justify-content: center;
    }

    .bottom-split {
        flex-direction: column;
        position: relative;
        bottom: 0;
        width: 100%;
        gap: 2rem;
        margin-top: 2rem;
    }

    .bottom-split-left,
    .bottom-split-right {
        width: 100%;
        text-align: center;
        background-color: rgba(0, 0, 0, 0.4);
        padding: 1rem;
        border-radius: 8px;
        backdrop-filter: blur(4px);
    }

    /* Global Mobile Typography */
    .display-title {
        font-size: 2.4rem;
    }

    .display-title-md {
        font-size: 9vwm;
    }

    .display-giant {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .body-text {
        font-size: 1.1rem;
    }

    .pill-badge {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }

    .signature-text {
        font-size: 2rem;
    }

    .left-col {
        margin-top: 0;
    }

    .pill-badge {
        display: none;
    }
}