/* -- TABLE OF CONTENTS --
   1. VARIABLES & DESIGN TOKENS
   2. GLOBAL RESET & BASE
   3. ATMOSPHERE LAYERS
   4. 3D CANVAS (SPLINE)
   5. NAVIGATION (DYNAMIC ISLAND)
   6. SECTIONS & LAYOUT
   7. PREMIUM COMPONENTS (CARDS, BUTTONS)
   8. CINEMATIC TIMELINE
   9. AUTHENTICATION & MODALS
   10. RESPONSIVE DESIGN
*/

/* Fonts are loaded in HTML for better performance */

:root {
    /* LUXURY MONOCHROME DARK MODE */
    --bg-primary: #000000;
    --bg-rgb: 0, 0, 0;
    --bg-secondary: #050505;
    --text-main: #ffffff;
    --accent-color: #ffffff;

    /* Theme Transition - Ultra-Low Latency */
    --theme-transition:
        background-color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.1s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);

    /* Auth Colors */
    --discord-brand: #5865f2;
    --google-brand: #db4437;
    --fb-brand: #1877f2;

    /* Compatibility with existing variables */
    --bg-color: var(--bg-primary);
    --surface-color: var(--bg-secondary);
    --text-color: var(--text-main);
    --text-heading: var(--text-main);
    --text-secondary: #a0a0a0;

    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.05);
    --glass-shadow: none;
    --apple-blur: blur(20px) saturate(180%);

    --canvas-filter: none;
    --vignette-grad: radial-gradient(
        ellipse at 50% 50%,
        transparent 40%,
        rgba(0, 0, 0, 1) 100%
    );

    /* Buttons - Premium Monochrome */
    --btn-bg: transparent;
    --btn-border: #ffffff;
    --btn-text: #ffffff;
    --btn-hover-bg: #ffffff;
    --btn-hover-text: #000000;
    --btn-shadow: 0 4px 20px rgba(255, 255, 255, 0.05);

    /* Atmosphere */
    --ambient-glow: none;
    --light-arc: none;

    /* LUXURY COLORS - Neutral Slate */
    --luxury-neutral: #1a1a1a;
    --bone-silver: #f5f5f7;
    --timeline-accent: #6e2cf2;
    /* Premium Deep Purple for Timeline only */

    /* ELEMENT-SPECIFIC CUSTOMIZABLE VARS */
    --hero-title-color: #ffffff;
    --hero-tagline-color: #a0a0a0;
    --hero-bg-color: #000000;
    --hero-line-color: #ffffff;
    --nav-bg: var(--glass-bg);
    --nav-text: var(--text-color);
    --nav-active: var(--accent-color);
    --section-title-color: var(--text-heading);
    --card-bg: var(--glass-bg);
    --card-border: var(--glass-border);
    --card-text: var(--text-color);
    --footer-bg: transparent;
    --footer-text: var(--text-color);
    --scroll-indicator-color: var(--text-color);
    /* PREMIUM TYPOGRAPHY SYSTEM */
    --font-display: 'Clash Display', sans-serif;
    --font-ui: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    --flash-color: #000;
}

.light-theme,
.light-theme-init {
    --bg-color: #f5f5f7;
    --bg-rgb: 245, 245, 247;
    --surface-color: #ffffff;
    --text-color: #000000;
    --text-heading: #000000;
    --text-secondary: #666666;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-highlight: rgba(255, 255, 255, 1);
    --glass-shadow: none;

    --canvas-filter: none;
    --vignette-grad: radial-gradient(
        circle at center,
        transparent 30%,
        rgba(0, 0, 0, 0.05) 150%
    );

    --btn-bg: #000000;
    --btn-border: #000000;
    --btn-text: #ffffff;
    --btn-hover-bg: #333333;
    --btn-hover-text: #ffffff;
    --btn-shadow: none;

    --ambient-glow: none;
    --light-arc: none;

    --hero-title-color: #000000;
    --hero-tagline-color: #000000;
    --hero-bg-color: #f9f7ff;
    --hero-line-color: #ffffff;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --nav-text: #000000;
    --nav-active: #ffffff;
    --section-title-color: #000000;
    --accent-color: #000000;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(0, 0, 0, 0.15);
    --card-text: #000000;
    --footer-bg: transparent;
    --footer-text: #000000;
    --scroll-indicator-color: #000000;
    --flash-color: #fff;
}

/* -- AUTH UI REMOVAL -- */
.auth-overlay,
.login-modal,
.auth-modal,
.auth-trigger,
.user-trigger,
.social-options,
.social-login-btns {
    display: none !important;
}

* {
    box-sizing: border-box;
}

html {
    /* scroll-behavior removed for performance */
    scroll-behavior: auto;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    transition:
        background-color 0.1s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: scroll;
    overflow-x: hidden;
    font-size: clamp(14px, 1.2vw, 18px);
    /* Fluid typography */
}

/* Device-Specific Height & Scaling Fixes */
.is-mobile section {
    min-height: 100dvh;
    /* Dynamic viewport height for mobile */
}

.is-ios .h-screen {
    height: -webkit-fill-available;
}

/* -- TAILWIND REPLACEMENT UTILITIES -- */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.h-screen {
    height: 100vh;
}

.w-full {
    width: 100%;
}

.max-w-7xl {
    max-width: 80rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .mb-12 { margin-bottom: 2rem; }
    .mt-4 { margin-top: 0.5rem; }
}

.text-center {
    text-align: center;
}

.gap-6 {
    gap: 1.5rem;
}

.z-20 {
    z-index: 20;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* -- ATMOSPHERE LAYERS -- */

/* -- PREMIUM THEME SWITCHER -- */
#themeToggleContainer {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-switch {
    position: relative;
    width: 64px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition:
        transform 0.4s cubic-bezier(0.2, 1, 0.2, 1),
        border-color 0.4s,
        background-color 0.4s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    /* Force GPU composition */
    transform: translateZ(0);
}

/* -- SKELETON LOADERS & SHIMMER -- */
.klyp-skeleton {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
}

.light-theme .klyp-skeleton {
    background: rgba(0, 0, 0, 0.04);
}

.klyp-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    animation: klyp-shimmer 2s infinite;
}

.light-theme .klyp-skeleton::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 0, 0, 0.05),
        transparent
    );
}

@keyframes klyp-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes klyp-spin {
    to { transform: rotate(360deg); }
}

.loading-dots {
    display: flex;
    gap: 4px;
    align-items: center;
}

.dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: dot-pulse 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes dot-pulse {
    0%, 80%, 100% { transform: scale(0); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

@media (max-width: 1024px) {
    .premium-switch,
    header,
    .logo-wrapper,
    .premium-contact-card,
    .cinematic-timeline-card,
    .client-logo-glass,
    .ai-terminal-glass,
    .premium-social-btn {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
}

.light-theme .premium-switch {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.premium-switch:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Animate transform instead of left for 60fps performance */
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        background-color 0.5s,
        box-shadow 0.5s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    will-change: transform;
}

.light-theme .premium-switch .switch-thumb {
    /* Use translate to slide instead of modifying layout property left */
    transform: translateX(32px);
    background: #000000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.switch-thumb svg {
    width: 14px;
    height: 14px;
    color: #050e07;
    transition: color 0.3s;
}

.light-theme .switch-thumb svg {
    color: #ffffff;
}

/* -- PREMIUM TIMELINE COMPONENT -- */
.timeline-container {
    position: fixed;
    bottom: clamp(20px, 8vh, 100px);
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    width: clamp(280px, 85%, 800px);
    background: transparent;
    z-index: 2000;
    user-select: none;
    padding: 1.5vmin;
    opacity: 1;
    pointer-events: none; /* Do not block clicks to background elements (Spline) */
    transition:
        opacity 0.8s cubic-bezier(0.2, 1, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
    will-change: opacity, transform;
}

.timeline-ruler,
.timeline-tracks,
.timeline-playhead,
.timeline-clip,
.timeline-keyframe {
    pointer-events: auto; /* Re-enable for actual interactive parts */
}

.timeline-container.hide-timeline {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(-50%, 20px, 0) scale(0.95);
}

/* Timeline children pointer-events handled above */

.timeline-ruler {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(110, 44, 242, 0.2);
    padding-bottom: 6px;
    margin-bottom: 12px;
    position: relative;
}

.timeline-tick {
    width: 1px;
    height: 6px;
    background: var(--timeline-accent);
    opacity: 0.3;
}

.timeline-tick:nth-child(5n + 1) {
    height: 10px;
    background: var(--timeline-accent);
    opacity: 0.6;
}

.timeline-tracks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.timeline-track {
    height: 16px;
    background: rgba(110, 44, 242, 0.05);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(110, 44, 242, 0.1);
}

.timeline-clip {
    position: absolute;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(110, 44, 242, 0.2),
        var(--timeline-accent)
    );
    border-radius: 8px;
    border: 1px solid rgba(110, 44, 242, 0.4);
    transition:
        filter 0.4s,
        transform 0.4s;
    backdrop-filter: blur(4px);
}

body.light-theme .timeline-clip {
    background: linear-gradient(90deg, #f3e8ff, #8b5cf6);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

body.light-theme .timeline-track {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.timeline-clip:hover {
    filter: brightness(1.2);
    transform: scaleY(1.05);
}

.timeline-keyframe {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 8px;
    background: #ebe5f5;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 10px #a855f7;
    transition:
        transform 0.4s,
        box-shadow 0.4s;
    z-index: 10;
}

body.light-theme .timeline-keyframe {
    background: #ffffff;
    box-shadow: 0 0 10px #9333ea;
}

.timeline-keyframe:hover {
    transform: translate(-50%, -50%) rotate(45deg) scale(1.5);
    box-shadow: 0 0 20px #a855f7;
}

body.light-theme .timeline-keyframe:hover {
    box-shadow: 0 0 20px #9333ea;
}

.timeline-playhead {
    position: absolute;
    top: -14px;
    bottom: -10px;
    width: 2.5px;
    background: #f0e7ff;
    box-shadow: 0 0 15px #a855f7;
    z-index: 100;
    transition:
        left 0.1s linear,
        transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    will-change: left, transform;
}

body.light-theme .timeline-playhead {
    background: #7c3aed;
    box-shadow: 0 0 15px #9333ea;
}

.timeline-playhead::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #f0e7ff;
}

body.light-theme .timeline-playhead::before {
    border-top: 8px solid #7c3aed;
}

.timeline-container:hover .timeline-playhead {
    transform: scaleY(1.15);
    box-shadow:
        0 0 25px #a855f7,
        0 0 15px #a855f7;
}

body.light-theme .timeline-container:hover .timeline-playhead {
    box-shadow:
        0 0 25px #9333ea,
        0 0 15px #9333ea;
}

/* Navigation indicator removed for minimalism */

.vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none !important;
    background: var(--vignette-grad);
    transition: opacity 0.8s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000;
}

.ambient-glow {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none !important;
    background: var(--ambient-glow);
    transition: opacity 0.8s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.light-arc {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none !important;
    background: var(--light-arc);
    transition: opacity 0.8s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    pointer-events: none !important;
    opacity: 0.03;
    mix-blend-mode: overlay;
    background: transparent; /* Fractal noise disabled for performance */
    transform: translateZ(0);
    display: none;
}

.hero-active .noise-overlay {
    display: none; /* Removed Noise Overlay as requested */
}

/* -- 3D CANVAS -- */

#spline-mount {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: auto;
    /* Removed perspective as it interferes with Spline's internal 3D math */
}

#spline-mount spline-viewer {
    width: 100%;
    height: 100%;
    min-width: 1px;
    min-height: 1px;
    pointer-events: auto !important;
    filter: none;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.2, 1, 0.2, 1);
    cursor: default;
    will-change: opacity, transform;
}

#hero-spline-dark,
#hero-spline-light {
    z-index: 2;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

.light-theme #hero-spline-light {
    mix-blend-mode: multiply;
}

#bg-spline-dark,
#bg-spline-light {
    z-index: 1;
}

