/* =========================================================================
   HALDEN — corporate site
   Concept: "The Specimen Book" — a technical manual made of hairline rules,
   oversized grotesque display, serif prose, and one restrained cobalt accent.
   ========================================================================= */

/* --- 1. Tokens --------------------------------------------------------- */

:root {
  /* Paper & ink */
  --paper: #f5f6f6;
  --paper-raised: #ffffff;
  --paper-sunk: #eceeef;
  --ink: #14171a;
  --ink-muted: #5b6266;
  --ink-faint: #8b9296;
  --rule: #d7dbdd;
  --rule-strong: #14171a;

  /* One accent, used sparingly */
  --accent: #1b2fd4;
  --accent-ink: #ffffff;
  --accent-wash: rgba(27, 47, 212, 0.07);

  /* Type families */
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Type scale (fluid) */
  --t-display: clamp(2.9rem, 1.1rem + 6.4vw, 7.5rem);
  --t-h2: clamp(2rem, 1.05rem + 3.3vw, 3.9rem);
  --t-h3: clamp(1.35rem, 1.05rem + 1.15vw, 1.95rem);
  --t-h4: clamp(1.1rem, 1rem + 0.42vw, 1.3rem);
  --t-lede: clamp(1.1rem, 1rem + 0.5vw, 1.5rem);
  --t-body: clamp(1rem, 0.965rem + 0.17vw, 1.11rem);
  --t-small: 0.9375rem;
  --t-meta: 0.75rem;

  /* Space */
  --shell: 82.5rem;
  --gutter: clamp(1.15rem, 0.5rem + 2.4vw, 2.75rem);
  --section-y: clamp(4.5rem, 2rem + 9vw, 9.5rem);
  --stack: clamp(1.1rem, 0.8rem + 1.1vw, 1.75rem);
  --tick: 0.5rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 620ms;

  /* Hairlines */
  --hair: 1px solid var(--rule);
  --hair-dark: 1px solid var(--rule-strong);
}

/* --- 2. Reset ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--t-body);
  line-height: 1.62;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  /* Faint registration texture — a printed sheet, not a gradient wash */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.5;
  background-image: linear-gradient(
      to right,
      rgba(20, 23, 26, 0.022) 1px,
      transparent 1px
    );
  background-size: 6.5rem 100%;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: var(--t-meta);
}

.skip:focus {
  left: 0.75rem;
  top: 0.75rem;
}

/* --- 3. Layout primitives ---------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--wide {
  max-width: 96rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

.section + .section {
  border-top: var(--hair);
}

.section--sunk {
  background: var(--paper-sunk);
}

.section--raised {
  background: var(--paper-raised);
}

.section--flush {
  padding-block: 0;
}

/* Column spans.
   These set grid-column-END only, so an element can also carry a .from-N
   offset that sets grid-column-START. Using the `grid-column` shorthand here
   would reset the start line and collapse the column to a single track. */
.c-3 { grid-column-end: span 3; }
.c-4 { grid-column-end: span 4; }
.c-5 { grid-column-end: span 5; }
.c-6 { grid-column-end: span 6; }
.c-7 { grid-column-end: span 7; }
.c-8 { grid-column-end: span 8; }
.c-9 { grid-column-end: span 9; }
.c-12 { grid-column-end: span 12; }

.from-4 { grid-column-start: 4; }
.from-5 { grid-column-start: 5; }
.from-6 { grid-column-start: 6; }
.from-7 { grid-column-start: 7; }
.from-8 { grid-column-start: 8; }
.from-9 { grid-column-start: 9; }

/* The editorial grid is a wide-screen device. Below the tablet breakpoint
   every column spans the full width and offset starts are dropped, so
   text never gets squeezed into a third of a phone screen. */
