:root {
  --ink: #0c0c0a;
  --night: #161512;
  --paper: #f0ede6;
  --cream: #e6e0d4;
  --terra: #c8502a;
  --terra-hot: #d9643c;
  --terra-deep: #9a3c1d;
  --rust: #2a1710;
  --ink-soft: #4a443b;
  --paper-soft: rgba(240, 237, 230, .68);
  --paper-faint: rgba(240, 237, 230, .14);
  --line-dark: rgba(240, 237, 230, .12);
  --line-light: rgba(12, 12, 10, .14);

  --serif: 'Lora', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--terra); color: var(--paper); }
:focus-visible { outline: 2px solid var(--terra-hot); outline-offset: 3px; border-radius: 2px; }

h1, h2 {
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  text-wrap: balance;
}
h2 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); }
h3 { font-size: 1.22rem; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
p { text-wrap: pretty; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 38px; height: 38px; }
.mark-ring { fill: none; stroke: var(--terra); stroke-width: 1.4; opacity: .55; }
.mark-line { stroke: var(--paper); stroke-width: 1.4; opacity: .5; }
.mark-bar { stroke: var(--paper); stroke-width: 3; stroke-linecap: round; }
.mark-dot { fill: var(--terra); }
.wordmark { font-family: var(--mono); font-weight: 500; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1; }
.wordmark .e { color: var(--terra); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--serif);
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-terra { background: var(--terra); color: var(--paper); }
.btn-terra:hover { background: var(--terra-hot); }
.btn-ghost { border-color: var(--paper-faint); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--rust); }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(12, 12, 10, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--line-dark); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: .95rem; text-decoration: none; color: var(--paper-soft); transition: color .2s; }
.nav-links a:hover { color: var(--paper); }
.nav-end { display: flex; align-items: center; gap: 22px; }

/* Imigongo teeth: a row of triangles in the colour above, pointing into the colour below */
.teeth { position: relative; height: 26px; background: var(--to); }
.teeth::before, .teeth::after { content: ''; position: absolute; inset: 0; }
.teeth::before {
  background: var(--from);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26'%3E%3Cpath d='M0 0h52L26 26z'/%3E%3C/svg%3E") repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26'%3E%3Cpath d='M0 0h52L26 26z'/%3E%3C/svg%3E") repeat-x;
}
.teeth::after {
  background: var(--accent, transparent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26'%3E%3Cpath d='M18 0h16L26 9z'/%3E%3C/svg%3E") repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='26'%3E%3Cpath d='M18 0h16L26 9z'/%3E%3C/svg%3E") repeat-x;
}
.t-ink-terra { --from: var(--ink); --to: var(--terra); --accent: var(--terra); }
.t-paper-ink { --from: var(--paper); --to: var(--ink); --accent: var(--terra); }
.t-ink-terra-plain { --from: var(--ink); --to: var(--terra); }

/* Section heads */
.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 20px; }
.section-head h2 { max-width: 15ch; }
.section-head p { max-width: 54ch; font-size: 1.12rem; }
.section-head-light p { color: var(--ink-soft); }

/* Scroll reveal: only hidden once JS has marked the page */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* Footer */
.footer { background: var(--ink); padding: 72px var(--gutter) 28px; }
.footer-top { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 0 auto; display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 40px 64px; }
.wordmark-lg { font-size: clamp(6rem, 19vw, 15rem); letter-spacing: -.06em; }
.meaning { max-width: 38ch; color: var(--paper-soft); font-size: 1.12rem; padding-bottom: 2.2em; }
.meaning b { color: var(--paper); font-family: var(--mono); font-weight: 500; }
.footer-bottom {
  max-width: calc(var(--max) - 2 * var(--gutter)); margin: 48px auto 0; padding-top: 22px;
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px;
  font-size: .9rem; color: var(--paper-soft);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom a { text-decoration: none; }
.footer-source { max-width: calc(var(--max) - 2 * var(--gutter)); margin: 18px auto 0; font-size: .78rem; color: rgba(240, 237, 230, .4); }
.footer-bottom a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 12px; }
  .meaning { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
