body {
    background-color: #ffffff;
    color: #111315;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* The Core Gradient Base (replaces orbs) */
.hero-gradient {
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 126, 39, 0.8) 0%, transparent 65%),
        radial-gradient(circle at 0% 100%, rgba(255, 175, 122, 0.7) 0%, transparent 65%),
        radial-gradient(circle at 50% 0%, #ffffff 0%, transparent 80%),
        linear-gradient(135deg, #ffffff 0%, #fff2ea 40%, #ffb98a 100%);
    position: relative;
    overflow: hidden;
}

/* Texture overlay */
.hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(60px) saturate(1.5);
    opacity: 0.15;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 1;
}

/* Static Brand Grid */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-size: 60px 60px;
    background-image:
        linear-gradient(to right, rgba(255, 126, 39, 0.1) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 126, 39, 0.1) 1px, transparent 1px);
    -webkit-mask-image: linear-gradient(to bottom, transparent 5%, black 80%);
    mask-image: linear-gradient(to bottom, transparent 5%, black 80%);
    pointer-events: none;
}

/* Living Circuit Pulse (Animated) */
.hero-grid-pulse {
    position: absolute;
    inset: 0;
    z-index: 3;
    background-size: 60px 60px;
    background-image:
        linear-gradient(to right, rgba(75, 213, 231, 0.4) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(75, 213, 231, 0.4) 1px, transparent 1px);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, transparent 20%);
    mask-image: linear-gradient(to bottom, transparent, black 10%, transparent 20%);
    -webkit-mask-size: 100% 200%;
    mask-size: 100% 200%;
    animation: pulse-scan 8s linear infinite;
    pointer-events: none;
}

@keyframes pulse-scan {
    0% { -webkit-mask-position: 0% -100%; mask-position: 0% -100%; }
    100% { -webkit-mask-position: 0% 200%; mask-position: 0% 200%; }
}

/* Pill Navigation — glassmorphism */
.nav-pill {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    -moz-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* When over dark background: white frost, dark text for readability */
body.nav-over-dark .nav-pill {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

body.nav-over-dark .nav-pill .nav-brand-text,
body.nav-over-dark .nav-pill .nav-link-desk {
    color: #111827;
}

body.nav-over-dark .nav-pill .nav-link-desk:hover {
    color: #000;
}

body.nav-over-dark .nav-pill .nav-logo-dot {
    background: #111827;
}

body.nav-over-dark .nav-pill .nav-logo-dot-inner {
    background: #ff7e27;
}

body.nav-over-dark .nav-pill #mobile-menu-btn {
    background: rgba(0, 0, 0, 0.15);
    color: #111827;
}

body.nav-over-dark .nav-pill #mobile-menu-btn:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Mobile menu panel when over dark: light text on light frost (panel stays dark for contrast when open) */
body.nav-over-dark #mobile-menu-panel.nav-pill .mobile-nav-link {
    color: #111827;
    border-color: rgba(0, 0, 0, 0.1);
}

body.nav-over-dark #mobile-menu-panel.nav-pill .mobile-nav-link:hover {
    color: #ff7e27;
}

/* Mobile menu: prevent scroll on body when open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Touch-friendly tap targets and reduce accidental zoom on inputs (iOS) */
@media (max-width: 768px) {
    .mobile-nav-link {
        -webkit-tap-highlight-color: rgba(255, 126, 39, 0.2);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    /* Prevent iOS zoom on input focus */
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Glassmorphic Browser Window */
.glass-browser {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 60px rgba(255, 126, 39, 0.15), 0 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Process section keyframe animations */
@keyframes shimmer {
    100% { transform: translateX(100%); }
}

@keyframes dash {
    to { stroke-dashoffset: 0; }
}

/* Scroll reveal: sections fade/slide in with slight delay when they enter viewport */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    transition-delay: 0.1s;
}
.scroll-reveal.scroll-reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* What We Do: mobile stacked cards (swipe to reveal next/prev) */
@media (max-width: 1023px) {
    #services-cards-track {
        display: block;
        position: relative;
        min-height: 520px;
        overflow: hidden;
        padding: 0 0 1rem 0;
        margin: 0;
    }
    #services-cards-track .story-card {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        min-height: 520px;
        opacity: 1;
        transform: translate3d(0, 0, 0);
        transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: none;
        border: 1px solid transparent;
        z-index: 1;
        will-change: transform;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    #services-cards-track .story-card.stack-prev,
    #services-cards-track .story-card.stack-next {
        box-shadow: none;
    }
    #services-cards-track .story-card.stack-prev {
        transform: translate3d(-100%, 0, 0);
        z-index: 0;
    }
    #services-cards-track .story-card.stack-next {
        transform: translate3d(100%, 0, 0);
        z-index: 0;
    }
    #services-cards-track .story-card.stack-active {
        transform: translate3d(0, 0, 0);
        z-index: 2;
    }
    .services-dot.active {
        background-color: #ff7e27;
        transform: scale(1.25);
    }
}
