/* ============================================================
   MAGCARS Website — Manston Air Group
   Professional dark theme with aviation-inspired design
   ============================================================ */

/* ===== CSS Variables ===== */
:root {
    --primary: #0FA2D2;
    --primary-dark: #0B7FA6;
    --primary-light: #17BAEF;
    --primary-glow: rgba(15, 162, 210, 0.15);
    --bg: #0D1117;
    --bg-secondary: #161B22;
    --surface: #1C2333;
    --surface-hover: #242D3D;
    --card: #1C2333;
    --card-hover: #222D40;
    --border: #30363D;
    --border-light: #3D4450;
    --text: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    /* Form-control surfaces. Referenced by admin/documents.php, admin/downloads.php,
       admin/models.php, awards.php and pilot.php, which previously fell back to a
       transparent (white) background while still using near-white --text. */
    --input-bg: #0D1117;
    --surface-2: #242D3D;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.3);
    --transition: all 0.2s ease;
}

/* ===== Dark Theme (explicit) ===== */
[data-theme="dark"] {
    --primary: #0FA2D2;
    --primary-dark: #0B7FA6;
    --primary-light: #17BAEF;
    --primary-glow: rgba(15, 162, 210, 0.15);
    --bg: #0D1117;
    --bg-secondary: #161B22;
    --surface: #1C2333;
    --surface-hover: #242D3D;
    --card: #1C2333;
    --card-hover: #222D40;
    --border: #30363D;
    --border-light: #3D4450;
    --text: #E6EDF3;
    --text-secondary: #8B949E;
    --text-muted: #6E7681;
    /* Form-control surfaces. Referenced by admin/documents.php, admin/downloads.php,
       admin/models.php, awards.php and pilot.php, which previously fell back to a
       transparent (white) background while still using near-white --text. */
    --input-bg: #0D1117;
    --surface-2: #242D3D;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

/* ===== Light Theme ===== */
[data-theme="light"] {
    --primary: #0FA2D2;
    --primary-dark: #0B7FA6;
    --primary-light: #1CB3E0;
    --primary-glow: rgba(15, 162, 210, 0.08);
    --bg: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --surface: #F3F6F9;
    --surface-hover: #EBF0F7;
    --card: #F8FAFC;
    --card-hover: #F0F4F8;
    --border: #D1D9E0;
    --border-light: #E2E8F0;
    --text: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --input-bg: #FFFFFF;
    --surface-2: #EBF0F7;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

img { max-width: 100%; height: auto; }

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-wide {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Navigation ===== */
.nav-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text);
}

.nav-brand img { height: 36px; }

.nav-brand .brand-text {
    color: var(--primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text);
    background: var(--surface);
}

.nav-links .nav-cta {
    background: var(--primary);
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-weight: 600;
}

.nav-links .nav-cta:hover {
    background: var(--primary-dark);
    color: white;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.nav-user .callsign {
    color: var(--primary);
    font-weight: 600;
}

/* Theme toggle button */
.theme-toggle-btn {
    transition: var(--transition);
}

.theme-toggle-btn:hover {
    color: var(--primary) !important;
    transform: scale(1.1);
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 12px;
    }
    .nav-links.open { display: flex; }
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--border);
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    transform: translate(30%, -30%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 24px 0;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 162, 210, 0.1);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* ===== Cards ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover { border-color: var(--border-light); }

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2, .card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.card-body { padding: 20px; }

/* ===== Page Header ===== */
.page-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===== Flight Report Specific ===== */
.flight-route-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 32px 20px;
    text-align: center;
}

.airport-code {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1;
}

.airport-name {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
}

.flight-route-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.flight-route-arrow .flight-num {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
}

.flight-route-arrow .arrow-line {
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    position: relative;
}

.flight-route-arrow .arrow-line::after {
    content: '';
    position: absolute;
    right: -4px; top: -4px;
    border: 5px solid transparent;
    border-left: 8px solid var(--primary-light);
}

/* Score badge */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: 700;
    border: 3px solid;
}

.score-excellent { border-color: var(--success); color: var(--success); background: rgba(16,185,129,0.1); }
.score-good { border-color: var(--primary); color: var(--primary); background: rgba(15,162,210,0.1); }
.score-fair { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,0.1); }
.score-poor { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.1); }

.score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    font-weight: 600;
}

/* Data rows */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .data-grid { grid-template-columns: 1fr; }
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.data-row:last-child { border-bottom: none; }

.data-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.data-value {
    font-weight: 600;
    text-align: right;
}

/* Skill analysis check/fail indicators */
.check-pass {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-weight: 600;
    font-size: 0.85rem;
}

.check-pass::before { content: '✓'; font-size: 1rem; }