@media (max-width: 720px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .c-3,
  .c-4,
  .c-5,
  .c-6,
  .c-7,
  .c-8,
  .c-9,
  .c-12,
  .c-md-6,
  .c-md-12 {
    grid-column: 1 / -1;
  }

  .from-4,
  .from-5,
  .from-6,
  .from-7,
  .from-8,
  .from-9,
  .from-md-5,
  .from-md-6 {
    grid-column-start: 1;
  }
}

/* --- 4. Running-head spine (the memorable device) ---------------------- */

.spine {
  position: fixed;
  left: clamp(0.85rem, 0.2rem + 1.1vw, 1.6rem);
  top: 50%;
  translate: 0 -50%;
  z-index: 30;
  display: none;
  align-items: center;
  gap: 0.85rem;
  pointer-events: none;
}

@media (min-width: 1180px) {
  .spine {
    display: flex;
  }
}

.spine__mark {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  color: var(--ink);
}

.spine__rule {
  position: relative;
  width: 1px;
  height: 14rem;
  background: var(--rule);
}

.spine__fill {
  position: absolute;
  inset: 0 0 auto;
  width: 1px;
  height: 0%;
  background: var(--accent);
  transition: height 120ms linear;
}

.spine__chapter {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-muted);
  writing-mode: vertical-rl;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

/* --- 5. Typography ------------------------------------------------------ */

.display {
  font-family: var(--sans);
  font-size: var(--t-display);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.display--tight {
  line-height: 0.87;
}

.h2 {
  font-family: var(--sans);
  font-size: var(--t-h2);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--sans);
  font-size: var(--t-h3);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.h4 {
  font-family: var(--sans);
  font-size: var(--t-h4);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.012em;
}

.lede {
  font-size: var(--t-lede);
  line-height: 1.48;
  color: var(--ink);
  max-width: 34ch;
  text-wrap: pretty;
}

.prose {
  max-width: 68ch;
  color: var(--ink-muted);
  text-wrap: pretty;
}

.prose + .prose {
  margin-top: 1.1em;
}

.prose strong {
  color: var(--ink);
  font-weight: 500;
}

/* Metadata — used only where it carries real information */
.meta {
  font-family: var(--mono);
  font-size: var(--t-meta);
  line-height: 1.55;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.meta--ink {
  color: var(--ink);
}

.meta--accent {
  color: var(--accent);
}

.meta-key {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.meta-list {
  display: grid;
  gap: 0.55rem;
}

.meta-list > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: var(--hair);
  padding-bottom: 0.55rem;
}

.meta-list dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.1rem;
}

.meta-list dd {
  font-family: var(--mono);
  font-size: var(--t-meta);
  text-align: right;
}

.kicker {
  /* A small line that sets up the display type — used once, in the hero */
  font-family: var(--sans);
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.1rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink-muted);
  line-height: 1.35;
}

.measure-narrow {
  max-width: 46ch;
}

.measure {
  max-width: 58ch;
}

/* --- 6. Rules & markers ------------------------------------------------- */

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.rule--dark {
  background: var(--ink);
}

.tick {
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
}

/* Section number that genuinely labels a position in the document */
.sec-no {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-faint);
  display: block;
  padding-top: 0.45rem;
}