#spline-mount spline-viewer.active {
    opacity: 1;
}

/* Low-end device: premium CSS gradient fallback */
.spline-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transition: background 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

.spline-fallback.hero-fallback {
    background:
        radial-gradient(
            ellipse 80% 60% at 50% 40%,
            rgba(0, 0, 0, 0.35) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 50% 80% at 75% 30%,
            rgba(0, 0, 0, 0.18) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse 40% 40% at 30% 70%,
            rgba(0, 0, 0, 0.1) 0%,
            transparent 50%
        );
}

.light-theme .spline-fallback.hero-fallback {
    background:
        radial-gradient(
            ellipse 80% 60% at 50% 40%,
            rgba(0, 0, 0, 0.14) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 50% 80% at 75% 30%,
            rgba(0, 0, 0, 0.08) 0%,
            transparent 60%
        );
}

.spline-fallback.bg-fallback {
    background:
        radial-gradient(
            ellipse 60% 60% at 40% 50%,
            rgba(0, 0, 0, 0.2) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 40% 60% at 70% 60%,
            rgba(0, 0, 0, 0.14) 0%,
            transparent 60%
        );
}

.light-theme .spline-fallback.bg-fallback {
    background:
        radial-gradient(
            ellipse 60% 60% at 40% 50%,
            rgba(0, 0, 0, 0.08) 0%,
            transparent 70%
        ),
        radial-gradient(
            ellipse 40% 60% at 70% 60%,
            rgba(0, 0, 0, 0.05) 0%,
            transparent 60%
        );
}

/* Off-screen section rendering optimization */
.section-padding {
    padding: 2rem 5%;
    contain: layout paint; /* Render isolation */
}

#all-services-scroller {
    width: 100%;
}

/* -- GLOBAL SECTION BEHAVIOR -- */
section {
    scroll-margin-top: 120px;
    position: relative;
    z-index: 10;
}

/* -- NAVIGATION (DYNAMIC ISLAND) -- */
header {
    position: fixed;
    top: 50px;
    /* Center-line */
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    /* Perfectly axial */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bg-rgb), 0.65);
    backdrop-filter: blur(50px) saturate(150%);
    -webkit-backdrop-filter: blur(50px) saturate(150%);
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    padding: 1vmin 4vmin;
    width: auto;
    min-width: clamp(300px, 45vmin, 500px);
    box-shadow: none !important;
    transition:
        transform 0.5s cubic-bezier(0.2, 1, 0.2, 1),
        opacity 0.5s cubic-bezier(0.2, 1, 0.2, 1),
        background-color 0.5s;
    will-change: transform, opacity;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 60px);
    z-index: 10000;
    pointer-events: none;
}

#dynamic-island {
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.2, 1), opacity 0.6s cubic-bezier(0.2, 1, 0.2, 1);
}

#dynamic-island.island-hidden {
    transform: translate3d(-50%, -150%, 0);
    opacity: 0;
    pointer-events: none;
}

.light-theme header {
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.65) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 5vw, 60px);
    z-index: 10000;
    pointer-events: none;
}

.site-header > * {
    pointer-events: auto;
}

.logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(var(--bg-rgb), 0.25) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: translateY(4px);
    transition: all 0.5s cubic-bezier(0.2, 1, 0.2, 1);
}

.light-theme .logo-wrapper {
    background: rgba(255, 255, 255, 0.25) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
    border: 0.5px solid rgba(0, 0, 0, 0.1) !important;
    /* Very thin premium outline */
    outline: none !important;
}

.logo-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at 30% 30%,
        rgba(255, 255, 255, 0.08) 0%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 10;
}

.logo-wrapper:hover {
    transform: translateY(4px);
    box-shadow: none !important;
}

.circle-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    transform: scale(1.08);
    /* Overscale slightly to hide image-level borders */
    transition: transform 0.5s ease;
    image-rendering: auto;
    border: none !important;
    outline: none !important;
    flex-shrink: 0;
}

.logo-dark {
    display: block;
}

.logo-light {
    display: none;
}

.light-theme .logo-dark {
    display: none;
}

.light-theme .logo-light {
    display: block;
}

.island-status {
    display: none;
    /* Removed dot per user request */
}

.nav-pill {
    position: relative;
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0 1.5rem;
    height: 100%;
}

.hover-backdrop {
    display: none !important; /* Replaced with underline per user request */
}

.light-theme .hover-backdrop {
    background: rgba(0, 0, 0, 0.04);
}

.nav-link {
    position: relative;
    z-index: 10;
    padding: 0.5rem 1.2rem;
    opacity: 0.8;
    transition: opacity 0.4s ease;
    text-decoration: none !important;
    color: var(--text-color);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none !important;
}

.nav-link-text {
    display: inline-block;
    position: relative;
    pointer-events: none;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link:active {
    opacity: 0.8;
}

.nav-link.active {
    opacity: 1;
    color: #ffffff !important;
}

.nav-btn {
    padding: 0.7rem 1.8rem;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition:
        background-color 0.5s,
        color 0.5s,
        border-color 0.5s;
    background: var(--text-color);
    color: var(--bg-color);
    border: 1px solid var(--text-color);
}

.nav-btn:hover {
    background: transparent;
    color: var(--text-color);
}

.light-theme .nav-btn:hover {
    background: transparent;
    color: var(--text-color);
    border-color: var(--text-color);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.5s cubic-bezier(0.2, 1, 0.2, 1),
        color 0.5s;
    color: var(--text-color);
    transform: translateY(4px); /* Perfectly axial adjustment */
    opacity: 1;
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* -- SECTIONS -- */
section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
    overflow: visible;
    background: transparent;
    scroll-margin-top: 0;
    contain: paint layout;
    /* Isolate rendering */
    perspective: 1000px;
    backface-visibility: hidden;
}

#home {
    height: 100vh;
    justify-content: center;
    /* Always render hero */
    perspective: 1000px;
}

.section-padding {
    padding: 2rem 5%;
    background: transparent;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

#services,
#testimonials,
#contact {
    transform: translateZ(0);
    /* Force GPU layer */
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    word-spacing: 0.15em;
    line-height: 1;
    margin-bottom: 3rem;
    color: var(--section-title-color, var(--text-heading));
    z-index: 5;
    position: relative;
}
#testimonials .section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    word-spacing: 0.15em;
}

/* -- PREMIUM TRANSITION & INTERACTIVITY -- */
#home {
    pointer-events: none;
}

#spline-mount {
    pointer-events: auto;
}

#spline-mount spline-viewer {
    pointer-events: auto;
}

/* -- FLIP CARDS -- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    padding: 2rem 0 4rem 0;
    overflow: visible;
}

.flip-card {
    height: clamp(240px, 30vh, 280px);
    /* Slightly larger for luxury feel */
    perspective: 2500px;
    position: relative;
    z-index: 1;
    transition: all 0.8s cubic-bezier(0.2, 1, 0.2, 1);
    cursor: pointer;
}

/* Luxury Glow Aura */
.flip-card::before {
    content: "";
    position: absolute;
    inset: -20px;
    background: radial-gradient(
        circle at center,
        var(--accent-color),
        transparent 70%
    );
    opacity: 0;
    filter: blur(40px);
    z-index: -1;
    transition: all 0.8s cubic-bezier(0.2, 1, 0.2, 1);
    pointer-events: none;
}

.flip-card:hover::before {
    opacity: 0.15;
    transform: scale(1.1) translateZ(-50px);
}

.flip-card:hover {
    transform: translateY(-15px) translateZ(100px);
    z-index: 100;
}

.flip-card:hover,
.flip-card.flipped,
.card-grid.active .flip-card:hover {
    z-index: 50;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
    transform-origin: center center;
    will-change: transform;
}

/* Spline 3D Volumetric Glare Effect */
.flip-card-inner::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.2) 45%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.2) 55%,
        transparent 60%
    );
    background-size: 300% 300%;
    background-position: 150% 150%;
    mix-blend-mode: overlay;
    transition: background-position 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10;
    border-radius: 20px;
}

.flip-card:hover .flip-card-inner::after {
    background-position: -50% -50%;
}

.flip-card:hover .flip-card-inner:not(.gift-inner),
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg) scale(1.05) translateZ(120px);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem auto;
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform: translateZ(30px);
    /* Float icon above card surface */
}

.light-theme .card-icon {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.6),
        0 4px 10px rgba(255, 255, 255, 0.05);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.4));
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card:hover .card-icon {
    transform: scale(1.1) translateY(-10px) translateZ(50px);
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 12px 25px rgba(255, 255, 255, 0.3);
}

.flip-card:hover .card-icon svg {
    transform: rotate(15deg) scale(1.15);
}

