.second-fold {
    position: relative;
    min-height: auto; /* Changed from 100vh to auto to fit content */
    background-color: #f5f5f5;
    margin-top: 100vh; /* This is correct for first transition */
    padding: 120px 20px 60px; /* Reduced padding to shrink height */
    color: #282828;
    z-index: 2;
    opacity: 0; /* Start hidden */
    transition: opacity 0.6s ease;
}

.second-fold.show {
    opacity: 1;
}

/**second footer**/

.second-fold-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-family: 'VT323', monospace;
    padding-top: 0px; /* Added additional top padding */
}

.second-fold h2 {
    margin-bottom: 25px;
    opacity: 0;
}

.second-fold.show h2 {
    animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.second-fold p {
    font-size: 20px;
    line-height: 1.4;
    margin-bottom: 40px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
}

.second-fold.show p {
    animation: textReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.rubik-font {
    font-family: 'Rubik', sans-serif;
}

.feature-boxes {
    position: relative;
    height: 350px; /* Increased from 300px to 350px */
    margin-top: 10px;
    margin-bottom: 40px; /* Added margin bottom for spacing */
    cursor: pointer;
}

.feature-box {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 280px;
    height: 180px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

/* First card - NOIR style */
.feature-box[data-index="0"] {
    background: #1a1a1a;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-box[data-index="0"] h3 {
    color: white;
    letter-spacing: 0.1em;
}

.feature-box[data-index="0"] p {
    color: #888;
}

/* Second card - MONO style */
.feature-box[data-index="1"] {
    background: linear-gradient(145deg, #FC5400, #d94700);
    border: none;
    overflow: hidden;
}

.feature-box[data-index="1"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
    background-size: 15px 15px;
    background-position: 0 0;
    opacity: 0.3; /* Reduced opacity for better contrast */
    z-index: 0;
}

.feature-box[data-index="1"]::after {
    content: none;
}

.feature-box[data-index="1"] h3,
.feature-box[data-index="1"] p {
    color: white;
    position: relative;
    z-index: 2;
}

.feature-box[data-index="1"] p {
    opacity: 0.9; /* Slightly reduced opacity for better readability */
}

.feature-box[data-index="1"] .feature-icon {
    color: white;
    position: relative;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.feature-box[data-index="1"] .feature-icon::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.8),
        0 0 20px rgba(255, 255, 255, 0.4);
    animation: iconPath 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes iconPath {
    0% {
        left: -20px;
        top: 20px;
    }
    30% {
        left: 40px;
        top: 20px;
    }
    31% {
        left: -20px;
        top: 10px;
    }
    60% {
        left: 40px;
        top: 10px;
    }
    61% {
        left: -20px;
        top: 30px;
    }
    90% {
        left: 40px;
        top: 30px;
    }
    100% {
        left: -20px;
        top: 20px;
    }
}

/* Third card - SILVERTONE style */
.feature-box[data-index="2"] {
    background: linear-gradient(145deg, #e6e6e6, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-box[data-index="2"]::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
}

/* Hover states remain the same but adjusted for new styles */
.feature-boxes:hover .feature-box {
    filter: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: rgba(40, 40, 40, 0.2); /* Increased opacity */
    border-radius: 2px;
    overflow: hidden;
    position: absolute;
    bottom: -40px; /* Moved down further */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10; /* Increased z-index to ensure visibility */
    margin-bottom: 60px; /* Increased margin to make space for trusted-by */
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #282828;
    transition: width 1s linear;
}

.progress-fill.animate {
    width: 100%;
}

/* Add hover state for progress bar */
.feature-boxes:hover .progress-fill {
    transition: width 4s linear;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #282828;
    margin-top: 0;
}

.feature-box p {
    font-size: 20px;
    line-height: 1.2;
    margin: 0;
    color: #666;
    text-align: center;
}

/* Normal stacked state */
.feature-box.active {
    opacity: 1;
    z-index: 3;
    transform: translateX(-50%) translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-box.next {
    opacity: 0.9;
    transform: translateX(-50%) translateY(10px);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-box.last {
    opacity: 0.8;
    transform: translateX(-50%) translateY(20px);
    z-index: 1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

/* Semi-circle spread on hover */
.feature-boxes:hover .feature-box {
    opacity: 1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-boxes:hover .feature-box.active {
    transform: translateX(-100%) translateY(-20px) rotate(-15deg);
}

.feature-boxes:hover .feature-box.next {
    transform: translateX(-50%) translateY(-40px);
}

.feature-boxes:hover .feature-box.last {
    transform: translateX(0%) translateY(-20px) rotate(15deg);
}

/* Media queries for mobile */
@media screen and (max-width: 768px) {
    .second-fold {
        padding: 80px 20px 40px; /* Further reduced padding for mobile */
    }
    
    .feature-boxes {
        height: 350px; /* Increased height to give more space */
        margin-bottom: 80px; /* Increased bottom margin */
        position: relative;
    }
    
    .feature-box {
        width: 280px; /* Restore original width */
        height: 180px; /* Restore original height */
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        padding: 40px; /* Restore original padding */
        touch-action: manipulation; /* Optimize for touch */
        -webkit-user-select: none; /* Prevent text selection */
        user-select: none;
    }
    
    .feature-box p {
        font-size: 18px;
    }
    
    /* Override hover animations on mobile */
    .feature-boxes:hover .feature-box {
        transform: translateX(-50%) !important;
        opacity: 0; /* Reset to default */
        box-shadow: none;
    }
    
    /* Show only the active card on mobile */
    .feature-box.active {
        opacity: 1 !important;
        transform: translateX(-50%) translateY(0) !important;
        z-index: 3;
    }
    
    /* Position the next card behind - make it more visible */
    .feature-box.next {
        opacity: 0.9 !important;
        transform: translateX(-50%) translateY(10px) !important;
        z-index: 2;
    }
    
    /* Position the last card at the back */
    .feature-box.last {
        opacity: 0.8 !important;
        transform: translateX(-50%) translateY(20px) !important;
        z-index: 1;
    }
    
    /* Subtle animation to draw attention to the stacked cards */
    @keyframes subtleBounce {
        0%, 100% { transform: translateX(-50%) translateY(10px); }
        50% { transform: translateX(-50%) translateY(13px); }
    }
    
    .feature-box.next {
        animation: subtleBounce 1.5s ease-in-out infinite;
    }
    
    /* Make progress bar more visible on mobile */
    .progress-bar {
        width: 50%; /* Make the progress bar wider on mobile */
        height: 6px; /* Make it taller for better visibility */
        background: rgba(40, 40, 40, 0.3); /* Increased opacity */
        bottom: -50px; /* Position it further below the cards */
        margin-bottom: 80px; /* Increased margin */
    }
    
    /* Agent types mobile styles */
    .agent-types {
        margin-top: 40px;
    }
    
    .agent-type-cards {
        gap: 20px;
    }
    
    .agent-type-card {
        width: 160px;
        padding: 40px 15px;
    }
    
    .agent-type-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .agent-type-label {
        font-size: 18px;
    }
}

/* ------------ Agent Types strip ------------ */

.agent-types {
    margin-top: 60px;
    text-align: center;
    font-family: 'VT323', monospace;
}

.agent-types-title {
    font-size: 18px;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 35px;
    color: #282828;
    opacity: .8;
}

.agent-type-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.agent-type-card {
    width: 160px;
    background: #fff;
    border-radius: 12px;
    padding: 30px 15px 25px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    cursor: pointer;
}

.agent-type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(0,0,0,.15);
    background: #f8f8f8;
}

.agent-type-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.agent-type-icon svg {
    width: 24px;
    height: 24px;
}

.agent-type-label {
    font-size: 18px;
    line-height: 1.2;
    color: #282828;
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .agent-type-cards {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .agent-type-card {
        width: 120px;
        padding: 25px 10px 20px;
    }
    
    .agent-type-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 15px;
    }
    
    .agent-type-label {
        font-size: 16px;
    }
}

/* ------------ Rolling Logos Section ------------ */

.rolling-trusted-by {
    margin-top: 80px;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
    overflow: hidden;
    text-align: center;
}

.rolling-separator {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        rgba(0, 0, 0, 0) 100%);
}

.rolling-trusted-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: 'VT323', monospace;
    font-size: 16px;
    letter-spacing: 0.15em;
    color: #00C8FF;
    background: #f5f5f5;
    padding: 0 20px;
    white-space: nowrap;
}

.rolling-logos-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    text-align: center;
}

.rolling-logos-container::before,
.rolling-logos-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.rolling-logos-container::before {
    left: 0;
    background: linear-gradient(to right, #f5f5f5 0%, rgba(245, 245, 245, 0) 100%);
}

.rolling-logos-container::after {
    right: 0;
    background: linear-gradient(to left, #f5f5f5 0%, rgba(245, 245, 245, 0) 100%);
}

.rolling-logos-track {
    display: flex;
    align-items: center;
    gap: 68px;
    width: fit-content;
}

.rolling-logo {
    height: 32px;
    width: auto;
    min-width: 32px;
    max-width: 200px;
    opacity: 0.4;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    flex-shrink: 0;
    object-fit: contain;
}

.rolling-logo:hover {
    opacity: 0.7;
    filter: grayscale(0%);
}

/* Specific logo sizes */
.rolling-logo[alt="Visa"] {
    height: 26px;
}

.rolling-logo[alt="Mastercard"] {
    height: 44px;
}

.rolling-logo[alt="Gensmo"] {
    height: 28px;
}

.rolling-logo[alt="Motormia"] {
    height: 19px;
}

.rolling-logo[alt="OneOff"] {
    height: 64px;
}

/* Wish: set to 2x the default rolling logo height */
.rolling-logo[alt="Wish"] {
    height: 64px;
}

/* Atman Labs size */
.rolling-logo[alt="Atman Labs"] {
    height: 77px; /* was 96px; reduced by ~20% */
}

.rolling-logo[alt="Aesthetic"] {
    height: 21px;
}

.rolling-logo[alt="Boujee"] {
    height: 48px; /* 1.5x of default 32px */
}

.rolling-logo[alt="CloudCloset"] {
    height: 51px; /* 20% smaller than 64px (2x of default 32px) */
}

.rolling-logo[alt="Yutori"] {
    height: 22px;
}

.rolling-logo[alt="Amex Ventures"] {
    height: 28px;
    /* Subtle desaturation for consistency in non-hero strip (lightened toward white) */
    filter: grayscale(80%) brightness(1.15) contrast(0.85);
    opacity: 0.65;
}

/* Gensmo: revert to default rolling logo styling (no special filter) */

.rolling-logo[alt="VGS"] {
    height: 34px;
}

/* Catalog: increase size by 15% and raise slightly */
.rolling-logo[alt="Catalog"] {
    height: 48px;
    margin-top: -0.165cm;
}

/* Tablet styles for rolling logos */
@media screen and (min-width: 481px) and (max-width: 768px) {
    .rolling-logos-container::before,
    .rolling-logos-container::after {
        width: 100px;
    }

    .rolling-logos-track {
        gap: 58px;
    }

    .rolling-logo {
        height: 30px;
    }

    .rolling-logo[alt="Visa"] {
        height: 24px;
    }

    .rolling-logo[alt="Mastercard"] {
        height: 40px;
    }

    .rolling-logo[alt="Gensmo"] {
        height: 26px;
    }

    .rolling-logo[alt="Motormia"] {
        height: 18px;
    }

    .rolling-logo[alt="OneOff"] {
        height: 58px;
    }

    .rolling-logo[alt="Aesthetic"] {
        height: 20px;
    }

    .rolling-logo[alt="Boujee"] {
        height: 45px; /* 1.5x of tablet default 30px */
    }

    .rolling-logo[alt="CloudCloset"] {
        height: 48px; /* 20% smaller than 60px (2x of tablet default 30px) */
    }

    .rolling-logo[alt="Yutori"] {
        height: 21px;
    }

    .rolling-logo[alt="AGI Inc"] {
        height: 26px;
    }

    .rolling-logo[alt="Rye"] {
        height: 28px;
    }

    .rolling-logo[alt="Amex Ventures"] {
        height: 26px;
    }

    .rolling-logo[alt="VGS"] {
        height: 31px;
    }

    /* Catalog tablet: 30px * 1.15 ≈ 35px */
    .rolling-logo[alt="Catalog"] {
        height: 46px;
        margin-top: -0.165cm;
    }
}

/* Mobile styles for rolling logos */
@media screen and (max-width: 768px) {
    .rolling-trusted-by {
        margin-top: 60px;
        margin-bottom: 30px;
    }

    .rolling-separator {
        margin-bottom: 30px;
    }

    .rolling-trusted-text {
        font-size: 14px;
        padding: 0 15px;
    }

    .rolling-logos-container::before,
    .rolling-logos-container::after {
        width: 80px;
    }

    .rolling-logos-track {
        gap: 50px;
    }

    .rolling-logo {
        height: 28px;
    }

    .rolling-logo[alt="Visa"] {
        height: 22px;
    }

    .rolling-logo[alt="Mastercard"] {
        height: 36px;
    }

    .rolling-logo[alt="Gensmo"] {
        height: 24px;
    }

    .rolling-logo[alt="Motormia"] {
        height: 17px;
    }

    .rolling-logo[alt="OneOff"] {
        height: 42px;
    }

    /* Wish mobile: 2x the mobile default (28px -> 56px) */
    .rolling-logo[alt="Wish"] {
        height: 56px;
    }

    /* Atman Labs mobile size */
    .rolling-logo[alt="Atman Labs"] {
        height: 67px; /* was 84px; reduced by ~20% */
    }

    .rolling-logo[alt="Aesthetic"] {
        height: 18px;
    }

    .rolling-logo[alt="Boujee"] {
        height: 42px; /* 1.5x of mobile default 28px */
    }

    .rolling-logo[alt="CloudCloset"] {
        height: 45px; /* 20% smaller than 56px (2x of mobile default 28px) */
    }

    .rolling-logo[alt="Yutori"] {
        height: 19px;
    }

    .rolling-logo[alt="AGI Inc"] {
        height: 24px;
    }

    .rolling-logo[alt="Rye"] {
        height: 26px;
    }

    .rolling-logo[alt="Amex Ventures"] {
        height: 24px;
    }

    .rolling-logo[alt="VGS"] {
        height: 29px;
    }

    /* Catalog mobile: 28px * 1.15 ≈ 32px */
    .rolling-logo[alt="Catalog"] {
        height: 42px;
        margin-top: -0.165cm;
    }
}

/* ------------ Hero Trusted By Variant ------------ */

.hero-trusted {
    position: fixed;
    bottom: 101px;
    left: 0;
    right: 0;
    margin: 0 auto;
    z-index: 1;
    width: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    text-align: center;
}

.hero-trusted * {
    pointer-events: auto;
}

.hero-trusted.show {
    opacity: 1;
}

.hero-trusted .rolling-separator {
    position: relative;
    text-align: center;
    margin-bottom: 41px;
    height: 2px;
    overflow: visible;
    background: linear-gradient(90deg,
        rgba(100, 230, 255, 0) 0%,
        rgba(100, 230, 255, 0.5) 20%,
        rgba(100, 230, 255, 1) 50%,
        rgba(100, 230, 255, 0.5) 80%,
        rgba(100, 230, 255, 0) 100%);
    box-shadow: 0 0 20px rgba(100, 230, 255, 0.8);
}

.hero-trusted .rolling-trusted-text {
    position: absolute;
    left: 50%;
    top: 13px;
    transform: translateX(-50%);
    font-family: 'VT323', monospace;
    font-size: 16px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    background: transparent;
    padding: 6px 22px;
    white-space: nowrap;
    text-shadow: none;
    box-shadow: none;
}

.hero-trusted .rolling-logos-container::before,
.hero-trusted .rolling-logos-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.hero-trusted .rolling-logos-container::before {
    left: 0;
    background: linear-gradient(to right, #00C8FF 0%, rgba(0, 200, 255, 0) 100%);
}

.hero-trusted .rolling-logos-container::after {
    right: 0;
    background: linear-gradient(to left, #00C8FF 0%, rgba(0, 200, 255, 0) 100%);
}

.hero-trusted .rolling-logo {
    filter: brightness(0) invert(1) grayscale(100%);
    opacity: 0.55;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keep Amex Ventures visible in hero strip (don’t force to white) */
.hero-trusted .rolling-logo[alt="Amex Ventures"] {
    /* Tone toward near-white in hero strip */
    filter: grayscale(100%) brightness(1.25) contrast(0.8);
    opacity: 0.8;
}

/* Gensmo hero: revert to default hero styling (no special override) */

.hero-trusted .rolling-logo[alt="Amex Ventures"]:hover {
    filter: grayscale(0%) brightness(1) contrast(1) drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
    opacity: 1;
    transform: translateY(-3px) scale(1.08);
}

.hero-trusted .rolling-logo:hover {
    opacity: 1;
    filter: grayscale(0%) drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
    transform: translateY(-3px) scale(1.08);
}

/* Remove transform effects on touch devices for better performance */
@media (hover: none) and (pointer: coarse) {
    .hero-trusted .rolling-logo:hover {
        transform: none;
    }

    .hero-trusted .rolling-logo:active {
        opacity: 1;
        filter: grayscale(0%) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
        transition: all 0.15s ease;
    }
}

/* Mobile styles for hero variant */
@media screen and (max-width: 768px) {
    .hero-trusted {
        bottom: calc(80px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }

    .hero-trusted .rolling-logos-container::before,
    .hero-trusted .rolling-logos-container::after {
        width: 80px;
    }

    .hero-trusted .rolling-separator {
        margin-bottom: 30px;
    }

    .hero-trusted .rolling-trusted-text {
        font-size: 14px;
        padding: 0 15px;
    }
}