/*
 * The public page at «/» — the only page an anonymous visitor sees.
 *
 * It has its own stylesheet rather than sharing site.css for two reasons. The app's stylesheet follows the learner's
 * theme (light or dark, per account); this page is always dark — ink with the brand's star-and-arch pattern, like the
 * hero it opens with. And it is the first request a stranger makes: one small file, no font download, no script,
 * nothing from a CDN. The server sits behind a TLS proxy, so nothing here writes a scheme or a host either.
 *
 * The palette is the brand's (brand/README.md): ink #0B1A22, teal #2BB6B9 on dark, cream #F4EFE6, gold #A8761E and
 * coral #C8442E for accents only. Text contrast on ink: cream 15.6:1, #9AAEB3 7.6:1, teal 7.2:1, gold #D6A650 8.0:1.
 */

:root {
    color-scheme: dark;
    --bg: #0b1a22;
    --surface: #11252e;
    --line: #24404a;
    --fg: #f4efe6;
    --muted: #9aaeb3;
    --accent: #2bb6b9;
    --accent-deep: #0c6e72;
    --accent-fg: #062326;
    --gold: #d6a650;
    --coral: #e8725c;
    --radius: 12px;
    --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--bg) url("../img/brand/pattern-dark.svg") repeat;
    color: var(--fg);
    font: 17px/1.6 system-ui, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
h1, h2, h3 { line-height: 1.15; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ───────────── header ───────────── */

header.top {
    position: sticky; top: 0; z-index: 5;
    background: rgba(11, 26, 34, .92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; min-width: 0; }
.brand img { display: block; flex: 0 0 auto; }
.lockup { display: grid; gap: 1px; min-width: 0; }
.name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.name b { color: var(--accent); font-weight: 800; }
.tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.bar nav { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ───────────── buttons ───────────── */

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 9px 16px; border-radius: 999px; font-weight: 650; text-decoration: none;
    border: 1px solid transparent; white-space: nowrap;
}
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: #3fcdd0; }
.btn.ghost { color: var(--fg); border-color: var(--line); background: rgba(17, 37, 46, .6); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.big { padding: 13px 24px; font-size: 1.05rem; }

/* ───────────── hero ───────────── */

.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); min-height: min(78vh, 720px); display: flex; align-items: center; }
.hero-art {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%;
}
/* The mosaic on the left is busy: the text sits on a band of ink that fades into the staircase. */
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg, rgba(11, 26, 34, .96) 0%, rgba(11, 26, 34, .88) 38%, rgba(11, 26, 34, .35) 68%, rgba(11, 26, 34, 0) 100%);
}
.hero-text { position: relative; z-index: 2; padding-block: 72px; display: grid; gap: 18px; max-width: var(--wrap); width: 100%; }
.hero-text > * { max-width: 34rem; }
.eyebrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 650; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; }
.accent { color: var(--accent); }
.lede { color: #d9d3c8; font-size: 1.08rem; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.cta-note { color: var(--muted); font-size: .9rem; }

/* ───────────── bands ───────────── */

.band { padding-block: 64px 8px; display: grid; gap: 14px; }
.band h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 750; }
.band-lede { color: var(--muted); max-width: 60ch; margin-bottom: 14px; }

/* The five steps: each a star one layer richer than the one before (brand/steps). */
.ladder { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; }
.step {
    background: rgba(17, 37, 46, .85); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px 16px; display: grid; gap: 8px; justify-items: start;
}
.step:nth-child(2) { margin-bottom: 14px; }
.step:nth-child(3) { margin-bottom: 28px; }
.step:nth-child(4) { margin-bottom: 42px; }
.step:nth-child(5) { margin-bottom: 56px; border-color: var(--coral); }
.step img { width: 56px; height: 56px; }
.level { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
.step:nth-child(5) .level { color: var(--coral); }
.step p { color: var(--muted); font-size: .92rem; }

.topics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.topics li {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: rgba(17, 37, 46, .85); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600;
}
/* The icon files draw in currentColor; as masks they take the accent here. */
.ico {
    flex: 0 0 auto; width: 30px; height: 30px; background: var(--accent);
    -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
}

.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.how li { background: rgba(17, 37, 46, .85); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: grid; gap: 8px; }
.how h3 { font-size: 1.1rem; }
.how p { color: var(--muted); }

.final { margin-top: 64px; border-top: 1px solid var(--line); background: rgba(17, 37, 46, .7); }
.final .inner { padding-block: 56px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.final h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); max-width: 26ch; }
.final p { color: var(--muted); }

footer { border-top: 1px solid var(--line); background: var(--bg); }
footer .inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; color: var(--muted); font-size: .9rem; }
footer nav { display: flex; gap: 16px; }

/* ───────────── narrow screens ───────────── */

@media (max-width: 900px) {
    .ladder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step { margin-bottom: 0 !important; }
    .topics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .how { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .wrap { padding-inline: 16px; }
    .tag { display: none; }
    .bar nav .btn.ghost { display: none; }
    /* On a phone the picture stands whole above the text instead of behind it. */
    .hero { min-height: 0; display: block; }
    .hero-art { position: static; height: auto; aspect-ratio: 16 / 9; object-position: 60% 50%; }
    .hero::before { display: none; }
    .hero-text { padding-block: 28px 40px; }
    .ladder, .topics { grid-template-columns: 1fr; }
}
