/* Orivael Academy — .axiom language course.
   Palette matched to sites/orivael/index.html so the family looks like one system. */

:root {
  --bg: #070a12;
  --panel: #0d1220;
  --panel-2: #111829;
  --line: #1e2942;
  --text: #eef4ff;
  --muted: #9cabca;
  --accent: #67e8f9;
  --good: #86efac;
  --warn: #fde68a;
  --bad: #fca5a5;
  --radius: 12px;
  --maxw: 62rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── header ─────────────────────────────────────────────────── */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(7, 10, 18, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand__mark { color: var(--accent); }
.brand__thin { color: var(--muted); font-weight: 450; }
.top__nav { display: flex; gap: clamp(0.7rem, 2vw, 1.5rem); font-size: 0.92rem; }
.top__nav a { color: var(--muted); }
.top__nav a:hover { color: var(--text); text-decoration: none; }

/* ── hero ───────────────────────────────────────────────────── */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.hero { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.lede { margin: 0 0 1.6rem; font-size: clamp(1.02rem, 2.2vw, 1.16rem); color: #cdd8ee; max-width: 46rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1.4rem; }
.hero__note { margin: 0; color: var(--muted); font-size: 0.9rem; max-width: 44rem; }

.btn {
  display: inline-block;
  padding: 0.62rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 550;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #04222b;
  font-weight: 650;
}
.btn--accent:hover { filter: brightness(1.08); }

/* ── sections ───────────────────────────────────────────────── */
.band { padding: clamp(2rem, 5vw, 3.2rem) 0; border-top: 1px solid var(--line); }
.band > h2 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  font-size: clamp(1.3rem, 3.4vw, 1.75rem);
  letter-spacing: -0.02em;
}
.num {
  color: var(--accent);
  font-family: ui-monospace, monospace;
  font-size: 0.78em;
  opacity: 0.75;
}
.band p { max-width: 46rem; }
p.tight { margin-top: 0.6rem; }
.muted { color: var(--muted); }

/* ── code blocks ────────────────────────────────────────────── */
.code {
  position: relative;
  margin: 1.15rem 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.code::before {
  content: attr(data-lang);
  position: absolute;
  top: 0.55rem;
  left: 0.9rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.code pre {
  margin: 0;
  padding: 2.1rem 1rem 1rem;
  overflow-x: auto;          /* wide code scrolls itself, page never does */
  font-size: 0.875rem;
  line-height: 1.6;
}
.code code { color: #dbe6ff; white-space: pre; }
.copy {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--accent); }
.copy[data-done="1"] { color: var(--good); border-color: var(--good); }

/* ── definition lists ───────────────────────────────────────── */
.defs {
  display: grid;
  grid-template-columns: minmax(8.5rem, max-content) 1fr;
  gap: 0.45rem 1.1rem;
  margin: 1.2rem 0 0;
  max-width: 48rem;
}
.defs dt { font-family: ui-monospace, monospace; }
.defs dt code { color: var(--accent); font-size: 0.87rem; }
.defs dd { margin: 0; color: #cdd8ee; }

/* ── notes ──────────────────────────────────────────────────── */
.note {
  margin: 1.2rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--line);
  border-radius: 0 8px 8px 0;
  background: var(--panel);
  color: #cdd8ee;
  font-size: 0.94rem;
  max-width: 48rem;
}
.note--key { border-left-color: var(--accent); }
.bad-example {
  padding: 0.7rem 0.95rem;
  border-left: 3px solid var(--bad);
  border-radius: 0 8px 8px 0;
  background: rgba(252, 165, 165, 0.06);
  font-size: 0.92rem;
  max-width: 48rem;
}

/* ── flow strip ─────────────────────────────────────────────── */
.flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.6rem;
  margin: 1.2rem 0;
}
.flow__step {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.flow__step code { display: block; color: var(--accent); font-size: 0.84rem; margin-bottom: 0.2rem; }
.flow__step span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

/* ── reference table ────────────────────────────────────────── */
.tablewrap { overflow-x: auto; margin: 1.1rem 0; }
.ref { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 34rem; }
.ref th, .ref td { padding: 0.5rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref th { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.ref td:first-child code { color: var(--accent); }
.ref td:nth-child(2) { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.ref tbody tr:hover { background: rgba(103, 232, 249, 0.04); }

/* ── next steps ─────────────────────────────────────────────── */
.next {
  margin-top: 1.6rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.next h3 { margin: 0 0 0.5rem; font-size: 1rem; }
.next ul { margin: 0; padding-left: 1.1rem; color: #cdd8ee; }
.next li { margin: 0.28rem 0; }

/* ── footer ─────────────────────────────────────────────────── */
.foot {
  margin-top: 2rem;
  padding: 1.6rem clamp(1rem, 4vw, 2rem) 2.4rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
}
.foot p { margin: 0.2rem 0; }

/* ── light theme: respect the reader's OS setting ───────────── */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f9fc;
    --panel: #ffffff;
    --panel-2: #eef2f9;
    --line: #d8e0ee;
    --text: #0d1526;
    --muted: #566484;
    --accent: #0b7f96;
  }
  .top { background: rgba(247, 249, 252, 0.88); }
  .lede, .defs dd, .note, .next ul { color: #33415c; }
  .code code { color: #12203a; }
  .btn--accent { color: #ffffff; }
}

@media (max-width: 34rem) {
  .defs { grid-template-columns: 1fr; gap: 0.15rem; }
  .defs dd { margin-bottom: 0.5rem; }
  .top__nav a:nth-child(3) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
