/* ===================================================================
   CampuWise — Modern Dark-Theme Design System
   Brand Color: #1B9ED7 (Cyan-Blue)
   Background: #0A0B10 (Obsidian)
   =================================================================== */

:root {
    --brand-primary: #1B9ED7;
    --brand-light: #38BDF8;
    --brand-dark: #1480AF;
    --brand-glow: rgba(27, 158, 215, 0.18);
    --bg-obsidian: #0A0B10;
    --card-surface: #12141F;
    --card-surface-hover: #181B2A;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(27, 158, 215, 0.35);
}

html {
    color-scheme: dark;
}

body {
    background-color: var(--bg-obsidian);
    color: #94A3B8;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

/* Ensure sticky header does not overlap anchor section headings */
section[id], div[id] {
    scroll-margin-top: 5.5rem;
}

/* Glassmorphic Card Style */
.glass-card {
    background: rgba(18, 20, 31, 0.7);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(24, 27, 42, 0.85);
    border-color: var(--card-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -10px var(--brand-glow);
}

/* Glassmorphic Modal */
.glass-modal {
    background: rgba(14, 16, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Typography Gradient Mask */
.text-gradient-brand {
    background: linear-gradient(135deg, #FFFFFF 20%, #38BDF8 60%, #1B9ED7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-sub {
    background: linear-gradient(to right, #F8FAFC, #94A3B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Ambient Glow Behind Hero & Interactive Mockup */
.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(27, 158, 215, 0.18) 0%, rgba(10, 11, 16, 0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
    border-radius: 9999px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-obsidian);
}
::-webkit-scrollbar-thumb {
    background: #1E2333;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2D374D;
}

/* Fade in animation class via IntersectionObserver */
.fade-in-section {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    will-change: opacity, transform;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Language Switcher Pill Active State */
.lang-btn {
    transition: all 0.2s ease;
}
.lang-btn.active {
    background-color: rgba(27, 158, 215, 0.25);
    color: #FFFFFF;
    border-color: rgba(27, 158, 215, 0.6);
}

/* Interactive Tabs Styling */
.preview-tab-btn.active {
    background: rgba(27, 158, 215, 0.15);
    border-color: rgba(27, 158, 215, 0.5);
    color: #FFFFFF;
}

/* Accessibility: Focus rings */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Reduced Motion Preference */
@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;
    }
    .fade-in-section {
        opacity: 1 !important;
        transform: none !important;
    }
}
