/* Base Styles */
body {
    background-color: var(--color-secondary);
    color: var(--color-text);
    font-family: var(--font-family);
    line-height: 1.75;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--color-accent-1);
}

img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   ACCESSIBILITY
   ========================================= */

/* Skip to Content Link - Hidden until focused */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary, #00e5ff);
    color: var(--color-secondary, #000);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 100000;
    transition: top 0.3s ease;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
    outline: none;
}

/* Screen Reader Only Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    height: auto;
    width: auto;
    margin: 0;
    overflow: visible;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary, #00e5ff);
    color: var(--color-secondary, #000);
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
    z-index: 100000;
    text-decoration: none;
}

/* Focus Visible - Modern Focus Indicator */
:focus-visible {
    outline: 2px solid var(--color-primary, #00e5ff);
    outline-offset: 3px;
}

/* Remove default focus for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Interactive elements focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-primary, #00e5ff);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Mega Typography (Agency Style) --- */
.display-mega {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -3px;
    font-weight: 800;
    text-transform: uppercase;
    color: #FFFFFF;
}

/* High Contrast Lead */
.lead-xl {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1.4;
    font-weight: 400;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================= 
   UTILITY CLASSES 
   ========================================= */

/* Section Headers */
.section-header {
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    max-width: 600px;
}

/* Text Helpers */
.text-balance {
    text-wrap: balance;
}

.text-white {
    color: #FFFFFF !important;
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

/* Text Constraints */
.text-constrained {
    max-width: 550px;
}

.text-constrained-lg {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.text-constrained-xl {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Color Utilities */
.text-accent-cyan {
    color: var(--color-accent-cyan, #00e5ff);
}

/* Background Utilities */
.bg-darker {
    background: var(--color-bg-darker, #050505);
}

.bg-cyan-subtle {
    background: rgba(0, 229, 255, 0.02);
}

.bg-gradient-cyan-top {
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.05) 0%, transparent 100%);
}

/* Border Utilities */
.border-subtle {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Size Utilities */
.avatar-sm {
    width: 40px;
    height: 40px;
}

.avatar-md {
    width: 50px;
    height: 50px;
}

.avatar-lg {
    width: 70px;
    height: 70px;
}

/* Security & Debug Utilities */
.sabha-honeypot {
    position: absolute;
    left: -9999px;
    top: -9999px;
}

.sabha-debug-pre {
    background: #f1f1f1;
    padding: 10px;
    overflow-x: auto;
}

/* =========================================
   BOOTSTRAP DARK THEME OVERRIDES
   ========================================= */

/* Override Bootstrap text-muted - WCAG AA Compliant */
.text-muted {
    color: var(--color-text-muted, rgba(255, 255, 255, 0.7)) !important;
}

/* Override Bootstrap text-secondary - Enhanced with blue tint */
.text-secondary {
    color: var(--color-text-secondary, rgba(200, 220, 255, 0.9)) !important;
}

/* Form labels - Make them visible */
.form-label,
label {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Form inputs on dark background */
.form-control,
.form-select {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Accordion text */
.accordion-body {
    color: rgba(255, 255, 255, 0.85);
}

/* Card text visibility */
.card-text,
.card-body p {
    color: rgba(255, 255, 255, 0.85);
}

/* List items in dark context */
.list-group-item {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Small text - WCAG AA Compliant */
small,
.small {
    color: rgba(255, 255, 255, 0.8);
}

/* Entry meta, dates, etc. */
.entry-meta,
.blog-card__meta,
.meta {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Lead paragraphs */
.lead {
    color: rgba(255, 255, 255, 0.9);
}

/* Badge improvements */
.badge.bg-dark {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Selection */
::selection {
    background: var(--color-primary);
    color: var(--color-secondary);
}

/* =========================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================= */

/* Focus Visible States - Keyboard Navigation */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Skip Link Enhancement */
.skip-link:focus {
    position: fixed !important;
    top: 10px;
    left: 10px;
    z-index: 9999;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: #000;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .animate-float,
    .animate-pulse-glow {
        animation: none !important;
    }
}

/* Screen Reader Only - Enhanced */
.sr-only,
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {

    .text-muted,
    .text-secondary {
        color: #FFFFFF !important;
    }

    .btn-primary {
        border-width: 3px;
    }

    .blog-card,
    .service-card,
    .tech-card,
    .testimonial-card__content {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.3);
    }
}