/* Digital Arise — Apple-Inspired Custom Stylesheet */

:root {
            --apple-ease: cubic-bezier(0.25, 1, 0.5, 1);
            --nav-height: 44px;
        }

        * {
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", sans-serif;
            background-color: #FFFFFF;
            color: #1D1D1F;
            overflow-x: hidden;
        }

        /* Exact Apple 44px Frosted Global Nav */
        .apple-nav {
            height: 44px;
            background: rgba(251, 251, 253, 0.82);
            backdrop-filter: saturate(180%) blur(20px);
            -webkit-backdrop-filter: saturate(180%) blur(20px);
            border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        }

        /* Apple Mega Menu Curtain */
        .mega-curtain {
            background: rgba(251, 251, 253, 0.96);
            backdrop-filter: saturate(180%) blur(24px);
            -webkit-backdrop-filter: saturate(180%) blur(24px);
            transition: opacity 0.28s var(--apple-ease), transform 0.32s var(--apple-ease);
        }

        /* Apple Pill Buttons */
        .btn-apple-primary {
            background-color: #0071E3;
            color: #FFFFFF;
            border-radius: 980px;
            transition: background-color 0.22s var(--apple-ease), transform 0.18s var(--apple-ease);
        }
        .btn-apple-primary:hover {
            background-color: #0077ED;
        }
        .btn-apple-primary:active {
            transform: scale(0.98);
        }

        .btn-apple-outline-light {
            background-color: transparent;
            color: #0071E3;
            border: 1px solid #0071E3;
            border-radius: 980px;
            transition: all 0.22s var(--apple-ease);
        }
        .btn-apple-outline-light:hover {
            background-color: #0071E3;
            color: #FFFFFF;
        }

        .btn-apple-outline-dark {
            background-color: transparent;
            color: #2997FF;
            border: 1px solid #2997FF;
            border-radius: 980px;
            transition: all 0.22s var(--apple-ease);
        }
        .btn-apple-outline-dark:hover {
            background-color: #2997FF;
            color: #000000;
        }

        /* Apple Store Shelf Card Hover */
        .apple-store-card {
            background: #FFFFFF;
            border-radius: 18px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
            border: 1px solid rgba(0, 0, 0, 0.04);
            transition: transform 0.4s var(--apple-ease), box-shadow 0.4s var(--apple-ease);
        }
        .apple-store-card:hover {
            transform: scale(1.015);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
        }

        /* Apple Ribbon Entrance */
        @keyframes ribbonReveal {
            0% { opacity: 0; transform: translateY(-6px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .apple-ribbon {
            animation: ribbonReveal 0.6s var(--apple-ease) forwards;
        }

        /* Subtle Specular Reflection on Dark Hero */
        .cinema-reflection {
            background: linear-gradient(125deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.02) 40%, transparent 60%);
        }

        /* Apple Scroll-Choreographed Reveal */
        .apple-reveal {
            opacity: 0;
            transform: translateY(28px) scale(0.985);
            transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
            will-change: opacity, transform;
        }
        .apple-reveal.is-visible {
            opacity: 1;
            transform: translateY(0) scale(1);
        }

        /* Hero Parallax Background Layer */
        .hero-bg-layer {
            will-change: transform;
            transition: transform 0.12s linear;
        }

        /* 3D Hardware Tilt & Specular Sheen */
        .tilt-stage {
            perspective: 1200px;
        }
        .tilt-card {
            transform-style: preserve-3d;
            transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
            position: relative;
        }
        .tilt-sheen {
            position: absolute;
            inset: 0;
            border-radius: inherit;
            pointer-events: none;
            background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 38%, transparent 70%);
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .tilt-card:hover .tilt-sheen {
            opacity: 1;
        }

        /* Auto-Gliding Apple TV+ / Spatial Creator Filmstrip */
        @keyframes filmstripGlide {
            0% { transform: translateX(0); }
            100% { transform: translateX(-50%); }
        }
        .filmstrip-track {
            display: flex;
            width: max-content;
            animation: filmstripGlide 42s linear infinite;
            will-change: transform;
        }
        .filmstrip-track:hover {
            animation-play-state: paused;
        }

        /* Hide Scrollbar for Horizontal Filter Bar */
        .no-scrollbar::-webkit-scrollbar { display: none; }
        .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

        /* Tabular Numbers for Apple Price Alignment */
        .tabular-price {
            font-variant-numeric: tabular-nums;
        }

        /* Sliding Category Pill Track & Spring Transitions */
        .cat-pill-track {
            position: relative;
        }
        #catSlidingIndicator {
            position: absolute;
            top: 4px;
            bottom: 4px;
            border-radius: 9999px;
            background: #1D1D1F;
            transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), width 0.38s cubic-bezier(0.22, 1, 0.36, 1);
            pointer-events: none;
            z-index: 0;
        }

        /* Smooth Product Card Entrance & Tactile Press */
        @keyframes cardPopIn {
            0% { opacity: 0; transform: translateY(14px) scale(0.985); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        .card-animate-in {
            animation: cardPopIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
        }

        /* Smooth Price Number Crossfade */
        @keyframes priceTick {
            0% { opacity: 0.35; transform: translateY(4px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        .price-tick {
            display: inline-block;
            animation: priceTick 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        }

        /* Configurator Sheet Smooth Scale & Backdrop */
        #configuratorModal {
            transition: opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }
        #configuratorPanel {
            transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
        }

        /* ========================================================= */
        /* APPLE OLED DARK MODE THEME SYSTEM                         */
        /* ========================================================= */
        html.dark body {
            background-color: #000000;
            color: #F5F5F7;
        }
        html.dark .apple-nav {
            background: rgba(22, 22, 24, 0.82);
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }
        html.dark .mega-curtain {
            background: rgba(24, 24, 27, 0.96);
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        }
        html.dark .apple-ribbon {
            background-color: #161618;
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        html.dark .bg-white {
            background-color: #161618 !important;
        }
        html.dark .bg-\[\#F5F5F7\],
        html.dark .bg-\[\#FBFBFD\] {
            background-color: #0C0C0E !important;
        }
        html.dark .bg-white\/95 {
            background-color: rgba(24, 24, 27, 0.92) !important;
        }
        html.dark .text-\[\#1D1D1F\],
        html.dark .text-\[\#1D1D1F\]\/80 {
            color: #F5F5F7 !important;
        }
        html.dark .text-\[\#6E6E73\] {
            color: #A1A1A6 !important;
        }
        html.dark .border-black\/\[0\.04\],
        html.dark .border-black\/\[0\.05\],
        html.dark .border-black\/\[0\.06\],
        html.dark .border-black\/\[0\.07\],
        html.dark .border-black\/\[0\.08\],
        html.dark .border-black\/\[0\.1\],
        html.dark .border-\[\#D2D2D7\]\/60,
        html.dark .border-\[\#D2D2D7\]\/80 {
            border-color: rgba(255, 255, 255, 0.11) !important;
        }
        html.dark .bg-black\/\[0\.05\] {
            background-color: rgba(255, 255, 255, 0.1) !important;
        }
        html.dark .hover\:bg-black\/\[0\.09\]:hover,
        html.dark .hover\:bg-black\/\[0\.08\]:hover {
            background-color: rgba(255, 255, 255, 0.16) !important;
        }
        html.dark .apple-store-card {
            background-color: #161618;
            border: 1px solid rgba(255, 255, 255, 0.09);
            box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
        }
        html.dark .apple-store-card:hover {
            box-shadow: 0 14px 36px rgba(0, 113, 227, 0.16);
        }
        html.dark #catSlidingIndicator {
            background: #0071E3;
        }
        html.dark footer {
            background-color: #0A0A0C !important;
        }
        html.dark .mix-blend-multiply {
            mix-blend-mode: screen;
            opacity: 0.16 !important;
        }
        html.dark .from-\[\#F5F5F7\]\/90 {
            --tw-gradient-from: rgba(12, 12, 14, 0.92) !important;
        }
        html.dark .via-\[\#F5F5F7\]\/75,
        html.dark .via-\[\#F5F5F7\]\/72 {
            --tw-gradient-via: rgba(12, 12, 14, 0.78) !important;
        }
        html.dark .to-\[\#F5F5F7\]\/95 {
            --tw-gradient-to: rgba(12, 12, 14, 0.96) !important;
        }
        /* Adaptive Digital Arise Brand Emblem */
        .da-navy {
            fill: #081E4A;
            transition: fill 0.25s ease;
        }
        .da-blue {
            fill: #0077D4;
            transition: fill 0.25s ease;
        }
        .da-cutout {
            fill: #FBFBFD;
            transition: fill 0.25s ease;
        }
        html.dark .da-navy {
            fill: #E2E8F0;
        }
        html.dark .da-blue {
            fill: #2997FF;
        }
        html.dark .da-cutout {
            fill: #161618;
        }
        /* Adaptive OpenAI / ChatGPT Knot Vector (Black in Light Mode, White in Dark Mode) */
        .openai-mark {
            color: #1D1D1F;
            transition: color 0.25s ease;
        }
        html.dark .openai-mark {
            color: #FFFFFF;
        }
