:root {
  --paper: #F3EDE0;
  --plate: #FFF9EE;
  --ink: #1C2430;
  --guide: #3D4854;
  --muted: #6B6456;
  --rule: #D8D0BC;
  --yellow: #E8C84A;
  --nav: #16343C;
  --cream: #FBF6EA;
  --rust: #C45C38;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
button, input, a { font: inherit; color: inherit; }
a { text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
}
.btn.ghost {
  background: transparent;
  border: 1px solid var(--rule);
}
.btn:hover { filter: brightness(0.97); }

.eyebrow {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.intro {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding: 18px 22px 20px;
}
.intro.is-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .5s ease, visibility .5s;
}
.intro-bar, .intro-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
}
.intro-bar button {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.intro-stage {
  flex: 1;
  display: grid;
  place-items: center;
  position: relative;
}
.intro-plate {
  width: min(720px, 92vw);
  height: auto;
  background: var(--plate);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(22, 52, 60, 0.08);
}
.intro-line, .intro-brand { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; opacity: 0; }
.intro-line.one { top: 12%; animation: fadeup .6s ease 1.2s forwards; }
.intro-line.two { top: 16%; animation: fadeup .6s ease 3.4s forwards; }
.intro-brand { bottom: 8%; animation: fadeup .7s ease 7.4s forwards; }
.intro-mark {
  display: block;
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 68px);
  letter-spacing: .04em;
}
.intro-sub { font-size: 15px; color: var(--guide); }
.intro-body .part { animation: splay .8s ease forwards; opacity: 0; }
.p-base { animation-delay: 1.8s; }
.p-collar { animation-delay: 2.1s; }
.p-washer { animation-delay: 2.4s; }
.p-screw { animation-delay: 2.7s; }
.p-lip { animation-delay: 3s; }
.p-key { animation-delay: 3.3s; }
.p-pin { animation-delay: 3.6s; }
.intro-tags g { opacity: 0; animation: bloom .4s ease forwards; }
.intro-tags g:nth-child(1) { animation-delay: 5s; }
.intro-tags g:nth-child(2) { animation-delay: 5.2s; }
.intro-tags g:nth-child(3) { animation-delay: 5.4s; }
.intro-tags g:nth-child(4) { animation-delay: 5.6s; }
.intro-tags g:nth-child(5) { animation-delay: 5.8s; }
.intro-tags g:nth-child(6) { animation-delay: 6s; }
.intro-tags g:nth-child(7) { animation-delay: 6.2s; }
.intro-tags g:nth-child(8) { animation-delay: 6.4s; }

@keyframes fadeup {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes splay {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes bloom {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: none; }
}

body.is-intro { overflow: hidden; }
.noscript { padding: 16px 24px; }

.nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  margin: 14px auto 0;
  width: min(1120px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  background: var(--nav);
  color: var(--cream);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(22, 52, 60, 0.16);
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 20px;
}
.wordmark svg { width: 28px; height: 28px; }
.nav nav { display: flex; gap: 18px; }
.nav nav a:hover { color: var(--yellow); }
.nav-cta {
  background: var(--yellow);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
}

.hero { width: min(1120px, calc(100% - 28px)); margin: 22px auto 0; }
.hero-frame {
  background: var(--plate);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(22, 52, 60, 0.06);
  overflow: hidden;
}
.plate-canvas { position: relative; min-height: 620px; }
.plate-tools {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.search-pill {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-pill input {
  width: min(260px, 64vw);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 249, 238, 0.95);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}
.layer-toggles { display: flex; gap: 8px; align-items: flex-start; }
.chip {
  border: 1px solid var(--rule);
  background: var(--plate);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.chip.is-on { background: var(--ink); color: var(--plate); border-color: var(--ink); }

.plate-svg { width: 100%; height: auto; }
.plate-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  fill: var(--muted);
}
.tag { cursor: pointer; }
.tag rect { fill: var(--yellow); stroke: var(--ink); stroke-width: 1.2; }
.tag text { fill: var(--ink); text-anchor: middle; font-family: var(--mono); }
.tag.is-on rect { fill: var(--ink); }
.tag.is-on text { fill: var(--yellow); }
.tag.is-dim, .rail-lot.is-dim { opacity: .28; }
.is-hidden { opacity: 0; pointer-events: none; }
.leaders [data-lot].is-on { stroke: var(--rust); }
.machine .part.is-on { stroke: var(--rust); }

.lot-card {
  position: absolute;
  right: 18px;
  top: 86px;
  width: min(270px, 86%);
  background: var(--plate);
  border: 1px solid var(--rule);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(22, 52, 60, 0.08);
  padding: 16px;
}
.lot-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 560;
}
.lot-card p { margin: 0 0 12px; }
.lot-card dl { margin: 0 0 14px; }
.lot-card dl div {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--rule);
  padding: 7px 0 0;
  margin-top: 7px;
  font-size: 13px;
}
.lot-card dt { color: var(--muted); }
.lot-card dd { margin: 0; }
.micro { font-size: 12px; color: var(--muted); }

