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

/* Mobile: prevent horizontal overflow — use clip, NOT hidden (hidden breaks position:sticky) */
body {
    overflow-x: clip;
    max-width: 100vw;
}

/* Design System Overrides
   Based on circuit_tech_dark/DESIGN.md and ct_tech_pro/DESIGN.md
   Applied on top of theme.css
*/

/* ============================================
   1. THE "NO-LINE" RULE — Borders removed
   ============================================ */
section {
    border: none !important;
}

/* ============================================
   2. GLASSMORPHISM — For floating elements
   ============================================ */
.glass-panel,
nav,
header {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.light .glass-panel {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(26, 143, 227, 0.08);
}

.dark .glass-panel {
    background: rgba(21, 26, 31, 0.75);
    border: 1px solid rgba(106, 214, 255, 0.08);
}

/* ============================================
   3. GHOST BORDERS — Subtle 15% opacity borders
   ============================================ */
.light input,
.light select,
.light textarea {
    border: 1px solid rgba(148, 163, 184, 0.15);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.dark input,
.dark select,
.dark textarea {
    border: 1px solid rgba(59, 72, 89, 0.15);
    background: var(--color-surface-container-high);
    color: var(--color-on-surface);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 143, 227, 0.1);
}

/* ============================================
   4. AMBIENT SHADOWS — No pure black shadows
   ============================================ */
.shadow-lg {
    box-shadow: 0 20px 40px rgba(10, 22, 40, 0.1), 0 0 0 1px rgba(26, 143, 227, 0.02) !important;
}

.dark .shadow-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(106, 214, 255, 0.03) !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(10, 22, 40, 0.15), 0 0 0 1px rgba(26, 143, 227, 0.03) !important;
}

.dark .shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(106, 214, 255, 0.04) !important;
}

/* ============================================
   5. TECH GLOW — LED-style glow on active elements
   ============================================ */
.dark .animate-pulse {
    box-shadow: 0 0 10px var(--color-primary);
}

/* ============================================
   6. SERVICE CARD HOVER — Accent strip + shift
   ============================================ */
[class*="col-span"] {
    transition: background-color 0.5s, box-shadow 0.5s, transform 0.3s;
}

[class*="col-span"]:hover {
    transform: translateY(-2px);
}

/* ============================================
   7. BUTTON GRADIENTS — "Charged" appearance
   ============================================ */
.tech-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dim) 100%);
    transition: box-shadow 0.3s;
}

.tech-gradient:hover {
    box-shadow: 0 0 30px rgba(26, 143, 227, 0.3);
}

/* ============================================
   8. TYPOGRAPHY — Tight tracking on headlines
   ============================================ */
h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* ============================================
   9. CIRCUIT/TECH BACKGROUND TEXTURES
   ============================================ */
.circuit-bg {
    background-image: radial-gradient(circle at 2px 2px, rgba(26, 143, 227, 0.05) 1px, transparent 0);
    background-size: 24px 24px;
}

.tech-grid {
    background-image: linear-gradient(to right, rgba(26, 143, 227, 0.04) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(26, 143, 227, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
}

.tech-gradient-bg {
    background-image: radial-gradient(circle at 20% 30%, rgba(26, 143, 227, 0.03) 0%, transparent 40%),
                      radial-gradient(circle at 80% 70%, rgba(26, 143, 227, 0.02) 0%, transparent 40%);
}

.neon-glow {
    text-shadow: 0 0 15px rgba(26, 143, 227, 0.2);
}

.terminal-input {
    background: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    color: var(--color-on-surface);
    transition: all 0.3s ease;
}

.terminal-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(26, 143, 227, 0.1);
}

/* ============================================
   10. PREFERS-REDUCED-MOTION
   ============================================ */
@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;
    }
}

/* ============================================
   11. SCROLLBAR STYLING
   ============================================ */
.light ::-webkit-scrollbar,
::-webkit-scrollbar {
    width: 8px;
}
.light ::-webkit-scrollbar-track,
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.light ::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-track {
    background: #0a0f13;
}
.dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #1A8FE3, #3bbfee);
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #3bbfee, #6ad6ff);
}

/* ============================================
   12. SMOOTH SCROLL
   ============================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================
   13. CLIENT LOGO MARQUEE
   ============================================ */
.marquee-container {
    width: 100%;
    overflow: hidden;
}

.marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 35s linear infinite;
}

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

.marquee-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 1.25rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.marquee-item:hover {
    background: #ffffff;
    border-color: rgba(106, 214, 255, 0.4);
    transform: translateY(-2px);
}

.marquee-item img {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.marquee-item:hover img {
    opacity: 1;
}

/* Light mode adjustments */
.light .marquee-item {
    background: rgba(245, 247, 250, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
}

.light .marquee-item:hover {
    background: #ffffff;
    border-color: rgba(26, 143, 227, 0.3);
}

/* Dark mode: label text needs to be dark on white cards */
.marquee-item span {
    color: rgba(0, 0, 0, 0.5) !important;
}

.marquee-item:hover span {
    color: rgba(0, 0, 0, 0.8) !important;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .marquee-track {
        gap: 2rem;
        animation-duration: 25s;
    }
    .marquee-item {
        min-width: 100px;
        padding: 0.5rem 1rem;
    }
    .marquee-item img {
        height: 2rem;
    }
    /* Mobile nav text */
    .font-headline { word-break: break-word; }
    /* Tighter padding on mobile */
    .px-8 { padding-left: 1rem; padding-right: 1rem; }
}
