/* Marketing site tokens. No external requests; Plex is self-hosted at
   /fonts/plex.css. */
:root {
  --ink: #14171c;
  --muted: #5b626d;
  --line: #d8dbdf;
  --line-soft: #e9ebee;
  --line-strong: #14171c;
  --fill: #f0f2f4;
  --fill-soft: #f7f8fa;
  --white: #fff;
  --paper: #fdfdfc;
  --dykem: #1e3fae;
  --hatch: repeating-linear-gradient(45deg, transparent 0 5px, rgba(30, 63, 174, 0.10) 5px 6px);
  --muted-on-ink: #c9cbd0;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, Helvetica, Arial, sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --wrap: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* every page is a drafting sheet: a fixed drawing frame around the viewport */
body::after {
  content: ""; position: fixed; inset: 7px; pointer-events: none; z-index: 80;
  border: 1px solid var(--ink);
}
body {
  font: 16px/1.6 var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
::selection { background: var(--dykem); color: var(--white); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--dykem); outline-offset: 2px; }
img, svg { max-width: 100%; }

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  border: 2px solid var(--ink);
  background: var(--white);
  font-family: var(--font-cond);
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(calc(-100% - var(--space-5)));
}
.skip-link:focus { transform: translateY(0); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--space-5); }

/* ---- voices ---------------------------------------------------------- */
/* section labels carry the machinist's scribe: a Dykem bar, like layout fluid
   marking the piece being worked */
.kicker {
  font-family: var(--font-cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 4px solid var(--dykem);
  padding-left: 10px;
}
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

h1 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.08; max-width: 18ch; }
h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.3; }
p, li { max-width: 62ch; }
.sub { font-size: clamp(17px, 1.8vw, 20px); line-height: 1.6; max-width: 52ch; }
.muted { color: var(--muted); }

/* ---- buttons --------------------------------------------------------- */
.btn {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  background: var(--white);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-family: var(--font-cond);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  min-height: 46px;
  padding: 12px 24px;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--white); }
.btn.primary { background: var(--dykem); border-color: var(--dykem); color: var(--white); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
/* on ink grounds */
.on-ink .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.on-ink .btn:hover { background: transparent; color: var(--white); }

.textlink {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 2px;
}
.textlink:hover { color: var(--dykem); border-color: var(--dykem); }

/* ---- header: the nameplate ------------------------------------------ */
.site-header { border-top: 3px solid var(--dykem); border-bottom: 1px solid var(--line-strong); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); height: 64px; }
.wordmark {
  font-family: var(--font-cond);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark .wright { color: var(--dykem); }
.site-nav { display: flex; align-items: center; gap: var(--space-5); margin-left: auto; }
.site-nav a {
  font-family: var(--font-cond);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--dykem); }
.site-header .btn { min-height: 40px; padding: 8px 18px; font-size: 13px; }

