/* ============================================================================
   PROVEHOUSE LLC — the "Proof House" identity, composed for a holding-company
   letterhead rather than a product page. Institutional register: a cool
   slate-and-white palette with a single deep steel-blue accent — the sober,
   acquirer-facing look of an M&A memorandum, not a warm workshop. Doubled
   trestle rules at section breaks, numbered stations, Archivo + Inter +
   Roboto Mono. Ornament is deliberately rationed — one quiet ruler-tick
   accent on the whole page, no rail apparatus, no solid ornament blocks.
   Flat, square, matte — no gradients, no glow, no glassmorphism, no purple.
   The one rounded device is the hallmark punch in the wordmark.
   (Token names — --pine etc. — are legacy slots; they now carry cool values.)
   ============================================================================ */

:root {
  --pine: #f6f8fa;
  --pine-0: #ffffff;
  --pine-2: #eaeef2;
  --pine-3: #dfe5ea;
  --ink: #12161b;
  --ink-2: #3a434e;
  --ink-3: #5f6a76;
  --ink-4: #8b96a2;
  --rule: #dce2e8;
  --rule-strong: #c3cbd4;

  --accent: #1e6f52;
  --accent-2: #175640;
  --accent-3: #17603f;
  --accent-tint: #e3f0e9;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --fs-tick: 0.62rem;
  --fs-label: 0.7rem;
  --fs-sm: 0.88rem;
  --fs-base: 1rem;
  --fs-h2: clamp(1.3rem, 2.4vw, 1.6rem);
  --fs-h1: clamp(1.9rem, 3.6vw, 2.6rem);

  --content-max: 700px;
  --wide-max: 1040px;
  --inset: clamp(1.1rem, 4vw, 4rem);

  /* The one ruler-tick device on the page — used once, quietly, in the hero
     exhibit box. Minor ticks only; no ochre major marks, low opacity. */
  --ticks-quiet: repeating-linear-gradient(to right, var(--rule-strong) 0 1px, transparent 1px 10px);

  --t-fast: 110ms ease-out;
  --t-med: 200ms ease-out;
}

/* Dark scheme: the slate/ink relationship inverted thoughtfully rather than a
   naive filter — the ground becomes a cool graphite, text becomes a soft
   off-white, and the steel-blue accent is brightened a step so it still clears
   contrast against a dark ground. */