.flip-card h4 {
    transform: translateZ(20px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card:hover h4 {
    transform: translateZ(40px);
}

.flip-card .service-desc {
    transform: translateZ(15px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card:hover .service-desc {
    transform: translateZ(30px);
}

.flip-card .btn-inverse {
    transform: translateZ(25px);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.flip-card:hover .btn-inverse {
    transform: translateZ(45px);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 24px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: rgba(var(--bg-rgb), 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Multi-layered Luxe Shadow */
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.25),
        0 10px 20px rgba(0, 0, 0, 0.3),
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 40px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(40px) saturate(2);
    -webkit-backdrop-filter: blur(40px) saturate(2);
    transition: all 0.8s cubic-bezier(0.2, 1, 0.2, 1);
    transform: translateZ(2px);
    will-change: transform;
    /* Hint for 3D flip */
}

.flip-card:hover .flip-card-front {
    background: rgba(var(--bg-rgb), 0.45);
    border-color: var(--accent-color);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 255, 255, 0.2),
        0 50px 100px rgba(0, 0, 0, 0.6);
}

/* -- PRODUCTION INTELLIGENCE (CHAT PORT) -- */
/* AI Chat styles removed */

/* -- PREMIUM CLASS EFFECTS & ANIMATIONS -- */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    filter: blur(10px);
    transition:
        opacity 1.2s cubic-bezier(0.2, 1, 0.2, 1),
        transform 1.2s cubic-bezier(0.2, 1, 0.2, 1),
        filter 1.2s cubic-bezier(0.2, 1, 0.2, 1);
    will-change: opacity, transform, filter;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
    will-change: auto;
    /* Optimization: release layer after animation */
}

.process-step {
    position: relative;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition:
        transform 0.6s cubic-bezier(0.2, 1, 0.2, 1),
        background-color 0.6s,
        border-color 0.6s,
        box-shadow 0.6s;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.process-step::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 60%
    );
    background-size: 200% 200%;
    background-position: 100% 100%;
    transition: background-position 0.8s;
}

.process-step:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-12px) translateZ(0);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.process-step:hover::before {
    background-position: 0 0;
}

.step-num {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    opacity: 0.05;
    position: absolute;
    top: 5px;
    right: 20px;
    transition:
        opacity 0.6s,
        transform 0.6s;
    color: var(--accent-color);
}

.process-step:hover .step-num {
    opacity: 0.2;
    transform: scale(1.1);
}

/* Glass/Gloss effect for buyers and bars */
.gloss-line {
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: skewX(-30deg);
    transition: left 0.8s ease;
    will-change: left;
}

.flip-card:hover .gloss-line {
    left: 150%;
}

.flip-card-front {
    background: linear-gradient(
        145deg,
        rgba(var(--bg-rgb), 0.6) 0%,
        rgba(var(--bg-rgb), 0.4) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px) saturate(1.6);
    -webkit-backdrop-filter: blur(30px) saturate(1.6);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        inset 0 -1px 1px rgba(0, 0, 0, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.5);
    overflow: visible;
    /* Changed from hidden to ensure no clipping */
    transition:
        transform 0.4s cubic-bezier(0.2, 1, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease,
        background-color 0.4s ease;
}

.light-theme .flip-card-front {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(253, 242, 248, 0.4) 40%,
        rgba(224, 242, 254, 0.5) 100%
    );
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        0 15px 45px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(35px) saturate(2);
    -webkit-backdrop-filter: blur(35px) saturate(2);
}

.flip-card-front::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.08) 40%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 70%
    );
    background-size: 200% 200%;
    background-position: -100% -100%;
    transition: background-position 0.8s ease;
    pointer-events: none;
}

.flip-card:hover .flip-card-front::after {
    background-position: 200% 200%;
}

.light-theme .flip-card-front::after {
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.05) 40%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
}

.flip-card-back {
    background: linear-gradient(
        145deg,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.95) 100%
    );
    color: var(--text-color);
    transform: rotateY(180deg) translateZ(1px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(45px) saturate(2.2);
    -webkit-backdrop-filter: blur(45px) saturate(2.2);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.2),
        0 30px 60px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    /* Enable 3D for children on the back face */
}

/* Anime Impact Burst (Performance Optimized) */
.flip-card-back::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid var(--accent-color);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.flip-card:hover .flip-card-back::before {
    animation: anime-burst 0.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    animation-delay: 0.1s;
}

@keyframes anime-burst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
        filter: blur(2px);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
        filter: blur(0px);
    }
}

/* Anime Speedlines FX */
.flip-card-back::after {
    content: "";
    position: absolute;
    inset: -50%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 15px,
        rgba(255, 255, 255, 0.04) 15px,
        rgba(255, 255, 255, 0.04) 18px
    );
    opacity: 0;
    z-index: 0;
    transform: rotate(0deg) scale(2);
    pointer-events: none;
    will-change: transform, opacity;
}

.flip-card:hover .flip-card-back::after {
    animation: anime-speed 0.5s ease forwards;
    animation-delay: 0.2s;
}

@keyframes anime-speed {
    0% {
        opacity: 0;
        transform: rotate(0deg) scale(2);
    }

    50% {
        opacity: 1;
        transform: rotate(5deg) scale(2);
    }

    100% {
        opacity: 0.3;
        transform: rotate(10deg) scale(2);
    }
}

/* Push content above anime effects */
.flip-card-back > * {
    position: relative;
    z-index: 2;
}

.light-theme .flip-card-back {
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.98) 0%,
        rgba(245, 245, 245, 0.9) 100%
    );
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 1),
        0 20px 50px rgba(0, 0, 0, 0.1);
}

/* -- DYNAMIC ISLAND & GIFT WRAP -- */
.glass-island-link {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 0.5rem 1.2rem;
    box-shadow:
        inset 0 1px 0 var(--glass-highlight),
        0 4px 15px var(--glass-shadow);
    transition:
        transform 0.4s cubic-bezier(0.2, 1, 0.2, 1),
        background-color 0.4s,
        color 0.4s,
        box-shadow 0.4s;
    color: var(--text-color) !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.glass-island-link:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-text) !important;
    transform: translateY(-2px) scale(1.05) translateZ(0);
    box-shadow: 0 8px 25px var(--glass-shadow);
}

.light-theme .glass-island-link:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-text) !important;
    border-color: var(--btn-hover-bg);
}

/* -- BUTTONS -- */
.btn-primary {
    display: inline-block;
    padding: 1.3rem 3.5rem;
    background: var(--btn-bg);
    color: var(--btn-text);
    border: 1.5px solid var(--btn-border);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 11px;
    font-weight: 600;
    transition: var(--theme-transition);
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 var(--glass-highlight),
        var(--btn-shadow);
}

.btn-primary:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-text);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px var(--glass-shadow);
    border-color: var(--btn-hover-bg);
}

.btn-inverse {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: rgba(var(--bg-rgb), 0.05);
    color: var(--text-color);
    border: 1.5px solid var(--glass-border);
    border-radius: 40px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 11px;
    font-weight: 600;
    transition: var(--theme-transition);
    text-decoration: none;
    margin-top: 2.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        inset 0 1px 1px var(--glass-highlight),
        0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.btn-inverse:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
    transform: scale(1.05) translateY(-2px) translateZ(0);
    box-shadow: 0 12px 30px var(--glass-shadow);
}

.happy-clients-subtitle {
    text-align: center;
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    word-spacing: 0.15em;
    color: var(--text-color);
    opacity: 1;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.light-theme .happy-clients-subtitle {
    color: var(--luxury-purple);
}

.section-padding {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 4rem 0; /* Increased to prevent clipping of enhanced cards */
    position: relative;
}

.marquee-track, .logo-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    will-change: transform;
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.marquee-track {
    animation: premium-marquee-scroll 25s linear infinite !important;
}

.logo-track {
    animation: premium-marquee-scroll 18s linear infinite !important;
}

.marquee-track:hover, .logo-track:hover {
    animation-play-state: running;
}

@keyframes premium-marquee-scroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-33.333333333%, 0, 0); }
}

/* -- SOCIAL BUTTONS: OFFICIAL BRANDING -- */
#dynamic-island {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    min-width: 320px;
    height: 48px;
    border-radius: 24px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 15, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1001;
    overflow: hidden;
    transition: background 0.4s, border 0.4s, box-shadow 0.4s;
}

#dynamic-island:hover {
    background: rgba(15, 15, 25, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, -50%);
    /* Width expansion removed to prevent scaling feel */
}

.premium-social-btn {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Brand colors moved to end of file for priority */
.premium-social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: none;
    filter: none;
}


