:root {
    --text-paragraph-1: #EEEEEE;
    --text-on-accent-1: #898891;
}

/* Custom font families - matching Figma design variables */
.font-sometype-mono {
    font-family: 'Sometype Mono', monospace;
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 1.3;
}

.font-eb-garamond {
    font-family: 'EB Garamond', serif;
}

/* All paragraphs use Stack Sans by default */
p {
    font-family: 'Stack Sans Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 230;
    line-height: 1.8;
    font-size: 17px;
}

.font-stack-sans {
    font-family: 'Stack Sans Text', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 230;
    line-height: 1.6;
}

/* Tag design from Figma */
.tag {
    border-radius: 100px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 49.5%, rgba(255, 255, 255, 0.02) 160.94%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    box-sizing: border-box;
    position: relative;
}

.tag::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    padding: 0.8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

/* Heading 1 styling - EB Garamond Medium 40px from Figma */
h1.font-eb-garamond:not(.italic-text) {
    font-size: 58px;
    font-weight: 300;
    line-height: 0.95;
    letter-spacing: -1px;
}

/* Heading 2 styling - EB Garamond Italic 20px from Figma */
.italic-text {
    font-size: 30px;
    font-weight: 200;
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.6px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
}

/* Hide scrollbar for infinite carousel */
.card-scroll {
    overflow: hidden !important;
    cursor: default;
}

.card-scroll::-webkit-scrollbar {
    display: none;
}

/* Infinite carousel */
.carousel-track {
    display: flex;
    gap: 20px;
    width: max-content;
}

@keyframes infiniteScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.carousel-track-animated {
    animation: infiniteScroll 80s linear infinite;
}

.carousel-track-animated:hover {
    animation-play-state: paused;
}

/* ========================================
   COMPONENT STYLES
   ======================================== */

/* Experiment Cards */
.experiment-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #333333;
    position: relative;
    border-radius: 16px;
    width: 340px;
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.experiment-card:hover {
    /* transform handled by vanilla-tilt */
    z-index: 10;
}

.card-inner {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
    overflow: hidden;
    padding: 9px 9px 2px 9px;
    position: relative;
    border-radius: inherit;
    width: 340px;
    pointer-events: none;
    transform: translateZ(20px);
    isolation: isolate;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.card-glow {
    position: absolute;
    filter: blur(24px);
    inset: -17.95% 0.35% 18.52% 0.35%;
    opacity: 0.25;
    background-color: #ffffff;
    transition: background-color 0.3s ease;
}

/* Default state - white glow */
.card-glow--red,
.card-glow--purple,
.card-glow--brown,
.card-glow--blue,
.card-glow--teal {
    background-color: #ffffffcf;
}

/* Hover state - colored glows */
.experiment-card:hover .card-glow--red {
    background-color: #890808;
}

.experiment-card:hover .card-glow--purple {
    background-color: #9f1387;
}

.experiment-card:hover .card-glow--brown {
    background-color: #a64120;
}

.experiment-card:hover .card-glow--blue {
    background-color: #0091ff;
}

.experiment-card:hover .card-glow--teal {
    background-color: #14a89e;
}

/* Cursor-following glow effect */
.card-cursor-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(50px);
    z-index: 2;
    transform: translate(-50%, -50%);
}

.experiment-card:hover .card-cursor-glow {
    opacity: 0.1;
}

.card-cursor-glow--red {
    background-color: #890808;
}

.card-cursor-glow--purple {
    background-color: #9f1387;
}

.card-cursor-glow--brown {
    background-color: #a64120;
}

.card-cursor-glow--blue {
    background-color: #0091ff;
}

.card-cursor-glow--teal {
    background-color: #14a89e;
}

.card-image-container {
    height: 264px;
    overflow: hidden;
    position: relative;
    border-radius: 12px;
    width: 100%;
    pointer-events: none;
}

.card-image-container * {
    pointer-events: none;
}

/* Card images grayscale by default */
.card-image-container img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}


.card-content {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 12px 8px;
    position: relative;
    width: 100%;
    pointer-events: none;
}

.card-content * {
    pointer-events: none;
}

.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.card-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

/* ========================================
   LAYOUT STYLES
   ======================================== */

.container-header {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 100px;
    align-items: flex-end;
    max-width: 1600px;
    padding: 20px 20px 0;
    position: relative;
    width: 100%;
}

