/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-black: #0a0a0a;
    --text-platinum: #e8e8e8;
    --text-gray: #5a5a5a;
    --accent-green: #1a3a2e;
    --green-glow: #2d5a47;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-black);
    color: var(--text-platinum);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* No scrolling - everything must fit in viewport */

/* ============================================
   CANVAS FOR NODE ANIMATIONS
   ============================================ */

#nodeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.4;
    filter: blur(2px);
    transition: opacity 6s ease, filter 6s ease;
}

#nodeCanvas.transitioning {
    opacity: 0.2;
    filter: blur(6px);
}

#nodeCanvas.reveal {
    opacity: 1;
    filter: blur(0px);
}

/* ============================================
   SECTION CONTAINER
   ============================================ */

.section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 2s ease, visibility 2s;
    z-index: 2;
}

/* Mobile: Ensure everything fits in viewport */
@media (max-width: 768px) {
    .section {
        min-height: auto;
        /* No minimum height - fit in viewport */
        max-height: 100vh;
        /* Constrain to viewport */
    }

    #section4 {
        min-height: auto;
        padding-bottom: 2vh;
        /* Minimal bottom padding */
        max-height: calc(100vh - 30vh);
        /* Ensure it fits */
    }
}

.section.active {
    opacity: 1;
    visibility: visible;
}

.section.exiting {
    opacity: 0;
    transform: translateY(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
    visibility: hidden;
}

/* Page exit animation - smooth fade out */
body.page-exiting {
    transition: background-color 0.8s ease;
}

body.page-exiting .section {
    transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
}

/* Section 2 stays persistent once active */
#section2.persistent {
    opacity: 1;
    visibility: visible;
    z-index: 3;
}

/* Section 3 stays persistent once active and remains visible */
#section3.persistent {
    opacity: 1;
    visibility: visible;
    z-index: 4;
    /* Maintain final position after animation completes */
    transform: translateY(0);
}

/* ============================================
   SECTION 0 — PRELOAD / CORTISOL
   ============================================ */

#section0 {
    z-index: 10;
}

#section0 .preload-text {
    font-size: 8vw;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
}

#section0 .word {
    opacity: 0;
    display: inline-block;
}

#section0 .word.show {
    opacity: 1;
    transition: opacity 1s ease;
}

#section0 .dot {
    opacity: 0;
    display: inline-block;
    margin-left: 0.2em;
}

#section0 .dot.show {
    opacity: 1;
    transition: opacity 1.5s ease;
}

/* ============================================
   SECTION 1 — DOPAMINE / ORDER
   ============================================ */

#section1 {
    opacity: 0;
    transform: translateY(20px) scale(1);
    transition: opacity 4s ease, transform 4s ease;
    z-index: 5;
    /* Higher z-index during exit so it fades out on top */
}

#section1.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Exit animation: Section 1 stays active (.active) but .exiting triggers the fade */
#section1.active.exiting {
    opacity: 0;
    transform: translateY(-15px) scale(0.98);
    transition: opacity 4s cubic-bezier(0.4, 0, 0.2, 1), transform 4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    /* Keep visibility visible during exit - don't hide until animation completes */
    visibility: visible;
}

#section1 .statement {
    font-size: 4vw;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.8;
    max-width: 80%;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 3s ease 1s, transform 3s ease 1s;
}

#section1 .statement.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SECTION 2 — REVELATION (THE OBJECT)
   Pixel-accurate match to original.png: 369px × 800px
   ============================================ */

#section2 {
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.genome-ui {
    width: 369px;
    height: 800px;
    background: #0A0C0E;
    position: relative;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 3s ease, transform 4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center center;
    /* Ensure scaling happens from center, preserving aspect ratio */
    /* Subtle silvery glow effect - ultra-luxury, minimal aesthetic */
    box-shadow: 0 0 20px rgba(232, 232, 232, 0.12),
        0 0 35px rgba(220, 220, 230, 0.08),
        0 0 50px rgba(232, 232, 232, 0.06);
}

