/* PURE APPLE DESIGN SYSTEM 3.0 */
@layer base {
    html {
        font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        scroll-behavior: smooth;
        background-color: #F5F5F7;
        /* Firefox */
        scrollbar-width: thin;
        scrollbar-color: #5C3BDB #fbfbfd;
    }

    body {
        color: #1d1d1f;
        line-height: 1.47059;
        letter-spacing: -0.022em;
        overflow-x: hidden;
        /* Anti-copy protection */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .apple-text-gradient {
        background: linear-gradient(180deg, #1d1d1f 0%, #86868b 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .apple-text-gradient-blue {
        background: linear-gradient(135deg, #0071e3 0%, #00d2ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}

/* Custom Scrollbar (Chrome/Safari/Edge) */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #fbfbfd;
}

::-webkit-scrollbar-thumb {
    background: #5C3BDB;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6d28d9;
}


/* 1. HEADER */
.header-glass-ultimate {
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    height: 80px;
    transition: background 0.4s ease;
}

/* 2. TYPOGRAPHY */
.hero-title {
    font-size: clamp(40px, 8vw, 84px);
    line-height: 1.05;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: #1d1d1f;
}

.hero-subtitle {
    font-size: clamp(21px, 4vw, 24px);
    line-height: 1.4;
    font-weight: 400;
    color: #86868b;
}

.section-headline {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 600;
    letter-spacing: -0.005em;
}

/* PREMIUM UTILITIES */
.glass-card-pro {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.text-shimmer {
    background: linear-gradient(to right, #ffffff 0%, #a855f7 50%, #ffffff 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.glow-ambient {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}


/* 3. CARDS & GLASS */
.apple-card {
    background: #FFFFFF;
    border-radius: 34px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 20px 40px rgba(0, 0, 0, 0.04);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.apple-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 30px 60px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 0, 0, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), 0 20px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}

.glass-card-dark {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.glass-card-dark:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(20, 20, 20, 0.8);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* Feature Block Large */
.feature-block-lg {
    min-height: 600px;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: #F5F5F7;
}

/* 4. BUTTONS */
.btn-cta {
    background-color: #0071e3;
    color: white;
    padding: 12px 26px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.btn-cta:hover {
    background-color: #0077ED;
}

.btn-cta-dark {
    background-color: #1d1d1f;
    color: white;
    padding: 14px 32px;
    border-radius: 980px;
}

/* 5. ANIMATIONS & PERSPECTIVE */
.reveal-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.perspective-frame {
    perspective: 2000px;
}

.perspective-card {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
}

.perspective-card:hover {
    transform: rotateX(5deg) rotateY(-5deg) translateY(-10px);
}

.parallax-img {
    transition: transform 0.5s cubic-bezier(0.33, 1, 0.68, 1);
}

.card-stack-section {
    position: relative;
    padding-top: 10vh;
}

.sticky-feature-card {
    position: sticky;
    top: 100px;
    margin-bottom: 30vh;
}

/* 6. RESPONSIVE GALLERY */
.apple-gallery {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px 0;
}

.gallery-item {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .apple-gallery {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 40px 0;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .apple-gallery::-webkit-scrollbar {
        display: none;
    }

    .gallery-item {
        scroll-snap-align: center;
        flex: 0 0 85%;
        margin: 0;
    }
}

/* 6. INPUTS */
.apple-input {
    width: 100%;
    padding: 16px;
    background: white;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    color: #1d1d1f;
    transition: all 0.2s ease;
}

.apple-input:focus {
    border-color: #0071e3;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
    outline: none;
}

/* Floating Label */
.floating-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-input {
    width: 100%;
    padding: 20px 16px 6px;
    background: #F5F5F7;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 17px;
    color: #1d1d1f;
    transition: all 0.2s;
}

.floating-input:focus {
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    outline: none;
}

.floating-label {
    position: absolute;
    left: 16px;
    top: 18px;
    font-size: 17px;
    color: #86868b;
    pointer-events: none;
    transition: all 0.2s;
}

.floating-input:focus~.floating-label,
.floating-input:not(:placeholder-shown)~.floating-label {
    top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #0071e3;
    text-transform: uppercase;
}

/* 7. SOCIAL ISLAND */
.social-island {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 100px;
}

.social-link {
    font-size: 20px;
    color: #333;
    transition: transform 0.2s ease;
}

.social-link:hover {
    transform: scale(1.2);
}

/* 8. APPLE MINIMALIST SPLIT (Clean White) */
.minimalist-scroll-section {
    position: relative;
    background-color: #ffffff;
    width: 100%;
}

.scroll-split-layout {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Left Column: Text (Scrolls) */
.scroll-text-side {
    width: 40%;
    padding: 120px 60px 60px 80px;
    /* Reduced bottom padding */
    z-index: 10;
}

.text-feature-block {
    height: 70vh;
    /* Gives space for scroll feel */
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0.2;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    transform: translateY(20px);
}

.text-feature-block.active {
    opacity: 1;
    transform: translateY(0);
}

.pro-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #5C3BDB;
    /* Brand Mauve */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.text-feature-block h3 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.text-feature-block p {
    font-size: 1.5rem;
    color: #86868b;
    line-height: 1.4;
    font-weight: 400;
    max-width: 90%;
}

.text-link {
    display: inline-flex;
    align-items: center;
    margin-top: 30px;
    font-size: 1.1rem;
    color: #5C3BDB;
    /* Brand Mauve */
    font-weight: 600;
    text-decoration: none;
    transition: hover 0.3s ease;
}

.text-link:hover {
    text-decoration: underline;
}

.text-link i {
    margin-left: 8px;
    font-size: 0.8em;
}

/* Right Column: Image (Sticky) */
.scroll-visual-side {
    width: 60%;
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 60px 0;
    z-index: 5;
}

.visual-sticky-frame {
    width: 100%;
    height: 90%;
    background: #f5f5f7;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.1);
}

.visual-sticky-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

/* Tablet & Mobile */
@media (max-width: 1024px) {
    .text-feature-block h3 {
        font-size: 2.8rem;
    }

    .text-feature-block p {
        font-size: 1.3rem;
    }

    .scroll-text-side {
        width: 45%;
        padding-left: 40px;
        padding-right: 40px;
    }

    .scroll-visual-side {
        width: 55%;
        height: 80vh;
        top: 10vh;
        padding: 40px 40px 40px 0;
    }

    .visual-sticky-frame {
        height: 80%;
    }
}

@media (max-width: 991px) {
    .minimalist-scroll-section {
        padding-top: 60px;
    }

    .scroll-split-layout {
        flex-direction: column-reverse;
    }

    .scroll-text-side {
        width: 100%;
        padding: 40px 24px;
    }

    .text-feature-block {
        height: auto;
        min-height: auto;
        margin-bottom: 80px;
        opacity: 1;
        transform: none;
    }

    .text-feature-block h3 {
        font-size: 2.2rem;
    }

    .text-feature-block p {
        font-size: 1.15rem;
    }

    .scroll-visual-side {
        width: 100%;
        height: 50vh;
        position: relative;
        top: 0;
        padding: 0 24px;
        margin-bottom: 20px;
    }

    .visual-sticky-frame {
        height: 100%;
        border-radius: 20px;
    }
}

/* 9. PREMIUM DASHBOARD WHEEL (Apple-Style) */
.dashboard-showcase {
    padding: 120px 0;
    background: #ffffff;
    overflow: hidden;
}

.showcase-stage {
    position: relative;
    width: 100%;
    max-width: 1300px;
    height: 620px;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2500px;
    margin: 0 auto;
}

.laptop-wheel {
    position: relative;
    width: 800px;
    height: 500px;
    transform-style: preserve-3d;
}

.laptop-item {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform, opacity, filter;
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.laptop-item.active {
    transform: translate3d(0, 0, 350px);
    z-index: 50;
    filter: blur(0) drop-shadow(0 40px 80px rgba(0, 0, 0, 0.12));
    opacity: 1;
}

.laptop-item.left {
    transform: translate3d(-450px, 40px, -450px) rotateY(25deg) scale(0.85);
    z-index: 20;
    filter: blur(4px) brightness(0.85);
    opacity: 0.5;
}

.laptop-item.right {
    transform: translate3d(450px, 40px, -450px) rotateY(-25deg) scale(0.85);
    z-index: 20;
    filter: blur(4px) brightness(0.85);
    opacity: 0.5;
}

/* Real-Deal MacBook Pro Styling */
/* MOCKUP IMAGES CONTAINER */
.generated-macbook-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    transition: transform 0.5s ease;
}

.laptop-item.active .generated-macbook-container {
    transform: scale(1.05);
    /* Slight zoom on active */
}

.laptop-caption {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.laptop-item.active .laptop-caption {
    opacity: 1;
    transform: translateY(0);
}

.laptop-item:not(.active) .laptop-caption {
    opacity: 0;
    transform: translateY(15px);
}

.laptop-caption h4 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1d1d1f;
    letter-spacing: -0.02em;
}

/* TABLET REFINEMENT: Scale down for iPad and small screens */
@media (max-width: 1200px) and (min-width: 769px) {
    .showcase-stage {
        max-width: 950px;
        height: 550px;
        perspective: 2000px;
    }

    .laptop-wheel {
        width: 700px;
        height: 420px;
    }

    .laptop-item.active {
        transform: translate3d(0, 0, 250px);
    }

    .laptop-item.left {
        transform: translate3d(-320px, 30px, -350px) rotateY(20deg) scale(0.85);
    }

    .laptop-item.right {
        transform: translate3d(320px, 30px, -350px) rotateY(-20deg) scale(0.85);
    }

    .laptop-caption h4 {
        font-size: 1.4rem;
    }
}

/* MOBILE REFINEMENT: SINGLE "HERO" LAPTOP (One by One) */
@media (max-width: 768px) {
    .dashboard-showcase {
        padding: 60px 0 80px;
        height: auto;
    }

    .showcase-stage {
        height: auto;
        /* Allow growing height */
        perspective: none;
        /* Disable 3D */
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 24px;
        display: block;
    }

    .laptop-wheel {
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 60px;
        /* Vertical spacing between laptops */
        transform: none;
    }

    /* Reset all laptop items to be static blocks */
    .laptop-item,
    .laptop-item.active,
    .laptop-item.left,
    .laptop-item.right {
        position: relative;
        width: 100%;
        height: auto;
        transform: none !important;
        opacity: 1 !important;
        filter: none !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        left: auto;
        top: auto;
        margin: 0;
    }

    /* Container for the image */
    .generated-macbook-container {
        width: 100%;
        max-width: 100%;
        transform: none !important;
    }

    /* Force captions to be visible */
    .laptop-caption {
        opacity: 1 !important;
        transform: translateY(0) !important;
        margin-top: 20px;
        position: relative;
    }

    .laptop-caption h4 {
        font-size: 1.4rem;
        color: #1d1d1f;
        text-align: center;
    }
}