/* =============================================
    Private Pilot Ground School - Shared Styles
    ============================================= */

/* CSS Custom Properties */
:root {
    --ink: #0f2c3f;
    --ink-2: #163e57;
    --accent: #386393;
    --accent-2: #5c84b2;
    --bg: #f7f6f3;
    --card: #ffffff;
    --muted: #5a6b7a;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 44, 63, 0.08);
}

/* Base Styles */
html,
body {
    height: 100%;
}

/* Smooth scroll for anchor links (respects reduced motion below) */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1080px;
    margin-inline: auto;
    padding: 24px;
}

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    background: rgba(247, 246, 243, 0.9);
    backdrop-filter: saturate(140%) blur(6px);
    border-bottom: 1px solid #e7e4de;
    z-index: 50;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Slight elevation when page is scrolled */
header.scrolled {
    box-shadow: 0 6px 18px rgba(15, 44, 63, 0.08);
    background: rgba(247, 246, 243, 0.95);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}

.brand img {
    height: 54px;
    width: auto;
    display: block;
    border-radius: 12px;
    background: transparent;
}

.brand .title {
    font-weight: 800;
    letter-spacing: 0.2px;
}

.brand small {
    display: block;
    color: var(--muted);
    font-weight: 500;
    margin-top: -4px;
}

nav a {
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.9;
}

nav a:hover {
    opacity: 1;
}

.nav-links {
    display: flex;
    gap: 22px;
}

/* Hero Section */
.hero {
    padding: 64px 0 40px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: center;
}

/* Cards & Components */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card.pad {
    padding: 28px;
}

/* Typography */
h1 {
    font-size: clamp(28px, 4.2vw, 42px);
    line-height: 1.15;
    margin: 0 0 10px;
}

.lead {
    font-size: clamp(16px, 2.2vw, 19px);
    color: var(--muted);
    margin: 0 0 16px;
}

.muted {
    color: var(--muted);
}

/* Tags & Buttons */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 0;
}

.tag {
    padding: 6px 10px;
    border-radius: 999px;
    background: #e9eef6;
    color: #17344d;
    font-weight: 600;
    font-size: 13px;
}

.cta {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn {
    appearance: none;
    border: 0;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: transform 120ms ease, box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
}

.btn.primary {
    background: var(--ink);
    color: #fff;
}

.btn.secondary {
    background: #e9eef6;
    color: var(--ink);
}

.btn:focus {
    outline: 2px solid var(--accent);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 44, 63, 0.10);
}

/* Sections & Layout */
section {
    padding: 28px 0;
}

section h2 {
    font-size: 22px;
    margin: 0 0 8px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.item {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
}

.item h3 {
    margin: 4px 0 6px;
    font-size: 18px;
}

.hero-logo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    background: transparent;
}

/* Lists */
.list {
    margin: 0 0 4px 18px;
}

.hint {
    margin: 0.5rem 0 0;
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 28px 0;
    border-top: 1px solid #e7e4de;
    color: var(--muted);
    font-size: 14px;
}

footer a {
    color: inherit;
}

/* Motion: subtle reveal on scroll */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 500ms ease, transform 500ms ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Responsive Design */
@media (max-width: 880px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
    }
}

/* Respect user preferences: minimize motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}