/* Adjust genome-ui when other sections are visible to prevent overlap */
/* STRICT ASPECT RATIO: Using uniform scale() only to preserve 369px × 800px aspect ratio */
/* Maximum scale reduction capped at 0.80 to preserve Section 2's dominance */
body.sections-visible .genome-ui,
#section2.persistent.has-companions .genome-ui {
    transform: scale(0.95);
    /* Minimal scale reduction - preserves original aspect ratio and dominance */
    margin-top: -10vh;
    /* More space to accommodate Section 3 below */
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Further scale down genome-ui when Section 4 is visible - preserves original aspect ratio */
/* Capped at minimum 0.80 to maintain Section 2's visual dominance */
body.section4-visible .genome-ui,
#section2.persistent.has-section4 .genome-ui {
    transform: scale(0.80);
    /* Maximum allowed scale reduction - preserves original aspect ratio and dominance */
    margin-top: -20vh;
    /* Shifted up more to create space for Section 4 */
    transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 4s cubic-bezier(0.4, 0, 0.2, 1);
}

.genome-ui.reveal {
    opacity: 1;
    transform: scale(1);
}

/* Header Section */
.ui-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 15px 0;
}

.kill-switch-text {
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.logo-container {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    width: 54px;
    height: 54px;
    display: block;
}

.logo-text {
    font-size: 9px;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.indicator-square {
    width: 8px;
    height: 8px;
}

.indicator-square.dark {
    background: #333333;
}

.indicator-square.light {
    background: #AAAAAA;
}

.top-text {
    font-size: 10px;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin-left: 2px;
}

/* Barcode Separator */
.barcode-separator {
    position: absolute;
    top: 95px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.barcode-separator svg {
    width: 100%;
    height: 100%;
}

/* Value Blocks */
.value-block {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
}

.daily-block {
    top: 220px;
}

.session-block {
    top: 480px;
}

.large-value {
    font-size: 72px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #888888;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
}

.range-value {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
}

.plus-symbol {
    color: #FFFFFF;
    font-weight: 500;
}

.plus-symbol.session-plus {
    color: #AAAAAA;
}

/* Footer Section */
.ui-footer {
    position: absolute;
    bottom: 20px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.balance-value {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
}

.status-text {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-value {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #AAAAAA;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-variant-numeric: tabular-nums;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background: #33C799;
    border-radius: 0;
}

/* ============================================
   SECTION 3 — SEROTONIN / AUTHORITY
   ============================================ */

#section3 {
    /* Position centered horizontally, just below Section 2 */
    /* Section 2 calculation:
       - Original height: 800px
       - Compressed with uniform scale(0.88): 800px × 0.88 = 704px (aspect ratio preserved: 369px × 800px)
       - Section 2 container centered at: 50vh
       - genome-ui margin-top: -10vh, so center moves to: 50vh - 10vh = 40vh
       - Bottom of genome-ui: 40vh + (704px / 2) = 40vh + 352px
       - Add increased spacing: 128px to lower position and prevent overlap
       - Section 3 start: 40vh + 352px + 128px = 40vh + 480px */
    align-items: flex-start;
    justify-content: center;
    padding-top: calc(40vh + 545px + 2vh);
    /* Moved down 65px: 40vh + 480px + 35px + 30px + 2vh */
    z-index: 4;
    /* Ensure section stays visible within viewport */
    min-height: 0;
    overflow: visible;
    /* Keep section visible even when other sections animate */
    will-change: opacity, transform;
    /* Initial state: start completely below viewport (fully hidden) */
    transform: translateY(400px);
    /* Start 400px lower to ensure completely below viewport */
    opacity: 0;
    transition: padding-top 4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 4s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Section 3 entrance animation: animate upward to final position when active */
#section3.active {
    transform: translateY(0);
    /* Animate to final position */
    opacity: 1;
}

/* Adjust Section 3 position when Section 4 is visible */
body.section4-visible #section3 {
    /* Section 2 scaled to 0.80: 800px × 0.80 = 640px height
       - Section 2 container centered at: 50vh
       - genome-ui margin-top: -20vh (shifted up), so center moves to: 50vh - 20vh = 30vh
       - Bottom of genome-ui: 30vh + (640px / 2) = 30vh + 320px
       - Add increased spacing: 100px to lower position and prevent overlap
       - Section 3 start: 30vh + 320px + 100px = 30vh + 420px
       - Moved down additional 65px: 30vh + 425px */
    padding-top: calc(30vh + 425px + 2vh);
    /* Moved down 65px: 30vh + 360px + 35px + 30px + 2vh */
}

#section3 .authority-text {
    font-size: 1.3vw;
    /* Slightly reduced for viewport fit */
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    opacity: 0;
    transition: opacity 2s ease;
    max-width: 600px;
    line-height: 1.4;
    /* Tighter line height */
    /* Ensure text stays within viewport bounds */
    max-height: 60px;
    /* Constrained height */
    overflow: visible;
    word-wrap: break-word;
    /* Keep element visible and within bounds */
    position: relative;
    margin: 0 auto;
    margin-bottom: 0;
    /* Ensure no extra margin that could cause overlap */
}

#section3 .authority-text.show {
    opacity: 1;
}

/* ============================================
   SECTION 4 — ADRENALINE / CTA
   ============================================ */

#section4 {
    flex-direction: column;
    gap: 1.5vh;
    /* Reduced gap for viewport fit */
    /* Position centered horizontally, directly below Section 3 */
    align-items: center;
    justify-content: flex-start;
    /* Section 3 calculation:
       - Section 3 starts at: 40vh + 480px + 2vh (lowered position)
       - Section 3 text content height: ~60px (reduced for viewport fit)
       - Section 3 bottom: 40vh + 480px + 2vh + 60px = 40vh + 540px + 2vh
       - Add clear spacing: 40px to prevent overlap
       - Section 4 start: 40vh + 540px + 2vh + 40px = 40vh + 580px + 2vh */
    padding-top: calc(40vh + 645px + 2vh);
    /* Moved down 65px: 40vh + 580px + 35px + 30px + 2vh */
    z-index: 4;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 3s cubic-bezier(0.4, 0, 0.2, 1) 0.5s, transform 3s cubic-bezier(0.4, 0, 0.2, 1) 0.5s, padding-top 4s cubic-bezier(0.4, 0, 0.2, 1), gap 4s cubic-bezier(0.4, 0, 0.2, 1);
}

