.wrapper {
    width: 100%;
    height: auto;
    background-color: #0F0F0F;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* container */
.wrapper .container {
    width: 100%;
    max-width: 1500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* padding-top: 50px; */
    border-left: solid .5px #505358;
    border-right: solid .5px #505358;
    z-index: 2;
}

/* header */
.container .header {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    padding-top: 67.5px;
}

/* headline */
.header .project-headline {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    padding-top: clamp(50px, 8vw, 100px);
    padding-bottom: clamp(25px, 8vw, 50px);
    padding-left: clamp(25px, 8vw, 50px);
    padding-right: clamp(25px, 8vw, 50px);
    position: relative;
}

/* sparkles */
.header .project-headline::before,
.header .project-headline::after {
    content: '';
    width: 24px;
    height: 30px;
    background: url('/assets/img/artwork/decorations/sparkle.svg') no-repeat center/contain;
    position: absolute;
    bottom: -15px;
    z-index: 100;
}

.header .project-headline::before {
    left: -12px;
}

.header .project-headline::after {
    right: -12px;
}

.project-headline .project-name {
    font-family: var(--font-secondary-medium);
    font-weight: normal;
    font-size: 48px;
    color: #D5DFEF;
    text-align: center;
    line-height: 1.2;
}

.project-headline .project-tagline {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 20px;
    color: #BBC2CC;
    text-align: center;
    max-width: 600px;
}

/* project banner */
.header .project-banner-container {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border-top: solid .5px #505358;
    border-bottom: solid .5px #505358;
    position: relative;
}

/* sparkles */
.header .project-banner-container::before,
.header .project-banner-container::after {
    content: '';
    width: 24px;
    height: 30px;
    background: url('/assets/img/artwork/decorations/sparkle.svg') no-repeat center/contain;
    position: absolute;
    bottom: -15px;
    z-index: 100;
}

.header .project-banner-container::before {
    left: -12px;
}

.header .project-banner-container::after {
    right: -12px;
}

.project-banner-container .project-banner {
    width: 100%;
    height: auto;
}

@media screen and (max-width: 768px) {
    .header .project-banner-container {
        padding: 25px 0;
    }
}

/* button */
.project-banner-container .project-cta-link {
    width: max-content;
    height: auto;
    background: #131313;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 20px 25px;
    position: absolute;
    bottom: 50px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    border: solid .5px #2B2C2F;
    border-radius: 100px;
    outline: none;
    text-decoration: none;
    cursor: pointer;
    transition: inherit;
    overflow: hidden;
}

.project-cta-link .cta-link-label {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 14px;
    color: #BBC2CC;
    text-align: center;
}

.project-cta-link i {
    color: #BBC2CC;
    font-size: 16px;
    transform: rotate(45deg);
    margin-left: 15px;
    transition: transform 0.3s ease;
}

.project-banner-container .project-cta-link:hover i {
    transform: rotate(90deg) translateY(-5px);
}

/* project details */
.header .project-details {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.project-details .detail-container {
    flex: 1 1 300px;
    min-width: 300px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 25px;
    border-bottom: solid .5px #505358;
}

.project-details .detail-container:not(:last-child) {
    border-right: solid .5px #505358;
}

.detail-container .detail-label {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 16px;
    color: #7A7E85;
}

.detail-container .detail-info {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 18px;
    color: #BBC2CC;
}

/* divider (matches About section) */
.divider-container {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    border-bottom: solid .5px #505358;
}

.footer-divider-container {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.divider-container .divider {
    width: 100%;
    max-width: calc(400px + 50px);
    height: 100%;
    border-left: solid .5px #505358;
    transition: opacity 0.3s ease;
}

@media screen and (max-width: 1024px) {
    .divider-container .divider {
        opacity: 0;
    }
}

/* project section */
.container .project-section {
    width: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    border-bottom: solid .5px #505358;
}

.container .project-section.row {
    flex-direction: row;
    justify-content: space-between;
}

@media screen and (max-width: 1024px) {
    .container .project-section.row {
        flex-direction: column;
        align-items: stretch;
    }
}

/* text */
.project-section .section-text-container {
    width: auto;
    min-width: 400px;
    max-width: 700px;
    height: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 50px 25px;
}

@media screen and (max-width: 1024px) {
    .project-section .section-text-container {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        padding: 25px;
    }
}

.section-text-container.row {
    max-width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
}

.section-text-container .section-title {
    font-family: var(--font-secondary-medium);
    font-weight: normal;
    font-size: 24px;
    color: #D5DFEF;
    text-align: left;
}

.section-text-container .section-title::before {
    content: "—";
    color: inherit;
    font-size: inherit;
    margin-right: 10px;
    opacity: .5;
}

.section-text-container .section-text-subcontainer {
    width: 100%;
    max-width: 600px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.section-text-subcontainer .section-desc {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 24px;
    color: #BBC2CC;
    line-height: 1.5;
    text-align: left;
}

.section-text-subcontainer .section-desc-alt {
    font-family: var(--font-secondary);
    font-weight: normal;
    font-size: 20px;
    color: #BBC2CC;
    line-height: 1.5;
    text-align: left;
    margin-top: auto;
}

/* video container */
.project-section .project-video-container {
    width: auto;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 25px;
    border-left: solid .5px #505358;
    position: relative;
    overflow: visible;
}

@media screen and (max-width: 1024px) {
    .project-section .project-video-container {
        border-left: none;
        border-top: solid .5px #505358;
        width: 100%;
    }
}

@media screen and (max-width: 768px) {
    .project-section .project-video-container {
        padding: 25px 0;
    }
}

.project-section .project-video-container::before,
.project-section .project-video-container::after,
.project-section .project-video-container .video-sparkles::before,
.project-section .project-video-container .video-sparkles::after {
    content: '';
    width: 24px;
    height: 30px;
    background: url('/assets/img/artwork/decorations/sparkle.svg') no-repeat center/contain;
    position: absolute;
    z-index: 100;
}

/* bottom sparkles */
.project-section .project-video-container::before {
    left: -12px;
    bottom: -15px;
}

.project-section .project-video-container::after {
    right: -12px;
    bottom: -15px;
}

/* top sparkles */
.project-section .project-video-container .video-sparkles::before {
    left: -12px;
    top: -15px;
}

.project-section .project-video-container .video-sparkles::after {
    right: -12px;
    top: -15px;
}

/* video */
.project-section .project-video {
    width: 100%;
    height: auto;
    display: block;
}

/* phone frame video container */
.project-section .project-video-container.phone-frame-video-container {
    --frame-screen-top: 2.4%;
    --frame-screen-right: 5.7%;
    --frame-screen-bottom: 2.35%;
    --frame-screen-left: 5.7%;
    isolation: isolate;
}

.project-section .project-video-container.phone-frame-video-container .phone-frame-shell {
    position: relative;
    height: clamp(500px, 50vw, 800px);
    aspect-ratio: 453 / 912;
    overflow: hidden;
    z-index: 1;
}

.project-section .project-video-container.phone-frame-video-container .phone-frame-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/artwork/decorations/iPhone-16-mockup-frame.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}

.project-section .project-video-container.phone-frame-video-container .phone-frame-video {
    position: absolute;
    top: var(--frame-screen-top);
    left: var(--frame-screen-left);
    width: calc(100% - var(--frame-screen-left) - var(--frame-screen-right));
    height: calc(100% - var(--frame-screen-top) - var(--frame-screen-bottom));
    object-fit: cover;
    border-radius: clamp(15px, 5.2vw, 30px);
    transform: scale(1.01);
    transform-origin: center;
    z-index: 1;
}

/* logo clearspace */
.project-section .clearspace-images {
    width: 100%;
    height: auto;
    background-color: #131313;
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 25px;
    border-top: solid .5px #505358;
    overflow: hidden;
}

.clearspace-images .clearspace-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.clearspace-images .clearspace-image-swap {
    display: none;
}

@media screen and (max-width: 1024px) {
    .clearspace-images .clearspace-image-alt {
        display: none;
    }

    .clearspace-images .clearspace-image-swap {
        display: block;
    }
}

/* project image container */
.project-section .project-image-container {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border-top: solid .5px #505358;
}

@media screen and (max-width: 768px) {
    .project-section .project-image-container {
        padding: 25px 0;
    }
}

.project-section .project-image-container.row {
    flex-direction: row;
}

.project-image-container .project-image {
    width: 100%;
    max-width: 100%;
    height: auto;
}

/* menu loop */
.project-section .image-marquee {
    width: 100%;
    height: auto;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-marquee:not(:first-child) {
    border-top: solid .5px #505358;
}

.image-marquee .marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    will-change: transform;
    transform: translateZ(0);
}

.image-marquee .marquee-seq {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.image-marquee .marquee-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

.image-marquee .marquee-image {
    width: auto;
    height: clamp(500px, 50vw, 800px);
    object-fit: contain;
    display: block;
    /* Ensures videos render as block to prevent inline spacing collapse */
}

/* Ensure video elements maintain consistent aspect ratio and don't cause width fluctuations */
.image-marquee video.marquee-image {
    aspect-ratio: auto;
    min-width: 0;
    /* Prevents flex items from expanding beyond their content */
}

.image-marquee .marquee-image.phone {
    border-radius: clamp(30px, 5vw, 50px);
    border-top: solid .5px #50535866;
    border-bottom: solid .5px #50535866;
}

.image-marquee .marquee-item:first-child .marquee-image.phone {
    border-left: solid .5px #50535866;
}

.image-marquee .marquee-item:nth-child(6) .marquee-image.phone {
    border-right: solid .5px #50535866;
}

.image-marquee .marquee-image.phone.frame {
    border: none !important;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-clip-path: none;
    clip-path: none;
}

.image-marquee .marquee-item:has(.marquee-image.frame) {
    position: relative;
    height: clamp(500px, 50vw, 800px);
    aspect-ratio: 453 / 912;
    isolation: isolate;
    overflow: hidden;
    --frame-screen-top: 2.4%;
    --frame-screen-right: 5.7%;
    --frame-screen-bottom: 2.35%;
    --frame-screen-left: 5.7%;
}

.image-marquee .marquee-item:has(.marquee-image.frame)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/artwork/decorations/iPhone-16-mockup-frame.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
}

.image-marquee .marquee-item:has(.marquee-image.frame) .marquee-image.frame {
    position: absolute;
    top: var(--frame-screen-top);
    left: var(--frame-screen-left);
    width: calc(100% - var(--frame-screen-left) - var(--frame-screen-right));
    height: calc(100% - var(--frame-screen-top) - var(--frame-screen-bottom));
    object-fit: cover;
    border-radius: clamp(15px, 5.2vw, 30px);
    transform: scale(1.01);
    transform-origin: center;
    z-index: 1;
}

/* All appstore items: explicit sizing for consistent measurement */
.image-marquee.appstore-marquee .marquee-item {
    height: clamp(500px, 50vw, 800px);
    aspect-ratio: 453 / 912;
}

/* Non-frame items: seamless gaps, images fill container */
.image-marquee.appstore-marquee .marquee-item:not(:has(.marquee-image.frame)) {
    margin-left: 0;
    margin-right: 0;
}

.image-marquee.appstore-marquee .marquee-item:not(:has(.marquee-image.frame)) .marquee-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Frame items: spaced layout */
.image-marquee.appstore-marquee .marquee-item:has(.marquee-image.frame) {
    margin-left: 25px;
    margin-right: 25px;
}

.image-marquee.app-icons-marquee .marquee-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 22.5%;
    border: solid .5px #50535866;
}

.image-marquee.penny-marquee .marquee-image {
    border-radius: 13px;
}

/* Spotlight Marquee Styles */
.spotlight-marquee {
    width: 100%;
    height: auto;
    padding: 25px 0px;
    position: relative;
    border-top: solid .5px #505358;
    border-bottom: solid .5px #505358;
}

/* Clipped viewport, like regular marquee rows */
.spotlight-viewport {
    width: 100%;
    height: clamp(500px, 50vw, 800px);
    overflow: hidden;
    position: relative;
}

/* Track is a positioning context for centered slots */
.spotlight-track {
    display: flex;
    align-items: center;
    width: max-content;
    height: 100%;
    position: relative;
    gap: clamp(12px, 1.2vw, 22px);
    will-change: transform;
}

/* Individual spotlight item */
.spotlight-item {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    width: clamp(280px, 22vw, 420px);
    height: 100%;
    will-change: transform, opacity;
}

/* Dark overlay for non-center items */
.spotlight-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.5);
    z-index: 10;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.spotlight-item.is-active::after {
    opacity: 0;
}

/* On framed items, darken only the screen area (not the frame/bezel) */
.spotlight-item:has(.marquee-image.frame)::after {
    top: var(--frame-screen-top);
    left: var(--frame-screen-left);
    width: calc(100% - var(--frame-screen-left) - var(--frame-screen-right));
    height: calc(100% - var(--frame-screen-top) - var(--frame-screen-bottom));
    border-radius: clamp(15px, 5.2vw, 30px);
    transform: scale(1.01);
    transform-origin: center;
    z-index: 2;
}

/* Images without frame mockup */
.spotlight-marquee .marquee-image:not(.frame) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: clamp(20px, 3vw, 40px);
    border: solid 0.5px #50535866;
}

