/* base.css — element-level base layer (E1, 2026-08-22)
   Replaces main.css (white 800px base) + the base/typography/link sections of
   consolidated-cyberpunk.css. Loads AFTER tokens.css and BEFORE components.css.
   Only bare element selectors belong here — anything with a class goes in
   components.css. See docs/REDESIGN_V3_PLAN.md §6 E1. */

/* ---- reset ---- */
/* font-family deliberately NOT set here. The universal selector matches every
   element DIRECTLY, which beats inheritance, so a `*` font rule silently
   defeats the whole type system on nested inline elements: before E3 the logo
   <a> inside .site-title, table cells inside a mono table and every <strong>
   inside a styled block all rendered in the reset face, not their parent's.
   The site default now comes from `body` and inherits normally. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* form controls do not inherit type by default */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* ---- document ---- */
body {
    background-color: var(--bg);
    color: var(--txt-2);
    font-family: var(--f-cjk);
    line-height: 1.85;
}

/* ---- headings ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--f-display-cjk);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: var(--t-32);
    font-weight: 700;
    line-height: 1.24;
    /* no letter-spacing: headings carry Chinese (README Section 11) */
    color: var(--cyan);
}

h2 {
    font-size: var(--t-26);
    font-weight: 700;
    line-height: 1.3;
    color: var(--acid);
}

/* h3-h6 carried no size at all, so they used the UA defaults (18.72 / 16 /
   13.28 / 10.72px) - all off the §5 ladder. Page rules with a class still
   outrank these. */
h3 { font-size: var(--t-21); font-weight: 700; line-height: 1.35; }
h4 { font-size: var(--t-17); font-weight: 700; line-height: 1.4; }
h5 { font-size: var(--t-14); font-weight: 700; line-height: 1.5; }
h6 { font-size: var(--t-13); font-weight: 700; line-height: 1.5; }

/* ---- text ---- */
p, div, span {
    color: var(--txt-2);
    line-height: 1.85;
}

p {
    font-size: var(--t-17);
    font-weight: 400;
    line-height: 1.85;
}

/* ---- links ---- */
/* E6 (2026-08-29): the hover used to be a 5px acid glow on the text. README
   Section 11 forbids glow on text, so the feedback moved to colour: --cyan is
   the interactive role (Section 4). `transition: all` became an explicit
   property list at 120ms (Section 8) - `all` also animated layout properties,
   and 0.3s was three times the specified duration. */
a {
    color: var(--acid);
    text-decoration: none;
    transition: color 120ms ease, background-color 120ms ease,
                border-color 120ms ease;
}

a:hover {
    color: var(--cyan);
}

/* ---- responsive ---- */
@media (max-width: 768px) {
    h1 { font-size: var(--t-26); }
    h2 { font-size: var(--t-21); }
}

/* ---- motion ---- */
/* README Section 8 requires this block verbatim. The two !important are the
   only ones in the in-scope stylesheets (REDESIGN_V3_PLAN Section 6 E1 allows
   fewer than five) and they live here rather than in components.css so that
   file keeps its zero-!important record: a reduced-motion kill switch has to
   outrank every animation and transition declared anywhere after it, which is
   exactly what !important is for. Kills the hazard scroll, the LIVE dot and
   every hover transition on the site. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