/* --- 7. Header / nav ---------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: var(--hair);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
}

.wordmark__dot {
  width: 0.4rem;
  height: 0.4rem;
  background: var(--accent);
  translate: 0 -0.1rem;
}

.wordmark__sub {
  font-family: var(--mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.4rem + 1.4vw, 2.1rem);
}

.nav a {
  position: relative;
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-muted);
  padding-block: 0.35rem;
  transition: color 180ms var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: currentColor;
  scale: 0 1;
  transform-origin: left;
  transition: scale 260ms var(--ease);
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--ink);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  scale: 1 1;
}

.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"]::after {
  scale: 1 1;
  background: var(--accent);
}

.nav__cta {
  border: var(--hair-dark);
  border-radius: 2px;
  padding: 0.5rem 0.95rem;
  color: var(--ink) !important;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

.nav__cta::after {
  display: none;
}

.nav__cta:hover,
.nav__cta:focus-visible {
  background: var(--ink);
  color: var(--paper) !important;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: var(--hair-dark);
  border-radius: 2px;
  padding: 0.45rem 0.7rem;
  font-family: var(--mono);
  font-size: var(--t-meta);
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper-raised);
    border-bottom: var(--hair-dark);
    padding: 0.5rem var(--gutter) 1.25rem;
    display: none;
  }

  .nav[data-open="true"] {
    display: flex;
  }

  .nav a {
    padding-block: 0.8rem;
    border-bottom: var(--hair);
    font-size: 1rem;
  }

  .nav a::after {
    display: none;
  }

  .nav__cta {
    margin-top: 1rem;
    text-align: center;
  }
}

/* --- 8. Buttons & links ------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 1.35rem;
  border: var(--hair-dark);
  border-radius: 2px;
  background: transparent;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: -0.005em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 240ms var(--ease), border-color 240ms var(--ease);
}

/* The rule extends on hover instead of a decorative arrow glyph */
.btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  scale: 0 1;
  transform-origin: left;
  transition: scale 340ms var(--ease);
}

.btn:hover::after,
.btn:focus-visible::after {
  scale: 1 1;
}

.btn--solid {
  background: var(--ink);
  color: var(--paper);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  color: var(--paper);
}

.btn--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--accent:hover,
.btn--accent:focus-visible {
  color: var(--accent-ink);
}

/* Text link whose underline draws in on hover */
.link {
  position: relative;
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 550;
  padding-bottom: 2px;
}

.link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  scale: 1 1;
  transform-origin: right;
  transition: scale 300ms var(--ease);
}

.link:hover::after,
.link:focus-visible::after {
  scale: 0 1;
}

.link--accent {
  color: var(--accent);
}

/* --- 9. Hero ------------------------------------------------------------ */

.hero {
  padding-top: clamp(3.5rem, 2rem + 7vw, 7rem);
  padding-bottom: clamp(3rem, 1.5rem + 6vw, 6rem);
  position: relative;
}

.hero__grid {
  align-items: end;
  row-gap: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.hero__display {
  margin-top: 1.6rem;
}

/* The typographic moment: one line set at a smaller size, same family,
   so the composition has internal scale contrast rather than one
   italicised word. */
.hero__display span {
  display: block;
}

.hero__display .hero__sub-line {
  font-size: 0.29em;
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.06;
  color: var(--ink-muted);
  margin-top: 0.55em;
  max-width: 22ch;
}

.hero__aside {
  display: grid;
  gap: 1.5rem;
  align-content: end;
  padding-bottom: 0.35rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__index {
  margin-top: clamp(3rem, 1.5rem + 5vw, 5.5rem);
  border-top: var(--hair-dark);
}

.index-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding-block: 1.15rem;
  border-bottom: var(--hair);
  position: relative;
}

@media (min-width: 700px) {
  .index-row {
    /* Name gets a real measure of its own, then the description, then the
       duration. A narrow first column let long names collide with the copy. */
    grid-template-columns: minmax(9rem, 15rem) minmax(0, 1fr) 9rem 1.5rem;
    align-items: baseline;
    gap: 1.5rem;
  }
}

.index-row__name {
  font-family: var(--sans);
  font-size: var(--t-h4);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.index-row__desc {
  font-size: var(--t-small);
  color: var(--ink-muted);
  max-width: 48ch;
}

.index-row__meta {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-faint);
}

.index-row__mark {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: background 260ms var(--ease);
}

a.index-row:hover .index-row__mark,
a.index-row:focus-visible .index-row__mark {
  background: var(--paper-raised);
}

.index-row:hover .index-row__name,
.index-row:focus-visible .index-row__name {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

/* --- 10. Capability rows (editorial, not cards) ------------------------ */

.cap {
  display: grid;
  gap: 1.1rem;
  padding-block: clamp(1.75rem, 1rem + 2.5vw, 2.75rem);
  border-top: var(--hair);
  position: relative;
}

@media (min-width: 820px) {
  .cap {
    grid-template-columns: 4.5rem minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--gutter);
    align-items: start;
  }
}

.cap__body {
  display: grid;
  gap: 0.85rem;
}

.cap__delivers {
  display: grid;
  gap: 0.4rem;
  font-size: var(--t-small);
  color: var(--ink-muted);
}

.cap__delivers li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
}