.zoom-set {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: var(--plate);
}
.zoom-set span { padding: 4px 10px; color: var(--muted); }

.lot-rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px 16px;
}
.rail-lot {
  border: 1px solid var(--rule);
  background: var(--cream);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
}
.rail-lot span { font-family: var(--mono); margin-right: 6px; color: var(--muted); }
.rail-lot.is-on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.rail-lot.is-on span { color: var(--yellow); }

.hero-copy {
  width: min(720px, 92%);
  margin: 28px auto 8px;
}
.hero-copy h1, .spread h2, .method h2, .tray-band h2, #soon-title {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  margin: 0 0 12px;
}

.spread, .method, .tray-band {
  width: min(1120px, calc(100% - 28px));
  margin: 64px auto 0;
}
.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: center;
}
.spread-art {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(22, 52, 60, 0.08);
}
.method ol {
  padding-left: 20px;
  max-width: 40em;
}
.method li { margin-bottom: 10px; }

.tray-band {
  background: var(--nav);
  color: var(--cream);
  border-radius: 24px;
  padding: 28px;
}
.tray-band .eyebrow, .tray-band p { color: #c9c1ad; }
.tray-band h2 { color: var(--cream); }
.tray-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.tray-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.tray-list li {
  border: 1px solid #3a5348;
  border-radius: 12px;
  padding: 10px 12px;
  background: #1f4248;
}
.tray-list span { font-family: var(--mono); color: var(--yellow); margin-right: 8px; }
.tray-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

footer {
  width: min(1120px, calc(100% - 28px));
  margin: 36px auto 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}
.footer-links { display: flex; gap: 16px; align-items: center; }
.footer-links button, .footer-links a {
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

#soon {
  border: 0;
  border-radius: 20px;
  padding: 28px 24px;
  width: min(440px, 92vw);
  background: var(--plate);
  box-shadow: 0 16px 40px rgba(22, 52, 60, 0.2);
}
#soon::backdrop { background: rgba(22, 52, 60, 0.4); }
.dialog-close {
  float: right;
  border: 0;
  background: none;
  font-size: 22px;
  cursor: pointer;
}
.soon-flag {
  display: inline-block;
  background: var(--yellow);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 12px;
}

@media (max-width: 880px) {
  .nav { flex-wrap: wrap; }
  .nav nav { width: 100%; justify-content: space-between; }
  .plate-canvas { min-height: 0; }
  .lot-card { position: static; width: auto; margin: 0 14px 16px; }
  .plate-tools { position: static; padding: 14px 14px 0; }
  .spread, .tray-head { grid-template-columns: 1fr; display: block; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { display: none !important; }
  .intro-line, .intro-brand, .intro-body .part, .intro-tags g { animation: none; opacity: 1; }
  html { scroll-behavior: auto; }
}
