/* Ambergauge site. One light theme by decision (Tenis, 2026-10-01: "everything light").
   Tokens: ivory and charcoal from the v7 handoff; amber lives only in the mark. */

@font-face {
  font-family: "Jost";
  src: url("/assets/fonts/Jost-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #F5F2EB;      /* warm ivory, the brand ground */
  --paper-2: #ECE7DC;    /* one tonal step */
  --ink: #201D1B;        /* charcoal, 15.0:1 on paper */
  --muted: #5C554E;      /* 6.6:1 on paper */
  --hair: rgb(32 29 27 / 0.16);
  --stone: #3A322B;
  --amber: #C2711F;      /* the mark's amber; never used for text */

  --sans: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  --s7: 48px; --s8: 64px; --s9: 96px; --s10: 128px;

  --gutter: 16px;
  --max: 1180px;
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1240px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--sans);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; height: auto; }
::selection { background: rgb(194 113 31 / 0.25); }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); z-index: 10;
}
.skip:focus { top: var(--s2); }

.wrap { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- type */
h1, h2, h3 { font-weight: 400; margin: 0; text-wrap: balance; }
h1 { font-size: 36px; line-height: 1.12; letter-spacing: -0.01em; }
h2 { font-size: 28px; line-height: 1.18; letter-spacing: -0.005em; }
h3 { font-size: 20px; line-height: 1.35; font-weight: 500; }
@media (min-width: 768px) {
  h1 { font-size: 52px; line-height: 1.08; }
  h2 { font-size: 36px; line-height: 1.15; }
}
p { margin: 0 0 var(--s4); max-width: 64ch; }
.lead { font-size: 20px; line-height: 1.5; max-width: 52ch; }
@media (min-width: 768px) { .lead { font-size: 22px; } }
.muted { color: var(--muted); }
.small { font-size: 16px; }
.mono { font-family: var(--mono); font-size: 15px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- header */
.site-header { padding: var(--s5) 0 var(--s4); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s6); }
.brand { display: block; text-decoration: none; }
.lockup { width: 262px; height: auto; }            /* A = 48 px high: two-tone, master gutters */
.lockup--home { width: 100%; }                      /* A ~ 110 px desktop, ~ 64 px at 390 */
.home .brand { flex: 0 0 auto; width: min(640px, 100%); }
@media (max-width: 767px) { .home .brand { flex: none; width: 100%; } }
.home .header-row { align-items: flex-start; }
.home .site-header { padding-top: var(--s6); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.site-nav a {
  display: inline-block; padding: var(--s3) 0; font-size: 17px; text-decoration: none;
  border-bottom: 1px solid transparent; line-height: 1.3;
}
.site-nav a:hover { border-bottom-color: var(--ink); }
.site-nav a[aria-current="page"] { font-weight: 500; border-bottom: 2px solid var(--ink); }
@media (max-width: 767px) {
  .header-row { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .site-nav ul { gap: 0 var(--s5); }
  .site-nav a { padding: 12px 0; }
}
@media (min-width: 768px) {
  .home .site-nav { padding-top: 0; margin-top: 66px; } /* nav centre on the wordmark centre line */
}

/* ---------------------------------------------------------------- sections */
.section { padding: var(--s8) 0; }
.section + .section { border-top: 1px solid var(--hair); }
@media (min-width: 768px) { .section { padding: var(--s9) 0; } }
.section--tight { padding-top: var(--s6); }
.section--quiet { background: var(--paper-2); border-top: 0 !important; }
.section-head { margin-bottom: var(--s6); }
.section-head p { margin-top: var(--s4); }

.grid { display: grid; gap: var(--s6); }
@media (min-width: 900px) {
  .grid--hero { grid-template-columns: 7fr 5fr; align-items: center; gap: var(--s8); }
  .grid--split { grid-template-columns: 5fr 7fr; gap: var(--s8); }
  .grid--feature { grid-template-columns: 6fr 6fr; gap: var(--s8); align-items: start; }
  .grid--2 { grid-template-columns: 1fr 1fr; gap: var(--s7) var(--s8); }
}

/* ---------------------------------------------------------------- hero */
.hero { padding: var(--s7) 0 var(--s8); }
@media (min-width: 768px) { .hero { padding: var(--s8) 0 var(--s9); } }
.hero h1 { max-width: 15em; }
.hero .lead { margin-top: var(--s5); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); margin-top: var(--s6); }

.button {
  display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none;
  font: 500 17px/1.2 var(--sans); padding: 15px 24px; border: 1px solid var(--ink);
  min-height: 48px;
}
.button:hover { background: #3a3532; }
.button:active { transform: translateY(1px); }
.textlink { font-size: 17px; padding: var(--s3) 0; display: inline-block; }

figure { margin: 0; }
figcaption { margin-top: var(--s3); font-size: 15px; line-height: 1.45; color: var(--muted); max-width: 52ch; }
/* CAD renders are colour-corrected so their ground is the page ivory (see README) */
.media { background: var(--paper); }


/* ---------------------------------------------------------------- facts */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.facts li {
  display: grid; gap: var(--s1) var(--s6); padding: var(--s4) 0; border-bottom: 1px solid var(--hair);
}
@media (min-width: 768px) { .facts li { grid-template-columns: 15em 1fr; padding: var(--s5) 0; } }
.facts strong { font-weight: 500; }
.facts span { color: var(--muted); }

dl.spec { margin: var(--s5) 0 0; display: grid; grid-template-columns: minmax(7.5em, auto) 1fr; border-top: 1px solid var(--hair); }
dl.spec dt, dl.spec dd { margin: 0; padding: var(--s3) 0; border-bottom: 1px solid var(--hair); }
dl.spec dt { color: var(--muted); font-size: 16px; padding-right: var(--s5); }
dl.spec dd { font-family: var(--mono); font-size: 15px; }

/* ---------------------------------------------------------------- prices */
.price-block { border-top: 2px solid var(--ink); padding-top: var(--s5); }
.price { font-size: 36px; line-height: 1.1; letter-spacing: -0.01em; margin: var(--s3) 0 var(--s2); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .price { font-size: 44px; } }
.price-note { color: var(--muted); font-size: 16px; }
.price-words { font-size: 22px; line-height: 1.3; margin: var(--s4) 0 var(--s2); }

.service { padding: var(--s7) 0; border-top: 1px solid var(--hair); }
.service:first-of-type { border-top: 0; padding-top: 0; }
.service h2 { margin-bottom: var(--s3); }
.service h3 { margin: var(--s5) 0 var(--s2); }
.service ul { margin: 0; padding-left: 1.1em; max-width: 64ch; }
.service li { margin-bottom: var(--s2); }
.method { width: 100%; border-collapse: collapse; margin-top: var(--s4); font-size: 16px; }
.method th, .method td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--hair); }
.method th { font-weight: 500; width: 34%; }

/* ---------------------------------------------------------------- steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { display: grid; gap: var(--s2) var(--s6); padding: var(--s6) 0; border-top: 1px solid var(--hair); counter-increment: step; }
@media (min-width: 768px) { .steps > li { grid-template-columns: 18em 1fr; } }
.steps h3::before { content: counter(step); display: inline-block; min-width: 1.4em; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 22px; font-weight: 400; }
.steps p:last-child { margin-bottom: 0; }
.steps .out { color: var(--muted); }

/* ---------------------------------------------------------------- work */
.case-link { display: grid; gap: var(--s5); text-decoration: none; }
@media (min-width: 900px) { .case-link { grid-template-columns: 5fr 7fr; gap: var(--s8); align-items: center; } }
.case-link h2, .case-link h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
.case-link:hover h2, .case-link:hover h3 { text-decoration-thickness: 2px; }
.status { font-size: 16px; color: var(--muted); margin-bottom: var(--s3); }

table.data { width: 100%; border-collapse: collapse; font-size: 16px; margin: var(--s4) 0 var(--s5); }
table.data caption { text-align: left; font-weight: 500; padding-bottom: var(--s3); }
table.data th, table.data td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4) var(--s3) 0; border-bottom: 1px solid var(--hair); }
table.data thead th { font-weight: 500; color: var(--muted); font-size: 15px; border-bottom-color: var(--ink); }
table.data td.r, table.data th.r { text-align: right; padding-right: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; }
/* phone: tables become stacked rows, no sideways scrolling */
@media (max-width: 599px) {
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.data tr { display: grid; grid-template-columns: 2.5em 1fr; gap: var(--s1) 0; padding: var(--s3) 0; border-bottom: 1px solid var(--hair); }
  table.data td { display: block; padding: 0; border: 0; }
  table.data--rev td:nth-child(3) { grid-column: 2; color: var(--muted); }
  table.data--res tr { grid-template-columns: 1fr auto; gap: var(--s1) var(--s4); }
  table.data--res td:first-child { grid-column: 1 / -1; }
  table.data--res td.r { text-align: left; white-space: normal; }
  table.data--res td.r + td.r { text-align: right; color: var(--muted); }
}
.label { font-family: var(--mono); font-size: 14px; color: var(--muted); }