.light-theme .premium-social-btn:not([class*=" "]) {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.light-theme .premium-social-btn:hover {
    color: white !important;
}

.testimonials-section {
    background: #000000; /* Dark Mode base */
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    z-index: 5;
    transition: background 0.6s ease;
}

.light-theme .testimonials-section {
    background: #ffffff !important; /* Light Mode base */
}

.luxury-card {
    flex-shrink: 0;
    width: 400px;
    min-height: 380px; /* Increased for certified content visibility */
    height: auto;
    margin: 0 1.5rem;
    padding: 2rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
    box-shadow: none;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s,
        opacity 0.4s ease,
        filter 0.4s ease,
        box-shadow 0.4s ease;
    will-change: transform, opacity, filter;
    cursor: pointer;
    overflow: visible;
    color: var(--text-color);
    transform: translateZ(0);
}

/* Focused Interaction (Netflix Style) */
.marquee-container:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-container:hover .luxury-card:not(:hover) {
    opacity: 0.4;
    filter: blur(2px) grayscale(0.3);
    transform: scale(0.95) translateZ(0);
}

.luxury-card:hover {
    transform: translateY(-15px) scale(1.05) translateZ(0) !important;
    border-color: var(--accent-color) !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 100;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.light-theme .luxury-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Light Mode Card */
.light-theme .luxury-card {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #000000 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
}

.light-theme .certified-badge span {
    color: rgba(0, 0, 0, 0.5) !important;
}

.light-theme .luxury-divider {
    background: #000000 !important;
    opacity: 0.1 !important;
}

.luxury-card .quote {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.95;
    font-weight: 600;
    font-style: italic;
    /* Smart Multi-line Truncation */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.luxury-card .client-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.luxury-card .client-name {
    font-family: var(--font-display);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    opacity: 0.6;
}

.luxury-card .stars {
    display: flex;
    gap: 4px;
    margin-bottom: 2rem;
}

.luxury-card .star-svg {
    width: 18px;
    height: 18px;
    fill: #FFD700;
    transition: transform 0.3s ease;
}

.luxury-card:hover .star-svg {
    transform: scale(1.1);
}

.logo-marquee-container {
    margin-top: 1.5rem;
    padding: 1.5rem 0;
    opacity: 0.8;
    transition:
        opacity 0.5s,
        transform 0.5s;
    position: relative;
    /* Soft fade on all sides to blend into sections */
    -webkit-mask-image:
        linear-gradient(
            to right,
            transparent,
            black 5%,
            black 95%,
            transparent
        ),
        linear-gradient(
            to bottom,
            transparent,
            black 10%,
            black 90%,
            transparent
        );
    mask-image:
        linear-gradient(
            to right,
            transparent,
            black 5%,
            black 95%,
            transparent
        ),
        linear-gradient(
            to bottom,
            transparent,
            black 10%,
            black 90%,
            transparent
        );
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

@media (max-width: 768px) {
    .luxury-logo {
        width: 100px !important;
        height: 100px !important;
        font-size: 0.7rem !important;
    }
    .logo-marquee-container {
        /* No vertical mask on mobile to prevent clipping */
        mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent) !important;
        -webkit-mask-image: linear-gradient(to right, transparent, black 2%, black 98%, transparent) !important;
    }
}

/* Logo marquee container hover effects removed to prevent 'pop out' glitch */

.luxury-logo {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: none;
    white-space: nowrap;
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 4rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08); /* Fixed opacity for performance */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    will-change: transform;
    cursor: pointer;
    overflow: hidden;
    transform: translate3d(0,0,0);
    transition: 
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.4s ease,
        filter 0.4s ease,
        background 0.4s ease;
}

.logo-marquee-container:hover .logo-track {
    animation-play-state: paused;
}

.logo-marquee-container:hover .luxury-logo:not(:hover) {
    opacity: 0.25;
    filter: blur(3px) grayscale(0.8);
    transform: scale(0.85);
}

.luxury-logo:hover {
    transform: scale(1.1) translateY(-10px) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 10;
}

@media (max-width: 768px) {
    .luxury-logo {
        backdrop-filter: none !important; /* Killer of mobile performance */
        -webkit-backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.15);
    }
}

.logo-static-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spin-360 25s linear infinite;
    pointer-events: none;
    transform: translate3d(0,0,0);
}

@media (max-width: 768px) {
    .logo-static-wrapper {
        animation: none !important; /* Stop rotation on mobile to save GPU */
    }
}

@keyframes spin-360 {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.luxury-logo::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(255, 255, 255, 0) 45%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 55%,
        transparent 100%
    );
    animation: glass-loop 4s infinite linear;
    pointer-events: none;
    z-index: 5;
}

@keyframes glass-loop {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* Interaction animations removed for stability */

/* .luxury-logo:hover removed because it was empty */

.light-theme .luxury-logo {
    color: #000000 !important;
    text-shadow: none;
    font-weight: 800;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.03), transparent);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: none;
}

.light-theme .luxury-logo:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

/* -- SCROLL REVEAL -- */
.card-grid .flip-card {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.8s cubic-bezier(0.2, 1, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

.card-grid.active .flip-card {
    opacity: 1;
    transform: translateY(0);
}

.card-grid.active .flip-card:nth-child(1) {
    transition-delay: 0.1s;
}

.card-grid.active .flip-card:nth-child(2) {
    transition-delay: 0.2s;
}

.card-grid.active .flip-card:nth-child(3) {
    transition-delay: 0.3s;
}

.card-grid.active .flip-card:nth-child(4) {
    transition-delay: 0.4s;
}

.card-grid.active .flip-card:nth-child(5) {
    transition-delay: 0.5s;
}

.card-grid.active .flip-card:nth-child(6) {
    transition-delay: 0.6s;
}

/* -- SPLINE WATERMARK REMOVAL -- */
spline-viewer::part(logo),
spline-viewer::part(hint),
spline-viewer::part(watermark) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Aggressive hint removal */
#spline-mount spline-viewer div[style*="z-index"] {
    display: none !important;
}

/* -- PERFORMANCE UTILS -- */
.hide-timeline {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
    visibility: hidden !important;
}

.is-paused {
    animation-play-state: paused !important;
}

/* -- VIDEO: Remove fullscreen button -- */
video::-webkit-media-controls-fullscreen-button,
video::-webkit-media-controls-picture-in-picture-button,
video::-moz-media-controls-fullscreen-button {
    display: none !important;
}

/* -- Auth Container (Fixed Top-Right, OUTSIDE nav) -- */
.auth-container {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-btn {
    padding: 0.5rem 1.4rem;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    transition:
        transform 0.4s cubic-bezier(0.2, 1, 0.2, 1),
        background-color 0.4s,
        color 0.4s,
        border-color 0.4s,
        box-shadow 0.4s;
    white-space: nowrap;
    font-family: var(--font-body);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.auth-login-btn {
    background: rgba(var(--bg-rgb), 0.5);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.auth-login-btn:hover {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
    transform: translateY(-1px) translateZ(0);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.auth-signup-btn {
    background: linear-gradient(135deg, #ffffff, #000000);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

.auth-signup-btn:hover {
    transform: translateY(-1px) scale(1.02) translateZ(0);
    box-shadow: 0 6px 24px rgba(34, 139, 34, 0.45);
}

.light-theme .auth-login-btn {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 16px rgba(38, 67, 49, 0.1);
}

.light-theme .auth-signup-btn {
    box-shadow: 0 4px 16px rgba(34, 139, 34, 0.18);
}

.auth-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    position: relative;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 30px;
    background: rgba(var(--bg-rgb), 0.5);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: border-color 0.3s ease;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.light-theme .auth-user-info {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 4px 16px rgba(38, 67, 49, 0.1);
}

.auth-user-info:hover {
    border-color: var(--text-color);
}

.auth-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #000000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.auth-user-dropdown {
    position: absolute;
    top: 48px;
    right: 0;
    min-width: 180px;
    background: rgba(10, 18, 12, 0.95);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 999;
    animation: dropdownIn 0.25s cubic-bezier(0.2, 1, 0.2, 1);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.light-theme .auth-user-dropdown {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

@keyframes dropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-user-dropdown.show {
    display: block;
}

.auth-user-dropdown button {
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    border-radius: 10px;
    text-align: left;
    transition: background-color 0.2s;
}

.auth-user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Login Modal Overlay */
#loginModal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

#loginModal.show {
    display: flex;
}

.login-card {
    width: 400px;
    max-width: 92vw;
    background: rgba(10, 18, 12, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 40px 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    animation: modalIn 0.4s cubic-bezier(0.2, 1, 0.2, 1);
}

.light-theme .login-card {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(34, 139, 34, 0.15);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-card h3 {
    font-family: var(--font-display);
    font-size: 24px;
    margin: 0 0 6px;
    color: var(--text-color);
}

.login-card .login-sub {
    font-size: 12px;
    opacity: 0.5;
    margin: 0 0 24px;
    color: var(--text-color);
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    margin-bottom: 12px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.light-theme .login-card input {
    background: rgba(0, 0, 0, 0.04);
}

.login-card input:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.login-card input::placeholder {
    color: rgba(224, 219, 197, 0.3);
}

.light-theme .login-card input::placeholder {
    color: rgba(0, 0, 0, 0.3);
}

.login-card .login-submit {
    width: 100%;
    padding: 13px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #ffffff, #000000);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition:
        transform 0.3s,
        box-shadow 0.3s;
    letter-spacing: 0.03em;
    margin-top: 4px;
}

.login-card .login-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.3);
}

.login-card .login-toggle {
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
    color: var(--text-color);
    opacity: 0.6;
}

.login-card .login-toggle a {
    color: var(--accent-color);
    cursor: pointer;
    text-decoration: underline;
}

.login-card .login-error {
    color: #ef4444;
    font-size: 12px;
    margin: -4px 0 8px;
    display: none;
}

.login-card .login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

/* -- 10. PREMIUM AUTH MODAL -- */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.auth-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(32px) saturate(150%);
    -webkit-backdrop-filter: blur(32px) saturate(150%);
    border-radius: 28px;
    padding: 40px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.2, 1, 0.2, 1);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.auth-overlay.active .auth-modal {
    transform: translateY(0) scale(1);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

.social-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-btn {
    width: 100%;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-discord {
    background: rgba(88, 101, 242, 0.1);
    color: #fff;
}

.btn-discord:hover {
    background: var(--discord-brand);
    border-color: transparent;
}

.btn-google {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.btn-google:hover {
    background: #fff;
    color: #000;
}

.btn-fb {
    background: rgba(24, 119, 242, 0.1);
    color: #fff;
}

.btn-fb:hover {
    background: var(--fb-brand);
    border-color: transparent;
}

.social-btn svg {
    width: 22px;
    height: 22px;
}

.close-auth {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        transform 0.3s ease,
        background-color 0.3s ease;
}

.close-auth:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.user-trigger {
    height: 36px;
    padding: 0 14px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.user-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-trigger img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.user-trigger span {
    font-size: 13px;
    font-weight: 500;
}

.logged-in-only {
    display: none;
}

.is-logged-in .logged-in-only {
    display: flex;
}

.is-logged-in .logged-out-only {
    display: none;
}

/* -- TICKET SYSTEM IN CHAT -- */
.ticket-section {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: slideUp 0.4s ease;
}

.ticket-section.active {
    display: flex;
}

.tk-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-color);
}

.tk-btn {
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.tk-btn:hover {
    transform: scale(1.02);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* -- PREMIUM SCROLL INDICATOR -- */
.scroll-indicator {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 20;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.8s cubic-bezier(0.2, 1, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}

body.hero-active .scroll-indicator {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--text-color);
    opacity: 0.6;
    font-weight: 500;
    transition:
        color 0.3s,
        opacity 0.3s;
}

.mouse {
    width: 22px;
    height: 36px;
    border: 1.5px solid var(--text-color);
    border-radius: 20px;
    position: relative;
    opacity: 0.8;
    transition: border-color 0.3s;
}

.wheel {
    width: 3px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite ease-in-out;
}

@keyframes scrollWheel {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 14px);
        opacity: 0;
    }
}

.scroll-indicator:hover .mouse {
    border-color: var(--accent-color);
}

.scroll-indicator:hover span {
    color: var(--accent-color);
    opacity: 1;
}

/* -- PREMIUM AI ASSISTANT (PORT) PANEL -- */
#klypChatPanel {
    position: fixed;
    bottom: clamp(70px, 15vmin, 120px);
    right: clamp(15px, 4vmin, 40px);
    width: clamp(280px, 80vw, 420px);
    height: clamp(350px, 70vh, 650px);
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    backdrop-filter: blur(40px) saturate(2);
    -webkit-backdrop-filter: blur(40px) saturate(2);
    border: 1px solid var(--glass-border);
    border-radius: clamp(20px, 5vmin, 35px);
    display: flex;
    flex-direction: column;
    z-index: 2400;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px) scale(0.92);
    transition:
        transform 0.6s cubic-bezier(0.19, 1, 0.22, 1),
        opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
    will-change: transform, opacity;
}

#klypChatPanel.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.klchat-header {
    padding: 30px 35px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.klchat-header h4 {
    color: var(--accent-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 6px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.klchat-header p {
    font-size: 9px;
    opacity: 0.4;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-weight: 500;
}

#klchatMsgs {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

#klchatMsgs::-webkit-scrollbar {
    width: 4px;
}

#klchatMsgs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.klchat-input-area {
    padding: 25px 35px 35px;
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.15);
}

#klchatMsg {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 16px 22px;
    color: white;
    font-size: 14px;
    transition:
        border-color 0.3s,
        background-color 0.3s,
        box-shadow 0.3s;
    font-family: inherit;
}

#klchatMsg:focus {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.04);
    outline: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

#klchatSend {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff, #ffffff);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    cursor: pointer;
    transition:
        transform 0.5s cubic-bezier(0.2, 1, 0.2, 1),
        box-shadow 0.5s,
        filter 0.5s;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

#klchatSend:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
    filter: brightness(1.1);
}

#klchatSend:active {
    transform: translateY(1px) scale(0.98);
}

/* -- PREMIUM AI ASSISTANT (PORT) ICON -- */
#klypChatBtn {
    position: fixed;
    bottom: clamp(15px, 4vmin, 40px);
    right: clamp(15px, 4vmin, 40px);
    width: clamp(48px, 12vmin, 80px);
    height: clamp(48px, 12vmin, 80px);
    cursor: pointer;
    z-index: 2500;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn-glass {
    width: 100%;
    height: 100%;
    background: rgba(var(--bg-rgb), 0.1);
    backdrop-filter: blur(24px) saturate(1.8);
    -webkit-backdrop-filter: blur(24px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.05),
        0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.5s,
        background-color 0.5s;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.chat-btn-glow {
    display: none;
}

#klypChatBtn:hover .chat-btn-glass {
    transform: translateY(-3px) scale(1.05) translateZ(0);
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

#klypChatBtn.open .chat-btn-glass {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* Intelligence Node SVG Styles */
.port-node-svg {
    width: 32px;
    height: 32px;
    overflow: visible;
}

.node-ring {
    fill: none;
    stroke: var(--accent-color);
    stroke-width: 1.5;
    stroke-linecap: round;
    opacity: 0.4;
    transform-origin: center;
}

.node-ring.outer {
    stroke-dasharray: 60 180;
    animation: spinClockwise 4s linear infinite;
}

.node-ring.inner {
    stroke-dasharray: 40 120;
    animation: spinCounterClockwise 3s linear infinite;
    opacity: 0.6;
}

.node-core {
    fill: var(--accent-color);
    filter: drop-shadow(0 0 5px var(--accent-color));
}

.node-pulse {
    fill: var(--accent-color);
    opacity: 0;
    animation: nucleusPulse 2s ease-out infinite;
}

@keyframes spinClockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinCounterClockwise {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

@keyframes nucleusPulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.8);
    }
}

/* Light Theme Overrides */
.light-theme #klypChatPanel {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.1);
}

.light-theme .klchat-header {
    background: rgba(255, 255, 255, 0.1);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.light-theme .klchat-header h4 {
    color: #113a22;
}

.light-theme #klchatMsg {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #000000;
}

.light-theme .chat-btn-glass {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.1);
}