#section4.active {
    opacity: 1;
    transform: translateY(0);
}

/* Adjust Section 4 position when it becomes visible (genome-ui scales down) */
body.section4-visible #section4 {
    /* Section 3 starts at: 30vh + 395px + 2vh (moved down 35px)
       - Section 3 text content height: ~50px (reduced for viewport fit)
       - Section 3 bottom: 30vh + 395px + 2vh + 50px = 30vh + 445px + 2vh
       - Add clear spacing: 35px to prevent overlap
       - Section 4 start: 30vh + 445px + 2vh + 35px = 30vh + 480px + 2vh */
    padding-top: calc(30vh + 510px + 2vh);
    /* Moved down 65px: 30vh + 445px + 35px + 30px + 2vh */
    gap: 1.5vh;
    /* Reduced gap for viewport fit */
}

#section4 .cta-button,
#section4 .cta-subtext {
    text-align: center;
}

.cta-button {
    background: transparent;
    border: 1px solid var(--text-platinum);
    color: var(--text-platinum);
    font-family: 'Inter', sans-serif;
    font-size: 1vw;
    /* Reduced for viewport fit */
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1vh 3vw;
    /* Reduced padding */
    cursor: pointer;
    transition: all 0.5s ease;
    opacity: 0;
}

.cta-button.show {
    opacity: 1;
}

