/* AVA Academy stylesheet — extends the brand register from /game/game.css.
   Lessons + index share this file. */

/* Self-hosted Inter — same files the landing root and main app use.
   Without these @font-face declarations the academy was falling back to
   system fonts (SF Pro / Roboto / Segoe), which broke the cross-surface
   typographic consistency that the brand decision (rule 26) depends on.
   2026-05-15 fix per Eric's feedback. The TTF files live one level up
   at landing/fonts/ and are referenced relatively. */
@font-face { font-family: 'Inter'; font-weight: 300; font-display: swap; src: url('../fonts/inter-300.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('../fonts/inter-400.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('../fonts/inter-500.ttf') format('truetype'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('../fonts/inter-600.ttf') format('truetype'); }

:root {
    /* AVA palette — 2026-05-15 dual-tone (Proton Monokai accents
       on AVA neutral backgrounds).
       Aligned with src/ava/ui/static/style.css (see that file's
       :root for full rationale). Coral = action; mint = trust/active. */
    --bg: #0A0A0A;                /* true black, neutral */
    --surface: #1F1F1F;
    --border: #2E2E2E;
    --border-strong: #3A3A3A;
    --text-primary: #EBEEF2;
    --text-secondary: #9C9C9C;
    --text-muted: #67627A;        /* Mauve Slate plumbing */
    --silver: #67627A;            /* legacy alias */
    --accent: #e53265;            /* Coral — primary brand voice / CTAs */
    --accent-light: #f04a7a;
    --accent-2: #2fd6b5;          /* Mint — active/trust state (no CTAs) */
    --accent-2-light: #4fe0c5;
    --interaction-weak: #2E2E2E;  /* Secondary-button fill (neutral grey) */
    --hit: #00E676;               /* RAG safe */
    --warn: #FFEC00;              /* RAG caution */
    /* Legacy `--orange` alias — preserved so existing rules referencing
       it render the new brand coral without a sweep. Phase out by
       switching to `--accent`. */
    --orange: #e53265;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    background: var(--bg);
    color: var(--text-secondary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--silver); text-decoration: none; }
a:hover { color: var(--text-primary); text-decoration: underline; }

/* -- Index page -------------------------------------------------------- */

.academy-index {
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.academy-hero { text-align: center; margin-bottom: 3rem; }

.academy-crumb {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: var(--hit);
    text-transform: uppercase;
    font-family: monospace;
    margin-bottom: 0.75rem;
}

.academy-hero h1 {
    color: var(--text-primary);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 0.85rem;
    font-family: monospace;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
    line-height: 1.2;
}

.academy-sub {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

.academy-sub a { color: var(--hit); }
.academy-sub a:hover { color: #6ee7a3; }

.lesson-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    list-style: none;
    margin-bottom: 3rem;
}

.lesson-card { display: flex; }

.lesson-card a {
    display: flex;
    gap: 0.85rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    width: 100%;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
    align-items: flex-start;
}

.lesson-card a:hover {
    border-color: var(--silver);
    background: #1a1f28;
    transform: translateY(-2px);
    text-decoration: none;
}

.lc-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; padding-top: 0.15rem; }

.lc-body { display: flex; flex-direction: column; gap: 0.3rem; }

.lc-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    font-family: monospace;
    line-height: 1.3;
}

.lc-summary {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.lc-meta {
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-family: monospace;
}

.academy-cta {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.academy-cta p { margin-bottom: 0.85rem; }
.academy-cta strong { color: var(--text-secondary); }

/* Primary CTA: orange-on-black-with-grey-border treatment matching the
   landing-page entry-point CTAs. */
.cta-link {
    display: inline-block;
    background: var(--bg);
    color: var(--orange);
    padding: 0.75rem 1.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: monospace;
    border: 1px solid var(--border);
    transition: border-color 0.15s, background 0.15s;
}
.cta-link:hover {
    border-color: var(--accent);
    background: rgba(227, 60, 222, 0.08);
    color: var(--accent);
    text-decoration: none;
}

/* -- Lesson page ------------------------------------------------------- */

.academy-lesson {
    max-width: 720px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}

.breadcrumb {
    font-size: 0.72rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    font-family: monospace;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--silver); }
.breadcrumb .sep { margin: 0 0.4rem; opacity: 0.6; }

.lesson-header { margin-bottom: 2.5rem; }

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.lesson-icon { font-size: 2rem; line-height: 1; }

.lesson-meta-text {
    color: var(--hit);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: monospace;
}

.lesson-header h1 {
    color: var(--text-primary);
    font-size: 1.95rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.01em;
    margin-bottom: 0.85rem;
    font-family: monospace;
}

.lesson-lede {
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.65;
}

.lesson-body h2 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2.25rem 0 0.85rem;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

.lesson-body p {
    font-size: 0.96rem;
    line-height: 1.75;
    margin-bottom: 1.05rem;
    color: var(--text-secondary);
}

.lesson-body ul, .lesson-body ol {
    margin: 0.5rem 0 1.25rem 1.25rem;
}

.lesson-body li {
    font-size: 0.96rem;
    line-height: 1.7;
    margin-bottom: 0.55rem;
    color: var(--text-secondary);
}

.lesson-body strong { color: var(--text-primary); }
.lesson-body em { color: var(--text-primary); font-style: italic; }
.lesson-body a { color: var(--hit); }
.lesson-body a:hover { color: #6ee7a3; }

.lesson-game-link {
    margin-top: 3rem;
    padding: 1.5rem 1.5rem 1.6rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-left: 3px solid var(--hit);
}

.lesson-game-link h3 {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.6rem;
    font-family: monospace;
}

.lesson-game-link p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
}

.lesson-game-link a { color: var(--hit); font-weight: 500; }

.lesson-nav {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-back, .nav-cta {
    font-family: monospace;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
}

.nav-back { color: var(--text-muted); }
.nav-back:hover { color: var(--silver); }

.nav-cta { color: var(--orange); }
.nav-cta:hover { color: #fb923c; }

/* Persistent "back to AVA" home link — top-left on every academy page,
   matches the breadcrumb pattern used elsewhere on the site. */
.back-to-ava {
    display: inline-block;
    margin-bottom: 1.5rem;
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid var(--border);
    /* 44×44 tap target (WCAG 2.1 / Apple HIG). Audit 2026-05-14. */
    padding: 0.7rem 1rem;
    min-height: 44px;
    min-width: 44px;
    box-sizing: border-box;
    transition: border-color 0.15s, color 0.15s;
}
.back-to-ava:hover {
    border-color: var(--orange);
    color: var(--orange);
}

@media (max-width: 720px) {
    .academy-hero h1 { font-size: 1.8rem; }
    .academy-sub { font-size: 0.95rem; }
    .lesson-header h1 { font-size: 1.6rem; }
    .lesson-lede { font-size: 1rem; }
    .lesson-body h2 { font-size: 1.1rem; }
}
