/* ==========================================================================
   1. Root Variables & Global Reset
   ========================================================================== */
:root {
    --ink: #0d0f10;
    --paper: #f3f1ee;
    --muted: #6f7377;
    --line: rgba(13, 15, 16, 0.16);
    --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Instrument Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.portfolio-body {
    background-color: #ffffff;
    color: #1e293b;
}

img, video {
    display: block;
    max-width: 100%;
}

/* ==========================================================================
   2. Animations & Transition Utilities
   ========================================================================== */
.r {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition: opacity 0.9s var(--ease), transform 1.05s var(--ease);
    transition-delay: var(--d, 0ms);
    will-change: opacity, transform;
}

    .r.blur {
        filter: blur(8px);
        transition: opacity 0.9s var(--ease), transform 1.05s var(--ease), filter 0.9s var(--ease);
    }

    .r.scale {
        transform: translate3d(0, 18px, 0) scale(0.96);
    }

    .r.in {
        opacity: 1;
        transform: none;
        filter: none;
    }

@keyframes heroZoom {
    to {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .r {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   3. Navigation Component
   ========================================================================== */
.nav {
    position: relative;
    z-index: 3;
    padding: 18px 20px 0;
    display: flex;
    justify-content: center;
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: clamp(26px, 3.4vw, 44px);
    padding: 8px 20px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

    .brand svg {
        width: 16px;
        height: 16px;
        opacity: 0.95;
    }

.nav__link {
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s var(--ease);
}

    .nav__link:hover {
        opacity: 0.6;
    }

/* ==========================================================================
   4. Hero Headers (Top Section & Middle Scene Section)
   ========================================================================== */
.hero {
    position: relative;
    min-height: 126vh;
    min-height: 126svh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #0b0d0e;
    isolation: isolate;
}

.hero--scene {
    position: relative;
    background-color: #0b0d0e;
    min-height: 100vh;
    min-height: 100svh;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
}

    .hero__media video,
    .hero__media img,
    .hero__media .hero__img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        display: block;
        transform: scale(1.07);
        animation: heroZoom 16s var(--ease) forwards;
    }

    .hero__media::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(8, 10, 11, 0.55) 0%, rgba(8, 10, 11, 0.10) 24%, rgba(8, 10, 11, 0.20) 52%, rgba(8, 10, 11, 0.44) 80%, rgba(8, 10, 11, 0.30) 100%), radial-gradient(120% 80% at 50% 42%, rgba(8, 10, 11, 0) 40%, rgba(8, 10, 11, 0.45) 100%);
    }

.hero__fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: clamp(200px, 34%, 430px);
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(243, 241, 238, 0) 0%, rgba(243, 241, 238, 0.13) 26%, rgba(243, 241, 238, 0.40) 50%, rgba(243, 241, 238, 0.71) 70%, rgba(243, 241, 238, 0.94) 88%, var(--paper) 100%);
}

.hero__fade--dark {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: clamp(200px, 34%, 430px);
    z-index: 4;
    pointer-events: none;
    background: linear-gradient( 180deg, rgba(11, 13, 14, 0) 0%, rgba(11, 13, 14, 0.4) 30%, rgba(0, 0, 0, 0.85) 75%, #000000 100% ) !important;
}

.hero__body {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(92px, 16vh, 200px) 22px 0;
}

.hero__mark {
    margin-bottom: 26px;
}

.hero__lead {
    margin: 0;
    max-width: 23ch;
    color: #fff;
    font-size: clamp(17px, 2.1vw, 22px);
    line-height: 1.36;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-shadow: 0 1px 24px rgba(0, 0, 0, 0.35);
}

.hero__cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: clamp(58px, 11.5vh, 134px);
}

.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 7px;
    color: #fff;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 0.45s var(--ease), border-color 0.45s var(--ease);
}

    .btn span {
        position: relative;
        z-index: 1;
    }

    .btn::before {
        content: "";
        position: absolute;
        inset: 0;
        background: #fff;
        transform: translateY(101%);
        transition: transform 0.5s var(--ease);
    }

    .btn:hover {
        color: var(--ink);
        border-color: #fff;
    }

        .btn:hover::before {
            transform: translateY(0);
        }

.btn--solid {
    background: #fff;
    border-color: #fff;
    color: var(--ink);
}

    .btn--solid::before {
        background: var(--ink);
    }

    .btn--solid:hover {
        color: #fff;
        border-color: var(--ink);
    }

/* ==========================================================================
   5. Carousel & Card Showcase Section
   ========================================================================== */
.features-section {
    padding-top: 5rem;
    padding-bottom: 5rem;
    background-color: #ffffff;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

#features {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-bottom: none !important;
}

@media (min-width: 1024px) {
    .features-section {
        padding-top: 7rem;
        padding-bottom: 7rem;
    }
}

.features-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .features-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .features-container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.features-header {
    text-align: center;
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4rem;
}

.features-tag {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.features-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0;
}

