/* ===== CUSTOM PROPERTIES FOR DARK THEME ===== */
/* Prefer central tokens; keep legacy vars mapped for now */
[data-theme="dark"] {
    --primary-color: var(--brand-blue-400, #3b82f6);
    --primary-dark: var(--brand-blue-500, #2563eb);
    --primary-light: var(--brand-blue-300, #60a5fa);
    --secondary-color: var(--green-400, #10b981);
    --accent-color: var(--gold-400, #f59e0b);
    --text-color: #f1f5f9;
    --text-light: #94a3b8;
    --white: #0f172a;
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #f8fafc;
}

/* ===== ADDITIONAL UTILITY STYLES ===== */
/* (Removed horizontal progress-track styles) */
body.is-loading { overflow:hidden; touch-action:none; }

.epic-loader-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

/* Medical Grid Animation */
/* Loader visual background grid (pushed behind) */
.medical-grid {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    z-index: -2 !important; /* behind loader background */
    pointer-events: none;
}

/* Individual animated lines */
.medical-grid .grid-line {
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: gridPulse 3s ease-in-out infinite;
    z-index: -2 !important;
    mix-blend-mode: normal;
}

.grid-line:nth-child(1) {
    width: 2px;
    height: 100%;
    left: 20%;
    animation-delay: 0s;
}

.grid-line:nth-child(2) {
    width: 2px;
    height: 100%;
    left: 40%;
    animation-delay: 0.6s;
}

.grid-line:nth-child(3) {
    width: 2px;
    height: 100%;
    left: 60%;
    animation-delay: 1.2s;
}

.grid-line:nth-child(4) {
    width: 100%;
    height: 2px;
    top: 30%;
    animation-delay: 1.8s;
}

.grid-line:nth-child(5) {
    width: 100%;
    height: 2px;
    top: 70%;
    animation-delay: 2.4s;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.25; transform: scale(1.03); }
}

/* Elevate epic loader foreground explicitly so future additions don't overlap */
/* Foreground stacking */
#epic-loading-screen {
    position: fixed;
    z-index: 10000;
    inset: 0;
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    --loader-pad: clamp(1rem, 2.5vh, 3rem);
    padding: var(--loader-pad);
    padding-bottom: calc(var(--loader-pad) + env(safe-area-inset-bottom, 0px));
}
.epic-loader-background { z-index: -1 !important; position: absolute; }
.epic-loader-content { position: relative; z-index: 10 !important; }
.epic-logo-section { position: relative; z-index: 11 !important; }

/* Absolute kill switch utility (add class .no-grid to #epic-loading-screen to hide) */
#epic-loading-screen.no-grid .medical-grid { display: none !important; }

/* Floating Medical Icons */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.float-icon {
    position: absolute;
    /* Use hero accent colors with slight transparency for cohesion */
    color: var(--brand-blue-300, rgba(255,255,255,0.25));
    opacity: 0.28;
    font-size: 2rem;
    animation: floatAround 15s ease-in-out infinite;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
    transition: opacity .6s ease;
}

.float-icon:nth-child(3n) { color: var(--green-300, #10b981); opacity:.22; }
.float-icon:nth-child(4n) { color: var(--gold-300, #fbbf24); opacity:.24; }
.float-icon:nth-child(5n) { color: var(--cyan-300, #06b6d4); opacity:.26; }

.float-icon.icon-1 {
    top: 18%;
    left: 8%;
    animation-delay: 0s;
}

.float-icon.icon-2 {
    top: 22%;
    right: 8%;
    animation-delay: 1.6s;
}

.float-icon.icon-3 {
    bottom: 24%;
    left: 12%;
    animation-delay: 3.2s;
}

.float-icon.icon-4 {
    bottom: 18%;
    right: 12%;
    animation-delay: 4.8s;
}

.float-icon.icon-5 {
    top: 54%;
    right: 18%;
    animation-delay: 6.4s;
}

@media (max-width: 1024px) {
    .float-icon {
        font-size: 1.6rem;
    }
    .float-icon.icon-5 {
        right: 12%;
    }
}

@media (max-width: 768px) {
    .floating-icons {
        display: none;
    }
}

@keyframes floatAround {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.2;
    }
    25% { 
        transform: translateY(-20px) rotate(90deg);
        opacity: 0.4;
    }
    50% { 
        transform: translateY(-10px) rotate(180deg);
        opacity: 0.6;
    }
    75% { 
        transform: translateY(-30px) rotate(270deg);
        opacity: 0.4;
    }
}

/* Epic Loader Content */
.epic-loader-content { text-align:center; color:white; z-index:2; position:relative; animation:epicFadeIn 1.2s ease-out; max-width: min(640px, 92vw); width:100%; padding:clamp(1.25rem,2.5vh,2.25rem); }

/* Responsive Loader Scaling */
@media (max-width: 640px) { /* phones */
    .epic-loader-content { max-width: 100%; padding: 1.25rem 1rem 2rem; }
    .epic-logo-section { margin-bottom: 1.5rem; }
    .epic-title .title-main { font-size: 2.2rem; }
    .epic-title .title-sub { font-size: 1rem; }
    .loading-steps { flex-direction: column; gap: .6rem; }
    .loading-steps .step { padding: .85rem .9rem; font-size: .85rem; }
    .progress-ring-svg { width: 110px; height: 110px; }
    .pr-value { font-size: .9rem; }
}
@media (min-width: 641px) and (max-width: 900px) { /* tablets */
    .epic-loader-content { max-width: 540px; }
    .epic-title .title-main { font-size: 3rem; }
    .loading-steps { gap: .75rem; }
    .loading-steps .step { padding: .9rem 1rem; }
}
@media (min-width: 1500px) { /* very large desktop */
    .epic-loader-content { max-width: 760px; }
    .epic-title .title-main { font-size: 4.25rem; }
}

/* Logo Section */
.epic-logo-section {
    margin-bottom: 3rem;
    animation: logoEntrance 0.2s ease-out;
}

@keyframes logoEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
        filter: blur(10px);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(2deg);
        filter: blur(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: blur(0px);
    }
}

.epic-logo {
    position: relative;
    margin-bottom: 2rem;
}

.logo-icon {
    position: relative;
    display: inline-block;
    font-size: 4rem;
    color: var(--brand-blue-300, #60a5fa);
    animation: heartbeat 4s ease-in-out infinite;
}

.pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid rgba(96, 165, 250, 0.3);
    border-radius: 50%;
    animation: pulsate 4s ease-out infinite;
}

.pulse-ring-delay {
    animation-delay: 2s;
    width: 160px;
    height: 160px;
    border-color: rgba(96, 165, 250, 0.2);
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    20% { transform: scale(1.1); filter: brightness(1.2); }
    40% { transform: scale(1.05); filter: brightness(1.1); }
    60% { transform: scale(1.15); filter: brightness(1.3); }
    80% { transform: scale(1.08); filter: brightness(1.15); }
}

@keyframes pulsate {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.4);
        opacity: 0;
    }
}

.epic-title {
    font-family: 'Poppins', sans-serif;
    margin-bottom: 1rem;
}

.title-main {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-blue-300, #60a5fa) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 6s ease-in-out infinite alternate;
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.5rem;
    letter-spacing: 0.05em;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(96, 165, 250, 0.5)); }
}

.epic-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
    letter-spacing: 0.1em;
    animation: fadeInUp 0.1s ease-out 0.2s both;
}

/* Progress Section */
.epic-progress-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.075s ease-out 0.3s both;
}

.progress-container {
    position: relative;
    margin-bottom: 2rem;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand-blue-300, #60a5fa), var(--brand-blue-400, #3b82f6), var(--brand-blue-600, #1d4ed8));
    border-radius: 10px;
    width: 0%;
    animation: fillProgress 4s ease-out infinite;
    position: relative;
}

.progress-glow {
    position: absolute;
    top: -2px;
    left: 0;
    height: 10px;
    width: 40px;
    background: linear-gradient(90deg, transparent, rgba(96, 165, 250, 0.8), transparent);
    border-radius: 10px;
    animation: progressGlow 5s ease-in-out infinite;
}

@keyframes fillProgress {
    0% { width: 0%; }
    15% { width: 50%; }
    30% { width: 55%; }
    50% { width: 70%; }
    80% { width: 90%; }
    100% { width: 100%; }
}

@keyframes progressGlow {
    0%, 100% { transform: translateX(-40px); opacity: 0; }
    25% { transform: translateX(150px); opacity: 0.8; }
    50% { transform: translateX(300px); opacity: 1; }
    75% { transform: translateX(450px); opacity: 0.8; }
}


/* Loading Steps */
.loading-steps {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Preload improvement: show final "Ready to Serve" step as visually green baseline before JS animates */
.loading-steps .step[data-step="4"] {
    background: rgba(31, 41, 55, 0.75);
    border: 1px solid rgba(59, 130, 246, 0.35);
    /* Subtle dormant success styling (lighter than active/completed pulse) */
    background: linear-gradient(145deg, color-mix(in srgb, var(--secondary-400, var(--green-400)) 25%, transparent), rgba(255,255,255,0.05));
    border: 1px solid color-mix(in srgb, var(--secondary-400, var(--green-400)) 35%, transparent);
}
/* When JS marks it completed later, existing .step.completed styles take over */

.step {
    flex: 1;
    min-width: 120px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.step.active {
    opacity: 1;
    background: rgba(96, 165, 250, 0.2);
    border: 1px solid rgba(96, 165, 250, 0.3);
    animation: stepPulse 1s ease-in-out infinite alternate;
}

.step.progressed {
    opacity: 0.9;
    background: linear-gradient(145deg, rgba(96,165,250,0.15), rgba(59,130,246,0.08));
    border: 1px solid rgba(59,130,246,0.25);
}

/* Phase-based color ramp (1→4 = blue → cyan → violet → green) */
.step.phase-1.active { background: linear-gradient(145deg, color-mix(in srgb,var(--brand-blue-400) 40%, transparent), rgba(255,255,255,0.05)); border:1px solid color-mix(in srgb,var(--brand-blue-400) 45%, transparent); }
.step.phase-1.progressed { background: linear-gradient(145deg, color-mix(in srgb,var(--brand-blue-400) 18%, transparent), rgba(255,255,255,0.04)); }

.step.phase-2.active { background: linear-gradient(145deg, color-mix(in srgb,var(--cyan-400, #27B9E3) 40%, transparent), rgba(255,255,255,0.05)); border:1px solid color-mix(in srgb,var(--cyan-400, #27B9E3) 45%, transparent); }
.step.phase-2.progressed { background: linear-gradient(145deg, color-mix(in srgb,var(--cyan-400, #27B9E3) 18%, transparent), rgba(255,255,255,0.04)); }

.step.phase-3.active { background: linear-gradient(145deg, color-mix(in srgb,var(--innovation-400, #667EEA) 42%, transparent), rgba(255,255,255,0.05)); border:1px solid color-mix(in srgb,var(--innovation-400, #667EEA) 48%, transparent); }
.step.phase-3.progressed { background: linear-gradient(145deg, color-mix(in srgb,var(--innovation-400, #667EEA) 20%, transparent), rgba(255,255,255,0.04)); }

.step.phase-4.active { background: linear-gradient(145deg, color-mix(in srgb,var(--secondary-400, var(--green-400)) 44%, transparent), rgba(255,255,255,0.06)); border:1px solid color-mix(in srgb,var(--secondary-400, var(--green-400)) 50%, transparent); }
/* Completed state already covers green celebration */

.step.completed {
    opacity: 1;
    background: linear-gradient(145deg, rgba(16,185,129,0.35), rgba(5,150,105,0.15));
    border: 1px solid rgba(16,185,129,0.3);
    animation: stepComplete 0.85s ease-out;
}

.step.completed i {
    color: var(--secondary-400, #10b981);
    animation: iconCelebrate 0.8s ease-out;
}

@keyframes stepComplete {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(16, 185, 129, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    }
}

@keyframes iconCelebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.2) rotate(-5deg); }
    50% { transform: scale(1.3) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
}

.step i {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--brand-blue-300, #60a5fa);
}

.step span {
    font-size: 0.9rem;
    font-weight: 500;
}

@keyframes stepPulse {
    0% { transform: scale(1); box-shadow: 0 0 20px rgba(96, 165, 250, 0.3); }
    100% { transform: scale(1.02); box-shadow: 0 0 30px rgba(96, 165, 250, 0.5); }
}

/* Epic Stats */
.epic-stats {
    display: flex;

/* ==== OVERRIDE: Completely hide medical loading grid lines ==== */
#epic-loading-screen .medical-grid,
#epic-loading-screen .medical-grid .grid-line { display: none !important; visibility: hidden !important; }
/* To restore, remove the override above. */
    justify-content: center;
    gap: 3rem;
    animation: fadeInUp 0.075s ease-out 0.375s both;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--brand-blue-300, #60a5fa);
    display: block;
    animation: countUp 3s ease-out infinite;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    margin-top: 0.5rem;
}

/* Loading Particles */
.loading-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: color-mix(in srgb, var(--brand-blue-300, #60a5fa) 80%, transparent);
    border-radius: 50%;
    animation: particleMove 12s linear infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { right: 30%; animation-delay: 3s; }
.particle:nth-child(5) { right: 20%; animation-delay: 4s; }
.particle:nth-child(6) { right: 10%; animation-delay: 5s; }

@keyframes particleMove {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) scale(0);
        opacity: 0;
    }
}

@keyframes epicFadeIn {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .epic-loader-content {
        padding: 1rem;
        max-width: 90%;
    }
    
    .title-main {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.2rem;
    }
    
    .loading-steps {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .epic-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .float-icon {
        font-size: 1.5rem;
    }
}

/* Additional Epic Loading Enhancements */
@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.epic-logo-section {
    position: relative;
}

.epic-logo-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand-blue-300, #60a5fa), transparent);
    animation: dataFlow 8s ease-in-out infinite;
}

.epic-logo-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green-400, #10b981), transparent);
    animation: dataFlow 8s ease-in-out infinite reverse;
    animation-delay: 4s;
}

.loader-logo {
    margin-bottom: 2rem;
    position: relative;
}

.loader-logo i {
    font-size: 4rem;
    color: white;
    animation: pulse 2s infinite, rotate 3s linear infinite;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.loader-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.loader-subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 400;
    margin-bottom: 3rem;
}

.loader-progress {
    width: 300px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), white, rgba(255,255,255,0.8));
    border-radius: 2px;
    width: 0%; /* JS will drive width */
    position: relative;
    transition: width 0.18s cubic-bezier(.4,.0,.2,1);
}

.loader-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

.loader-text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes loadProgress {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 35%; }
    60% { width: 60%; }
    80% { width: 85%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

/* ===== LOADING SCREEN STYLES ===== */
#loading-screen .loader-content {
    text-align: center;
    color: white;
}

#loading-screen .loader-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: bold;
}

#loading-screen .loader-logo i {
    animation: pulse 2s infinite;
    font-size: 2rem;
}

/* ===== FORM ANIMATIONS ===== */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message {
    animation: slideInDown 0.5s ease-out;
}

/* ===== ADDITIONAL UTILITY ANIMATIONS ===== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.testimonial__card {
    animation: fadeInScale 0.6s ease-out;
}

.faq__item {
    animation: fadeInUp 0.6s ease-out;
}

#loading-screen .spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==== GLASSMORPHISM LOADING REVAMP (2025 refresh) ==== */
.glass-loading-root {
    background: radial-gradient(circle at 20% 20%, rgba(96,165,250,0.25) 0%, rgba(30,64,175,0.9) 55%, rgba(15,23,42,0.95) 100%),
                linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
}

.glass-backdrop::before,
.glass-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(125deg, rgba(255,255,255,0.08), rgba(255,255,255,0) 40%, rgba(255,255,255,0.1));
    mix-blend-mode: overlay;
    pointer-events: none;
}

.glass-backdrop::after {
    background: radial-gradient(circle at 70% 80%, rgba(255,255,255,0.15), transparent 70%);
    filter: blur(40px) saturate(180%);
}

.ambient-orbs { position: absolute; inset: 0; overflow:hidden; }
.ambient-orbs .orb {
    position: absolute;
    width: 420px; height: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(96,165,250,0.55), rgba(37,99,235,0.15) 60%, transparent 75%);
    filter: blur(40px) saturate(160%);
    opacity: .55;
    animation: orbFloat 18s ease-in-out infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}
.ambient-orbs .orb-1 { top: -120px; left: -120px; animation-delay: 0s; }
.ambient-orbs .orb-2 { bottom: -160px; right: -150px; animation-delay: 4s; background: radial-gradient(circle at 70% 70%, rgba(16,185,129,0.45), rgba(56,189,248,0.2) 55%, transparent 75%); }
.ambient-orbs .orb-3 { top: 40%; left: 55%; animation-delay: 8s; background: radial-gradient(circle at 50% 50%, rgba(99,102,241,0.5), rgba(30,64,175,0.2) 55%, transparent 75%); }

@keyframes orbFloat {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    25% { transform: translate3d(40px,-30px,0) scale(1.05); }
    50% { transform: translate3d(-30px,25px,0) scale(0.95); }
    75% { transform: translate3d(25px,35px,0) scale(1.08); }
}

.glass-panel {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 18px 45px rgba(5, 13, 30, 0.45);
    border-radius: 34px;
    position: relative;
    isolation: isolate;
}

@keyframes panelPulse { 0%,100% { opacity:.9; } 50% { opacity:1; } }

.glass-steps .step {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 24px rgba(5, 13, 30, 0.35);
}

.glass-steps .step.active {
    background: linear-gradient(145deg, rgba(96,165,250,0.35), rgba(59,130,246,0.15));
    box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 8px 28px -6px rgba(37,99,235,0.55);
}

.glass-steps .step.completed {
    background: linear-gradient(145deg, rgba(16,185,129,0.35), rgba(5,150,105,0.15));
}

.glass-particles .particle { background: radial-gradient(circle at 40% 40%, rgba(255,255,255,0.9), rgba(96,165,250,0.85)); filter: blur(.5px); }
.glass-particles .particle:nth-child(odd) { background: radial-gradient(circle at 60% 60%, rgba(255,255,255,0.85), rgba(16,185,129,0.75)); }

@supports ((backdrop-filter: blur(26px)) or (-webkit-backdrop-filter: blur(26px))) {
    .glass-panel {
        background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
        -webkit-backdrop-filter: blur(26px) saturate(180%);
        backdrop-filter: blur(26px) saturate(180%);
        box-shadow: 0 8px 48px -12px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05), inset 0 0 0 0.5px rgba(255,255,255,0.4);
    }

    .glass-panel::before {
        content:'';
        position:absolute; inset:0;
        background: linear-gradient(160deg, rgba(255,255,255,0.25), rgba(255,255,255,0) 55%);
        opacity:.6;
        mix-blend-mode: overlay;
        pointer-events:none;
    }

    .glass-panel::after {
        content:''; position:absolute; inset:2px;
        border-radius: 31px;
        background: linear-gradient(160deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02));
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15), inset 0 8px 32px -8px rgba(255,255,255,0.25), 0 4px 24px -10px rgba(96,165,250,0.3);
        pointer-events: none;
        animation: panelPulse 8s ease-in-out infinite;
    }

    .glass-steps .step {
        background: linear-gradient(145deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
        backdrop-filter: blur(18px) saturate(180%);
        -webkit-backdrop-filter: blur(18px) saturate(180%);
        border: 1px solid rgba(255,255,255,0.18);
        box-shadow: 0 4px 22px -6px rgba(0,0,0,0.45), inset 0 0 0 0.5px rgba(255,255,255,0.15);
    }
}

/* Title enhancements for glass context */
.glass-panel .title-main { filter: drop-shadow(0 4px 18px rgba(59,130,246,0.35)); }
.glass-panel .epic-tagline { letter-spacing: .25em; text-transform: uppercase; font-size: .85rem; font-weight:500; }

/* Accessibility: contrast adjustments in dark theme */
[data-theme="dark"] .glass-panel { background: linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)); }
[data-theme="dark"] .glass-steps .step { background: linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03)); }

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .ambient-orbs .orb, .float-icon, .particle, .progress-fill, .pulse-ring, .pulse-ring-delay { animation: none !important; }
    .glass-panel::after { animation: none !important; }
}

/* Responsive refinements for glass version */
@media (max-width: 820px) {
    .glass-panel { border-radius: 26px; padding: 1.5rem 1.25rem; }
    .glass-panel .title-main { font-size: 2.4rem; }
    .ambient-orbs .orb { width: 300px; height:300px; }
}

@media (max-width: 520px) {
    .glass-panel { border-radius: 22px; padding: 1.4rem 1rem; }
    .glass-panel .title-main { font-size: 2rem; }
    .glass-panel .epic-tagline { letter-spacing:.18em; }
    .loading-steps { flex-direction: column; }
}

/* === Circular Progress (Glass) === */
.progress-meta { display:flex; flex-direction:column; align-items:center; gap:.75rem; margin-top:1.25rem; }
.progress-ring { width:120px; height:120px; position:relative; }
.progress-ring-svg { width:100%; height:100%; overflow:visible; }
.progress-ring-svg circle { fill:none; stroke-linecap:round; }
.pr-track { stroke:rgba(255,255,255,0.12); stroke-width:10; }
.pr-fill { stroke: var(--brand-blue-300, #60a5fa); stroke-width:10; stroke-dasharray:339.292; stroke-dashoffset:339.292; filter:drop-shadow(0 0 8px rgba(96,165,250,0.45)); transition:stroke-dashoffset .25s ease-out, stroke .6s ease; }
.pr-glow { stroke:rgba(96,165,250,0.35); stroke-width:16; stroke-dasharray:339.292; stroke-dashoffset:339.292; opacity:.15; filter:blur(8px); }
.pr-value { font-size:1.15rem; font-weight:600; fill: var(--brand-blue-300, #60a5fa); font-family: 'Poppins', sans-serif; }
.progress-status { font-size:.8rem; letter-spacing:.15em; text-transform:uppercase; color:rgba(255,255,255,0.75); font-weight:500; text-align:center; max-width:220px; line-height:1.3; }

@supports (filter: drop-shadow(0 0 8px color-mix(in srgb, #60a5fa 35%, transparent))) {
    .pr-fill { filter:drop-shadow(0 0 8px color-mix(in srgb, var(--brand-blue-300, #60a5fa) 35%, transparent)); }
}

/* Animate entrance */
.progress-meta { animation: fadeInUp .4s ease-out .15s both; }

[data-theme="dark"] .pr-value { fill:#93c5fd; }

@media (max-width:520px){
    .progress-ring { width:100px; height:100px; }
    .pr-value { font-size:1rem; }
}

/* ===== ENHANCED HOVER EFFECTS ===== */
.service__card {
    position: relative;
    overflow: hidden;
}

.service__card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s;
    opacity: 0;
}

.service__card:hover::after {
    animation: shimmer 0.8s ease-in-out;
    opacity: 1;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ===== PRINT STYLES ===== */
@media print {
    .header,
    .hero__scroll,
    .footer,
    .theme-toggle,
    .scroll-progress,
    .custom-cursor {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .section__title {
        color: black !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.form__input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    }
    
    .btn--outline {
        border-width: 3px;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.reduced-animations * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

/* Critical resource hints */
.critical-resource {
    font-display: swap;
}

/* ===== BROWSER COMPATIBILITY ===== */
/* Safari specific fixes */
@supports (-webkit-appearance: none) {
    .hero__backdrop {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .hero__backdrop {
        background: rgba(255, 255, 255, 0.2);
    }
}

/* Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .service__card {
        border: 1px solid var(--gray-200);
    }
}

/* ===== ADDITIONAL ANIMATIONS ===== */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ===== MOBILE ENHANCEMENTS ===== */
@media (max-width: 768px) {
    .custom-cursor {
        display: none;
    }
    
    .theme-toggle {
        bottom: 1rem !important;
        right: 1rem !important;
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1rem !important;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Improved mobile navigation */
    .nav__menu.show-menu {
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.95);
    }
    
    /* Better mobile forms */
    .form__input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===== ENHANCED HERO SECTION ===== */
.hero__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero__particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.hero__particle:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.hero__particle:nth-child(2) {
    width: 15px;
    height: 15px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.hero__particle:nth-child(3) {
    width: 8px;
    height: 8px;
    top: 40%;
    left: 60%;
    animation-delay: 4s;
}

/* ===== SUCCESS MESSAGE STYLES ===== */
.success-message {
    animation: slideInFromBottom 0.5s ease-out;
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
