/* Keelwright Studio — "the register" */

@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2-variations"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/instrument-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/instrument-sans-latin-600-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --ink: #0C1328;
  --paper: #FBF8F3;
  --cobalt: #4A80EA;
  --cobalt-deep: #2D6AE3;
  --fg: var(--paper);
  --fg-muted: #C9CEDA;
  --fg-faint: #8D96AA;
  --link: #8FB1F5;
  --link-hover: #B3CBF8;
  --rule: #3A4666;
  --grid: rgba(74, 128, 234, 0.13);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-ui: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --chart-opacity: 0.45;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--ink);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
a:hover { color: var(--link-hover); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
p { margin: 0; }
code { font-family: var(--font-mono); font-size: 0.92em; color: var(--link); }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 3px; }

.page { position: relative; isolation: isolate; min-height: 100vh; padding: 0 var(--gutter) 48px; }
.page > .chart {
  position: absolute; z-index: -1; inset: 0 0 auto 0; height: 1100px;
  background-image: url(chart-1836.webp); background-size: cover; background-position: 30% top;
  opacity: var(--chart-opacity);
  -webkit-mask-image: linear-gradient(#000 0, #000 55%, transparent 100%);
  mask-image: linear-gradient(#000 0, #000 55%, transparent 100%);
  pointer-events: none;
}

/* Type styles */
.label { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.lede { font-size: 19px; line-height: 1.5; color: var(--fg-muted); max-width: 34em; }
.display { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95; }
.standfirst { font-family: var(--font-display); font-weight: 600; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em; }
.big-link { font-family: var(--font-display); font-weight: 800; font-size: clamp(24px, 3.4vw, 44px); letter-spacing: -0.02em; line-height: 1.1; padding: 8px 0; overflow-wrap: anywhere; }

/* Header */
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 32px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.site-header .brand { color: var(--fg-muted); text-decoration: none; padding: 14px 0; display: inline-flex; align-items: center; gap: 10px; }
.site-header .brand:hover { color: var(--fg); }
.site-header .brand .mark { width: 20px; height: 20px; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 0 28px; }
.site-header nav a { color: var(--fg); text-decoration: none; padding: 14px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--link); }

/* Wordmark */
.wordmark { padding: 40px 0 0; overflow: hidden; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); }
.wordmark .word, .wordmark .reflection {
  font-family: var(--font-display); font-weight: 800; font-size: min(240px, calc((100vw - 2 * var(--gutter)) / 4.9));
  line-height: 0.8; letter-spacing: -0.06em; white-space: nowrap; margin-left: -0.04em;
}
.wordmark .waterline { height: 6px; background: var(--cobalt); margin: 0 0 0 calc(-1 * var(--gutter)); }
.wordmark .reflection { color: transparent; -webkit-text-stroke: 2px var(--rule); transform: translateY(0.44em) scaleY(-0.55); transform-origin: top; height: 0.44em; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 32px 80px; padding: 56px 0 96px; align-items: flex-start; }
.hero h1 { flex: 1 1 420px; }
.hero p { flex: 1 1 360px; font-size: 19px; color: var(--fg-muted); }

/* Register tables */
.register-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-bottom: 12px; border-bottom: 3px solid var(--fg); }
.register-head .faint { color: var(--fg-faint); }
.row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 32px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.row.quiet { color: var(--fg-faint); }
.row .no { width: 60px; color: var(--link); flex-shrink: 0; }
.row .name { font-family: var(--font-display); font-weight: 800; font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.03em; line-height: 1; flex: 1 1 440px; }
.row .name a { color: inherit; text-decoration: none; }
.row .name a:hover { color: var(--link); }
.row .kind { flex: 1 1 200px; font-size: 16px; }
.row .waters { flex: 1 1 160px; font-size: 16px; }
.row .state { flex: 0 1 150px; }
.row .title { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -0.01em; line-height: 1.1; flex: 1 1 280px; }
.row .body { flex: 2 1 420px; color: var(--fg-muted); }
.row .path { font-family: var(--font-mono); font-size: 15px; color: var(--link); flex: 1 1 280px; overflow-wrap: anywhere; }
.row .what { flex: 2 1 420px; font-size: 16px; color: var(--fg-muted); }
.row.compact { padding: 16px 0; gap: 4px 32px; }
section { padding-bottom: 96px; }
section:last-of-type { padding-bottom: 0; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; font-weight: 600; text-decoration: none; border: 1px solid var(--fg); color: var(--fg); }
.btn:hover { color: var(--fg); background: rgba(251, 248, 243, 0.08); }
.btn.primary { background: var(--fg); color: var(--ink); }
.btn.primary:hover { background: #fff; color: var(--ink); }

/* Two-up blocks */
.two-up { display: flex; flex-wrap: wrap; gap: 40px 64px; padding-top: 32px; }
.two-up > * { flex: 1 1 320px; }
.two-up h3 { font-weight: 600; font-size: 26px; margin-bottom: 10px; }
.two-up p { color: var(--fg-muted); }

/* Colophon / footer */
.colophon { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; padding-top: 120px; }
.colophon .mark { width: 96px; height: 96px; flex-shrink: 0; }
.colophon p { flex: 1 1 320px; font-size: 16px; color: var(--fg-muted); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 24px; margin-top: 48px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--fg-faint); }
.site-footer a { padding: 12px 0; display: inline-block; }

