/* ClassApt landing page. Plain CSS, system fonts, no external requests
   (school filters often block CDNs). Colors follow the app: slate blue
   accent, gray text, and the green/yellow/red check-in colors. */

:root {
    --bg: #ffffff;
    --bg-alt: #f6f8fb;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --accent: #4f7096;
    --accent-strong: #3d5a7a;
    --accent-text: #ffffff;
    --placeholder: #eef3f9;
    --green: #2e7d32;
    --yellow: #f9a825;
    --red: #c62828;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #111827;
        --bg-alt: #172033;
        --text: #e5e7eb;
        --muted: #9ca3af;
        --border: #2b3546;
        --accent: #7f9fc4;
        --accent-strong: #9db7d6;
        --accent-text: #0f172a;
        --placeholder: #1c2840;
    }
}
:root[data-theme="dark"] {
    --bg: #111827;
    --bg-alt: #172033;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: #2b3546;
    --accent: #7f9fc4;
    --accent-strong: #9db7d6;
    --accent-text: #0f172a;
    --placeholder: #1c2840;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 16px;
}
.wrap.narrow { max-width: 720px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: clamp(28px, 5vw, 42px); letter-spacing: -0.01em; max-width: 22ch; }
h2 { font-size: clamp(22px, 3.2vw, 28px); }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }

a { color: var(--accent); }

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 19px;
    color: var(--text);
    text-decoration: none;
}
.brand-dots { display: inline-flex; gap: 3px; }
.brand-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.d-green { background: var(--green); }
.d-yellow { background: var(--yellow); }
.d-red { background: var(--red); }

.btn {
    display: inline-block;
    padding: 7px 16px;
    border-radius: 6px;
    background: var(--accent);
    color: var(--accent-text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}
.btn:hover { background: var(--accent-strong); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-link { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
.header-link:hover { color: var(--accent); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Sections */
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--border); }
.hero { padding-top: 64px; }
.lede { font-size: 19px; color: var(--muted); max-width: 60ch; margin-bottom: 36px; }
.section-lede { color: var(--muted); max-width: 60ch; margin-bottom: 28px; }

.features, .history { background: var(--bg-alt); }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 20px;
}
.feature p { color: var(--muted); margin: 0; }
.feature p.feature-link { margin-top: 10px; }

.plain-list { margin: 0; padding-left: 20px; }
.plain-list li { margin-bottom: 8px; }

/* Page links sit on their own row under the brand, so the top row stays
   brand and Login at every width and the links can wrap on a phone. */
/* A muted dot separates the links. Every link starts with one, the nav is
   shifted left by a dot's width, and the clip hides the dot at the start of
   each row, so dots only ever sit between links, even after a wrap.
   The "/ ''" keeps screen readers from reading the dot. */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 0;
    margin-left: -22px;
    padding-bottom: 12px;
    clip-path: inset(-4px -4px -4px 22px);
}
.site-nav a { font-size: 15px; font-weight: 600; color: var(--text); text-decoration: none; }
/* The clip would cut the left edge of a focus outline, so keyboard focus shows as an underline. */
.site-nav a:focus-visible { outline: none; text-decoration: underline; text-underline-offset: 4px; }
.site-nav a::before {
    content: "·";
    content: "·" / "";
    display: inline-block;
    width: 22px;
    text-align: center;
    color: var(--muted);
    font-weight: 400;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }

/* Home page only: a student who lands here by mistake sees this without scrolling. */
.student-note { font-size: 14px; color: var(--muted); margin: -24px 0 32px; }

/* Screenshots */
.shot { margin: 0; }
.shot img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}
/* Captures show at their own pixel size (never stretched, which blurs them),
   and shrink to fit on narrow screens. */
.shot-natural img { width: auto; max-width: 100%; }

/* Text beside a figure, stacked on narrow screens. */
.split {
    display: grid;
    grid-template-columns: 1fr minmax(0, 621px);
    gap: 40px;
    align-items: start;
}
@media (max-width: 820px) {
    .split { grid-template-columns: 1fr; gap: 20px; }
}
.shot figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

/* Evidence page: one block per idea, text beside its screenshot. */
.how { background: var(--bg-alt); }
.detail { margin-top: 44px; }
.detail p { color: var(--muted); }
.detail-text { max-width: 60ch; }
/* A wide capture goes under its text instead of beside it. */
.detail > .shot { margin-top: 16px; }

/* A long table shows its first rows and fades out, so it reads as continuing
   without spending the page on rows that add nothing new. */
.shot-fade img {
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent);
    mask-image: linear-gradient(to bottom, #000 80%, transparent);
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 20px 0; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; }
