﻿/* gunlab draft 1. Inter is self-hosted (SIL OFL, assets/fonts/LICENSE.txt). */
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ink: #1C1C1E;       /* graphite */
  --ink-2: #4B5058;     /* secondary text */
  --page: #F5F5F7;
  --card: #FFFFFF;
  --tile: #F1F2F4;
  --line: #E5E7EB;      /* cool grey */
  --green: #00D26A;     /* brand green: logo flask, bullet dots */
  --price: #007C39;     /* prices and totals, 5.3:1 on white, 4.9:1 on the grey page (David 11/12: darker green) */
  --pill-off: #EDEEF1;
  --focus: #1C1C1E;
  --r: 18px;
  --gut: 16px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 400 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 1;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 10px; }
.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.top { background: var(--page); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; gap: 10px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; min-height: 44px; padding-right: 4px; }
.word { font-weight: 600; font-size: 30px; letter-spacing: -0.045em; line-height: 1; padding-bottom: 4px; }
.flask { width: 27px; height: 27px; color: var(--ink); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a, .nav .soon { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: 16px; text-decoration: none; border-radius: 10px; }
.nav a.on { font-weight: 600; }
.nav .soon { color: var(--ink-2); cursor: default; }
.nav .soon { display: none; }
.crumb { margin-left: auto; color: var(--ink-2); font-size: 16px; }
.back { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.back svg { width: 20px; height: 20px; }
.back[hidden], .crumb[hidden] { display: none; }
body.on-part .nav { display: none; }

/* build head */
.head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0 12px; padding: 18px 0 14px; }
h1 { margin: 0; font-size: 25px; line-height: 1.12; font-weight: 700; letter-spacing: -0.03em; }
.sub { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.total { display: flex; flex-direction: column; align-items: flex-end; }
.label { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-2); }
.big { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--price); }

/* grid */
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; background: var(--card); border-radius: var(--r); padding: 6px 6px 12px; box-shadow: 0 1px 2px rgba(28,28,30,.06), 0 6px 20px rgba(28,28,30,.05); display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(28,28,30,.07), 0 12px 28px rgba(28,28,30,.08); }
.tile { background: var(--tile); border-radius: 13px; aspect-ratio: 3 / 2; overflow: hidden; display: grid; place-items: center; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.maker img { object-fit: contain; padding: 6%; mix-blend-mode: multiply; }
.tile.icon svg { width: 34%; height: auto; color: var(--ink); }
.tile.icon { align-content: center; gap: 8px; }
.tile .tag { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.card h3 { margin: 10px 6px 0; font-size: 14px; line-height: 1.3; font-weight: 600; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }  /* whole card opens the part page */
.price { margin: 6px 6px 8px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--price); }
.pill { position: relative; z-index: 1; align-self: flex-start; margin: auto 6px 0; display: inline-flex; align-items: center; min-height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500; line-height: 1; }
.pill::before { content: ""; position: absolute; inset: -8px -4px; }  /* 44 px tap area */
a.pill { border: 1px solid #C9CDD3; background: var(--card); text-decoration: none; color: var(--ink); }
a.pill:hover { border-color: var(--ink); }
span.pill { background: var(--pill-off); color: var(--ink-2); }

/* price list */
.list { margin: 36px 0 8px; background: var(--card); border-radius: var(--r); padding: 18px 16px 16px; box-shadow: 0 1px 2px rgba(28,28,30,.06); }
.list h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.note { margin: 6px 0 12px; color: var(--ink-2); font-size: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); padding: 6px 0 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
td:first-child a { display: inline-flex; align-items: center; min-height: 44px; }
td:first-child { padding-top: 0; }
td small { display: block; color: var(--ink-2); font-size: 12.5px; }
.n { text-align: right; white-space: nowrap; padding-left: 12px; padding-top: 13px; }
.sum { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 14px; }
.sum > div { display: flex; flex-direction: column; }
.sum > div:last-child { align-items: flex-end; }
.mid { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }

/* part page */
.narrow { max-width: 760px; }
.hero { margin-top: 16px; background: var(--tile); border-radius: 24px; aspect-ratio: 1.08 / 1; overflow: hidden; display: grid; place-items: center; border: 1px solid var(--line); }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero.maker img { object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.hero.icon svg { width: 30%; color: var(--ink); }
.part-name { margin: 22px 0 0; font-size: 28px; }
.part-price { font-size: 44px; margin-top: 4px; }
.facts { list-style: none; margin: 18px 0 0; padding: 0; }
.facts li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--line); font-size: 17px; }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts li::before { content: ""; position: absolute; left: 2px; top: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 240px; padding: 0 26px; margin-top: 22px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); font-size: 17px; font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--ink); color: #fff; }
.btn.off { display: block; min-height: 0; min-width: 0; padding: 0; margin-top: 20px; border: 0; background: none; color: var(--ink-2); font-size: 15px; font-weight: 400; }
.of { margin: 14px 0 0; color: var(--ink-2); font-size: 15px; }
.step { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

/* footer */
.foot { margin-top: 40px; border-top: 1px solid var(--line); padding: 18px 0 28px; color: var(--ink-2); font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot .small { font-size: 13px; }

@media (min-width: 768px) {
  :root { --gut: 32px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .nav .soon { display: inline-flex; }
  h1 { font-size: 36px; }
  .big { font-size: 40px; }
  .sub { font-size: 15px; }
  .card h3 { font-size: 15px; }
  .list { padding: 22px 24px 20px; }
}
@media (min-width: 1100px) {
  :root { --gut: 56px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}

/* maker photos always fit whole inside their tile (never cut at the edge) */
.tile, .hero { position: relative; }
.tile.maker img, .hero.maker img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
