@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400;1,6..72,500&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

/*
 * Clawgnition public site — shared design system ("Document of record").
 *
 * A cool archival-datasheet aesthetic: near-black spruce ink on cool paper,
 * one deep-green accent (harmonizing with the claw mark), heavy label rules.
 * Editorial serif headlines (Newsreader), a precise monospace for every fact
 * and number (Spline Sans Mono), a clean grotesque body (Hanken Grotesk).
 *
 * Shared by the landing page, /docs/*, and the legal pages. Everything here is
 * page-agnostic; landing-specific rules live in landing.css.
 */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #edf0ea;
  --surface: #ffffff;
  --surface-2: #f4f6f1;

  /* Ink */
  --ink: #16211b;
  --ink-2: #47514a;
  --ink-3: #667069;

  /* Rules */
  --line: rgba(22, 33, 27, 0.12);
  --line-strong: rgba(22, 33, 27, 0.32);

  /* Accent — deep spruce green (AA on white); harmonizes with the claw mark */
  --accent: #10704e;
  --accent-deep: #0a4f37;
  --accent-tint: rgba(16, 112, 78, 0.1);

  /* Caution — reserved for the key-loss class of content */
  --warn: #8a5410;
  --warn-tint: rgba(138, 84, 16, 0.1);

  /* Night — deep panel for the footer and closing CTA */
  --night: #101a15;
  --night-2: #16241d;
  --night-ink: #e9ede6;
  --night-line: rgba(233, 237, 230, 0.15);

  /* Type */
  --font-display: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Spline Sans Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Layout */
  --maxw: 1200px;
  --radius: 3px;
  --shadow: 0 22px 48px -26px rgba(16, 33, 24, 0.4);
}

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

* {
  margin: 0;
}

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

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-feature-settings: 'cv05', 'ss01';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

strong {
  font-weight: 600;
  color: var(--ink);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

::selection {
  background: rgba(16, 112, 78, 0.18);
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------- Utilities ---------- */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 5vw, 3.25rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 500;
  padding: 0.65rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius);
  transform: translateY(-160%);
  transition: transform 0.18s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.kicker::before {
  content: '';
  width: 1.6em;
  height: 2px;
  background: currentcolor;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--ink);
  background: var(--surface);
}

/* ---------- Site header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  min-height: 68px;
  padding-block: 0.5rem;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-header__logo img {
  width: 26px;
  height: 26px;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 0.5rem 1.75rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.site-header__nav > a:not(.site-header__cta) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  transition: color 0.18s ease;
}

.site-header__nav > a:not(.site-header__cta):hover,
.site-header__nav > a:not(.site-header__cta):focus-visible {
  color: var(--ink);
}

.site-header__cta {
  min-height: 44px;
  padding-inline: 1.15rem;
}

/* ---------- Site footer ---------- */

.site-footer {
  background: var(--night);
  color: var(--night-ink);
  border-top: 1px solid var(--night-line);
}

.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 2fr);
  gap: 2.5rem 3rem;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2.5rem;
}

.site-footer__brand {
  max-width: 30ch;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--night-ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
}

.site-footer__logo img {
  width: 24px;
  height: 24px;
}

.site-footer__brand p {
  margin-top: 0.9rem;
  color: color-mix(in srgb, var(--night-ink) 62%, transparent);
  font-size: 0.9rem;
  line-height: 1.6;
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 1.5rem;
}

.site-footer__col h4 {
  margin-bottom: 1rem;
  color: color-mix(in srgb, var(--night-ink) 55%, transparent);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.site-footer__col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.site-footer__col a {
  color: color-mix(in srgb, var(--night-ink) 82%, transparent);
  font-size: 0.9rem;
  transition: color 0.18s ease;
}

.site-footer__col a:hover,
.site-footer__col a:focus-visible {
  color: var(--night-ink);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--night-line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--night-ink) 55%, transparent);
}

/* ---------- Prose (docs + legal rich text) ---------- */

.prose {
  color: var(--ink-2);
  font-size: 1.02rem;
  line-height: 1.75;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.prose h2 {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 2.25rem;
  font-size: 1.3rem;
}

.prose h4 {
  margin-top: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
}

.prose p,
.prose li {
  max-width: 68ch;
}

.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color 0.18s ease;
}

.prose a:hover,
.prose a:focus-visible {
  text-decoration-color: currentcolor;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  padding: 0.35rem 0 0.35rem 1.3rem;
  border-left: 3px solid var(--accent);
  color: var(--ink-2);
  font-style: italic;
}

.prose code {
  padding: 0.12em 0.4em;
  background: var(--accent-tint);
  border-radius: 3px;
  color: var(--accent-deep);
  font-size: 0.86em;
}

.prose pre {
  overflow-x: auto;
  padding: 1.1rem 1.25rem;
  background: var(--night);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--night-ink);
  font-size: 0.85rem;
  line-height: 1.7;
  -webkit-overflow-scrolling: touch;
}

.prose pre code {
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

.prose hr {
  height: 0;
  margin-block: 2.5rem;
  border: 0;
  border-top: 1px solid var(--line);
}

/* Any table in prose becomes its own horizontally-scrollable block so a wide
   table never forces the page itself to scroll sideways. */
.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.92rem;
  -webkit-overflow-scrolling: touch;
}

.prose th,
.prose td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.prose tbody tr:last-child th,
.prose tbody tr:last-child td {
  border-bottom: 0;
}

/* ---------- Notes / callouts ---------- */

.note {
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: 0.95rem;
  line-height: 1.65;
}

.note > * + * {
  margin-top: 0.6rem;
}

.note strong,
.note b {
  color: var(--ink);
}

.note--warn {
  border-left-color: var(--warn);
  background: var(--warn-tint);
}

.note--warn strong,
.note--warn b {
  color: var(--warn);
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Responsive shell ---------- */

@media (max-width: 720px) {
  .site-footer__top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-header__inner {
    row-gap: 0.25rem;
  }

  .site-header__nav {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    gap: 0.25rem 1.25rem;
    padding-bottom: 0.35rem;
  }

  .site-header__cta {
    margin-left: auto;
  }
}

@media (max-width: 380px) {
  .site-footer__cols {
    grid-template-columns: 1fr;
  }
}