@media (min-width: 640px) {
    .features-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

.features-desc {
    color: #475569;
    margin-top: 1rem;
    font-size: 1rem;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .features-desc {
        font-size: 1.125rem;
    }
}

.carousel-wrapper {
    position: relative;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 2.75rem;
    height: 2.75rem;
    background-color: rgba(255, 255, 255, 0.95);
    color: #334155;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

    .carousel-btn:hover {
        background-color: #ffffff;
        color: #020617;
        transform: translateY(-50%) scale(1.05);
    }

.carousel-btn--prev {
    left: 0;
    margin-left: -0.5rem;
}

.carousel-btn--next {
    right: 0;
    margin-right: -0.5rem;
}

@media (min-width: 768px) {
    .carousel-btn--prev {
        margin-left: -1.5rem;
    }

    .carousel-btn--next {
        margin-right: -1.5rem;
    }
}

.carousel-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.cards-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .cards-track::-webkit-scrollbar {
        display: none;
    }

@media (min-width: 768px) {
    .cards-track {
        gap: 2rem;
    }
}

.showcase-card {
    flex: 0 0 18rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    .showcase-card:hover {
        background-color: #ffffff;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

@media (min-width: 640px) {
    .showcase-card {
        flex: 0 0 20rem;
    }
}

@media (min-width: 768px) {
    .showcase-card {
        flex: 0 0 21.875rem;
    }
}

.card-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #e2e8f0;
    margin-bottom: 1rem;
}

    .card-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-caption {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
}

/* ==========================================================================
   6. Lady Banner (Clear Center + Top & Bottom Black Blur Mask)
   ========================================================================== */
.lady-banner {
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    padding: 0 !important;
}

    .lady-banner .v-blur-wrapper,
    .v-blur-wrapper {
        position: relative;
        width: 100%;
        max-height: 440px;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        border-radius: 0.5rem;
        margin-left: auto;
        margin-right: auto;
        background-color: #000000;
    }

    .lady-banner .v-blur-img,
    .v-blur-img {
        display: block;
        max-width: 100%;
        height: auto;
        max-height: 440px;
        margin-left: auto;
        margin-right: auto;
        object-fit: contain;
        object-position: center center;
    }

    /* 
   Overlay with transparent window in the middle:
   - Top & bottom: heavy 12px blur + dark fade into #000000
   - Middle (36% to 64%): 100% clear and unblurred
*/
    .lady-banner .v-blur-wrapper::after,
    .v-blur-wrapper::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        background: linear-gradient( to bottom, #000000 0%, rgba(0, 0, 0, 0.8) 12%, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0) 64%, rgba(0, 0, 0, 0.8) 88%, #000000 100% );
        -webkit-mask-image: linear-gradient( to bottom, black 0%, rgba(0, 0, 0, 0.9) 18%, transparent 36%, transparent 64%, rgba(0, 0, 0, 0.9) 82%, black 100% );
        mask-image: linear-gradient( to bottom, black 0%, rgba(0, 0, 0, 0.9) 18%, transparent 36%, transparent 64%, rgba(0, 0, 0, 0.9) 82%, black 100% );
    }

/* ==========================================================================
   7. Story Section & Right-Shifted 3D Model Turnaround
   ========================================================================== */
#features + .story,
.features-section + .story {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.story {
    background-color: #000000 !important;
    color: #f8fafc !important;
    position: relative;
    z-index: 10;
    padding: clamp(64px, 11vh, 124px) 0 clamp(80px, 14vh, 150px);
}

/* Extended right offset for 3D model section */
#story .wrap {
    width: min(1320px, 92vw);
    margin-left: auto;
    margin-right: clamp(1rem, 4vw, 5rem);
    padding-left: clamp(4rem, 18vw, 22rem);
    padding-right: 1.5rem;
}

#story .story__grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: clamp(40px, 5vw, 90px);
    align-items: start;
}

#story .stat {
    padding-top: 6px;
    margin-left: 0;
}

.story .stat__rule {
    height: 1px;
    background: rgba(255, 255, 255, 0.2) !important;
    width: 100%;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.1s var(--ease);
    transition-delay: var(--d, 0ms);
}

    .story .stat__rule.in {
        transform: scaleX(1);
    }

.story .stat__num {
    margin: 20px 0 12px;
    line-height: 1;
}

#story .stat__num video {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    border-radius: 0.75rem;
}

.story .stat__label {
    color: #cbd5e1 !important;
    margin: 0;
    font-size: 11px;
    line-height: 1.65;
}

.story .story__head {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(27px, 4.05vw, 50px);
    line-height: 1.12;
    letter-spacing: -0.032em;
    font-weight: 500;
}

.story .story__sub {
    margin: clamp(14px, 1.4vw, 22px) 0 0;
    font-size: clamp(15px, 1.6vw, 20px);
    line-height: 1.2;
    letter-spacing: -0.028em;
    font-weight: 500;
    color: #e2e8f0 !important;
    position: relative;
    z-index: 10;
}

    .story .story__sub .dim {
        color: #94a3b8 !important;
    }

    .story a,
    .story .story__sub a,
    .story .story__link {
        display: inline-block;
        pointer-events: auto !important;
        cursor: pointer !important;
        position: relative;
        z-index: 20;
        text-decoration: none !important;
        color: inherit;
        outline: none;
    }

        .story a:link, .story a:visited, .story a:hover, .story a:active, .story a:focus,
        .story .story__sub a:link, .story .story__sub a:visited, .story .story__sub a:hover,
        .story .story__sub a:active, .story .story__sub a:focus {
            text-decoration: none !important;
        }

        .story .story__sub a:hover,
        .story .story__link:hover .story__sub {
            color: #60a5fa !important;
            opacity: 1 !important;
        }

/* ==========================================================================
   Mobile Layout Override for Chinese Lady Model & Text
   ========================================================================== */
@media (max-width: 768px) {
    /* Reset the heavy right margin and padding on mobile */
    #story .wrap {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Stack the model and text vertically in one column */
    #story .story__grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Center-align the model and text container for mobile viewing */
    #story .stat {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #story .stat__num video {
        margin-left: auto;
        margin-right: auto;
    }

    .story .story__head,
    .story .story__sub {
        text-align: center;
    }
}