/* Frame mockup styling */
.spotlight-marquee .marquee-image.frame {
    border: none !important;
    outline: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-clip-path: none;
    clip-path: none;
}

/* Item with frame - iPhone mockup */
.spotlight-marquee .spotlight-item:has(.marquee-image.frame) {
    width: auto;
    aspect-ratio: 453 / 912;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    --frame-screen-top: 2.4%;
    --frame-screen-right: 5.7%;
    --frame-screen-bottom: 2.35%;
    --frame-screen-left: 5.7%;
}

/* Phone frame overlay */
.spotlight-marquee .spotlight-item:has(.marquee-image.frame)::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/assets/img/artwork/decorations/iPhone-16-mockup-frame.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 3;
}

/* Screen content inside frame */
.spotlight-marquee .spotlight-item:has(.marquee-image.frame) .marquee-image.frame {
    position: absolute;
    top: var(--frame-screen-top);
    left: var(--frame-screen-left);
    width: calc(100% - var(--frame-screen-left) - var(--frame-screen-right));
    height: calc(100% - var(--frame-screen-top) - var(--frame-screen-bottom));
    object-fit: cover;
    border-radius: clamp(15px, 5.2vw, 30px);
    transform: scale(1.01);
    transform-origin: center;
    z-index: 1;
}