@media (prefers-color-scheme: dark) {
  :root {
    --pine: #0f1318;
    --pine-0: #151a20;
    --pine-2: #0b0e12;
    --pine-3: #090b0f;
    --ink: #e7ecf1;
    --ink-2: #b3bcc6;
    --ink-3: #7e8894;
    --ink-4: #5a636e;
    --rule: #232a32;
    --rule-strong: #313a44;

    --accent: #43c785;
    --accent-2: #34b374;
    --accent-3: #6fd6a6;
    --accent-tint: #14293a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--pine);
  font: var(--fs-base)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.shell { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.008em; margin: 0; }
h2 { font-size: var(--fs-h2); line-height: 1.2; }
h3 { font-size: 1.05rem; line-height: 1.3; }

a { color: var(--accent-3); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
::selection { background: var(--accent-tint); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wide-max); margin: 0 auto; padding: 0 var(--inset); }
.wrap-narrow { max-width: var(--content-max); }

.dateline {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: var(--fs-label); font-weight: 500; color: var(--accent-3); margin: 0 0 0.9rem;
}

/* ============================================================================
   Wordmark — the PROVEHOUSE lettermark, with "PROVE" struck inside a hallmark
   punch: the thin bordered, slightly-rounded outline of an assay stamp, the
   mark a proof house leaves on metal that has passed. "HOUSE" sits plain
   beside it. The punch is the page's one rounded shape — everything else
   stays square. Border rides on currentColor so it inverts with the scheme.
   ============================================================================ */
.logo {
  display: inline-flex; align-items: baseline;
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.01em; color: var(--ink); line-height: 1;
  font-size: 1.4rem;
}
.logo-punch {
  display: inline-block; padding: 0.14em 0.2em 0.12em;
  border: 2px solid currentColor; border-radius: 0.16em;
  margin-right: 0.12em; line-height: 1;
}
.logo-suffix { margin-left: 0.34em; font-weight: 500; letter-spacing: 0.08em; color: var(--ink-3); font-size: 0.6em; }

/* ============================================================================
   Nav — a plain letterhead rule, no ticks, no shouting.
   ============================================================================ */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; gap: 1.6rem; align-items: center;
  padding: 0 var(--inset); height: 4rem;
  border-bottom: 2px solid var(--ink);
  background: var(--pine-0);
}
.brand { display: flex; align-items: center; margin-right: auto; color: var(--ink); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a {
  font-family: var(--mono); color: var(--ink-2); font-weight: 500;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
@media (max-width: 640px) { .nav-links { gap: 1rem; } }
@media (max-width: 480px) {
  .nav { flex-wrap: wrap; height: auto; row-gap: 0.6rem; padding: 0.8rem var(--inset) 0.9rem; }
  .nav-links { flex-basis: 100%; flex-wrap: wrap; gap: 0.5rem 0.9rem; }
  .logo { font-size: 1.1rem; }
}

/* ============================================================================
   Beams — full-bleed bands separated by a doubled trestle rule (a thick ink
   line with a hairline riding below it). This is the one recurring structural
   device kept from the product's identity; everything inside a beam is a
   single, centred, generously spaced column — no rail, no gutter, no ticks.
   ============================================================================ */
.beam { position: relative; background: var(--pine-0); padding: clamp(2.6rem, 5vw, 4rem) 0; }
.beam-alt { background: var(--pine-2); }
.beam-ground { background: var(--pine); }
.beam + .beam, .hero + .beam {
  border-top: 2px solid var(--ink);
}
.beam + .beam::before, .hero + .beam::before {
  content: ""; position: absolute; left: 0; right: 0; top: -4px; height: 1px;
  background: var(--rule-strong); pointer-events: none;
}

.station {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.14em;
  font-size: var(--fs-label); font-weight: 500; color: var(--ink-3); margin: 0 0 0.8rem;
}
.station b { color: var(--accent-3); font-weight: 700; }

.beam-header { margin-bottom: 1.8rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--rule); }
.beam-header .gloss { color: var(--ink-3); margin: 0.5rem 0 0; max-width: 46ch; font-size: 0.94rem; }

.prose { max-width: 62ch; color: var(--ink-2); margin: 0; font-size: 1.02rem; }

/* ============================================================================
   Hero — a calm masthead: a modest headline (not a shout), the pitch, two
   in-page CTAs, and an honest, quiet manifest of the portfolio (real names
   and real status only — no invented figures).
   ============================================================================ */
.hero { position: relative; background: var(--pine-0); padding: clamp(3rem, 6vw, 4.4rem) 0 clamp(2.6rem, 5vw, 3.8rem); }
.hero-grid {
  max-width: var(--wide-max); margin: 0 auto; padding: 0 var(--inset);
  display: grid; grid-template-columns: 1.3fr 1fr; column-gap: 3.5rem; align-items: start;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; row-gap: 2.2rem; }
}
.hero-lead { max-width: 46ch; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.18; letter-spacing: -0.012em; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--ink); box-shadow: inset 0 -0.09em 0 var(--accent); }
.hero-pitch { font-size: 1.02rem; color: var(--ink-2); max-width: 50ch; margin: 1.2rem 0 1.7rem; line-height: 1.65; }
.hero-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; }

