/* The Knowledge Factory: one small stylesheet. No framework, no external fonts or scripts.
   Colours (all checked for WCAG AA, 4.5:1 for text):
   ink #2b1a0c on #fffaf3 (15:1); accent #8a4f0a on #fffaf3 (6.3:1); button text #fff on #6b3a06 (9.4:1);
   footer text #f3e6d3 on #2b1a0c (13:1); footer links #ffd98f on #2b1a0c (12:1). */

:root {
  --ink: #2b1a0c;
  --muted: #5a4631;
  --paper: #fffaf3;
  --cream: #fbf1e0;
  --line: #e6d3b4;
  --accent: #8a4f0a;
  --button: #6b3a06;
  --button-hover: #42230d;
  --focus: #0b57d0;
  --dark: #2b1a0c;
  --on-dark: #f3e6d3;
  --link-on-dark: #ffd98f;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.25rem; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.25rem; margin-top: 2rem; }
p { margin: 0 0 1rem; }

a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--button-hover); }

/* Focus is always visible, on light and on dark. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.site-footer :focus-visible { outline-color: #ffd98f; }

/* Hidden until it has focus; then it sits in the flow above the header, so it covers nothing. */
.skip {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: .5rem;
}
.skip:focus {
  position: static; display: inline-block; width: auto; height: auto; overflow: visible; clip-path: none;
  margin: .5rem 1.25rem; padding: .6rem 1rem;
}

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { padding-top: .75rem; padding-bottom: .75rem; }
.brand { display: flex; align-items: center; gap: 1rem; color: var(--ink); text-decoration: none; flex-wrap: wrap; }
.brand img { display: block; width: 9.5rem; height: auto; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 700; font-size: 1.25rem; }
.brand-tag { color: var(--muted); font-size: .95rem; }

/* The feature: the Atlas */
.feature { background: var(--cream); border-bottom: 1px solid var(--line); padding: 2.5rem 0 3rem; }
.feature-grid { display: grid; gap: 2rem; align-items: center; }
.eyebrow { margin: 0 0 .5rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .85rem; }
.lead { font-size: 1.2rem; }
.feature-art svg { display: block; width: 100%; height: auto; border-radius: 1.5rem; }

.button {
  display: inline-block; background: var(--button); color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.1rem; padding: .85rem 1.6rem; border-radius: 999px; min-height: 2.75rem;
}
.button:hover { background: var(--button-hover); color: #fff; }
.button-quiet { background: #fff; color: var(--button); border: 2px solid var(--button); font-size: 1rem; padding: .6rem 1.3rem; }
.button-quiet:hover { background: var(--button); color: #fff; }

/* Who we are */
.who { padding: 3rem 0; }
.pillars, .work, .founders { padding: 0; margin: 0 0 1rem; list-style: none; }
.pillars { display: grid; gap: 1rem; }
.pillars li { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.pillars strong { color: var(--accent); font-size: 1.15rem; }
.work li { padding: .9rem 0; border-top: 1px solid var(--line); }
.work li:last-child { border-bottom: 1px solid var(--line); }
.founders { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }

/* Services: three cards at the bottom */
.services { background: var(--cream); border-top: 1px solid var(--line); padding: 3rem 0; }
.cards { display: grid; gap: 1.25rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 1.25rem; padding: 1.5rem; display: flex; flex-direction: column; }
.card h3 { margin-top: 0; }
.card p:last-child { margin: auto 0 0; padding-top: .5rem; }

/* Footer */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 2.5rem 0 1.5rem; font-size: 1rem; }
.site-footer h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.site-footer a { color: var(--link-on-dark); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
address { font-style: normal; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.social a { display: inline-block; padding: .35rem 0; }
.copy { margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid #5a4631; font-size: .95rem; }

/* 404 */
.lost { padding: 4rem 0; }

@media (min-width: 48rem) {
  .feature-grid { grid-template-columns: 1.1fr .9fr; gap: 3rem; }
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .brand img { width: 12.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color .15s ease, color .15s ease; }
}

@media print {
  .skip, .button { display: none; }
  .site-footer { background: #fff; color: #000; }
  .site-footer a { color: #000; }
}
