@font-face { font-family: 'Underseen Fraunces'; font-style: italic; font-weight: 400; src: url('fonts/Fraunces-Italic.ttf') format('truetype'); }
@font-face { font-family: 'Underseen Fraunces'; font-style: italic; font-weight: 600 700; src: url('fonts/Fraunces-SemiBoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'Underseen Jost'; font-style: normal; font-weight: 400; src: url('fonts/Jost_400Regular.ttf') format('truetype'); }
@font-face { font-family: 'Underseen Jost'; font-style: normal; font-weight: 600; src: url('fonts/Jost_600SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Underseen Commit Mono'; font-style: normal; font-weight: 400; src: url('fonts/CommitMono-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Underseen Commit Mono'; font-style: normal; font-weight: 600; src: url('fonts/CommitMono-SemiBold.ttf') format('truetype'); }

:root {
  color-scheme: light;
  --bg: #DED8CC;
  --bg-deep: #D6CFC1;
  --band: #CBC1B1;
  --hair: #B9AD98;
  --ink: #1A1712;
  --ink-dim: #484236;
  --ink-faint: #5F5748;
  --paper: #F5F1EA;
  --edge: #2A251D;
  --edge-strong: #423A2E;
  --warn: #B42318;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  background: linear-gradient(rgba(26, 23, 18, 0.035) 1px, transparent 1px), var(--bg);
  background-size: 100% 6px;
  color: var(--ink);
  font-family: 'Underseen Jost', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.65;
}

body::before {
  background: linear-gradient(90deg, rgba(255, 252, 246, 0.22), transparent 16%, transparent 84%, rgba(60, 48, 30, 0.08));
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

a { color: var(--ink); }

a:focus-visible { outline: 2px solid var(--warn); outline-offset: 4px; }

.site-header {
  align-items: center;
  background: linear-gradient(180deg, #F9F7F3 0%, #EEEAE3 100%);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 rgba(255, 252, 246, 0.95), inset 0 -1px 0 rgba(60, 48, 30, 0.1), 0 1px 2px rgba(60, 48, 30, 0.2);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 20px auto 0;
  max-width: 1120px;
  padding: 18px 22px;
  position: relative;
}

.site-header::after {
  background: var(--hair);
  bottom: 7px;
  content: '';
  height: 1px;
  left: 22px;
  opacity: 0.65;
  position: absolute;
  right: 22px;
}

.site-brand { min-width: 170px; }

.site-code,
.eyebrow,
.site-nav a,
.instrument-label,
.instrument-status,
.lever,
.machine-label {
  font-family: 'Underseen Commit Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-code {
  color: var(--ink-faint);
  display: block;
  font-size: 10px;
  line-height: 1.2;
  margin-bottom: 5px;
}

.wordmark {
  color: var(--ink);
  font-family: 'Underseen Fraunces', Georgia, serif;
  font-size: 30px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 1;
  text-decoration: none;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  margin-bottom: 4px;
}

.site-nav a {
  align-items: center;
  border: 1px solid transparent;
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  min-height: 48px;
  padding: 8px 11px;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 90ms ease;
}

.site-nav a:hover { background: var(--band); border-color: var(--hair); }
.site-nav a:active { transform: scale(0.97); }

main {
  background: linear-gradient(180deg, rgba(245, 241, 234, 0.72), rgba(238, 234, 227, 0.56));
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 rgba(255, 252, 246, 0.82), inset 0 -1px 0 rgba(60, 48, 30, 0.1), 0 2px 5px rgba(60, 48, 30, 0.14);
  margin: 16px auto 48px;
  max-width: 1120px;
  min-height: calc(100vh - 180px);
  padding: clamp(34px, 6vw, 72px) clamp(22px, 7vw, 82px) 54px;
  position: relative;
}

main::before { background: var(--ink); content: ''; height: 3px; left: 0; opacity: 0.9; position: absolute; right: 0; top: -1px; }
.home-main { padding-bottom: 44px; }

.hero-grid {
  align-items: start;
  display: grid;
  gap: clamp(32px, 7vw, 96px);
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
}

.eyebrow { color: var(--ink-dim); font-size: 11px; font-weight: 600; line-height: 1.4; }

h1, h2 { color: var(--ink); font-family: 'Underseen Fraunces', Georgia, serif; font-style: italic; font-weight: 600; line-height: 1.08; }
h1 { font-size: clamp(42px, 7vw, 76px); letter-spacing: -0.055em; margin: 14px 0 22px; max-width: 780px; }
h2 { border-top: 1px solid var(--hair); font-size: clamp(25px, 3vw, 34px); letter-spacing: -0.035em; margin: 48px 0 14px; max-width: 760px; padding-top: 17px; }
h2::before { color: var(--ink-faint); content: '//'; font-family: 'Underseen Commit Mono', ui-monospace, monospace; font-size: 11px; font-style: normal; letter-spacing: 0.12em; margin-right: 10px; vertical-align: middle; }

p, li { font-size: 16px; }
p { max-width: 760px; }
.lede { color: var(--ink-dim); font-size: clamp(19px, 2.4vw, 24px); line-height: 1.45; max-width: 660px; }

.instrument-card {
  background: var(--ink);
  border: 1px solid var(--edge-strong);
  box-shadow: inset 0 2px 5px rgba(40, 32, 20, 0.45), 0 1px 0 rgba(255, 252, 246, 0.9);
  color: var(--paper);
  margin-top: 24px;
  padding: 20px;
}

.instrument-label, .instrument-status { color: #C8BFAF; display: block; font-size: 10px; line-height: 1.5; }
.instrument-title { color: var(--paper); font-family: 'Underseen Fraunces', Georgia, serif; font-size: 30px; font-style: italic; font-weight: 600; letter-spacing: -0.04em; line-height: 1.05; margin: 20px 0 12px; }
.instrument-copy { color: #D8D0C3; font-size: 15px; line-height: 1.5; }
.instrument-status { border-top: 1px solid var(--edge-strong); margin-top: 22px; padding-top: 14px; }

.lever {
  align-items: center;
  background: var(--ink);
  border: 1px solid var(--edge-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -1px 0 rgba(0, 0, 0, 0.4), 0 2px 3px rgba(0, 0, 0, 0.28);
  color: var(--paper);
  display: inline-flex;
  font-size: 10px;
  font-weight: 600;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  min-height: 48px;
  padding: 12px 14px;
  text-decoration: none;
  transition: transform 90ms ease, background-color 120ms ease;
}

.lever:hover { background: var(--edge-strong); }
.lever:active { transform: scale(0.97); }

.notice { background: var(--band); border: 1px solid var(--hair); border-left: 4px solid var(--ink); box-shadow: inset 0 1px 0 rgba(255, 252, 246, 0.58), 0 1px 2px rgba(60, 48, 30, 0.12); margin: 42px 0 0; max-width: 760px; padding: 16px 18px; }
.notice a, main p a, main li a { font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }

main ul, main ol { list-style: none; margin: 0; max-width: 760px; padding: 0; }
main li { border-bottom: 1px solid rgba(185, 173, 152, 0.8); padding: 13px 0 13px 23px; position: relative; }
main ul li::before { color: var(--ink-faint); content: '—'; font-family: 'Underseen Commit Mono', ui-monospace, monospace; left: 0; position: absolute; top: 13px; }
main ol { counter-reset: section-step; }
main ol li { counter-increment: section-step; padding-left: 42px; }
main ol li::before { color: var(--ink-faint); content: counter(section-step, decimal-leading-zero); font-family: 'Underseen Commit Mono', ui-monospace, monospace; font-size: 11px; left: 0; letter-spacing: 0.08em; position: absolute; top: 16px; }

footer { align-items: center; border-top: 1px solid var(--hair); color: var(--ink-faint); display: flex; flex-wrap: wrap; font-family: 'Underseen Commit Mono', ui-monospace, monospace; font-size: 10px; gap: 12px 22px; letter-spacing: 0.08em; margin-top: 58px; padding-top: 18px; text-transform: uppercase; }
footer a { color: var(--ink-dim); }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 17px; padding: 17px 16px 20px; }
  .site-header::after { left: 16px; right: 16px; }
  .site-nav { justify-content: flex-start; width: 100%; }
  .site-nav a { flex: 1 1 auto; justify-content: center; }
  main { margin-top: 12px; padding: 40px 20px 42px; }
  .hero-grid { grid-template-columns: 1fr; }
  .instrument-card { margin-top: 0; }
  h1 { font-size: clamp(42px, 14vw, 64px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