.hero-aside { position: relative; border: 1px solid var(--rule-strong); background: var(--pine); padding: 1.2rem 1.3rem 1.3rem; }
.hero-aside-cap {
  font-family: var(--mono); font-size: var(--fs-tick); font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--ink-3); padding-bottom: 0.7rem;
  margin: 0 0 0.8rem; display: flex; justify-content: space-between; align-items: flex-end; gap: 0.6rem;
}
/* the one quiet tick accent on the whole page — small, low-opacity, no ochre */
.hero-aside-cap::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background-image: var(--ticks-quiet); background-size: 10px 1px; background-repeat: repeat-x; background-position: left bottom;
  opacity: 0.55;
}
.exhibit-row { display: flex; align-items: baseline; gap: 0.9rem; padding: 0.55rem 0; }
.exhibit-row + .exhibit-row { border-top: 1px solid var(--rule); }
.exhibit-label { font-family: var(--sans); font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.exhibit-figure {
  margin-left: auto; font-family: var(--mono); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--rule-strong);
  color: var(--ink-3); padding: 0.14rem 0.45rem;
}
.exhibit-figure.is-live { color: var(--accent-3); border-color: var(--accent); }
.exhibit-note { margin: 0.9rem 0 0; font-size: var(--fs-tick); color: var(--ink-4); font-family: var(--mono); letter-spacing: 0.04em; }

/* ============================================================================
   Buttons — solid, square, restrained
   ============================================================================ */
button, .btn {
  cursor: pointer; background: var(--accent); color: var(--pine-0);
  border: 1px solid var(--accent); padding: 0.6rem 1.2rem; font-size: var(--fs-sm);
  font-weight: 600; font-family: var(--display); line-height: 1.15;
  letter-spacing: 0.01em;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--pine-0); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--pine-0); border-color: var(--ink); }

/* ============================================================================
   Steps — three quiet bays for the operating principles
   ============================================================================ */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 0.4rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 0 1.8rem; border-left: 1px solid var(--rule); }
.step:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 760px) {
  .step { border-left: 0; border-top: 1px solid var(--rule); padding: 1.3rem 0; }
  .step:first-child { border-top: 0; padding-top: 0; }
}
.step-num {
  display: block; font-family: var(--mono); font-weight: 600; font-size: 1.5rem;
  color: var(--accent-3); line-height: 1; margin-bottom: 0.6rem;
  font-variant-numeric: tabular-nums;
}
.step h3 { margin-bottom: 0.4rem; }
.step p { color: var(--ink-2); margin: 0; font-size: 0.95rem; }

/* ============================================================================
   Portfolio — planed boards in a ruled frame, no shadow, no rounding
   ============================================================================ */
.portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0;
  border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule-strong);
  margin-top: 0.4rem;
}
.portfolio-card {
  display: flex; flex-direction: column; background: var(--pine-0);
  border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  padding: 1.3rem 1.4rem 1.4rem;
}
.portfolio-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.7rem; }
.portfolio-name { font-size: 1.12rem; }
.chip {
  display: inline-flex; align-items: center; border: 1px solid var(--rule-strong);
  color: var(--ink-3); background: transparent; padding: 0.16rem 0.45rem;
  font-family: var(--mono); font-size: var(--fs-tick); font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase; white-space: nowrap; flex-shrink: 0;
}
.chip-live { color: var(--accent-3); border-color: var(--accent); }
.portfolio-tagline { color: var(--ink-2); font-size: 0.95rem; margin: 0.6rem 0 0; flex: 1; }
.portfolio-card-foot { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.portfolio-link { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.01em; }
.portfolio-soon-note { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--ink-4); }

/* ============================================================================
   Footer — a plain rule, quiet close
   ============================================================================ */
.disclaimer {
  border-top: 2px solid var(--ink); color: var(--ink-3);
  font-size: 0.82rem; background: var(--pine-2); padding: 1.5rem 0 1.8rem;
}
.disclaimer p { margin: 0; font-family: var(--mono); letter-spacing: 0.02em; }

/* Footer link row — terms/privacy/support/contact, added alongside the
   copyright line. Reuses the disclaimer's mono voice and ink-3 colour rather
   than introducing a new type treatment. */
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; align-items: baseline; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.footer-links a { font-family: var(--mono); color: var(--ink-3); font-weight: 500; letter-spacing: 0.02em; }
.footer-links a:hover { color: var(--ink); }