.cta-button:hover {
    background: rgba(232, 232, 232, 0.05);
    border-color: var(--text-platinum);
}

.cta-subtext {
    font-size: 0.75vw;
    /* Reduced for viewport fit */
    color: var(--text-gray);
    letter-spacing: 0.1em;
    text-align: center;
    line-height: 1.5;
    /* Tighter line height */
    opacity: 0;
    transition: opacity 2s ease;
}

.cta-subtext.show {
    opacity: 1;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-black);
    border: 1px solid rgba(232, 232, 232, 0.1);
    padding: 4vh 5vw;
    /* Reduced padding to fit in viewport */
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    /* Constrain modal height */
    overflow-y: auto;
    /* Allow scrolling within modal if needed */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease, transform 1s ease;
}

.modal-overlay.active .modal {
    opacity: 1;
    transform: scale(1);
}

.modal-title {
    font-size: 2.5vw;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 4vh;
    /* Reduced for viewport fit */
    color: var(--text-platinum);
}

.product-list {
    list-style: none;
    margin-bottom: 4vh;
    /* Reduced for viewport fit */
}

.product-item {
    display: flex;
    flex-direction: column;
    padding: 2vh 0;
    /* Reduced padding */
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
}

.product-item:last-child {
    border-bottom: none;
}

.product-name {
    font-size: 1.5vw;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-platinum);
    margin-bottom: 0.5vh;
    line-height: 1.4;
}

.product-description {
    font-size: 1vw;
    font-weight: 300;
    letter-spacing: 0.05em;
    text-transform: none;
    color: var(--text-gray);
    line-height: 1.5;
    margin-top: 0.3vh;
}

.modal-button {
    background: transparent;
    border: 1px solid var(--text-platinum);
    color: var(--text-platinum);
    font-family: 'Inter', sans-serif;
    font-size: 1vw;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 1.5vh 3vw;
    cursor: pointer;
    transition: all 0.5s ease;
    display: block;
    margin: 0 auto 3vh;
    width: 100%;
}

.modal-button:hover {
    background: rgba(232, 232, 232, 0.05);
}

.modal-subtext {
    font-size: 0.8vw;
    color: var(--text-gray);
    letter-spacing: 0.1em;
    text-align: center;
    line-height: 1.8;
}

.form-group {
    margin-bottom: 4vh;
}