/* Swatchbuckler page */
.product-meta { padding: 48px 0 0; display: flex; flex-wrap: wrap; gap: 8px 32px; }
.product-title { padding: 16px 0 0; overflow: hidden; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); }
.product-title h1 { font-weight: 800; font-size: min(190px, calc((100vw - 2 * var(--gutter)) / 7)); line-height: 0.85; letter-spacing: -0.06em; white-space: nowrap; margin-left: -0.04em; }
.product-title .swatches { display: flex; height: 10px; margin: 12px 0 0 calc(-1 * var(--gutter)); }
.product-title .swatches span { flex: 1; }
.product-intro { display: flex; flex-wrap: wrap; gap: 48px 80px; padding: 64px 0 96px; align-items: flex-start; }
.product-intro .text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.product-intro .shot { width: 320px; max-width: 100%; height: auto; border: 1px solid var(--rule); }
.get { display: flex; flex-wrap: wrap; gap: 24px 64px; padding-top: 32px; align-items: flex-end; }
.get > div { flex: 1 1 420px; }
.get h2 { font-weight: 800; font-size: clamp(36px, 5vw, 64px); letter-spacing: -0.03em; line-height: 0.95; margin-bottom: 16px; }
.get p { color: var(--fg-muted); max-width: 40em; }

/* Prose pages (privacy) */
.page-head { padding: 48px 0 56px; display: flex; flex-direction: column; gap: 16px; }
.page-head .faint { max-width: 70ch; }
.page-head h1 { font-weight: 800; font-size: clamp(44px, 9vw, 120px); line-height: 0.9; letter-spacing: -0.05em; }
.prose { max-width: 70ch; }
.prose h2 { font-weight: 800; font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.02em; line-height: 1; padding: 48px 0 12px; border-bottom: 3px solid var(--fg); margin-bottom: 24px; }
.prose h2:first-child { padding-top: 0; }
.prose h3 { font-weight: 600; font-size: 22px; margin: 32px 0 8px; }
.prose p { margin: 0 0 16px; color: var(--fg-muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 16px; }
.prose th { text-align: left; font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; padding: 0 16px 12px 0; border-bottom: 3px solid var(--fg); }
.prose td { vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); color: var(--fg-muted); }
.prose td:first-child { white-space: nowrap; }
@media (max-width: 640px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose td { display: block; }
  .prose thead { display: none; }
  .prose td { padding: 6px 0; border: 0; white-space: normal; }
  .prose td:first-child { padding-top: 16px; }
  .prose td:last-child { padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
  .prose td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 2px; }
}

@media (max-width: 640px) { .row.quiet .kind, .row.quiet .waters { display: none; } .row .state { flex-basis: auto; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { body { background: #fff; color: #000; } .page > .chart { display: none; } }
