*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --crimson: #e94560;
  --midnight: #1a1a2e;
  --navy: #16213e;
  --snow: #f8f8f8;
  --silver: #e0e0e0;
  --slate: #6b6b6b;
  --charcoal: #2d2d2d;
  --deep-blue: #0f3460;
  --violet: #533483;
  --gold: #e9c46a;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--charcoal);
  background: #fff;
  line-height: 1.7;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ── */

.hero {
  background: var(--midnight);
  color: #fff;
  padding: 3rem 0 2.5rem;
}

.hero-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.hero-sub {
  color: #b0b0c0;
  max-width: 36rem;
}

/* ── TOC Nav ── */

.toc {
  background: var(--snow);
  border-bottom: 1px solid var(--silver);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.toc .container {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.toc a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}

.toc a:hover,
.toc a:focus-visible {
  color: var(--crimson);
}

/* ── Sections ── */

.section {
  padding: 3rem 0;
  scroll-margin-top: 3rem;
}

.section-alt {
  background: var(--snow);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
  color: var(--midnight);
}

.section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--midnight);
}

.section h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--midnight);
}

.section > .container > p {
  margin-bottom: 1.5rem;
  max-width: 42rem;
}

/* ── Grid ── */

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .section {
    scroll-margin-top: 4.5rem;
  }
}

/* ── Cards ── */

.card {
  background: #fff;
  border: 1px solid var(--silver);
  border-radius: 8px;
  padding: 1.25rem;
}

.card h3,
.card h4 {
  margin-top: 0;
}

.section-alt .card {
  background: #fff;
}

/* ── Logo displays ── */

.logo-display {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.dark-bg {
  background: var(--midnight);
}

.light-bg {
  background: var(--snow);
  border: 1px solid var(--silver);
}

/* ── Swatches ── */

.swatch-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.swatch {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 120px;
}

.swatch-block {
  width: 100%;
  height: 72px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.swatch strong {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.swatch span {
  font-size: 0.75rem;
  color: var(--slate);
  font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, monospace;
}

/* ── Typography specimens ── */

.type-specimen {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.type-sample {
  border-bottom: 1px solid var(--silver);
  padding-bottom: 1.5rem;
}

.type-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--crimson);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.specimen-h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.specimen-h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.specimen-h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.specimen-body {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.7;
}

.specimen-caption {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--slate);
  line-height: 1.5;
}

/* ── Type table ── */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.type-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.type-table th {
  text-align: left;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--midnight);
  color: var(--midnight);
}

.type-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--silver);
}

.type-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Usage ── */

.usage-block {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .usage-block {
    flex-direction: column;
  }
}

.clearspace-demo {
  flex-shrink: 0;
  background: var(--snow);
  border: 1px solid var(--silver);
  border-radius: 8px;
  padding: 2rem;
}

.clearspace-inner {
  border: 2px dashed var(--crimson);
  padding: 1.5rem;
  border-radius: 4px;
}

.usage-card {
  position: relative;
}

.usage-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.correct .usage-badge {
  background: #d4edda;
  color: #155724;
}

.incorrect .usage-badge {
  background: #f8d7da;
  color: #721c24;
}

.usage-card p {
  font-size: 0.875rem;
  color: var(--slate);
  margin-top: 0.5rem;
}

/* ── Colour pairings ── */

.pairing-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.pairing-strip span {
  font-size: 0.875rem;
}

/* ── Footer ── */

.footer {
  background: var(--midnight);
  color: #b0b0c0;
  padding: 2rem 0;
  font-size: 0.875rem;
  text-align: center;
}

.footer p {
  max-width: 36rem;
  margin: 0 auto;
}