.form-label {
    font-size: 0.9vw;
    color: var(--text-gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.5vh;
}

.form-input {
    background: transparent;
    border: 1px solid rgba(232, 232, 232, 0.1);
    color: var(--text-platinum);
    font-family: 'Inter', sans-serif;
    font-size: 1vw;
    font-weight: 300;
    padding: 1.5vh 1.5vw;
    width: 100%;
    letter-spacing: 0.05em;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: rgba(232, 232, 232, 0.3);
}

.price-list {
    list-style: none;
    margin-bottom: 6vh;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.5vw;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3vh 0;
    border-bottom: 1px solid rgba(232, 232, 232, 0.1);
    color: var(--text-platinum);
}

.price-item:last-child {
    border-bottom: none;
}

.price-value {
    font-variant-numeric: tabular-nums;
    color: var(--text-platinum);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Mobile-first: Small screens (phones) */
@media (max-width: 768px) {

    /* Section 2: No extra top spacing on initial load */
    .genome-ui {
        margin-top: 0;
        /* No extra top spacing on initial load */
    }

    /* Section 2: After animation completes, maintain ~30px top margin from viewport top */
    body.sections-visible .genome-ui,
    #section2.persistent.has-companions .genome-ui {
        transform: scale(0.70);
        /* Reduced by ~20px: 580px → 560px (800px × 0.70) */
        margin-top: calc(-8vh - 60px + 30px);
        /* ~30px top margin after animation completes */
        transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.section4-visible .genome-ui,
    #section2.persistent.has-section4 .genome-ui {
        transform: scale(0.70);
        /* Reduced by ~20px: 580px → 560px (800px × 0.70) */
        margin-top: calc(-12vh - 60px + 30px);
        /* ~30px top margin after animation completes */
        transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), margin-top 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Section 3: Moved down 13px on mobile */
    #section3 {
        padding-top: calc(42vh + 313px + 0.5vh) !important;
        /* Moved down 13px (from 300px + 5px + 3px + 5px) */
        padding-left: 4vw;
        padding-right: 4vw;
        /* Override desktop entrance animation - no transform on mobile */
        transform: none !important;
        opacity: 1 !important;
        transition: padding-top 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.section4-visible #section3 {
        padding-top: calc(38vh + 313px + 0.5vh) !important;
        /* Moved down 13px (from 300px + 5px + 3px + 5px) */
        transition: padding-top 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #section3 .authority-text {
        font-size: 2.1vw;
        /* Further reduced for viewport fit */
        max-width: 90vw;
        line-height: 1.05;
        /* Very tight line height */
        max-height: 28px;
        /* Further reduced height to maximize room for Section 4 */
    }

    /* Section 4: Moved up by additional 20px on mobile */
    #section4 {
        padding-top: calc(42vh + 336px + 0.5vh) !important;
        /* Moved up another 20px (from 356px) */
        padding-left: 4vw;
        padding-right: 4vw;
        padding-bottom: 1.5vh;
        gap: 0.4vh;
        min-height: auto;
        position: relative;
        max-height: calc(100vh - 42vh - 336px - 1.5vh);
        transition: padding-top 4s cubic-bezier(0.4, 0, 0.2, 1), gap 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.section4-visible #section4 {
        padding-top: calc(38vh + 336px + 0.5vh) !important;
        /* Moved up another 20px (from 356px) */
        padding-bottom: 1.5vh;
        max-height: calc(100vh - 38vh - 336px - 1.5vh);
        transition: padding-top 4s cubic-bezier(0.4, 0, 0.2, 1), gap 4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .cta-button {
        font-size: 2vw;
        /* Further reduced for viewport fit */
        padding-top: calc(0.4vh + 5px);
        /* Increased top padding by 5px for better centering */
        padding-bottom: 0.4vh;
        padding-left: 3vw;
        padding-right: 3vw;
        min-width: 110px;
        max-width: 90vw;
        line-height: 1;
        /* Very tight line height */
        height: auto;
        /* Allow natural height */
        /* Constrain button height - increased by 5px to accommodate top padding */
        max-height: 35px;
        /* Perfect vertical centering using flexbox */
        display: flex;
        align-items: center;
        justify-content: center;
        /* Remove transform - flexbox handles centering */
        transform: none;
    }

    .cta-subtext {
        font-size: 1.3vw;
        /* Further reduced for viewport fit */
        max-width: 90vw;
        line-height: 1;
        /* Very tight line height */
        margin-top: 0;
        /* Remove any extra margin */
        margin-bottom: 0;
        /* Remove bottom margin */
        /* Constrain text height */
        max-height: 14px;
    }

    /* Reduce animation complexity on mobile for performance */
    .section {
        transition: opacity 2s ease, visibility 2s, transform 2s ease;
    }

    #section1 {
        transition: opacity 3s ease, transform 3s ease;
    }

    #section1.exiting {
        transition: opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1), transform 2.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .genome-ui {
        transition: opacity 2s ease, transform 3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    body.sections-visible .genome-ui,
    #section2.persistent.has-companions .genome-ui,
    body.section4-visible .genome-ui,
    #section2.persistent.has-section4 .genome-ui {
        transition: transform 3s cubic-bezier(0.4, 0, 0.2, 1), margin-top 3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #section3 {
        transition: padding-top 3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    #section4 {
        transition: opacity 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
            transform 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
            padding-top 3s cubic-bezier(0.4, 0, 0.2, 1),
            gap 3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    #section0 .preload-text {
        font-size: 12vw;
    }

    #section1 .statement {
        font-size: 6vw;
    }

    /* Section 2 maintains exact dimensions - no responsive scaling */
    /* Scaling handled via transform to preserve pixel accuracy */

    #section3 {
        /* On smaller screens, maintain proportional spacing with clear separation */
        /* Section 2 compressed height with uniform scale(0.88): 800px × 0.88 = 704px
           Bottom at: 40vh + 352px, add 128px spacing = 40vh + 480px
           Moved down 65px: 40vh + 545px */
        padding-top: calc(40vh + 545px + 2vh);
        /* Moved down 65px: 40vh + 480px + 35px + 30px + 2vh */
    }

    body.section4-visible #section3 {
        /* Section 2 scaled: 800px × 0.80 = 640px
           Bottom at: 30vh + 320px (shifted up), add 100px spacing = 30vh + 420px
           Moved down 65px: 30vh + 425px */
        padding-top: calc(30vh + 425px + 2vh);
        /* Moved down 65px: 30vh + 360px + 35px + 30px + 2vh */
    }

    #section4 {
        /* Section 3 starts at: 40vh + 545px + 2vh (moved down 65px)
           Section 3 content: ~60px, bottom: 40vh + 605px + 2vh
           Add clear spacing: 40px to prevent overlap
           Moved down 65px: 40vh + 645px */
        padding-top: calc(40vh + 645px + 2vh);
        /* Moved down 65px: 40vh + 580px + 35px + 30px + 2vh */
    }

    body.section4-visible #section4 {
        /* Section 3 starts at: 30vh + 425px + 2vh (moved down 65px)
           Section 3 content: ~50px, bottom: 30vh + 475px + 2vh
           Add clear spacing: 35px to prevent overlap
           Moved down 65px: 30vh + 510px */
        padding-top: calc(30vh + 510px + 2vh);
        /* Moved down 65px: 30vh + 445px + 35px + 30px + 2vh */
    }

    #section3 .authority-text {
        font-size: 2.5vw;
        max-width: 300px;
    }

    #section4 {
        padding-right: 3vw;
        padding-bottom: 4vh;
    }

    .cta-button {
        font-size: 2vw;
        padding: 2vh 6vw;
    }

    .cta-subtext {
        font-size: 1.5vw;
    }

    /* Section 2 maintains exact dimensions even on smaller screens */
    /* Scaling handled via transform to preserve pixel accuracy */

    .modal-title {
        font-size: 4vw;
        margin-bottom: 3vh;
        /* Reduced for viewport fit */
    }

    .product-list {
        margin-bottom: 3vh;
        /* Reduced for viewport fit */
    }

    .product-item {
        padding: 1.5vh 0;
        /* Reduced padding */
    }

    .product-name {
        font-size: 2.5vw;
    }

    .product-description {
        font-size: 1.8vw;
    }

    .price-item {
        font-size: 2.5vw;
    }

    .modal-button {
        font-size: 1.5vw;
    }
}

/* Mobile-specific modal adjustments */
@media (max-width: 768px) {
    .modal {
        padding: 4vh 5vw;
        max-width: 95vw;
        width: 95vw;
    }

    .modal-title {
        font-size: 5vw;
        margin-bottom: 3vh;
        /* Reduced for viewport fit */
    }

    .product-list {
        margin-bottom: 3vh;
        /* Reduced for viewport fit */
    }

    .product-item {
        padding: 1.5vh 0;
        /* Reduced padding */
    }

    .product-name {
        font-size: 4vw;
    }

    .product-description {
        font-size: 3vw;
    }

    .price-item {
        font-size: 4vw;
        padding: 2vh 0;
    }

    .modal-button {
        font-size: 3.5vw;
        padding: 1.5vh 4vw;
    }

    .modal-subtext {
        font-size: 2.5vw;
    }

    .form-label {
        font-size: 2.5vw;
    }

    .form-input {
        font-size: 3.5vw;
        padding: 1.5vh 3vw;
    }
}