/* -- RESPONSIVE SECTION -- */
/* Legacy Responsive Overrides Integrated into specific device blocks below */

/* -- HORIZONTAL TIMELINE (WHY US) -- */
.horizontal-scroll-section {
    height: 400vh;
    position: relative;
    width: 100%;
    padding: 0 !important;
}

.sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.horizontal-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.horizontal-panel {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cinematic-timeline-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 50px var(--glass-shadow);
    overflow: hidden;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.timeline-glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    pointer-events: none;
}

/* -- HAPPY CLIENTS LOGO -- */
.client-logo-wrapper {
    display: inline-block;
    padding: 2rem;
}

.client-logo-glass {
    width: clamp(100px, 15vw, 150px);
    aspect-ratio: 1/1;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow:
        0 10px 30px var(--glass-shadow),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    transition:
        transform 0.3s,
        border-color 0.3s,
        box-shadow 0.3s;
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.client-logo-glass:hover {
    transform: scale(1.05) translateZ(0);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 10px 30px var(--glass-shadow),
        inset 0 0 20px rgba(255, 255, 255, 0.3);
}

.marquee-track:hover {
    animation-play-state: paused;
}

.logo-track:hover {
    animation-play-state: paused;
}

/* -- AI TERMINAL -- */
.ai-terminal-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px var(--glass-shadow);
    transform: translateZ(0);
    /* Hardware accelerate blur */
}

.terminal-btn-glass {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition:
        transform 0.3s ease,
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
    text-decoration: none;
    color: var(--text-color);
}

.terminal-btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

.light-theme .terminal-btn-glass {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .terminal-btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

.light-theme .client-logo-glass {
    box-shadow:
        0 10px 30px var(--glass-shadow),
        inset 0 0 20px rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.15);
}

/* -- CONTACT SECTION CLEARANCE -- */
#contact {
    position: relative;
    z-index: 10;
    margin-top: 5rem;
}

.premium-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    z-index: 15;
    text-decoration: none;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* Official Brand Colors - Glass Backgrounds */
.premium-social-btn {
    background: rgba(var(--bg-rgb), 0.1) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.premium-social-btn:not([class*=" "]):hover {
    background: rgba(var(--bg-rgb), 0.2) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.light-theme .premium-social-btn:not([class*=" "]) {
    background: rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(0, 0, 0, 0.05);
}

.light-theme .premium-social-btn:not([class*=" "]):hover {
    background: rgba(255, 255, 255, 0.6) !important;
    border-color: rgba(0, 0, 0, 0.1);
}

.premium-social-btn .icon-white {
    fill: white !important;
}

.light-theme .premium-social-btn .icon-white {
    fill: #000000 !important;
}

/* Contact Section Styles */
.contact-section {
    min-height: auto;
    padding: 2rem 0; /* Removed horizontal padding to fix BG peeking from sides */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 10;
    overflow: hidden;
    width: 100%;
    margin: 0;
}

.premium-glass-card {
    max-width: 1100px;
    width: 100%;
    padding: clamp(1.5rem, 4vh, 4rem) clamp(1rem, 4vw, 4rem);
    background: var(--glass-bg);
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    border: 1px solid var(--glass-border);
    border-radius: clamp(30px, 5vmin, 50px);
    text-align: center;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.light-theme .contact-section {
    background: transparent;
    transition: background 0.6s ease;
}

.light-theme .premium-glass-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(30px) saturate(1.5);
}

.glass-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    margin-bottom: clamp(1rem, 2vh, 1.5rem);
    padding: 4px;
    overflow: hidden;
}

.glass-tag .circle-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: none;
    background: none;
    box-shadow: none;
}

.glass-heading {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 8vw, 3.8rem); /* Adjusted for better responsiveness */
    font-weight: 900;
    font-style: italic;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    word-spacing: 0.15em;
    color: var(--text-color);
    text-transform: uppercase;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.glass-text {
    font-size: clamp(0.9rem, 1.8vh, 1.1rem);
    max-width: 600px;
    margin: 0 auto clamp(1.5rem, 3vh, 3rem) auto;
    line-height: 1.6;
    font-weight: 300;
    opacity: 0.8;
    color: var(--text-color);
}

.contact-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: clamp(2rem, 4vh, 4rem);
}

.luxury-card .quote {
    font-family: 'Clash Display', sans-serif;
}

.luxury-card .client-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.glass-btn {
    padding: 1.4rem 3.5rem;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 0.05em;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.glass-btn.primary {
    background: var(--text-color);
    color: var(--bg-color) !important;
}

.glass-btn.secondary {
    background: rgba(var(--bg-rgb), 0.05);
    color: var(--text-color) !important;
    border: 1px solid var(--glass-border);
}

.glass-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.glass-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
    margin-bottom: clamp(1.5rem, 3vh, 3rem);
}

.social-grid {
    display: flex;
    gap: clamp(0.8rem, 2vw, 1.5rem);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: clamp(1.5rem, 3vh, 3rem);
}

