/* base.css — the design tokens and base element styles every page shares.
 *
 * Single source of truth for the palette. Before this file, `:root` was
 * declared inline on 13 pages with 10 different bodies, and the values had
 * already drifted: --success existed as #4ade80, #10b981 AND #22c55e, and
 * --glass-bg as both 0.6 and 0.7 opacity. Changing a brand colour meant
 * editing 13 files and missing some.
 *
 * Loaded by site.css (@import) and directly by the hand-built pages that use
 * nav.css instead. Page-specific layout stays inline on the page — this file
 * is only for what is genuinely shared.
 */

:root {
    /* Surfaces */
    --bg-body: #0f172a;
    --bg-card: #1e293b;

    /* Text */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    /* Brand */
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;          /* white on this is 6.7:1; --primary is only 3.7:1 */
    --secondary: #0ea5e9;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --primary-glow: rgba(59, 130, 246, 0.5);

    /* Accents */
    --accent-green: #10b981;
    --accent-yellow: #fbbf24;
    --accent-red: #ef4444;
    --accent-purple: #a78bfa;

    /* Status. One value each — these are the three that had drifted. */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    --success-border: rgba(16, 185, 129, 0.35);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.35);
    --error: #ef4444;
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, 0.12);
    --warn-border: rgba(251, 191, 36, 0.35);
    --purple: #a78bfa;
    --purple-bg: rgba(167, 139, 250, 0.12);
    --purple-border: rgba(167, 139, 250, 0.35);

    /* Glass panels */
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);

    /* Course-brand gradients used by the landing pages */
    --ai-gradient: linear-gradient(135deg, #c084fc 0%, #f472b6 100%);
    /* Google's own brand blue -> green, used on the Sheets/Office pages. */
    --google-gradient: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
    --brand-wp: #21759b;
    --brand-seo: #f59e0b;        /* amber, deliberately distinct from the WordPress blue */
}

/* ─── BASE ELEMENTS ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ─── ACCESSIBILITY ─────────────────────────────────────────────────────── */
/* A visible focus ring for keyboard users, without showing it on mouse click.
   :focus-visible only, so it never fires on a plain tap. */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Lets a keyboard or screen-reader user jump past the nav on every page. */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    padding: 12px 20px; border-radius: 0 0 12px 12px;
    /* primary-dark, not primary: white on #3b82f6 is only 3.7:1. */
    background: var(--primary-dark); color: #fff; font-weight: 700;
    transition: top 0.18s ease;
}
.skip-link:focus { top: 0; }

/* Visually hidden, still read aloud. */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@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;
    }
}