.check-fail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-weight: 600;
    font-size: 0.85rem;
}

.check-fail::before { content: '✗'; font-size: 1rem; }

/* Landing rate colour coding */
.landing-greaser { color: #10B981; }
.landing-excellent { color: #10B981; }
.landing-good { color: #0FA2D2; }
.landing-acceptable { color: #3B82F6; }
.landing-firm { color: #F59E0B; }
.landing-hard { color: #EF4444; }

/* ===== Tables ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.data-table tr:hover td {
    background: var(--surface-hover);
}

.data-table .mono {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-dark {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-dark:hover {
    background: var(--surface-hover);
    border-color: var(--border-light);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--border-light);
    color: var(--text);
}

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-pending { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-approved { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-denied { background: rgba(239,68,68,0.15); color: var(--danger); }
.badge-live { background: rgba(239,68,68,0.15); color: var(--danger); animation: pulse 2s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== Pilot Profile ===== */
.pilot-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid var(--primary);
}

.pilot-avatar img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== Live Map ===== */
.live-map-container {
    width: 100%;
    height: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* ===== Flight Log ===== */
.flight-log {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-height: 300px;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius);
}

.flight-log .log-entry {
    padding: 2px 0;
}

.flight-log .log-time {
    color: var(--text-muted);
}

.flight-log .log-warning {
    color: var(--warning);
}

.flight-log .log-error {
    color: var(--danger);
}

/* ===== Altitude Chart ===== */
.altitude-chart {
    width: 100%;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    margin-top: 48px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-brand span { color: var(--primary); font-weight: 600; }

.footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover { color: var(--primary); }

/* ===== Utility ===== */
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ===== Airline tag colours ===== */
.airline-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.airline-mse { background: rgba(15,162,210,0.15); color: #0FA2D2; }
.airline-str { background: rgba(231,76,60,0.15); color: #E74C3C; }
.airline-vrn { background: rgba(46,204,113,0.15); color: #2ECC71; }
.airline-wym { background: rgba(243,156,18,0.15); color: #F39C12; }


/* ---------- Live flights strap (matches landing page hero strap) ---------- */
.live-strap {
    display: inline-flex; align-items: center; gap: 12px;
    border: 1px solid var(--border-light); border-radius: 999px;
    background: rgba(8, 17, 32, 0.55);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 9px 20px;
    font-family: var(--font-heading);
    font-size: 13.5px; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--primary-light);
    text-decoration: none; white-space: nowrap;
    transition: var(--transition);
}
.live-strap:hover {
    border-color: var(--primary);
    background: rgba(8, 17, 32, 0.78);
    color: var(--text);
}
.live-strap .dot {
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--success); animation: livePulse 2s infinite;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.55); }
    60% { box-shadow: 0 0 0 9px rgba(53, 208, 127, 0); }
}
[data-theme="light"] .live-strap {
    background: rgba(255, 255, 255, 0.78);
    color: var(--primary-dark);
}
@media (prefers-reduced-motion: reduce) {
    .live-strap .dot { animation: none; }
}

/* ============================================================
   Manston Air Group — 2026 splash-site design language
   Ported from landing-page/css/site.css (manstonairgroup.com)
   Re-themes the existing app: variables remapped + shared
   components restyled. Loaded last so these rules win.
   ============================================================ */

:root {
    /* Landing palette */
    --primary: #2f9dff;
    --primary-dark: #1667d8;
    --primary-light: #7ab8ff;
    --primary-glow: rgba(47, 157, 255, 0.35);
    --navy: #16408f;
    --bg: #04070d;
    --bg-secondary: #071120;
    --surface: #0c1930;
    --surface-hover: #12243f;
    --card: #0b1a30;
    --card-hover: #10233f;
    --border: rgba(122, 174, 255, 0.14);
    --border-light: rgba(122, 174, 255, 0.28);
    --text: #eaf1fb;
    --text-secondary: #9db1cc;
    --text-muted: #6e809b;
    --success: #35d07f;
    --warning: #ffb347;
    --danger: #ef5a5a;
    --info: #2f9dff;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
    --font-heading: "Outfit", "Segoe UI", system-ui, sans-serif;
}

[data-theme="dark"] {
    --primary: #2f9dff;
    --primary-dark: #1667d8;
    --primary-light: #7ab8ff;
    --primary-glow: rgba(47, 157, 255, 0.35);
    --bg: #04070d;
    --bg-secondary: #071120;
    --surface: #0c1930;
    --surface-hover: #12243f;
    --card: #0b1a30;
    --card-hover: #10233f;
    --border: rgba(122, 174, 255, 0.14);
    --border-light: rgba(122, 174, 255, 0.28);
    --text: #eaf1fb;
    --text-secondary: #9db1cc;
    --text-muted: #6e809b;
    --success: #35d07f;
    --warning: #ffb347;
    --danger: #ef5a5a;
    --info: #2f9dff;
}

/* Light theme — airy blue variant of the same palette */
[data-theme="light"] {
    --primary: #1f7fe0;
    --primary-dark: #1667d8;
    --primary-light: #2f9dff;
    --primary-glow: rgba(47, 157, 255, 0.14);
    --bg: #f5f8ff;
    --bg-secondary: #eaf1fc;
    --surface: #ffffff;
    --surface-hover: #eef4ff;
    --card: #ffffff;
    --card-hover: #f4f8ff;
    --border: rgba(22, 64, 143, 0.14);
    --border-light: rgba(22, 64, 143, 0.24);
    --text: #16233f;
    --text-secondary: #4a5c7a;
    --text-muted: #7185a3;
    --success: #10b981;
    --warning: #d98c1a;
    --danger: #e04747;
    --info: #1f7fe0;
}

/* ---------- Base ---------- */
h1, h2, h3, h4, h5 { font-family: var(--font-heading); letter-spacing: -0.01em; }

body { line-height: 1.65; overflow-x: hidden; }

[data-theme="dark"] body {
    background:
        radial-gradient(120% 80% at 85% -10%, rgba(22, 64, 143, 0.22), transparent 55%),
        radial-gradient(90% 70% at -10% 5%, rgba(47, 157, 255, 0.10), transparent 50%),
        var(--bg);
    background-attachment: fixed;
}

::selection { background: rgba(47, 157, 255, 0.4); color: #fff; }

/* ---------- Navigation ---------- */
.nav-bar {
    background: rgba(5, 9, 17, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 40px -24px rgba(0, 0, 0, 0.9);
}
[data-theme="light"] .nav-bar { background: rgba(255, 255, 255, 0.86); }

.nav-inner { height: 70px; }

.nav-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    gap: 11px;
}
.nav-brand img { height: 34px; width: auto; filter: drop-shadow(0 0 14px rgba(47, 157, 255, 0.35)); }
.nav-brand .brand-text {
    color: var(--text);
    letter-spacing: 0.005em;
    font-size: 1.15rem;
    white-space: nowrap;
}
.nav-brand .brand-text .ac { color: var(--primary); }

.nav-links a { font-weight: 500; border-radius: 10px; }
.nav-links a:hover, .nav-links a.active {
    color: #fff; background: rgba(122, 174, 255, 0.10);
}
[data-theme="light"] .nav-links a:hover, [data-theme="light"] .nav-links a.active { color: var(--navy); }

.nav-links .nav-cta {
    background: linear-gradient(135deg, #2f9dff, #1667d8);
    border-radius: 999px;
    padding: 9px 20px;
    box-shadow: 0 8px 24px -10px var(--primary-glow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.nav-links .nav-cta:hover {
    background: linear-gradient(135deg, #2f9dff, #1667d8);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -10px var(--primary-glow);
}

/* ---------- Buttons: gradient pills + lift ---------- */
.btn {
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 999px;
    padding: 11px 24px;
    border: 1px solid transparent;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.btn-primary {
    background: linear-gradient(135deg, #2f9dff, #1667d8);
    box-shadow: 0 10px 30px -10px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #2f9dff, #1667d8);
    transform: translateY(-3px);
    box-shadow: 0 18px 40px -10px var(--primary-glow);
}
.btn-dark, .btn-secondary {
    background: rgba(122, 174, 255, 0.07);
    border: 1px solid var(--border-light);
    color: var(--text);
    backdrop-filter: blur(8px);
}
.btn-dark:hover, .btn-secondary:hover {
    background: rgba(122, 174, 255, 0.14);
    border-color: var(--primary);
    transform: translateY(-3px);
    color: var(--text);
}
.btn-sm { padding: 7px 15px; }

/* ---------- Hero: photo + Ken Burns + gradient veil ---------- */
.hero {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 118px 0 100px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.hero::before {
    content: "";
    position: absolute; z-index: -2;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: auto !important; height: auto !important;
    background: url("../images/hero.jpg") 38% 58% / cover no-repeat;
    transform: scale(1.08);
    animation: heroKen 26s ease-in-out infinite alternate;
}
.hero::after {
    content: "";
    position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg, rgba(4, 7, 13, 0.88) 0%, rgba(4, 7, 13, 0.48) 46%, rgba(4, 7, 13, 0.18) 100%),
        linear-gradient(180deg, rgba(4, 7, 13, 0.25) 0%, transparent 30%, rgba(4, 7, 13, 0.85) 97%);
}
@keyframes heroKen {
    from { transform: scale(1.08); }
    to { transform: scale(1.18) translateY(-2%); }
}

/* Plain hero variant (no photo/Ken-Burns) for data-focused headers e.g. pirep-info.php */
.hero-plain::before, .hero-plain::after { display: none; }
.hero-plain { background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--surface) 100%); padding: 48px 0; }

.hero-content { position: relative; z-index: 1; }
.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.04;
    color: #fff;
    margin-bottom: 14px;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
.hero p {
    color: #d4e0f2;
    font-size: clamp(1.02rem, 1.5vw, 1.2rem);
    max-width: 640px;
}

/* ---------- Stat cards: gradient panels + gradient figures ---------- */
.stats-bar { gap: 18px; padding: 30px 0; }
@media (max-width: 560px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
    background: linear-gradient(160deg, rgba(13, 26, 50, 0.55), rgba(7, 17, 32, 0.4));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
[data-theme="light"] .stat-card { background: var(--card); }
.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-light);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8), 0 0 40px -20px var(--primary-glow);
}
.stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    background: linear-gradient(92deg, #2f9dff 10%, #8fc5ff 55%, #2f9dff 90%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
[data-theme="light"] .stat-value { -webkit-text-fill-color: initial; color: var(--primary); background: none; }
.stat-label { letter-spacing: 0.16em; }

/* ---------- Cards: rounded, glassy, hover lift + glow ---------- */
.card {
    background: linear-gradient(160deg, rgba(13, 26, 50, 0.5), rgba(7, 17, 32, 0.32));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
[data-theme="light"] .card { background: var(--card); }
.card:hover {
    border-color: var(--border-light);
    box-shadow: 0 24px 50px -28px rgba(0, 0, 0, 0.8), 0 0 40px -24px var(--primary-glow);
}
.card-header h2, .card-header h3 { font-family: var(--font-heading); font-weight: 700; }

/* ---------- Page header ---------- */
.page-header h1 { font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.015em; }

/* ---------- Tables ---------- */
.data-table th { background: rgba(11, 26, 48, 0.6); letter-spacing: 0.14em; }
[data-theme="light"] .data-table th { background: var(--bg-secondary); }

/* ---------- Badges ---------- */
.badge { border-radius: 999px; letter-spacing: 0.06em; }

/* ---------- Footer ---------- */
.site-footer {
    background: linear-gradient(180deg, var(--bg), #030509);
    border-top: 1px solid var(--border);
}
[data-theme="light"] .site-footer { background: var(--bg-secondary); }
.footer-brand span { font-family: var(--font-heading); font-weight: 800; }
.footer-brand .ac { color: var(--primary); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar-thumb { background: var(--border-light); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---------- Gradient text utility ---------- */
.grad-text {
    background: linear-gradient(92deg, #2f9dff 10%, #8fc5ff 55%, #2f9dff 90%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Nav: collapse earlier (longer brand + 9 links) ---------- */
@media (max-width: 1080px) {
    .nav-toggle { display: block; color: var(--text); }
    .nav-links {
        display: none;
        position: absolute; top: 70px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: rgba(5, 9, 17, 0.97);
        backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--border);
        padding: 14px 5vw 20px;
    }
    [data-theme="light"] .nav-links { background: rgba(255, 255, 255, 0.97); }
    .nav-links.open { display: flex; }
    .nav-links a:not(.nav-cta) { padding: 13px 14px; font-size: 1rem; }
    .nav-links .nav-cta { margin-top: 8px; justify-content: center; text-align: center; }
    .nav-dropdown-menu { position: static !important; box-shadow: none !important; }
}
@media (max-width: 420px) {
    .nav-brand .brand-text { font-size: 1.02rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero::before { animation: none; transform: none; }
}


/* ---------- Light mode: brand horse ---------- */
[data-theme="light"] .nav-brand img {
    filter: invert(1) brightness(0.25) drop-shadow(0 0 10px rgba(28, 179, 224, 0.25));
}

/* ---------- Light mode: original hero image wash, white hero text ---------- */
[data-theme="light"] .hero::after {
    background:
        linear-gradient(180deg, rgba(8, 20, 44, 0.55) 0%, rgba(8, 20, 44, 0.30) 45%, rgba(245, 248, 255, 0.96) 96%);
}
[data-theme="light"] .hero .hero-content { color: #fff; }
[data-theme="light"] .hero { --text: #ffffff; --text-secondary: #d4e0f2; --text-muted: #b8c6dd; }
[data-theme="light"] .hero .btn-dark,
[data-theme="light"] .hero .btn-secondary,
[data-theme="light"] .hero .btn-dark:hover,
[data-theme="light"] .hero .btn-secondary:hover {
    color: #16233f;
}
