/* Bellsands: archive-room greens with one brass accent. Display: Familjen Grotesk. Body: IBM Plex Sans. Data: IBM Plex Mono. */
:root {
  --ink: #15201D;
  --ink-soft: #4A5651;
  --ground: #ECEEE9;
  --paper: #F7F8F5;
  --rule: #C9CEC6;
  --night: #18241F;
  --night-deep: #0F1714;
  --night-rule: #3A4A43;
  --night-field: #1F2D28;
  --night-text: #E6EAE3;
  --night-soft: #C7CFC6;
  --night-mute: #93A098;
  --brass: #C9973A;
  --brass-ink: #8A6420;
  --ok: #2F6B55;
  --bad: #A23B2C;
  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--ink); }
a:hover { color: var(--brass-ink); }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; margin: 0; }
p { margin: 0; }

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.section { padding-block: 96px; }
.narrow { max-width: 760px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-ink); }
.dark .eyebrow { color: var(--brass); }
.lede { font-size: 19px; line-height: 1.5; color: var(--ink-soft); max-width: 640px; }
.dark .lede { color: var(--night-soft); }
.muted { color: var(--ink-soft); }
.mono { font-family: var(--mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bands */
.dark { background: var(--night); color: var(--night-text); }
.dark a { color: var(--night-text); }
.paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 28px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-word { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: 0.2em; }
.nav { display: flex; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; }
.nav a { color: var(--night-soft); text-decoration: none; padding-block: 6px; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--night-text); }
.nav a[aria-current="page"] { color: var(--night-text); border-bottom-color: var(--brass); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 3px; border: 0;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn-brass { background: var(--brass); color: var(--night); }
.dark a.btn-brass, a.btn-brass { color: var(--night); }
.btn-brass:hover { background: #D5A54A; color: var(--night); }
.btn-ink { background: var(--ink); color: var(--ground); }
a.btn-ink { color: var(--ground); }
.btn-ink:hover { background: #24332E; color: var(--ground); }
.btn-line { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Hero */
.hero { padding-block: 88px 96px; display: flex; flex-direction: column; gap: 26px; }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); line-height: 1.02; letter-spacing: -0.02em; max-width: 900px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.sprockets { height: 14px; background: var(--night-deep); background-image: repeating-linear-gradient(90deg, transparent 0 12px, #33433D 12px 26px); background-size: 26px 8px; background-repeat: repeat-x; background-position: 0 3px; }

/* Section heads */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.01em; max-width: 680px; }
.section-head p { max-width: 440px; color: var(--ink-soft); }
h2.h-md { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; }

/* Provenance pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 2px solid var(--ink); }
.pillar { display: flex; flex-direction: column; gap: 12px; padding: 28px 24px 32px; border-right: 1px solid var(--rule); }
.pillar:last-child { border-right: 0; }
.pillar .n { font-family: var(--mono); font-size: 13px; color: var(--brass-ink); }
.pillar h3 { font-size: 23px; }
.pillar p { color: var(--ink-soft); font-size: 15px; }
.pillar .field { margin-top: auto; font-family: var(--mono); font-size: 12.5px; background: var(--paper); border: 1px solid var(--rule); padding: 10px 12px; border-radius: 3px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 24px; }
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 30px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 23px; }
.card p { color: var(--ink-soft); }
.card .terms { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 14px; }
.card .go { margin-top: auto; font-weight: 600; color: var(--brass-ink); }

.collections { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.collection { padding: 22px 24px 26px 0; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--rule); }
.collection h3 { font-size: 21px; }
.collection .years { font-family: var(--mono); font-size: 12.5px; color: var(--brass-ink); }

/* Forms */
.split { display: flex; flex-wrap: wrap; gap: 56px; }
.split > * { flex: 1 1 400px; min-width: 0; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field-row { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row label { font-size: 14px; font-weight: 500; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--rule); background: #FFFFFF;
  color: var(--ink); border-radius: 3px; font: inherit;
}
.form textarea { padding: 12px 14px; resize: vertical; min-height: 120px; }
.dark .form label { color: var(--night-soft); }
.dark .form input, .dark .form select, .dark .form textarea { background: var(--night-field); color: var(--night-text); border-color: var(--night-rule); color-scheme: dark; }
.form-panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; padding: 28px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; font-size: 15px; min-height: 1.5em; }
.form-status.ok { color: var(--ok); font-weight: 600; }
.form-status.err { color: var(--bad); font-weight: 600; }
.dark .form-status.ok { color: #7FC4A6; }
.dark .form-status.err { color: #F0A496; }
.form .note { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-soft); }
.dark .form .note { color: var(--night-mute); }
.dark .form .note a { color: var(--night-soft); }

/* Tables */
.table-box { overflow-x: auto; border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
th, td { padding: 15px 16px; text-align: left; vertical-align: top; }
th:first-child, td:first-child { padding-left: 0; }
th:last-child, td:last-child { padding-right: 0; }
thead th { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; font-weight: 500; color: var(--ink-soft); text-transform: uppercase; }
tbody tr { border-top: 1px solid var(--rule); }
tbody th { font-weight: 600; }
.num { text-align: right; font-family: var(--mono); white-space: nowrap; }

/* Definition lists */
.deflist { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.deflist > * { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.deflist .t { font-weight: 600; display: block; }
.deflist .d { color: var(--ink-soft); font-size: 15px; display: block; }
.deflist .v { font-family: var(--mono); white-space: nowrap; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 2px solid var(--ink); }
.steps li { display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 8px 0; }
.steps .n { font-family: var(--mono); font-size: 13px; color: var(--brass-ink); }
.steps .t { font-family: var(--display); font-weight: 600; font-size: 20px; }
.steps .d { color: var(--ink-soft); font-size: 15px; }

.code { font-family: var(--mono); font-size: 13px; background: var(--ink); color: #DDE3DB; border-radius: 3px; padding: 16px 18px; line-height: 1.7; overflow-x: auto; white-space: pre; margin: 0; }

/* Sell band */
.sell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-block: 72px; border-bottom: 1px solid var(--rule); }
.sell h2 { font-size: 30px; }

/* Footer */
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px; padding-block: 56px 64px; font-size: 15px; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col .h { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--ink-soft); }

/* Prose pages */
.prose { display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.prose h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; }
.prose h2 { font-size: 22px; margin-top: 14px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

@media (max-width: 640px) {
  .section { padding-block: 64px; }
  .hero { padding-block: 56px 64px; }
  .form { grid-template-columns: minmax(0, 1fr); }
  .pillar { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0; }
  .form-panel { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