@media (max-width: 768px) {
    .contact-section {
        padding: 1.5rem 2%;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .premium-glass-card {
        padding: 1.2rem 0.8rem;
        border-radius: 20px;
        gap: 0.3rem;
        width: 100%;
    }

    .glass-tag {
        width: 44px;
        height: 44px;
        margin: 0 auto 0.5rem auto;
        padding: 2px;
    }

    .glass-heading {
        font-size: 1.5rem;
        margin-bottom: 0.3rem;
    }

    .glass-text {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }

    .contact-actions {
        flex-direction: row;
        gap: 0.4rem;
        margin-bottom: 0.8rem;
    }

    .glass-btn {
        flex: 1;
        padding: 0.7rem 0.3rem;
        font-size: 0.6rem;
        letter-spacing: 0.05em;
        min-width: 0;
        white-space: nowrap;
    }

    .glass-divider {
        margin-bottom: 0.8rem;
        opacity: 0.2;
    }

    .social-grid {
        gap: 0.3rem;
        margin-bottom: 0.8rem;
    }

    .premium-social-btn {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
    
    .premium-social-btn svg, .premium-social-btn img {
        width: 18px;
        height: 18px;
    }
}

/* Discord - Solid Brand Color */
.premium-social-btn.discord {
    background: #5865f2;
}

/* Brand hover backgrounds removed */


.premium-social-btn svg {
    width: 32px;
    height: 32px;
    display: block;
}

.premium-social-btn img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    opacity: 0.9;
    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}

.premium-social-btn:hover img {
    transform: scale(1.1);
    opacity: 1;
}

/* -- REDUCED MOTION: Low-end device / accessibility fallback -- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .flip-card-inner {
        transition: none !important;
    }

    .luxury-card::after {
        animation: none !important;
    }

    .chat-btn-glow {
        animation: none !important;
    }

    .node-ring,
    .node-pulse,
    .status-dot {
        animation: none !important;
    }

    header,
    .flip-card-front,
    .flip-card-back,
    .luxury-card,
    .b-node-card,
    .process-step {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* -- ADVANCED DEVICE-SPECIFIC LAYOUTS -- */

/* 1. PC & LARGE MONITORS (Ultra-Premium Experience) */
@media (min-width: 1440px) {
    :root {
        --section-padding: 8rem 4rem;
    }

    .max-w-7xl {
        max-width: 1400px;
    }

    .section-title {
        font-size: 5rem;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* 2. LAPTOP & MEDIUM SCREENS */
@media (min-width: 1025px) and (max-width: 1439px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* 3. TABLETS (Landscape & Portrait) */
@media (min-width: 769px) and (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        min-width: 60vw;
    }
}

/* 1. ULTRAWIDE (21:9) */
@media (min-aspect-ratio: 2/1) {
    #spline-mount {
        transform: scale(1.5);
    }
}

/* 2. STANDARD DESKTOP (16:9) */
@media (min-width: 1440px) {
    #spline-mount {
        transform: scale(1.5);
    }
}

/* 3. TABLETS & LAPTOPS */
@media (max-width: 1024px) {
    .logo-wrapper {
        width: 60px;
        height: 60px;
    }
}

/* 4. SMARTPHONES (Optimized Phone Layout) */
@media (max-width: 768px) {
    :root {
        --section-padding: 4rem 1.5rem;
    }

    body {
        font-size: 15px;
    }

    .site-header {
        height: 64px;
        padding: 0 15px;
    }

    #dynamic-island {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        min-width: 180px;
        height: 42px;
        padding: 0 5px;
        border-radius: 21px;
        display: flex;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(50px) saturate(2.5);
        -webkit-backdrop-filter: blur(50px) saturate(2.5);
    }

    #dynamic-island:hover {
        transform: translateX(-50%);
        /* Scaling permanently removed */
    }

    #dynamic-island:active {
        transform: translateX(-50%);
        /* Scaling permanently removed */
    }

    .logo-wrapper {
        width: 44px;
        height: 44px;
    }

    .premium-switch {
        width: 48px;
        height: 24px;
    }

    .switch-thumb {
        width: 18px;
        height: 18px;
        top: 2px;
        left: 2px;
    }

    .light-theme .premium-switch .switch-thumb {
        transform: translateX(24px);
    }

    .nav-pill {
        padding: 0;
        gap: 4px;
        width: 100%;
        justify-content: space-evenly;
    }

    .nav-link {
        font-size: 7.5px;
        padding: 4px 2px;
        letter-spacing: -0.015em;
        opacity: 0.8;
        white-space: nowrap;
    }

    /* Restored Testimonials */
    .nav-link[href="#testimonials"] {
        display: block;
    }

    /* Header elements alignment - Row-based for side-by-side positioning */
    .logo-wrapper {
        position: fixed;
        top: 20px;
        left: 15px;
        width: 40px !important;
        height: 40px !important;
        background: transparent !important;
        backdrop-filter: none;
        z-index: 10001;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #themeToggleContainer {
        position: fixed;
        top: 20px;
        right: 15px;
        z-index: 10001;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .premium-switch {
        width: 34px;
        height: 18px;
    }

    .switch-thumb {
        width: 14px;
        height: 14px;
    }

    #spline-mount {
        transform: scale(0.65);
        /* Increased to ensure text and star are visible as requested */
        transform-origin: center center;
    }

    /* Stacked Layouts */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 0 1rem;
    }

    .section-padding {
        padding: 2rem 1.5rem;
    }

    .section-title {
        font-size: clamp(1.8rem, 8vw, 2.4rem);
        margin-bottom: 1.2rem;
        line-height: 1.1;
        letter-spacing: 0.05em;
    }

    /* Hero Section Adjustments */
    #home {
        height: 100dvh;
        padding-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Scale 3D content ONLY, keeping background mount full-screen */
    #spline-mount {
        transform: none;
    }

    #spline-mount spline-viewer {
        width: 100%;
        height: 100%;
        transform: none !important;
        filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.25));
        will-change: transform;
    }

    section {
        content-visibility: auto;
        /* GPU Gating for non-visible content */
        contain-intrinsic-size: 100vh;
    }

    /* #home removed because it was empty */

    /* Premium Social Buttons Scaling */
    .social-grid {
        gap: 1rem !important;
    }

    .premium-social-btn {
        width: 50px;
        height: 50px;
    }
}

/* -- IOS SPECIFIC POLISH -- */
.is-ios .logo-wrapper {
    /* Handle Notch on modern iPhones */
    top: calc(10px + env(safe-area-inset-top));
}

.is-ios header {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

/* -- ANDROID SPECIFIC POLISH -- */
.is-android body {
    /* Smoother scroll for high refresh rate Android screens */
    scroll-behavior: smooth;
}

/* -- RATIO-SPECIFIC FINE TUNING -- */

/* Ultra-Wide (21:9) */
@media (min-aspect-ratio: 2.1/1) {
    .max-w-7xl {
        max-width: 1600px;
    }

    #spline-mount {
        transform: scale(1.5);
    }
}

/* Tall Phones (e.g., iPhone 15 Pro, S24 Ultra) */
@media (max-width: 480px) and (min-aspect-ratio: 1/2) {
    #home {
        justify-content: flex-start;
        padding-top: 25dvh;
    }
}

/* Square-ish Displays (Foldables, iPad) */
@media (min-aspect-ratio: 3/4) and (max-aspect-ratio: 4/3) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* -- ACCESSIBILITY & PREFERENCES -- */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-delay: -1ms !important;
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        background-attachment: initial !important;
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
}

/* High Contrast Support */
@media (prefers-contrast: more) {
    :root {
        --glass-bg: rgba(0, 0, 0, 0.8);
        --glass-border: #fff;
    }
}

/* Unique Klyperix Extensions Consolidated Below */

/* -- KLYPERIX UNIQUE EXTENSIONS (DYNAMIC ISLAND & FEEDBACK) -- */

#dynamic-island {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    width: auto;
    min-width: 420px;
    height: 52px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(60px) saturate(2.2);
    -webkit-backdrop-filter: blur(60px) saturate(2.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
    padding: 0 10px;
}

#dynamic-island:hover {
    transform: translate(-50%, -50%);
    /* Scaling permanently removed */
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow:
        0 40px 90px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(255, 255, 255, 0.25),
        inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

#dynamic-island:active {
    transform: translate(-50%, -50%);
    /* Tactile Click - scaling removed */
}

#dynamic-island.island-hidden,
#dynamic-island.nav-hidden {
    transform: translate(-50%, -180%);
    opacity: 0;
    pointer-events: none;
}

/* -- FEEDBACK & SUBSCRIBE SECTION -- */
.star-rating .star {
    color: rgba(255, 255, 255, 0.2);
}

.star-rating input:checked ~ .star,
.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #fbbf24;
    fill: #fbbf24;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.6));
}

.feedback-submit-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.25);
    background: #f0f0f0;
}

.feedback-submit-btn:hover svg {
    transform: translateX(4px);
    transition: transform 0.3s ease;
}

.light-theme .premium-feedback-card {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1) !important;
}

.light-theme .premium-feedback-card h3,
.light-theme .premium-feedback-card p,
.light-theme .premium-feedback-card label,
.light-theme .premium-feedback-card input,
.light-theme .premium-feedback-card textarea {
    color: #000 !important;
}