.container-main {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 100px;
    align-items: flex-start;
    max-width: 1600px;
    padding: 100px 50px 0;
    position: relative;
    width: 100%;
}

.nav-section {
    border-top: 1px solid #2d2d2d;
    box-sizing: border-box;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 0 0 0;
}

.section-large {
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: flex-start;
    position: relative;
    width: 100%;
}

.section-medium {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
    position: relative;
}

.section-small {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    flex-grow: 1;
    align-items: flex-start;
    min-height: 1px;
    position: relative;
}

.content-description {
    flex: 1;
    max-width: 40%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex-grow: 1;
    align-items: flex-start;
    justify-content: center;
    min-height: 1px;
    position: relative;
}

.content-section {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: flex-end;
    justify-content: center;
    padding: 0 0 80px 0;
    position: relative;
    width: 100%;
}

.experiment-header {
    border-top: 1px solid #2d2d2d;
    box-sizing: border-box;
    display: flex;
    gap: 140px;
    align-items: flex-start;
    padding: 180px 0 80px 0;
    position: relative;
    width: 100%;
}

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

.gallery-row {
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    width: 100%;
}

.tag-group {
    display: flex;
    gap: 8px;
    align-items: center;
    position: relative;
}

.sidebar-text {
    position: relative;
    color: #eeeeee;
    width: 270px;
}

/* ========================================
   TYPOGRAPHY STYLES
   ======================================== */

.text-mono-primary {
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    line-height: 1.3;
    position: relative;
    color: #eeeeee;
    letter-spacing: -0.24px;
    text-transform: uppercase;
}

.text-mono-muted {
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    line-height: 1.3;
    position: relative;
    color: #898891;
    letter-spacing: -0.24px;
    text-transform: uppercase;
}

.text-mono-subdued {
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    line-height: 1.3;
    position: relative;
    color: #898891;
    letter-spacing: -0.24px;
    text-transform: uppercase;
}

.text-mono-subdued p {
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    letter-spacing: -0.24px;
}

.card-title {
    display: flex;
    flex-direction: column;
    font-weight: 300;
    justify-content: center;
    line-height: 0;
    position: relative;
    color: #ededed;
}

.tag-text {
    display: block;
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    line-height: 1.3;
    position: relative;
    color: #eeeeee;
    letter-spacing: -0.24px;
    text-transform: uppercase;
    white-space: pre;
}

.caption {
    font-family: 'Sometype Mono', monospace;
    font-weight: 300;
    line-height: 1.4;
    position: relative;
    color: #898891;
    letter-spacing: -0.24px;
    text-transform: uppercase;
    width: 100%;
    font-size: 15px;
}

/* ========================================
   IMAGE & MEDIA STYLES
   ======================================== */

