/* Maksimus Pegasus — public site.
   Self-contained: no web fonts, no CDN, no trackers. A privacy-first app should
   not ship a privacy policy page that phones home to load a typeface. Everything
   below uses fonts already on the reader's device. */

:root {
  color-scheme: dark light;
  --bg: #0a0a0c;
  --bg-elev: #131318;
  --fg: #f3f0e9;
  --fg-strong: #fffdf8;
  --muted: #9b958a;
  --line: rgba(206, 172, 112, 0.16);
  --line-soft: rgba(255, 255, 255, 0.06);
  --accent: #cfa96a;
  --accent-bright: #e3c48d;
  --accent-soft: rgba(207, 169, 106, 0.09);
  --serif: "New York", ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --measure: 40rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fbf9f5;
    --bg-elev: #ffffff;
    --fg: #1e1b16;
    --fg-strong: #100e0a;
    --muted: #6d6658;
    --line: rgba(138, 108, 44, 0.20);
    --line-soft: rgba(0, 0, 0, 0.07);
    --accent: #8a6a24;
    --accent-bright: #6f551a;
    --accent-soft: rgba(138, 106, 36, 0.07);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* A soft warm glow behind the masthead, fixed so it never scrolls away. */
  background-image:
    radial-gradient(58rem 32rem at 50% -14rem, var(--accent-soft), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 5rem;
}

/* ---------- Masthead ---------- */

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1.4rem;
  padding-bottom: 1.4rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The first link is the wordmark: serif, un-shouty, sets the tone. */
nav a:first-child {
  flex: 1 1 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  color: var(--fg-strong);
  margin-bottom: 0.5rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--accent-bright);
  border-bottom-color: var(--accent);
}

/* ---------- Type ---------- */

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--fg-strong);
  margin: 0 0 0.6rem;
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--fg-strong);
  margin: 3rem 0 0.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line-soft);
}

/* The first section after the intro needs no rule above it. */
h2:first-of-type { border-top: none; padding-top: 0; }

h3 {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 2rem 0 0.4rem;
}

p { margin: 0 0 1.1rem; }

.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.6vw, 1.35rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.muted { color: var(--muted); }

strong { color: var(--fg-strong); font-weight: 600; }

a {
  color: var(--accent);
  text-decoration-color: var(--line);
  text-underline-offset: 0.2em;
  transition: color 0.18s ease;
}

a:hover, a:focus-visible { color: var(--accent-bright); }

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

/* ---------- Lists ---------- */

ul { list-style: none; padding-left: 0; margin: 0 0 1.4rem; }

ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.6rem;
}

/* A small champagne rule instead of a bullet. */
ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.82em;
  width: 0.7rem;
  height: 1px;
  background: var(--accent);
  opacity: 0.75;
}

ol { padding-left: 1.3rem; margin: 0 0 1.4rem; }
ol li { margin-bottom: 0.6rem; }
ol li::marker { color: var(--accent); }

/* ---------- Callout ---------- */

.note {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.3rem;
  margin: 1.8rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.note p:last-child { margin-bottom: 0; }

/* ---------- Footer ---------- */

footer {
  margin-top: 4.5rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.87rem;
}

footer p { margin: 0 0 0.35rem; }

/* ---------- Small screens ---------- */

@media (max-width: 30rem) {
  body { font-size: 16px; }
  .wrap { padding: 2.5rem 1.15rem 3.5rem; }
  nav { gap: 0.35rem 1rem; margin-bottom: 2.2rem; }
}

/* Hover transitions are the only motion here; drop them on request. */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