/* ---- sections -------------------------------------------------------- */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.section:first-of-type, .hero { border-top: 0; }
.hero { padding: 96px 0 88px; }
.hero .kicker { display: block; margin-bottom: var(--space-4); }
.hero .sub { margin-top: var(--space-5); }
.cta-row { margin-top: var(--space-6); display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.section > .wrap > .kicker { display: block; margin-bottom: var(--space-3); }
.section h2 { margin-bottom: var(--space-5); }

/* recessed zone: hatch, not tint */
.hatch-panel { background: var(--fill-soft); background-image: var(--hatch); border: 1px solid var(--line); }

/* hatched drawing-board band: white plates sit on the blueprint ground */
.section.alt { background: var(--fill-soft); background-image: var(--hatch); }
.section.alt .day-grid > div,
.section.alt .spec-table td { background: var(--white); }

/* ---- ink close panel -------------------------------------------------- */
.close-panel { background: var(--ink); color: var(--white); padding: 88px 0 96px; border-top: 4px solid var(--dykem); }
.close-panel .kicker { border-color: var(--dykem); }
.close-panel h2 { max-width: 18ch; font-size: clamp(28px, 4vw, 44px); }
.close-panel .founder { font-size: 15px; color: var(--muted-on-ink); }
.close-panel .founder a { color: var(--white); text-underline-offset: 3px; }

/* ---- spec tables (drawn, framed like a rating plate) ------------------ */
.spec-table { border-collapse: collapse; width: 100%; }
.spec-table th, .spec-table td { border: 1px solid var(--ink); padding: 14px 16px; text-align: left; vertical-align: top; }
.spec-table th {
  background: var(--fill-soft);
  background-image: var(--hatch);
  font-family: var(--font-cond);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.spec-table td.num { text-align: right; }

/* open table variant: 2px ink head rule, hairline rows, no vertical rules */
.open-table { border-collapse: collapse; width: 100%; }
.open-table th { border-bottom: 2px solid var(--ink); padding: 8px 14px 8px 0; text-align: left; font-family: var(--font-cond); font-size: 12px; font-weight: 600; letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted); }
.open-table td { border-bottom: 1px solid var(--line); padding: 12px 14px 12px 0; vertical-align: top; }

/* ---- nameplate (stamped plate, for guarantees and stamps) ------------- */
.nameplate { border: 2px solid var(--ink); padding: var(--space-5) var(--space-6); background: var(--fill-soft); background-image: var(--hatch); }
.nameplate .kicker { color: var(--ink); display: block; margin-bottom: var(--space-2); }

/* plain stacked feature list: hairline rules between items */
.rule-list { list-style: none; }
.rule-list li { padding: var(--space-4) 0; border-top: 1px solid var(--line); }
.rule-list li:first-child { border-top: 2px solid var(--ink); }
.rule-list b { font-weight: 600; }

/* ---- footer: the title block ------------------------------------------ */
.site-footer { border-top: 2px solid var(--ink); margin-top: 0; }
.title-block { display: grid; grid-template-columns: 2fr 1fr 1fr; }
.title-block > div { padding: var(--space-5); border-left: 1px solid var(--line); min-width: 0; }
.title-block > div:first-child { border-left: 0; padding-left: 0; }
.title-block .wordmark { font-size: 17px; }
.title-block nav { display: grid; gap: 6px; }
.title-block a { text-decoration: none; color: var(--muted); font-size: 14px; }
.title-block a:hover { color: var(--ink); }
.title-block .fineprint { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---- plates: engraved figures from the catalog ------------------------ */
.plate { margin: 0; }
.plate img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }

/* ---- the rubber stamp -------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .stampable[data-rv] { opacity: 0; transform: scale(1.12) rotate(-1deg); }
  html.js .stampable[data-rv].in { animation: stamp-down 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
  @keyframes stamp-down {
    0% { opacity: 0; transform: scale(1.12) rotate(-1deg); }
    60% { opacity: 1; transform: scale(0.985) rotate(0.2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
  }
}

/* ---- motion: drafting, not decoration ---------------------------------
   [data-rv] rises and fades in when scrolled into view (motion.js adds .in).
   .plate[data-rv] prints itself like a plotter pass behind a Dykem pen line.
   Without JS or with reduced motion everything is simply visible. */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-rv] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
  html.js [data-rv].in { opacity: 1; transform: none; }
  html.js [data-rv][data-rv-delay="1"] { transition-delay: 0.12s; }
  html.js [data-rv][data-rv-delay="2"] { transition-delay: 0.24s; }
  html.js [data-rv][data-rv-delay="3"] { transition-delay: 0.36s; }

  html.js .plate[data-rv] { transform: none; opacity: 1; position: relative; }
  html.js .plate[data-rv] img { clip-path: inset(0 100% 0 0); transition: clip-path 1.3s cubic-bezier(0.6, 0, 0.3, 1); }
  html.js .plate[data-rv].in img { clip-path: inset(0 0 0 0); }
  html.js .plate[data-rv]::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 2px;
    background: var(--dykem); opacity: 0;
  }
  html.js .plate[data-rv].in::after { animation: plotter-pen 1.3s cubic-bezier(0.6, 0, 0.3, 1) forwards; }
  @keyframes plotter-pen {
    0% { left: 0; opacity: 1; }
    96% { opacity: 1; }
    100% { left: calc(100% - 2px); opacity: 0; }
  }
  .btn { transition: background 120ms, border-color 120ms, color 120ms, transform 80ms; }
  .btn:active { transform: translateY(1px); }

  /* the drafting line that draws itself across a framed strip */
  html.js .draw-line[data-rv] { opacity: 1; transform: none; }
  html.js .draw-line { position: relative; }
  html.js .draw-line::before {
    content: ""; position: absolute; top: -2px; left: 0; height: 3px; width: 100%;
    background: var(--dykem); transform: scaleX(0); transform-origin: left;
    transition: transform 1.4s cubic-bezier(0.6, 0, 0.3, 1) 0.1s;
  }
  html.js .draw-line.in::before { transform: scaleX(1); }
}

/* ---- responsive -------------------------------------------------------- */
@media (max-width: 820px) {
  .hero { padding: 64px 0 56px; }
  .section { padding: 56px 0; }
  .site-header .wrap { height: auto; flex-wrap: wrap; padding-top: var(--space-3); padding-bottom: var(--space-3); row-gap: var(--space-2); }
  .site-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-left: 0; order: 3; width: 100%; }
  .site-nav a { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 7px 2px; font-size: 11px; line-height: 1.2; letter-spacing: 0.05em; text-align: center; }
  .site-header .btn { margin-left: auto; }
  .title-block { grid-template-columns: 1fr; }
  .title-block > div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .title-block > div:first-child { border-top: 0; }
}