.img-responsive {
    position: absolute;
    inset: 0;
    max-width: none;
    object-fit: cover;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

.image-placeholder {
    background-color: #333333;
    display: block;
    min-height: 1px;
    position: relative;
    border-radius: 8px;
}

.media-placeholder {
    position: absolute;
    background-color: #2b2b2b;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item {
    flex: 1;
    background-color: #333333;
    display: block;
    min-height: 1px;
    position: relative;
    border-radius: 8px;
}

.figure-image {
    flex: 1;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    align-items: flex-start;
    min-height: 1px;
    overflow: hidden;
    padding: 0;
    position: relative;
    border-radius: 8px;
}

/* ========================================
   UTILITY STYLES
   ======================================== */

.container-flipped {
    flex: none;
    width: 100%;
}

/* Link hover effects */
.back-to-top {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.back-to-top:hover {
    opacity: 0.7;
}

.carousel-section {
    padding-left: 50px;
}

.intro-section {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
    padding: 100px 0 300px 0;
    position: relative;
    width: 100%;
}

.intro-text {
    max-width: 100%;
    position: relative;
    color: #eeeeee;
    text-align: center;
}

.intro-text .line {
    opacity: 0;
}

/* ========================================
   ANIMATION STYLES
   ======================================== */

/* Lenis Recommended CSS */
html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Text Reveal Animation */
@keyframes blur-in {
    0% {
        opacity: 0;
        filter: blur(80px);
        transform: translateY(180px);
    }

    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

.animate-reveal {
    opacity: 0;
    /* Start hidden */
    animation: blur-in 2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

.delay-6 {
    animation-delay: 0.6s;
}

.delay-7 {
    animation-delay: 0.7s;
}

/* Enhanced Image Hover */
.card-image-container img {
    filter: grayscale(100%);
    transform: scale(1.0);
    transition: filter 0.5s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.experiment-card:hover .card-image-container img {
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* Lightbox Targets */
.section-large img.img-responsive,
.section-large video.img-responsive {
    transition: transform 0.3s ease;
}

.section-large figure {
    cursor: pointer;
}

.section-large figure:hover img.img-responsive,
.section-large figure:hover video.img-responsive {
    transform: scale(1.02);
}

/* ========================================
   LIGHTBOX STYLES
   ======================================== */

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

#lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: default;
}

#lightbox.active #lightbox-content {
    transform: scale(1);
}

/* Close button */
#lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

#lightbox-close::before,
#lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #fff;
}

#lightbox-close::before {
    transform: rotate(45deg);
}

#lightbox-close::after {
    transform: rotate(-45deg);
}

/* Hide volume controls on all videos */
video::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-mute-button {
    display: none !important;
}

video::-moz-volume-control,
video::-moz-mute-button {
    display: none !important;
}

/* ========================================
   NAVIGATION SWITCHER STYLES
   ======================================== */

.nav-switcher-root {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 100;
    border-radius: 9999px;
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.nav-switcher-root.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-switcher-content {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-button {
    background: transparent;
    border: none;
    color: #898891;
    padding: 8px 20px;
    font-family: 'Sometype Mono', monospace;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.3;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    z-index: 2;
    transition: color 0.3s ease;
    border-radius: 9999px;
    white-space: nowrap;
    letter-spacing: -0.24px;
}

.nav-button:hover {
    color: #eeeeee;
}

.nav-button.active {
    color: #eeeeee;
}

.nav-pill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-glow {
    position: absolute;
    top: -50px;
    left: 0;
    height: 100px;
    background: radial-gradient(100% 40% at 50% 50%, rgb(255, 255, 255) 20%, rgba(255, 255, 255, 0) 100%);
    filter: blur(40px);
    z-index: 1;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    mix-blend-mode: overlay;
}

.nav-divider {
    width: 1px;
    height: 16px;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.12);
    z-index: 2;
    pointer-events: none;
}

/* ========================================
   PART TWO — RESIDUAL MOTION
   ======================================== */

.part-two-section {
    position: relative;
    width: 100%;
    background-color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Transition strip */
.part-two-transition {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 240px 24px 220px;
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.part-two-eyebrow {
    font-size: 13px !important;
    letter-spacing: 0.4em !important;
}

/* Non-italic EB Garamond statement — same size as .italic-text (30px) */
.part-two-statement {
    font-family: 'EB Garamond', serif;
    font-style: normal;
    font-weight: 400;
    font-size: 30px;
    letter-spacing: -0.6px;
    line-height: 1.1;
    color: #eeeeee;
}

.part-two-subline {
    font-size: 17px;
    line-height: 1.7;
    color: #898891;
    max-width: 540px;
    margin: 0 auto;
}

/* Hero container */
.part-two-container {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 1680px;
    padding: 0 40px;
    width: 100%;
}

/* Hero: full-width image on top + content-description right-aligned below */
.rm-hero {
    gap: 0;
    width: 100%;
}

.rm-hero-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1054 / 600;
    overflow: hidden;
    margin: 0;
    border-radius: 8px;
    cursor: pointer;
}

.rm-hero-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rm-hero-image:hover img {
    transform: scale(1.02);
}

.rm-hero-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 700px;
    gap: 120px;
    align-items: start;
    width: 100%;
    padding: 80px 0 120px 0;
}

/* Hero content sits in the right 700px column, matching the image column
   of panel 01 below for a consistent rhythm between hero and panels. */
.rm-hero-meta-row .content-description {
    grid-column: 2;
    width: 100%;
    max-width: 700px;
}

/* Panels */
.rm-panels {
    width: 100%;
    max-width: 1680px;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    gap: 220px;
    margin-bottom: 240px;
}

.rm-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 700px;
    gap: 120px;
    align-items: center;
    border-top: 1px solid #2d2d2d;
    padding-top: 240px;
}

.rm-panel--reverse {
    grid-template-columns: 700px minmax(0, 1fr);
}

.rm-panel--full {
    grid-template-columns: 1fr;
    gap: 120px;
    justify-items: center;
}

.rm-panel-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
}