.cap__delivers li::before {
  content: "";
  flex: none;
  width: 0.5rem;
  height: 1px;
  background: var(--rule-strong);
  translate: 0 -0.35em;
}

/* --- 11. Case studies --------------------------------------------------- */

.case {
  padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
  border-top: var(--hair-dark);
  display: grid;
  gap: clamp(1.75rem, 1rem + 3vw, 3rem);
}

@media (min-width: 900px) {
  .case {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
    align-items: center;
  }

  .case:nth-of-type(even) .case__frame {
    order: -1;
  }
}

.case__text {
  display: grid;
  gap: 1.1rem;
  align-content: center;
}

.case__title {
  font-family: var(--sans);
  font-size: clamp(1.6rem, 1rem + 2.4vw, 2.9rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.028em;
}

.case__facts {
  display: grid;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-muted);
  border-top: var(--hair);
  padding-top: 0.9rem;
}

.case__facts > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.case__facts dt {
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
}

.case__facts dd {
  text-align: right;
}

.case__result {
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
}

/* --- 12. Rendered interface mockups (real, not stock imagery) ---------- */

.frame {
  border: var(--hair-dark);
  border-radius: 3px;
  background: var(--paper-raised);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(20, 23, 26, 0.04);
}

.frame__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-bottom: var(--hair);
  background: var(--paper-sunk);
}

.frame__dots {
  display: flex;
  gap: 0.28rem;
}

.frame__dots i {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--rule);
}

.frame__url {
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-faint);
  background: var(--paper-raised);
  border: var(--hair);
  border-radius: 2px;
  padding: 0.15rem 0.5rem;
  margin-inline: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frame__body {
  font-size: 0.75rem;
  line-height: 1.4;
}

.frame__pad {
  padding: clamp(0.9rem, 0.5rem + 1.6vw, 1.6rem);
}

/* Storefront mock */
.shop__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.85rem;
  border-bottom: var(--hair);
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.shop__nav span:not(.shop__logo) {
  color: var(--ink-faint);
  font-weight: 500;
}

.shop__logo {
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.625rem;
}

.shop__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

@media (max-width: 460px) {
  .shop__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop__card {
  border: var(--hair);
  border-radius: 2px;
  overflow: hidden;
}

.shop__thumb {
  aspect-ratio: 4 / 3;
  background: var(--paper-sunk);
  position: relative;
  overflow: hidden;
}

.shop__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    115deg,
    rgba(20, 23, 26, 0.09) 0 1px,
    transparent 1px 7px
  );
}

