/* corelata.com: the Bonham Technologies visual language (bonham.tech), self-hosted fonts, no script. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/geist-mono-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-italic-latin.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #8f8f99; /* bonham.tech's #71717a lightened to 5.9:1 on --bg for small text */
  --accent: #f59e0b;
  --accent-hover: #fbbf24;
  --accent-glow: rgba(245, 158, 11, 0.15);
  --border: #27272a;
  --border-2: #3f3f46;
  --ok: #22c55e;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

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

html {
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* bonham.tech's faint amber grid */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(245, 158, 11, 0.05) 2px, transparent 2px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.05) 2px, transparent 2px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

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

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

code,
pre,
kbd {
  font-family: var(--mono);
  font-size: 0.875em;
}

p code,
li code,
td code,
dd code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05em 0.35em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  left: 0;
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.92);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark span {
  color: var(--accent);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-2);
  text-decoration: none;
  display: inline-block;
  padding: 4px 0;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 96px 0 72px;
}

.eyebrow,
.label {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

.label {
  color: var(--text-3);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-bottom: 12px;
}

h1,
h2,
h3 {
  font-weight: 400;
  margin: 0;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 7.5vw, 5rem);
  line-height: 1.05;
  max-width: 16ch;
  margin-bottom: 28px;
}

h1 em,
h2 em {
  font-style: italic;
  color: var(--accent);
}

.lede {
  font-size: 1.125rem;
  color: var(--text-2);
  max-width: 62ch;
  margin: 0 0 36px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg);
}

.btn-secondary {
  color: var(--text);
  border-color: var(--border-2);
}

.btn-secondary:hover {
  color: var(--text);
  background: var(--bg-2);
  border-color: var(--text-2);
}

/* Sections */
.section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 28px;
  max-width: 24ch;
}

.section h3 {
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
}

.prose {
  max-width: 68ch;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--text-2);
  margin: 0 0 18px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose li + li {
  margin-top: 6px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

@media (max-width: 820px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* The four roles */
.roles {
  list-style: none;
  padding: 0;
  margin: 8px 0 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  counter-reset: role;
}

.roles li {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  counter-increment: role;
}

.roles li::before {
  content: "0" counter(role);
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

.roles h3 {
  font-family: var(--serif);
  font-size: 1.625rem;
  font-weight: 400;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.roles p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.points {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}

.points li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}

.points li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 16px;
  margin: 0 0 32px;
}

.fact {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 0;
}

.fact dt {
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1.1;
  color: var(--accent);
}

.fact dd {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--text-2);
}

/* Demo */
.video {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 0 0 16px;
}

.video video {
  width: 100%;
  border-radius: 6px;
  background: var(--bg);
}

.caption,
figcaption {
  font-size: 0.875rem;
  color: var(--text-2);
}

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 48px;
  counter-reset: step;
}

.steps > li {
  counter-increment: step;
}

.shot {
  margin: 0;
}

.shot img {
  width: 100%;
  border: 1px solid var(--border-2);
  border-radius: 10px;
}

.shot figcaption {
  margin-top: 14px;
  max-width: 72ch;
}

.shot figcaption strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.shot figcaption strong::before {
  content: counter(step, decimal-leading-zero) "  ";
  white-space: pre;
}

.note {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--text-2);
  max-width: 72ch;
  margin: 0 0 24px;
}

.note p {
  margin: 0;
}

.note p + p {
  margin-top: 10px;
}

/* Sample page */
.output {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 0 0 32px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.downloads {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 12px;
}

.downloads a {
  display: block;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
}

.downloads a:hover {
  border-color: var(--border-2);
  color: var(--text);
}

.downloads span {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-2);
}

.downloads code {
  color: var(--accent);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 56px;
  font-size: 0.875rem;
  color: var(--text-2);
  position: relative;
  z-index: 1;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text-2);
}

.site-footer a:hover {
  color: var(--text);
}

.not-found {
  min-height: 60vh;
  padding: 120px 0;
}

.not-found h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  margin-bottom: 20px;
}