.light-theme .premium-feedback-card input,
.light-theme .premium-feedback-card textarea {
    background: rgba(0, 0, 0, 0.03) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.light-theme .star-rating .star {
    color: rgba(0, 0, 0, 0.15);
}

.light-theme .star-rating input:checked ~ .star,
.light-theme .star-rating .star:hover,
.light-theme .star-rating .star:hover ~ .star {
    color: #fbbf24;
    fill: #fbbf24;
}

.light-theme .feedback-submit-btn {
    background: #000 !important;
    color: #fff !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
}

.light-theme .feedback-submit-btn:hover {
    background: #222 !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3) !important;
}

/* Redundant block removed - consolidated in Section 10 */

.light-theme #dynamic-island {
    background: rgba(255, 255, 255, 0.95);
    /* More opaque for light mode contrast */
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

.light-theme .nav-link {
    color: #000 !important;
    /* Ensure text is visible in light mode */
}

.light-theme #dynamic-island:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================================================
   10. COMPREHENSIVE RESPONSIVE DESIGN (All Devices)
   ========================================================================= */

/* Global overflow prevention */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

img,
video,
canvas,
spline-viewer {
    max-width: 100%;
}

/* TABLET LANDSCAPE (1024px) */
@media (max-width: 1024px) {
    .master-container {
        padding-left: 2.5rem;
        padding-right: 2.5rem;
    }

    .glass-panel {
        padding: 2.5rem;
    }

    .luxury-card {
        width: 320px;
    }

    .luxury-logo {
        width: 140px;
        height: 140px;
        margin: 0 2.5rem;
    }

    .media-card.ratio-16-9 {
        width: 480px;
    }

    .media-card.ratio-1-1 {
        width: 320px;
    }

    .media-card.ratio-9-16 {
        width: 240px;
    }

    .contact-tier {
        padding: 6rem 2rem;
    }
}

/* TABLET PORTRAIT (768px) */
@media (max-width: 768px) {
    /* Navigation and Dynamic Island */
    .site-header {
        height: 70px;
        padding: 0 16px;
    }

    .logo-wrapper {
        width: 44px !important;
        height: 44px !important;
    }

    #dynamic-island {
        min-width: 260px;
        width: 80vw;
        max-width: 360px;
        height: 44px;
        top: 100px;
        /* Increased vertical breathing space from logo */
        transform: translate3d(-50%, 0, 0);
        padding: 0 6px;
    }

    #dynamic-island:hover {
        min-width: 260px;
        width: 80vw;
        max-width: 360px;
        transform: translate3d(-50%, 0, 0);
        /* Scaling permanently removed */
    }

    #themeToggleContainer {
        top: 25px;
        transform: translateY(2px); /* Optical alignment */
        transform-origin: right center;
    }

    .nav-pill {
        gap: 2px;
        padding: 0;
    }

    .nav-link {
        font-size: 8px !important;
        padding: 4px 6px !important;
        letter-spacing: 0.08em;
    }

    /* Layout and Sections */
    .master-container {
        padding: 160px 1.5rem 5rem 1.5rem;
        /* Increased top padding to clear the fixed island */
    }

    .section-padding {
        padding: 2rem 1.5rem;
    }

    .section-head {
        margin-bottom: 3rem;
    }

    /* Typography */
    .page-title {
        font-size: clamp(2.2rem, 9vw, 3.2rem) !important;
        line-height: 1;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .page-desc {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .section-title {
        font-size: clamp(1.6rem, 7vw, 2.4rem) !important;
        letter-spacing: 0.05em;
    }

    .hero-title {
        font-size: clamp(2.2rem, 10vw, 3.5rem) !important;
        line-height: 1.05;
        word-break: break-word;
    }

    .hero-tagline {
        font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    }

    /* Glass Panels */
    .glass-panel {
        padding: 1.5rem;
        border-radius: 24px;
        margin-bottom: 2.5rem;
    }

    .panel-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .panel-title {
        font-size: 1.6rem;
    }

    .panel-tag {
        font-size: 9px;
    }

    /* Carousel and Media Cards */
    .marquee-track {
        gap: 1rem;
    }

    .media-card.ratio-9-16 {
        width: 140px !important;
        max-width: 42vw !important;
    }

    .media-card.ratio-1-1 {
        width: 160px !important;
        max-width: 50vw !important;
    }

    .media-card.ratio-16-9 {
        width: 220px !important;
        max-width: 75vw !important;
    }

    .carousel-item {
        width: auto !important;
    }

    /* Testimonials */
    .luxury-card {
        width: 80vw !important;
        max-width: 320px;
        min-height: 180px;
        padding: 1.5rem !important;
        margin: 0 0.8rem;
        gap: 1rem;
    }

    .luxury-card .quote {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .luxury-card .stars {
        margin-bottom: 0.5rem;
    }

    .luxury-card .star-svg {
        width: 14px;
        height: 14px;
    }

    /* Client Logos */
    .logo-marquee-container {
        margin-top: 1rem;
        padding: 1rem 0;
        overflow: hidden;
    }

    .luxury-logo {
        width: 110px;
        height: 110px;
        margin: 0 1.5rem;
        font-size: 0.8rem;
        letter-spacing: 0.2em;
    }

    /* Flip Cards */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0;
    }

    .flip-card {
        height: 220px;
    }

    .flip-card-front,
    .flip-card-back {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 1rem;
    }

    /* Buttons */
    .btn-primary {
        padding: 1rem 2.5rem;
        font-size: 10px;
    }

    .btn-inverse {
        padding: 0.8rem 2rem;
        font-size: 10px;
    }

    /* Contact Section */
    .contact-tier {
        padding: 5rem 1.5rem;
    }

    .contact-title {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .contact-links {
        gap: 1rem;
    }

    .contact-btn {
        padding: 0.9rem 2rem;
        font-size: 12px;
        letter-spacing: 0.12em;
    }

    /* Social Buttons */
    .social-grid {
        gap: 0.8rem !important;
    }

    .premium-social-btn {
        width: 44px;
        height: 44px;
    }

    .premium-social-btn svg,
    .premium-social-btn img {
        width: 24px;
        height: 24px;
    }

    /* Spline 3D */
    #spline-mount spline-viewer {
        transform: none !important;
        width: 100%;
        height: 100%;
    }

    /* Stats Banner */
    .stats-banner {
        padding: 2.5rem 3%;
    }

    .stat-number {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .stat-label {
        font-size: clamp(0.6rem, 2.5vw, 0.72rem);
    }

    /* Premium Text Marquee */
    .premium-text-marquee-wrapper {
        padding: 0.5rem 0;
    }

    .marquee-group span {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: clamp(1rem, 4vw, 1.5rem);
        padding: 0 clamp(0.5rem, 2vw, 1.5rem);
        opacity: 1;
    }
}

/* SMALL MOBILE (480px) */
@media (max-width: 480px) {
    .site-header {
        height: 60px;
        padding: 0 12px;
    }

    .logo-wrapper {
        width: 36px !important;
        height: 36px !important;
    }

    #dynamic-island {
        min-width: 200px;
        width: 65vw;
        /* Narrower to allow logo/toggle on sides with breathing space */
        max-width: 280px;
        height: 40px;
        top: 20px;
        /* Same horizontal plane as logo/toggle */
        padding: 0 4px;
        z-index: 9999;
    }

    .nav-link {
        font-size: 7px !important;
        padding: 3px 4px !important;
        letter-spacing: 0.04em;
    }

    .master-container {
        padding: 150px 1rem 4rem 1rem;
        /* Clear the island and logo */
    }

    .section-padding {
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: clamp(1.8rem, 10vw, 2.6rem) !important;
    }

    .glass-heading {
        font-size: 2.8rem !important;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 8vw, 2rem) !important;
    }

    .hero-title {
        font-size: clamp(1.8rem, 12vw, 2.8rem) !important;
    }

    .glass-panel {
        padding: 0.8rem;
        border-radius: 20px;
        margin-bottom: 1.5rem;
    }

    .panel-title {
        font-size: 1.1rem;
    }

    .marquee-track {
        gap: 1rem !important;
    }

    #testimonials-track {
        gap: 1.5rem !important;
        animation-duration: 15s !important;
    }

    .logo-track {
        animation-duration: 10s !important;
    }

    .luxury-card {
        backdrop-filter: none !important;
        background: rgba(255, 255, 255, 0.1) !important;
        width: 85vw !important;
    }

    .media-card.ratio-9-16 {
        width: 120px !important;
        max-width: 40vw !important;
    }

    .media-card.ratio-1-1 {
        width: 140px !important;
        max-width: 48vw !important;
    }

    .media-card.ratio-16-9 {
        width: 200px !important;
        max-width: 70vw !important;
    }

    .luxury-card {
        width: 85vw !important;
        max-width: 300px;
        padding: 1.2rem !important;
        min-height: 160px;
        gap: 0.8rem;
    }

    .luxury-card .quote {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .luxury-card .star-svg {
        width: 12px;
        height: 12px;
    }

    .luxury-logo {
        width: 85px;
        height: 85px;
        margin: 0 1rem;
        font-size: 0.65rem;
        letter-spacing: 0.15em;
        border-width: 1px;
    }

    .flip-card {
        height: 200px;
    }

    .card-icon {
        width: 40px;
        height: 40px;
    }

    .contact-tier {
        padding: 3.5rem 1rem;
    }

    .contact-btn {
        padding: 0.8rem 1.5rem;
        font-size: 11px;
    }

    .stats-container {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .stat-item {
        flex: 1;
    }

    .stat-item::after {
        display: none !important;
    }

    .premium-social-btn {
        width: 40px;
        height: 40px;
    }

    .premium-social-btn svg,
    .premium-social-btn img {
        width: 20px;
        height: 20px;
    }

    .premium-text-marquee-wrapper {
        padding: 0.5rem 0;
    }

    .marquee-group span {
        font-family: var(--font-display);
        font-weight: 700;
        font-size: clamp(0.8rem, 3.5vw, 1.2rem);
    }

    /* Spline 3D Mobile Fit */
    #spline-mount spline-viewer {
        transform: none !important;
        width: 100%;
        height: 100%;
    }
}

/* --- PORTFOLIO TOGGLE --- */
.portfolio-toggle-wrapper {
    width: 100%;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .portfolio-toggle-wrapper {
        width: 100%;
        margin-left: 0;
        display: flex;
        justify-content: center;
        padding: 0;
    }
}