.shop__card:nth-child(1) .shop__thumb { background: #dfe4e6; }
.shop__card:nth-child(2) .shop__thumb { background: #e7e2d9; }
.shop__card:nth-child(3) .shop__thumb { background: #d9e0e4; }
.shop__card:nth-child(4) .shop__thumb { background: #e4e4e0; }

.shop__cap {
  padding: 0.4rem 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.625rem;
}

.shop__cap b {
  font-weight: 600;
}

.shop__cap span {
  font-family: var(--mono);
  font-size: 0.5625rem;
  color: var(--ink-faint);
}

.shop__bar {
  margin-top: 1rem;
  height: 0.35rem;
  background: var(--paper-sunk);
  border-radius: 99px;
  overflow: hidden;
}

.shop__bar i {
  display: block;
  height: 100%;
  width: 62%;
  background: var(--accent);
}

/* Console / dashboard mock */
.console__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: var(--hair);
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
}

.console__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.console__live::before {
  content: "";
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: #1f9d55;
}

.console__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-block: 0.9rem;
}

.console__tile {
  border: var(--hair);
  border-radius: 2px;
  padding: 0.5rem;
}

.console__tile b {
  display: block;
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.console__tile span {
  font-family: var(--mono);
  font-size: 0.5rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.console__spark {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 1.5rem;
  margin-top: 0.4rem;
}

.console__spark i {
  flex: 1;
  background: var(--rule);
}

.console__spark i.hi {
  background: var(--accent);
}

.console__table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.5625rem;
}

.console__table th {
  text-align: left;
  font-weight: 400;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-bottom: 0.4rem;
  border-bottom: var(--hair);
}

.console__table td {
  padding-block: 0.4rem;
  border-bottom: var(--hair);
  color: var(--ink-muted);
}

.console__table td:last-child,
.console__table th:last-child {
  text-align: right;
}

.console__tag {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 2px;
  border: var(--hair);
  font-size: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.console__tag[data-state="hold"] {
  border-color: rgba(191, 106, 12, 0.4);
  color: #a2620c;
}

.console__tag[data-state="ok"] {
  border-color: rgba(31, 157, 85, 0.35);
  color: #1a7a44;
}

/* Docs mock */
.docs__side {
  display: flex;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: var(--hair);
  margin-bottom: 0.9rem;
  font-family: var(--sans);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.docs__side b {
  color: var(--ink);
}

.docs__code {
  border: var(--hair);
  border-radius: 2px;
  background: #14171a;
  padding: 0.7rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.5625rem;
  line-height: 1.75;
  color: #c7ced1;
  overflow-x: auto;
}

.docs__code .k { color: #7f9bff; }
.docs__code .s { color: #86d39b; }
.docs__code .c { color: #6b7276; }

.docs__note {
  margin-top: 0.8rem;
  padding: 0.55rem 0.7rem;
  background: var(--accent-wash);
  border-left: 2px solid var(--accent);
  font-size: 0.625rem;
  color: var(--ink-muted);
  border-radius: 0 2px 2px 0;
}

/* --- 13. Ledger (proof, as a table rather than a stats bar) ------------- */

.ledger {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger caption {
  text-align: left;
  font-size: var(--t-small);
  color: var(--ink-muted);
  padding-bottom: 1.25rem;
  max-width: 52ch;
}

.ledger th,
.ledger td {
  text-align: left;
  padding: 1.05rem 1.25rem 1.05rem 0;
  border-top: var(--hair);
  vertical-align: baseline;
}

.ledger thead th {
  border-top: var(--hair-dark);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.ledger tbody th {
  font-family: var(--sans);
  font-size: var(--t-h4);
  font-weight: 600;
  letter-spacing: -0.015em;
  width: 34%;
}

/* table-layout is fixed, so the three columns need their widths stated or
   the figures get clipped by the measure column. */
.ledger th:nth-child(1),
.ledger td:nth-child(1) {
  width: 30%;
}

.ledger th:nth-child(2),
.ledger td:nth-child(2) {
  width: 24%;
}

.ledger tbody td {
  font-size: var(--t-small);
  color: var(--ink-muted);
}

.ledger .num {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 0.95rem + 1.5vw, 2.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--ink);
  overflow-wrap: break-word;
}

/* Figures like "6 wks -> 4 days" are the widest cells in the ledger, so the
   measure column yields before the numbers do. */
@media (max-width: 900px) {
  .ledger th:nth-child(1),
  .ledger td:nth-child(1) {
    width: 38%;
  }

  .ledger th:nth-child(2),
  .ledger td:nth-child(2) {
    width: 28%;
  }
}

@media (max-width: 700px) {
  .ledger {
    table-layout: auto;
  }

  .ledger thead {
    display: none;
  }

  .ledger tbody th,
  .ledger tbody td {
    display: block;
    width: auto;
    padding-right: 0;
  }

  .ledger tbody th {
    padding-top: 1.4rem;
  }

  .ledger tbody td {
    border-top: 0;
    padding-top: 0.3rem;
  }
}

/* --- 14. Process (a real sequence — numbering is earned here) ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
  border-top: var(--hair);
}

.step {
  counter-increment: step;
  display: grid;
  gap: 0.6rem 1.5rem;
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  border-bottom: var(--hair);
  position: relative;
}

@media (min-width: 820px) {
  .step {
    grid-template-columns: 4.5rem 15rem minmax(0, 1fr);
    align-items: baseline;
  }
}

.step__no {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--accent);
}

.step__no::before {
  content: "0" counter(step);
}

.step__name {
  font-family: var(--sans);
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.step__when {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-faint);
  grid-column: 2;
}

@media (min-width: 820px) {
  .step__when {
    grid-column: 1;
    grid-row: 2;
  }

  .step__copy {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}

.step__copy {
  font-size: var(--t-small);
  color: var(--ink-muted);
  max-width: 52ch;
}

.step__out {
  grid-column: 2 / -1;
  margin-top: 0.35rem;
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink);
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
}

.step__out::before {
  content: "";
  flex: none;
  width: 1.1rem;
  height: 1px;
  background: var(--accent);
}

/* --- 15. People --------------------------------------------------------- */

.people {
  display: grid;
  gap: var(--gutter);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 760px) {
  .people {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.person {
  display: grid;
  gap: 0.75rem;
}

.person__mark {
  aspect-ratio: 1;
  border: var(--hair);
  border-radius: 2px;
  background: var(--paper-raised);
  display: grid;
  place-items: center;
  font-family: var(--sans);
  font-size: clamp(1.1rem, 0.7rem + 1.4vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.person__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(20, 23, 26, 0.07) 0 1px,
    transparent 1px 9px
  );
}

.person__name {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.012em;
}

.person__role {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}

/* --- 16. Quotes --------------------------------------------------------- */

.pullquote {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 860px) {
  .pullquote {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 5rem);
    align-items: end;
  }
}

.pullquote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1rem + 1.7vw, 2.35rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.pullquote figcaption {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-muted);
  border-top: var(--hair);
  padding-top: 0.85rem;
}

/* --- 17. Forms ---------------------------------------------------------- */

.form {
  display: grid;
  gap: 1.5rem;
  max-width: 44rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field > label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--paper-raised);
  border: var(--hair-dark);
  border-radius: 2px;
  padding: 0.8rem 0.9rem;
  font-family: var(--serif);
  font-size: 1rem;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}

.field textarea {
  min-height: 9.5rem;
  resize: vertical;
  line-height: 1.6;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-faint);
}

.field input:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--ink-faint);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea {
  border-color: #a62f1c;
}

.field__hint,
.field__error {
  font-family: var(--mono);
  font-size: 0.6875rem;
  line-height: 1.5;
}

.field__hint {
  color: var(--ink-faint);
}

.field__error {
  color: #a62f1c;
}

.field__error:empty {
  display: none;
}

.form__row {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 620px) {
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.checkbox {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 0.75rem;
  align-items: start;
}

.checkbox .field__error {
  grid-column: 2;
}

.checkbox input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0.28rem 0 0;
  accent-color: var(--accent);
  flex: none;
}

.checkbox label {
  font-size: var(--t-small);
  color: var(--ink-muted);
  line-height: 1.5;
}

.form-status {
  border: var(--hair-dark);
  border-radius: 2px;
  padding: 1rem 1.1rem;
  background: var(--paper-raised);
  display: none;
  gap: 0.5rem;
}

.form-status[data-visible="true"] {
  display: grid;
}

.form-status strong {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
}

.form-status p {
  font-size: var(--t-small);
  color: var(--ink-muted);
}

.form-status[data-tone="error"] {
  border-color: #a62f1c;
}

/* --- 18. Contact details ------------------------------------------------ */

.contact-list {
  display: grid;
  gap: 1.5rem;
  min-width: 0;
}

.contact-row {
  display: grid;
  gap: 0.3rem;
  padding-bottom: 1.1rem;
  border-bottom: var(--hair);
  min-width: 0;
}

.contact-row a {
  font-family: var(--sans);
  font-size: var(--t-h4);
  font-weight: 600;
  letter-spacing: -0.015em;
  position: relative;
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.contact-row a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  scale: 1 1;
  transform-origin: right;
  transition: scale 280ms var(--ease);
}

.contact-row a:hover::after,
.contact-row a:focus-visible::after {
  scale: 0 1;
}

.contact-row address,
.contact-row p {
  font-style: normal;
  font-size: var(--t-small);
  color: var(--ink-muted);
  line-height: 1.55;
}

/* --- 19. Footer --------------------------------------------------------- */

.footer {
  border-top: var(--hair-dark);
  background: var(--paper-raised);
  padding-block: clamp(3rem, 2rem + 4vw, 5rem) 2rem;
}

.footer__top {
  display: grid;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 1.5rem + 4vw, 4rem);
}

@media (min-width: 860px) {
  .footer__top {
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: var(--gutter);
  }
}

.footer__statement {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.028em;
  max-width: 15ch;
}

.footer__col h3 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
}

.footer__col li + li {
  margin-top: 0.5rem;
}

.footer__col a,
.footer__col span {
  font-size: var(--t-small);
  color: var(--ink-muted);
}

.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  border-top: var(--hair);
  padding-top: 1.5rem;
}

/* --- 20. Page head (secondary pages) ----------------------------------- */

.pagehead {
  padding-top: clamp(3rem, 2rem + 5vw, 5.5rem);
  padding-bottom: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  border-bottom: var(--hair-dark);
}

.pagehead__grid {
  row-gap: 1.75rem;
  align-items: end;
}

.pagehead__lede {
  color: var(--ink-muted);
  max-width: 40ch;
  padding-bottom: 0.4rem;
}

/* --- 21. Misc ----------------------------------------------------------- */

.stack-sm { display: grid; gap: 0.85rem; }
.stack { display: grid; gap: var(--stack); }
.stack-lg { display: grid; gap: clamp(1.75rem, 1rem + 2.5vw, 3rem); }

.row-between {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.footnote {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--ink-faint);
  line-height: 1.6;
}

/* Note placeholder: site name is a stand-in and is marked as such in the
   page title, so nobody ships invented claims by accident. */
.pl-1 { padding-left: var(--gutter); }
.pl-2 { padding-left: calc(var(--gutter) * 2); }
.mt-auto { margin-top: auto; }

@media (min-width: 700px) {
  .c-md-6 { grid-column: span 6; }
  .c-md-12 { grid-column: span 12; }
  .from-md-5 { grid-column-start: 5; }
  .from-md-6 { grid-column-start: 6; }
}

/* --- 22. Motion --------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  translate: 0 1.15rem;
  transition: opacity 760ms var(--ease), translate 760ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

/* The single orchestrated page-load moment */
.hero [data-reveal] {
  transition-duration: 900ms;
}

.masked {
  display: block;
  overflow: hidden;
}

.masked > * {
  display: block;
  translate: 0 105%;
  transition: translate 900ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.masked.is-in > * {
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal],
  .masked > * {
    opacity: 1;
    translate: 0 0;
  }
}

/* --- 23. Print ---------------------------------------------------------- */

@media print {
  .masthead,
  .spine,
  .footer {
    display: none;
  }

  body {
    background: #fff;
  }
}