.prose h2 { margin: var(--s8) 0 var(--s4); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: var(--s6) 0 var(--s3); }
.prose figure { margin: var(--s6) 0; }

.breadcrumb { font-size: 16px; color: var(--muted); margin-bottom: var(--s5); }
.breadcrumb a { color: var(--muted); }
.page-head { padding-top: var(--s7); padding-bottom: var(--s7); }
@media (min-width: 768px) { .page-head { padding-top: var(--s8); padding-bottom: var(--s8); } }
.page-head .lead { margin-top: var(--s5); }

.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--hair); }
.contact-list li { display: grid; gap: var(--s1) var(--s6); padding: var(--s5) 0; border-bottom: 1px solid var(--hair); }
@media (min-width: 768px) { .contact-list li { grid-template-columns: 10em 1fr; } }
.contact-list .k { color: var(--muted); }
.contact-list .v { font-size: 22px; }

.close { padding: var(--s9) 0; }
.close h2 { max-width: 18em; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--hair); padding: var(--s7) 0 var(--s8); font-size: 16px; }
.footer-grid { display: grid; gap: var(--s4) var(--s6); }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1fr auto; } .footer-note { grid-column: 1 / -1; } }
.footer-line { margin: 0; padding: 12px 0; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.footer-contact a { display: inline-block; padding: 12px 0; }
.footer-contact { align-items: center; }
.footer-note { margin: 0; color: var(--muted); }

/* ---------------------------------------------------------------- motion */
.ag-m, .ag-frag { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-nav, .skip { display: none; }
  body { background: #fff; }
}

/* ---------------------------------------------------------------- utilities */
.mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); }
.mt-7 { margin-top: var(--s7); }
dl.spec--text dd { font-family: var(--sans); font-size: 17px; padding-top: var(--s3); }
.method caption { text-align: left; padding-bottom: var(--s2); }
table.data--rev { table-layout: fixed; }
table.data--rev th:first-child, table.data--rev td:first-child { width: 3.5em; }
table.data--rev th:nth-child(2), table.data--rev td:nth-child(2) { width: 48%; }
.case-hero img { max-height: 560px; width: auto; justify-self: center; }