.portfolio-toggle {
    display: inline-flex;
    background: #000000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 50px;
    padding: 4px;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
    position: relative;
    z-index: 10;
    max-width: 100%;
    overflow-x: auto;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

@media (max-width: 768px) {
    .portfolio-toggle {
        display: flex;
        width: 100%;
        justify-content: space-between;
    }
}
.portfolio-toggle::-webkit-scrollbar {
    display: none;
}

.light-theme .portfolio-toggle {
    background: #000000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.portfolio-toggle-btn {
    padding: 0.6rem 2rem;
    border-radius: 40px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    flex-shrink: 0;
}

.mobile-text { display: none; }
.desktop-text { display: inline; }

@media (max-width: 768px) {
    .mobile-text { display: inline; }
    .desktop-text { display: none; }
    .portfolio-toggle-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

.light-theme .portfolio-toggle-btn {
    color: rgba(255, 255, 255, 0.5);
}

.portfolio-toggle-btn.active {
    color: #000000;
    background: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.light-theme .portfolio-toggle-btn.active {
    color: #000000;
    background: #ffffff;
    box-shadow: none;
}

/* --- RESPONSIVE UTILITIES --- */
@media (min-width: 769px) {
    .hidden-desktop { display: none !important; }
}
@media (max-width: 768px) {
    .hidden-mobile { display: none !important; }
    .master-container {
        padding-left: 1.5rem !important; /* Increased for safety */
        padding-right: 1.5rem !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden;
    }
}

/* --- PORTFOLIO TAB CONTENT --- */
.portfolio-content-area {
    width: 100%;
    box-sizing: border-box;
}

.portfolio-tab-content {
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
    box-sizing: border-box;
}

.master-container, .glass-panel, .netflix-card, .card-thumbnail {
    box-sizing: border-box !important;
}

/* --- NETFLIX HORIZONTAL ROW --- */
.netflix-row-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2rem;
    margin-top: 1rem;
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}
.netflix-row-wrapper::-webkit-scrollbar {
    display: none;
}

.netflix-row {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0; /* Vertical padding only */
    width: max-content;
}

.netflix-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.6s cubic-bezier(0.2, 1, 0.2, 1), filter 0.5s ease;
    cursor: pointer;
    box-shadow: none !important;
    flex-shrink: 0;
    animation: card-reveal 0.8s cubic-bezier(0.2, 1, 0.2, 1) forwards;
}

@keyframes card-reveal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (hover: hover) {
    .netflix-card:hover {
        transform: scale(1.05) translateY(-5px);
        z-index: 10;
    }
    
    .netflix-row:hover .netflix-card:not(:hover) {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

.card-thumbnail {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    flex-shrink: 0;
}

.light-theme .card-thumbnail {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-thumbnail.ratio-16-9 {
    width: 400px;
    aspect-ratio: 16/9;
}

.card-thumbnail.ratio-9-16 {
    width: 260px;
    aspect-ratio: 9/16;
}

.card-thumbnail.ratio-1-1 {
    width: 320px;
    aspect-ratio: 1/1;
}

.card-thumbnail video,
.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: transform 1s cubic-bezier(0.2, 1, 0.2, 1), filter 0.5s ease;
}

.media-ghost-shield {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 10, 7, 0.6) 0%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    transition: opacity 1.2s ease;
    opacity: 0.3; /* Subtle static overlay */
}


.card-views {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: left;
    padding: 0 4px;
}

.card-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-category {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.7;
}

/* --- GRAPHIC GRID --- */
.graphic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.graphic-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
    cursor: pointer;
}

.graphic-card:hover {
    transform: scale(1.02) translateY(-5px);
}

.graphic-card .card-thumbnail {
    width: 100%;
}

.graphic-card .card-thumbnail.ratio-1-1 {
    aspect-ratio: 1/1;
}

.graphic-card .card-thumbnail.ratio-16-9 {
    aspect-ratio: 16/9;
}

@media (max-width: 768px) {
    .master-container { padding-left: 1rem !important; padding-right: 1rem !important; }
    .card-thumbnail.ratio-16-9 { width: 320px; }
    .card-thumbnail.ratio-9-16 { width: 220px; }
    .graphic-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
}

@media (max-width: 480px) {
    .card-thumbnail.ratio-16-9 { width: 260px; }
    .card-thumbnail.ratio-9-16 { width: 180px; }
    .portfolio-toggle-btn { 
        padding: 0.5rem 0.8rem; 
        font-size: 0.65rem !important; 
        letter-spacing: 0.05em; 
        flex: 1; 
        text-align: center; 
    }
    .mobile-text { display: inline !important; }
    .desktop-text { display: none !important; }
    .graphic-grid { grid-template-columns: 1fr; }
    .page-title { font-size: 2.2rem !important; }

    /* Stable Mobile CTA */
    .mobile-explore-btn {
        background: rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(168, 85, 247, 0.4);
        color: #a855f7;
        padding: 0.8rem 2.2rem;
        border-radius: 50px;
        font-family: 'Clash Display', sans-serif;
        font-size: 0.9rem;
        font-weight: 700;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.2);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        animation: mobile-glow 2s infinite alternate;
    }

    .mobile-explore-btn:active {
        transform: scale(0.95);
        background: rgba(168, 85, 247, 0.2);
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
    }

    @keyframes mobile-glow {
        from { box-shadow: 0 0 10px rgba(168, 85, 247, 0.2); }
        to { box-shadow: 0 0 25px rgba(168, 85, 247, 0.5); }
    }
}

/* Tiny screen safety (iPhone SE etc) */
@media (max-width: 360px) {
    .card-thumbnail.ratio-16-9 { width: 230px; }
    .card-thumbnail.ratio-9-16 { width: 160px; }
    .glass-panel { padding: 1rem 0.8rem !important; }
    .portfolio-toggle-btn { padding: 0.3rem 0.5rem; font-size: 0.6rem; }
}

/* -- OFFICIAL SOCIAL BRANDING OVERRIDES (ABSOLUTE PRIORITY) -- */
.premium-social-btn.gmail { 
    background: #ffffff !important; 
    border-color: rgba(0, 0, 0, 0.1) !important; 
}
.premium-social-btn.instagram { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285ae3 90%) !important; 
    border-color: transparent !important;
}

.premium-social-btn.x-brand { background: #000000 !important; }
.premium-social-btn.linkedin { background: #0a66c2 !important; }
.premium-social-btn.youtube { background: #ff0000 !important; }
.premium-social-btn.facebook { background: #1877f2 !important; }
.premium-social-btn.behance { background: #0057ff !important; }
.premium-social-btn.freelancer { background: #29b2fe !important; }
.premium-social-btn.discord { background: #5865f2 !important; }

/* Force brand backgrounds in Light Mode also */
.light-theme .premium-social-btn.gmail { background: #ffffff !important; }
.light-theme .premium-social-btn.instagram { 
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285ae3 90%) !important; 
}
.light-theme .premium-social-btn.x-brand { background: #000000 !important; }
.light-theme .premium-social-btn.linkedin { background: #0a66c2 !important; }
.light-theme .premium-social-btn.youtube { background: #ff0000 !important; }
.light-theme .premium-social-btn.facebook { background: #1877f2 !important; }
.light-theme .premium-social-btn.behance { background: #0057ff !important; }
.light-theme .premium-social-btn.freelancer { background: #29b2fe !important; }
.light-theme .premium-social-btn.discord { background: #5865f2 !important; }

/* Apply white fill to all icons EXCEPT Gmail to allow official colors */
.premium-social-btn:not(.gmail) svg, 
.premium-social-btn:not(.gmail) svg path,
.premium-social-btn:not(.gmail) svg circle,
.premium-social-btn:not(.gmail) svg rect {
    fill: white !important;
}

/* Ensure Gmail paths use their official multi-color branding */
.premium-social-btn.gmail svg path:nth-child(1) { fill: #EA4335 !important; }
.premium-social-btn.gmail svg path:nth-child(2) { fill: #4285F4 !important; }
.premium-social-btn.gmail svg path:nth-child(3) { fill: #34A853 !important; }
.premium-social-btn.gmail svg path:nth-child(4) { fill: #FBBC04 !important; }

/* Ensure Gmail background is always white for the colorful logo to pop */
.premium-social-btn.gmail { 
    background: #ffffff !important; 
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

/* -- PREMIUM VERIFICATION NOTICE -- */
.verification-notice {
    margin-top: 0;
    padding: clamp(0.8rem, 1.5vh, 1.2rem);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-align: left;
    position: relative;
    overflow: hidden;
    box-shadow: none;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.verification-notice::before {
    display: none;
}

.verification-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.8rem;
}

.verification-icon {
    font-size: 1.5rem;
    line-height: 1;
    margin-right: 0.5rem;
}

.verification-title {
    font-family: var(--font-heading, 'Clash Display', sans-serif);
    font-size: clamp(1.1rem, 2vh, 1.4rem);
    font-weight: 800; /* Announced Weight */
    color: #ffffff;
    letter-spacing: 0.1em; /* Announced Spacing */
    text-transform: uppercase;
    margin: 0;
    text-align: center;
}

.verification-text {
    font-family: var(--font-body, 'Outfit', sans-serif);
    font-size: clamp(0.9rem, 1.8vh, 1rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.5;
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 600; /* Announced Weight */
}

.verification-details {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: clamp(0.5rem, 1.5vh, 1rem);
    border-radius: 12px;
    margin: clamp(0.8rem, 2vh, 1.2rem) auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
}

.verification-footer {
    font-family: var(--font-body, 'Outfit', sans-serif);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    text-align: center;
    margin: 0;
}

.brand-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-detail strong {
    color: var(--accent-color, #ffffff);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.brand-detail span {
    font-weight: 800;
    text-transform: uppercase;
    color: #ffffff;
    font-size: 0.95rem;
}

/* Light Theme Verification Notice Overrides */
.light-theme .verification-notice {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.light-theme .verification-title {
    color: #000000;
    font-weight: 800;
}

.light-theme .verification-text {
    color: rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

.light-theme .verification-details {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .brand-detail strong {
    color: #000000;
}

.light-theme .brand-detail span {
    color: rgba(0, 0, 0, 0.7);
}

.light-theme .verification-footer {
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
    text-align: center;
    font-weight: 400;
}

@media (max-width: 768px) {
    .verification-notice {
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 12px;
    }
    .verification-header {
        margin-bottom: 0.5rem;
    }
    .verification-title {
        font-size: 1.1rem;
    }
    .verification-icon {
        font-size: 1.1rem !important;
    }
    .verification-text {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 0.6rem;
        opacity: 0.9;
    }
    .verification-details {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 0.8rem 0.5rem;
        width: 100%;
        margin: 0.8rem 0;
        background: rgba(255, 255, 255, 0.04);
        border: 0.5px solid rgba(255, 255, 255, 0.1);
    }
    .brand-detail {
        flex: 0 1 auto;
        text-align: center;
        min-width: 80px;
    }
    .brand-detail strong {
        font-size: 0.6rem;
        display: block;
        margin-bottom: 2px;
        opacity: 0.6;
        white-space: normal;
    }
    .brand-detail span {
        font-size: 0.75rem;
        font-weight: 700;
        white-space: normal;
        display: block;
        word-break: break-all;
    }
    .verification-footer {
        font-size: 0.65rem;
        opacity: 0.6;
    }
}

/* -- SOCIAL BRAND HOVER STATES -- */
.premium-social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285ae3 90%) !important;
    border-color: transparent !important;
    box-shadow: none !important;
    filter: none !important;
}

.premium-social-btn.gmail:hover {
    background: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
    box-shadow: none !important;
    filter: none !important;
}

.premium-social-btn.x-brand:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.premium-social-btn.linkedin:hover {
    background: rgba(0, 119, 181, 0.1);
    border-color: rgba(0, 119, 181, 0.3);
}

.premium-social-btn.youtube:hover {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.3);
}

.premium-social-btn.facebook:hover {
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.3);
}

.premium-social-btn.behance:hover {
    background: rgba(23, 105, 255, 0.1);
    border-color: rgba(23, 105, 255, 0.3);
}

.premium-social-btn.freelancer:hover {
    background: rgba(41, 178, 254, 0.1);
    border-color: rgba(41, 178, 254, 0.3);
}

.premium-social-btn.discord:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.3);
}

/* -- Testimonial Logos Theme Toggle -- */
.testimonial-logo-light {
    display: none !important;
}

.light-theme .testimonial-logo-light {
    display: block !important;
}

.light-theme .testimonial-logo-dark {
    display: none !important;
}