/* ============================================================================
   Legal / support prose — long-form static content (Terms, Privacy, Support).
   Added for terms.html, privacy.html, and support.html; built entirely from
   the page's existing tokens (no new colours). No .reveal / scroll-in motion
   here on purpose — static prose must never depend on JS to become visible.
   ============================================================================ */
.legal { padding: clamp(2.6rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 4.5rem); }
.legal h1 { font-size: var(--fs-h1); line-height: 1.18; letter-spacing: -0.012em; }
.legal-updated {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: var(--fs-label); font-weight: 500; color: var(--ink-3); margin: 0.8rem 0 0.6rem;
}
.legal-related { color: var(--ink-3); font-size: 0.9rem; margin: 0 0 2.2rem; }
.legal h2 {
  font-size: 1.15rem; margin: 2.2rem 0 0.8rem; padding-top: 1.4rem;
  border-top: 1px solid var(--rule);
}
.legal h2:first-of-type { margin-top: 2.4rem; }
.legal h3 { font-size: 1rem; margin: 1.4rem 0 0.4rem; }
.legal p, .legal li { max-width: 62ch; color: var(--ink-2); font-size: 1rem; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.3rem; }
.legal li { margin: 0 0 0.4rem; }
.legal strong { color: var(--ink); font-weight: 600; }
.legal table { border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.95rem; max-width: 100%; }
.legal th, .legal td { border: 1px solid var(--rule-strong); padding: 0.5rem 0.8rem; text-align: left; }
.legal th { font-family: var(--mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }

/* ============================================================================
   Motion — restrained, letterhead-appropriate. One fade-and-rise figure (12px,
   ~400ms, ease-out, small stagger) used twice: on load for the hero, and on
   first scroll into view for section furniture (.reveal; a tiny inline
   IntersectionObserver adds .is-in — without JS, or under reduced motion,
   nothing is ever hidden). Hover moves are colour-only plus one 1px nav
   underline. No parallax, no spring, no travel beyond the 12px rise.
   ============================================================================ */

/* anchor targets clear the sticky nav when jumped to */
.hero, .beam { scroll-margin-top: 4.5rem; }

/* hover/focus polish — colour transitions and the nav underline */
a { transition: color var(--t-fast); }
.nav-links a { position: relative; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }
.portfolio-card { transition: background-color var(--t-med); }
.portfolio-card:hover { background: var(--pine); }
.exhibit-figure, .chip { transition: color var(--t-fast), border-color var(--t-fast); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .nav-links a::after { transition: transform 180ms ease-out; }

  @keyframes rise-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
  }

  /* hero — on-load rise, lead column first, manifest last */
  .hero-lead > *, .hero-aside { animation: rise-in 400ms ease-out backwards; }
  .hero-lead h1 { animation-delay: 60ms; }
  .hero-lead .hero-pitch { animation-delay: 120ms; }
  .hero-lead .hero-ctas { animation-delay: 170ms; }
  .hero-aside { animation-delay: 230ms; }

  /* scroll reveal — hidden state exists only once JS has armed it (html.js) */
  .js .reveal { opacity: 0; }
  .js .reveal.is-in { opacity: 1; animation: rise-in 420ms ease-out backwards; }
  .js .beam-header.reveal.is-in { animation-delay: 60ms; }
  .js .prose.reveal.is-in { animation-delay: 120ms; }
  .js .step.reveal.is-in:nth-child(2) { animation-delay: 70ms; }
  .js .step.reveal.is-in:nth-child(3) { animation-delay: 140ms; }
  .js .portfolio-card.reveal.is-in:nth-child(2) { animation-delay: 60ms; }
  .js .portfolio-card.reveal.is-in:nth-child(3) { animation-delay: 120ms; }
  .js .portfolio-card.reveal.is-in:nth-child(4) { animation-delay: 180ms; }
}

/* reduced motion — collapse every animation and transition, ours and the
   button/link ones above, to effectively zero */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
}