.rm-panel-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rm-panel-image:hover img {
    transform: scale(1.03);
}

.rm-panel-image--landscape {
    aspect-ratio: 4 / 3;
    max-width: 700px;
    margin: 0 auto;
}

.rm-panel-image--portrait {
    aspect-ratio: 3 / 4;
    max-width: 700px;
    margin: 0 auto;
}

.rm-panel-text {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: flex-start;
    max-width: 600px;
    width: 100%;
}

/* In reversed panels, pin the text block to the right edge of its column
   so it aligns with the hero content-description's right rail. */
.rm-panel--reverse .rm-panel-text {
    justify-self: end;
}

.rm-panel-text--centered {
    align-items: center;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.rm-panel-number {
    font-family: 'Sometype Mono', monospace !important;
    font-size: 12px !important;
    font-weight: 300 !important;
    color: #898891;
    letter-spacing: 0.32em !important;
    text-transform: uppercase;
    line-height: 1.3 !important;
}

/* Panel titles use .italic-text sizing (30px) but non-italic, matching .part-two-statement */
.rm-panel-title {
    font-style: normal;
    font-weight: 400;
    line-height: 1.1;
    color: #eeeeee;
}

.rm-panel-text > p:not(.rm-panel-number) {
    font-size: 18px;
    line-height: 1.85;
    color: #eeeeee;
}

.rm-spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 12px;
    padding-top: 32px;
    border-top: 1px solid #2d2d2d;
    width: 100%;
}

.rm-spec {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rm-spec-label {
    font-family: 'Sometype Mono', monospace !important;
    font-size: 11px !important;
    font-weight: 300 !important;
    color: #898891 !important;
    letter-spacing: 0.32em !important;
    text-transform: uppercase;
    line-height: 1.3 !important;
}

.rm-spec-value {
    font-family: 'Sometype Mono', monospace !important;
    font-size: 13px !important;
    font-weight: 300 !important;
    color: #eeeeee !important;
    letter-spacing: -0.24px !important;
    line-height: 1.5 !important;
    text-transform: none;
}

/* Panel 3 — full-bleed-ish image */
.rm-panel-image-full {
    width: 100%;
    aspect-ratio: 1054 / 600;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    margin: 0;
}

.rm-panel-image-full img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rm-panel-image-full:hover img {
    transform: scale(1.02);
}

/* Closing video — full-bleed */
.rm-closing-video {
    width: 100%;
    position: relative;
    margin: 0;
    overflow: hidden;
    cursor: pointer;
}

.rm-closing-video video {
    width: 100%;
    height: auto;
    display: block;
}

/* End-of-project line */
.rm-end {
    font-size: 30px !important;
    text-align: center;
    width: 100%;
    padding: 40px 20px 220px;
    color: #eeeeee;
    line-height: 1 !important;
}

/* Fade-in animation for media on scroll */
.rm-fade-target {
    opacity: 0;
}

.rm-fade-target.rm-fade-in {
    animation: blur-in 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================
   PART THREE — CODE AS THE CANVAS
   ======================================== */

.part-three-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.pub-flipbook-wrap {
    width: 100%;
    max-width: 1200px;
    padding: 0 40px 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* Stage wrapper holds the transform so StPageFlip's inline styles on the
   mount can't override it. On load it's translated left by half a page
   so the cover (which sits in the right slot of the 2-page layout) is
   centered in the wrapper. JS toggles -half / 0 / +half on page change. */
.pub-flipbook-stage {
    transform: translateX(-270px);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.pub-flipbook {
    touch-action: none;
}

.pub-page {
    background-color: #0a0a0a;
    background-repeat: no-repeat;
}

.pub-flipbook-caption {
    font-family: 'Sometype Mono', monospace;
    font-size: 12px;
    color: #898891;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    line-height: 1.3;
}

/* ========================================
   PART TWO — RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .rm-panel {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .rm-panel-text {
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
    }

    .rm-panels {
        gap: 160px;
    }
}

@media (max-width: 640px) {
    .part-two-transition {
        padding: 160px 24px 140px;
    }

    .part-two-container {
        padding: 0 24px;
    }

    .rm-panels {
        padding: 0 24px;
        gap: 120px;
        margin-bottom: 160px;
    }

    .rm-spec-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}