/* Urverk — Nordic precision-mechanism. Scandinavian minimalism meets fine
   watchmaking: generous whitespace, a precise modular grid, hairline rules like
   watch-face indices, one brass accent, and one place per page where the
   mechanism comes alive. The eight palette tokens are the only hex literals in
   this file; every other colour is derived via var()/color-mix() so the palette
   guard holds. Light is the committed default; a dark theme is built from the
   same tokens under prefers-color-scheme. */

/* Self-hosted fonts — no third-party request, no render-blocking CDN, and a
   strict font-src 'self' CSP. Only the latin subset is committed (the site is
   English). Space Grotesk is the engineered display face; Inter carries body
   and UI. unicode-range copied from the Google latin @font-face blocks so glyph
   coverage is identical. */
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* --- the eight palette tokens (the only hex literals) --------------------- */
  --graphite:      #0f1113; /* dark ground / mechanism */
  --graphite-2:    #171a1d; /* raised graphite panel */
  --snow:          #f6f4ef; /* light page ground */
  --paper:         #e7e2d8; /* raised panel on light */
  --ink:           #1c1e22; /* text on snow */
  --brass:         #b98a3e; /* the one accent — indices, rules, the mechanism */
  --brass-hi:      #d8b877; /* brass highlight — jewels, hover */
  --steel:         #8b9198; /* cool grey — labels, secondary text */

  /* --- semantic tokens (light, the committed default) ----------------------- */
  --ground:  var(--snow);
  --surface: var(--paper);
  --fg:      var(--ink);
  --accent:  var(--brass);
  --accent-hi: var(--brass-hi);
  /* Brass as *text* on the page ground: full brass is only 2.8:1 on snow, so
     darken it toward ink to clear WCAG AA (5.6:1). The dark theme restores full
     brass, which already passes on graphite (6:1). Used for accent-coloured copy
     that sits on --ground, e.g. form-field error messages. */
  --accent-text: color-mix(in srgb, var(--brass) 58%, var(--ink));

  --rule:       color-mix(in srgb, var(--ink) 13%, transparent);
  --rule-brass: color-mix(in srgb, var(--brass) 50%, transparent);
  /* 64% ink keeps the muted labels clearly quieter than body copy while
     clearing WCAG AA (4.86:1 on snow); 58% read 4.0:1 and failed. */
  --label:      color-mix(in srgb, var(--ink) 64%, var(--snow));
  --body-soft:  color-mix(in srgb, var(--ink) 90%, var(--snow));

  /* The mechanism grounds — always dark, in both themes. Reassigned a touch
     lighter under dark so they still lift off the graphite page. */
  --movement:   var(--graphite);
  --movement-2: var(--graphite-2);
  --on-dark:    var(--snow);
  --on-dark-soft: color-mix(in srgb, var(--snow) 78%, var(--graphite));
  --on-dark-faint: color-mix(in srgb, var(--snow) 60%, var(--graphite));
  --rule-dark:  color-mix(in srgb, var(--snow) 15%, transparent);

  --font-display: "Space Grotesk", "SF Pro Display", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;

  /* Vertical rhythm and type scale — the whitespace is the design. */
  --measure: 66ch;
  --step-0: 1.0625rem;
  --step-1: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
  --step-2: clamp(1.35rem, 1.2rem + 0.9vw, 1.7rem);
  --step-3: clamp(1.7rem, 1.4rem + 1.6vw, 2.35rem);
  --step-4: clamp(2.3rem, 1.75rem + 2.9vw, 3.5rem);
  --step-5: clamp(2.9rem, 2rem + 4.6vw, 4.6rem);
  --step-6: clamp(3.4rem, 2.3rem + 6vw, 6rem);

  /* Motion: mechanical, never bouncy — this brand ticks, it doesn't wobble. */
  --ease-mech: cubic-bezier(0.22, 0.85, 0.24, 1);
}

/* Dark theme — rebuilt from the same tokens. The mechanism grounds lift a step
   so the dark sections still separate from the now-graphite page. */
@media (prefers-color-scheme: dark) {
  :root {
    --ground:  var(--graphite);
    --surface: var(--graphite-2);
    --fg:      var(--snow);
    --accent-text: var(--brass);  /* full brass reads 6:1 on graphite */
    --rule:       color-mix(in srgb, var(--snow) 14%, transparent);
    --rule-brass: color-mix(in srgb, var(--brass) 55%, transparent);
    --label:      color-mix(in srgb, var(--snow) 62%, var(--graphite));
    --body-soft:  color-mix(in srgb, var(--snow) 90%, var(--graphite));

    --movement:   var(--graphite-2);
    --movement-2: color-mix(in srgb, var(--graphite-2) 82%, var(--snow));
    --on-dark-soft: color-mix(in srgb, var(--snow) 80%, var(--graphite-2));
    --on-dark-faint: color-mix(in srgb, var(--snow) 62%, var(--graphite-2));
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 0 1.15em;
  max-width: var(--measure);
}

h2 + p {
  margin-top: 0.75em;
}

a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-brass);
  transition: border-color 140ms var(--ease-mech), color 140ms var(--ease-mech);
}

a:hover {
  border-bottom-color: var(--accent);
}

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

::selection {
  background: color-mix(in srgb, var(--brass) 30%, transparent);
  color: inherit;
}

/* Underline-growth: a resting hairline that a solid brass rule extends over on
   hover, like a watch hand sweeping to the mark. */
.link-grow {
  position: relative;
  display: inline-block;
  color: var(--fg);
  border-bottom: 1px solid var(--rule-brass);
}

.link-grow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 420ms var(--ease-mech);
}

.link-grow:hover::after,
.link-grow:focus-visible::after {
  transform: scaleX(1);
}

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

/* --- Layout scaffolding ------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: clamp(1.5rem, 5vw, 4rem);
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
}

/* Eyebrow: a data label, carried by a short brass index tick — the watch-face
   vocabulary that recurs across the site. */
.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--label);
  margin: 0 0 1.5rem;
}

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

.lede {
  font-size: var(--step-2);
  line-height: 1.36;
  max-width: 34ch;
  color: var(--body-soft);
}

.honesty-note {
  margin-top: clamp(2rem, 5vw, 3rem);
  max-width: 58ch;
  font-size: 0.9rem;
  color: var(--label);
}

/* --- Skip link ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 20;
  background: var(--movement);
  color: var(--on-dark);
  padding: 0.6rem 1rem;
  border: 0;
  transition: top 140ms var(--ease-mech);
}

.skip-link:focus {
  top: 1rem;
}

/* --- Header / nav ------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 0;
  color: var(--fg);
}

/* The wordmark mark — a "U" whose counter is an escape-wheel silhouette. It
   ticks into place on first load (html.js), then rests. */
.brand-mark {
  width: 1.55rem;
  height: 1.55rem;
  display: block;
  flex: none;
  color: var(--accent);
}

html.js .brand-mark .mark-wheel {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .brand-mark .mark-wheel {
    animation: mark-tick 900ms var(--ease-mech) 1 both;
  }
}

@keyframes mark-tick {
  0%   { transform: rotate(-38deg); opacity: 0; }
  60%  { opacity: 1; }
  100% { transform: rotate(0deg); opacity: 1; }
}

.brand .brand-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.16rem;
  letter-spacing: 0.02em;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.92rem;
}

/* Nav links: the underline extends from the left like a hand sweeping to the
   hour. WCAG 2.2 target size held via an inline-flex min-height box. */
.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding-block: 0.35rem;
  border-bottom: 0;
  font-weight: 500;
  color: color-mix(in srgb, var(--fg) 82%, var(--ground));
  transition: color 140ms var(--ease-mech);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.15rem;
  height: 1px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 260ms var(--ease-mech);
}

.site-nav a:hover {
  color: var(--fg);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

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

@media (max-width: 39.999rem) {
  .site-nav a {
    min-height: 2.75rem;
  }
}

/* --- Hero: the movement (the mechanism comes alive here) ---------------- */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--movement);
  color: var(--on-dark);
  border-bottom: 1px solid var(--rule-dark);
  padding-block: clamp(4rem, 10vw, 8rem);
}

/* A faint brass index ring bleeds off the top-right — the caseback edge. */
.hero::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -18%;
  width: min(48rem, 70vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--brass) 16%, transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
}

@media (min-width: 54rem) {
  .hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    min-height: min(62vh, 34rem);
  }
}

.hero-lead {
  position: relative;
  z-index: 3;
  max-width: 34rem;
}

.hero .wordmark {
  margin: 0 0 clamp(1.4rem, 3.5vw, 2rem);
}

.hero .wordmark .mark {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-6);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--on-dark);
}

.hero .wordmark .mark .k {
  color: var(--accent);
}

.hero .tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.3;
  max-width: 22ch;
  margin: 0 0 1.1rem;
  color: var(--on-dark);
}

.hero .lede {
  max-width: 40ch;
  color: var(--on-dark-soft);
}

.hero-sv {
  margin-top: clamp(1.1rem, 3vw, 1.6rem);
  max-width: 42ch;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--on-dark-faint);
}

.hero-sv .sv {
  font-family: var(--font-display);
  color: var(--accent-hi);
  letter-spacing: 0.01em;
}

/* Hero CTA with a second-hand sweep that draws around it on load. */
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: 0.85rem 1.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--on-dark);
  border: 1px solid color-mix(in srgb, var(--brass) 55%, transparent);
  border-radius: 999px;
  overflow: visible;
  transition: color 160ms var(--ease-mech), border-color 160ms var(--ease-mech);
}

.hero-cta .sweep {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  pointer-events: none;
  overflow: visible;
}

.hero-cta .sweep rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .hero-cta .sweep rect {
    stroke-dasharray: var(--peri, 600);
    stroke-dashoffset: var(--peri, 600);
    animation: sweep-draw 1.25s var(--ease-mech) 0.2s both;
  }
}

@keyframes sweep-draw {
  to { stroke-dashoffset: 0; }
}

.hero-cta .tick {
  display: inline-block;
  color: var(--accent-hi);
  transition: transform 320ms var(--ease-mech);
}

.hero-cta:hover {
  color: var(--on-dark);
  border-color: var(--accent);
}

.hero-cta:hover .tick {
  transform: rotate(90deg);
}

/* The clockwork art — a live gear train seen through the caseback. */
.hero-art {
  position: relative;
  z-index: 1;
}

@media (max-width: 53.999rem) {
  .hero-art {
    margin-top: clamp(2rem, 8vw, 3rem);
    opacity: 0.9;
  }
}

.clockwork {
  display: block;
  width: 100%;
  height: auto;
  color: var(--accent);
  overflow: visible;
}

.gear-teeth {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.gear-pitch {
  fill: none;
  stroke: color-mix(in srgb, var(--brass) 30%, transparent);
  stroke-width: 0.75;
  vector-effect: non-scaling-stroke;
}

.gear-hub {
  fill: color-mix(in srgb, var(--brass) 10%, transparent);
  stroke: var(--accent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.gear-spokes {
  fill: none;
  stroke: color-mix(in srgb, var(--brass) 55%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.gear-jewel {
  fill: var(--accent-hi);
}

/* Per-gear periods set in CSS (not inline style attrs) so the strict
   style-src 'self' CSP holds. Period is proportional to tooth count, so the
   inverse-ratio mesh is preserved: 30/18/12/15 teeth. */
.gear-a { --dur: 10.8s; }
.gear-b { --dur: 6.48s; }
.gear-c { --dur: 4.32s; }
.gear-d { --dur: 5.4s; }

.gear-spin {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  html.js .gear-spin {
    animation: gear-rotate var(--dur, 8s) linear infinite;
  }
  html.js .gear.ccw .gear-spin {
    animation-direction: reverse;
  }
  html.js .balance-spin {
    transform-box: fill-box;
    transform-origin: center;
    animation: balance-osc 2.6s var(--ease-mech) infinite;
  }
}

@keyframes gear-rotate {
  to { transform: rotate(360deg); }
}

/* The balance ticks — it swings, it does not spin. */
@keyframes balance-osc {
  0%   { transform: rotate(-15deg); }
  50%  { transform: rotate(15deg); }
  100% { transform: rotate(-15deg); }
}

.balance-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
}

.balance-arm {
  fill: none;
  stroke: color-mix(in srgb, var(--brass) 60%, transparent);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* --- Pillars ------------------------------------------------------------ */

.pillars {
  display: grid;
  gap: clamp(2.25rem, 5vw, 3.5rem);
}

@media (min-width: 52rem) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }
}

/* Each pillar hangs from a hairline index rule with a brass tick — a watch
   face's marker, reused as structure. */
.pillar {
  position: relative;
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
}

.pillar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
}

.pillar h3 {
  font-size: var(--step-2);
  margin-bottom: 0.7rem;
}

.pillar p {
  margin-bottom: 0;
  color: var(--body-soft);
}

/* --- Assay (mechanism ground) ------------------------------------------- */

.assay {
  background: var(--movement);
  color: var(--on-dark);
}

.assay .eyebrow {
  color: var(--accent-hi);
}

.assay .eyebrow::before {
  background: var(--accent-hi);
}

.assay h2 {
  font-size: var(--step-3);
  max-width: 22ch;
  margin-bottom: 1.5rem;
  color: var(--on-dark);
}

.assay p {
  color: var(--on-dark-soft);
  max-width: 62ch;
}

.assay .runs {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
}

@media (min-width: 40rem) {
  .assay .runs {
    grid-template-columns: 1fr 1fr;
  }
}

.assay .runs li {
  background: var(--movement);
  padding: 1.3rem 1.4rem;
}

.assay .runs .run-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--accent-hi);
  margin-bottom: 0.35rem;
}

.assay .runs .run-desc {
  color: var(--on-dark-soft);
  font-size: 0.95rem;
}

.assay .assay-stamp {
  margin: clamp(1.5rem, 4vw, 2rem) 0 0;
  font-size: 0.9rem;
  color: var(--on-dark-soft);
  font-variant-numeric: tabular-nums;
}

.assay .assay-stamp strong {
  color: var(--accent-hi);
  letter-spacing: 0.08em;
}

.assay .assay-stamp a {
  color: var(--accent-hi);
  border-bottom-color: transparent;
}

.assay .assay-stamp a:hover,
.assay .assay-stamp a:focus-visible {
  border-bottom-color: var(--accent-hi);
}

/* --- Comparison (editorial table, not a checkmark grid) ----------------- */

.compare h2 {
  font-size: var(--step-4);
  line-height: 1.06;
  max-width: 16ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.compare-table thead th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--label);
  vertical-align: bottom;
  padding: 0 1.5rem 0.9rem;
  border-bottom: 1px solid var(--rule);
}

.compare-corner {
  border-bottom: 1px solid var(--rule);
}

.compare-table tbody th {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg);
  vertical-align: baseline;
  white-space: nowrap;
  padding: 1.8rem 1.5rem 1.8rem 0;
  border-bottom: 1px solid var(--rule);
}

.compare-table td {
  vertical-align: baseline;
  padding: 1.8rem 1.5rem;
  border-bottom: 1px solid var(--rule);
  color: var(--label);
}

.compare-table .col-urverk {
  border-left: 1px solid var(--rule-brass);
  background: color-mix(in srgb, var(--brass) 7%, transparent);
}

.compare-table .cell-urverk {
  border-left: 1px solid var(--rule-brass);
  background: color-mix(in srgb, var(--brass) 7%, transparent);
  color: var(--body-soft);
}

@media (max-width: 39.999rem) {
  .compare-table thead {
    display: none;
  }

  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table tbody tr {
    padding-block: 1.75rem;
    border-bottom: 1px solid var(--rule);
  }

  .compare-table tbody tr:first-child {
    border-top: 1px solid var(--rule);
  }

  .compare-table tbody th {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--label);
    white-space: normal;
    padding: 0 0 1rem;
    border: 0;
  }

  .compare-table td {
    padding: 0 0 0.85rem;
    border: 0;
  }

  .compare-table td:last-child {
    padding-bottom: 0;
  }

  .compare-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--label);
    margin-bottom: 0.35rem;
  }

  .compare-table .cell-urverk {
    border-left: 2px solid var(--rule-brass);
    padding-left: 1rem;
  }

  .compare-table tbody tr:not(:first-child) td::before {
    display: none;
  }
}

/* --- Pricing ------------------------------------------------------------ */

.pricing h2 {
  font-size: var(--step-3);
  margin-bottom: 0.75rem;
}

.pricing .intro {
  color: var(--label);
  max-width: 48ch;
  margin-bottom: 3rem;
}

.tiers {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.tier {
  display: grid;
  gap: 0.35rem 2rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .tier {
    grid-template-columns: 10rem 1fr auto;
    align-items: baseline;
  }
}

.tier .tier-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
}

.tier .tier-scope {
  color: var(--label);
  margin: 0;
}

.tier .tier-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.guarantee {
  position: relative;
  margin-top: 3rem;
  padding-top: 2rem;
  max-width: 58ch;
}

.guarantee::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3rem;
  height: 2px;
  background: var(--accent);
}

.terms-restate .guarantee::before {
  height: 1px;
  background: var(--rule);
}

.guarantee .guarantee-eyebrow {
  margin-bottom: 1rem;
}

.guarantee p {
  font-size: var(--step-1);
  line-height: 1.5;
  margin-bottom: 0;
  font-variant-numeric: tabular-nums;
}

.guarantee-terms {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.terms {
  margin-top: 2.25rem;
  padding: 0;
  list-style: none;
  color: var(--label);
  max-width: 58ch;
}

.terms li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.6rem;
}

.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.8rem;
  height: 1px;
  background: var(--accent);
}

/* --- CTA ---------------------------------------------------------------- */

.cta {
  border-top: 1px solid var(--rule);
}

.cta h2 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
  max-width: 18ch;
}

.cta p {
  color: var(--label);
  margin-bottom: 2rem;
}

/* The pill button "winds" on hover: a brass fill sweeps in and the button
   settles up a hair. */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.8rem 1.7rem;
  cursor: pointer;
  transition: color 180ms var(--ease-mech), background-color 180ms var(--ease-mech),
    transform 180ms var(--ease-mech);
}

.button::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.6;
  transition: transform 320ms var(--ease-mech);
}

.button:hover {
  background: var(--accent);
  color: var(--graphite);
  transform: translateY(-1px);
}

.button:hover::after {
  transform: rotate(180deg) scale(1.15);
}

/* --- Contact structured form (progressive enhancement) ------------------ */

.contact-form-section {
  display: none;
}

html.js-contact .contact-form-section {
  display: block;
}

.contact-form-title {
  font-size: var(--step-3);
  margin-bottom: 1rem;
  max-width: 22ch;
}

.contact-form-lede {
  color: var(--label);
  max-width: 52ch;
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.contact-form .field {
  max-width: 52ch;
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--label);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.7rem 0.85rem;
  transition: border-color 160ms var(--ease-mech);
}

.contact-form input:hover,
.contact-form textarea:hover {
  border-color: var(--rule-brass);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.contact-form .field-error {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--accent-text);
}

.contact-form button {
  margin-top: 0.5rem;
}

/* --- Footer (mechanism ground) ------------------------------------------ */

.site-footer {
  flex-shrink: 0;
  background: var(--movement);
  color: var(--on-dark-soft);
  border-top: 1px solid var(--rule-dark);
}

.site-footer .wrap {
  display: flex;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  font-size: 0.9rem;
}

.site-footer .foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 0;
}

.site-footer .foot-brand .brand-mark {
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent);
}

.site-footer .foot-name {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--on-dark);
  letter-spacing: 0.02em;
}

.site-footer a:not(.foot-brand) {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  color: var(--accent-hi);
  border-bottom: 0;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 140ms var(--ease-mech), color 140ms var(--ease-mech);
}

.site-footer a:not(.foot-brand):hover {
  text-decoration-color: var(--accent-hi);
}

@media (max-width: 39.999rem) {
  .site-footer a:not(.foot-brand) {
    min-height: 2.75rem;
  }
}

.site-footer .foot-note {
  color: var(--on-dark-faint);
}

.site-footer .foot-link {
  color: var(--accent-hi);
  font-size: 0.9rem;
}

.site-footer .foot-detail {
  flex-basis: 100%;
  order: 1;
  margin: 0;
  max-width: none;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--on-dark-faint);
}

.site-footer .foot-detail .detail-motto {
  font-family: var(--font-display);
  color: var(--accent-hi);
  margin-right: 0.5rem;
}

/* --- Interior page intro ------------------------------------------------ */

.page-intro h1 {
  font-size: var(--step-4);
  line-height: 1.04;
  margin-bottom: 1.25rem;
  max-width: 18ch;
}

.page-intro .lede {
  color: var(--body-soft);
  max-width: 38ch;
}

/* --- Journal ------------------------------------------------------------ */

.journal-list {
  padding-block-start: clamp(1rem, 3vw, 2rem);
}

.piece-provenance {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--label);
}

.piece-index {
  list-style: none;
  margin: 0;
  padding: 0;
}

.piece-entry {
  position: relative;
  border-top: 1px solid var(--rule);
  padding-block: clamp(1.5rem, 4vw, 2rem);
}

.piece-entry::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
}

.piece-meta {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

.piece-title {
  margin: 0 0 0.5rem;
  font-size: var(--step-2);
  line-height: 1.2;
}

.piece-title a {
  border-bottom: 0;
}

.piece-title a:hover {
  color: var(--accent);
}

.piece-summary {
  margin: 0;
  max-width: 62ch;
  color: var(--label);
}

.piece h1 {
  font-size: var(--step-4);
  line-height: 1.08;
}

.piece h2 {
  font-size: var(--step-2);
  margin-top: 2.5rem;
}

.piece-header {
  margin-bottom: 2.5rem;
}

.piece-byline {
  font-size: 0.85rem;
  color: var(--label);
  font-variant-numeric: tabular-nums;
}

.piece code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86em;
  padding: 0.1em 0.35em;
  background: var(--surface);
  border-radius: 3px;
}

.piece ul {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
}

.piece ul li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.6rem;
}

.piece ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.8rem;
  height: 1px;
  background: var(--accent);
}

p.guarantee-fine,
p.terms-note,
.terms-block p.terms-note {
  font-size: 0.9rem;
  color: var(--label);
}

/* --- Numbered method (prose, not cards) --------------------------------- */

.method {
  list-style: none;
  counter-reset: step;
  margin: 2.5rem 0 0;
  padding: 0;
  max-width: var(--measure);
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
}

.method > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0 1.25rem;
  align-items: baseline;
}

/* The step number reads as a watch index: monospaced tabular, brass. */
.method > li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.7;
}

.method p {
  margin-bottom: 0;
  color: var(--body-soft);
}

/* --- Delivery ledger table ---------------------------------------------- */

.ledger-wrap {
  overflow-x: auto;
  margin-top: 2.5rem;
}

.ledger {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ledger th:nth-child(1) { width: 20%; }
.ledger th:nth-child(2) { width: 24%; }
.ledger th:nth-child(3) { width: 19%; }
.ledger th:nth-child(4) { width: 16%; }
.ledger th:nth-child(5) { width: 21%; }

.ledger caption {
  text-align: left;
  color: var(--label);
  margin-bottom: 1.5rem;
  max-width: 58ch;
}

.ledger th {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  border-bottom: 1px solid var(--rule-brass);
  padding: 0 1.25rem 0.75rem 0;
  vertical-align: bottom;
  white-space: nowrap;
}

.ledger td {
  padding: 1.75rem 1.25rem 1.75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--body-soft);
}

.ledger .ledger-empty {
  font-style: italic;
  max-width: 60ch;
  color: var(--label);
}

@media (max-width: 39.999rem) {
  .ledger {
    table-layout: auto;
  }
  .ledger th {
    white-space: normal;
  }
  .ledger:has(.ledger-empty) thead {
    display: none;
  }
}

/* --- Assay client view (a structural artifact, not an app mock) --------- */

.assay-view-section h2 {
  font-size: var(--step-3);
  margin-bottom: 0.9rem;
  max-width: 18ch;
}

.assay-view-section .view-intro {
  color: var(--label);
  max-width: 54ch;
  margin-bottom: 0;
}

.assay-view {
  position: relative;
  margin: clamp(2.75rem, 6vw, 4rem) 0 0;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--movement);
  color: var(--on-dark);
}

/* The index rule crosses the ground -> movement boundary at the panel's top,
   binding the intro to the artifact. */
.assay-view-joint {
  position: absolute;
  top: 0;
  left: clamp(1.75rem, 4vw, 2.75rem);
  right: clamp(1.75rem, 4vw, 2.75rem);
  width: auto;
  height: auto;
  max-height: 1.6rem;
  margin: 0;
  transform: translateY(-52%);
}

.assay-view-grid {
  display: grid;
  gap: 1px;
  background: var(--rule-dark);
  border: 1px solid var(--rule-dark);
}

@media (min-width: 40rem) {
  .assay-view-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.view-panel {
  background: var(--movement);
  padding: 1.3rem 1.4rem;
}

.view-panel .panel-label {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-hi);
  margin: 0 0 0.95rem;
}

.view-panel .panel-states {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.view-panel .panel-states li {
  position: relative;
  padding-left: 1.2rem;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--on-dark-soft);
}

.view-panel .panel-states li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.6rem;
  height: 1px;
  background: var(--accent);
}

.assay-view-caption {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--on-dark-faint);
  font-variant-numeric: tabular-nums;
}

.assay-view-caption a {
  color: var(--accent-hi);
  border-bottom-color: transparent;
}

.assay-view-caption a:hover,
.assay-view-caption a:focus-visible {
  border-bottom-color: var(--accent-hi);
}

/* --- FAQ (definition list, no disclosure gimmicks) ---------------------- */

.faq h2 {
  font-size: var(--step-3);
  max-width: 20ch;
}

.faq-joint {
  display: block;
  width: clamp(14rem, 48vw, 32rem);
  height: auto;
  max-height: 1.8rem;
  margin: 1.5rem 0 0;
}

.faq-list {
  margin: 0.75rem 0 0;
  border-top: 1px solid var(--rule);
}

.faq-item {
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 44rem) {
  .faq-item {
    display: grid;
    grid-template-columns: minmax(0, 19rem) minmax(0, 1fr);
    gap: 0 clamp(1.5rem, 4vw, 3rem);
    align-items: baseline;
  }
}

.faq-item dt {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--step-1);
  color: var(--fg);
  margin: 0 0 0.6rem;
}

@media (min-width: 44rem) {
  .faq-item dt {
    margin-bottom: 0;
  }
}

.faq-item dd {
  margin: 0;
  max-width: 54ch;
  color: var(--body-soft);
}

/* --- Guarantee terms (one idea per view) -------------------------------- */

.terms-block h2 {
  font-size: var(--step-3);
  line-height: 1.08;
  margin-bottom: 1rem;
  max-width: 24ch;
}

.terms-block p {
  margin-bottom: 0;
  max-width: 58ch;
  color: var(--body-soft);
  font-variant-numeric: tabular-nums;
}

.terms-block--accent {
  position: relative;
  background: var(--surface);
  padding-block: clamp(2.75rem, 6vw, 4.25rem);
}

.terms-joint {
  position: absolute;
  top: 0;
  left: clamp(1.5rem, 5vw, 4rem);
  right: clamp(1.5rem, 5vw, 4rem);
  width: auto;
  height: auto;
  max-height: 1.6rem;
  margin: 0;
  transform: translateY(-52%);
}

/* --- Motion: scroll reveals -------------------------------------------- */

/* Double-gated: content is fully visible by default; the hidden state exists
   ONLY inside both guards, so any browser without view() timelines (or with
   reduced motion) renders the complete static page with nothing hidden. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }

    @keyframes reveal-rise {
      from {
        opacity: 0;
        transform: translateY(18px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Progressive enhancement (JS reveal fallback) ----------------------- */

/* Fallback for browsers without scroll-driven animations. Only under
   html.js-reveal (set by reveal.js exactly when it commits to observing) and
   only where view() is unsupported, so the CSS-only path stays primary and the
   no-JS / reduced-motion render is fully visible. */
@media (prefers-reduced-motion: no-preference) {
  @supports not (animation-timeline: view()) {
    html.js-reveal .reveal {
      opacity: 0;
      transform: translateY(18px);
      transition: opacity 0.6s var(--ease-mech), transform 0.6s var(--ease-mech);
    }

    html.js-reveal .reveal.revealed {
      opacity: 1;
      transform: none;
    }
  }
}

/* --- Cross-document view transitions ------------------------------------ */

@view-transition {
  navigation: auto;
}

.brand-name {
  view-transition-name: wordmark;
}

main {
  view-transition-name: page-main;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
}

/* --- Print -------------------------------------------------------------- */

@media print {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    background: transparent !important;
    color: var(--ink) !important;
    box-shadow: none !important;
  }

  .skip-link,
  .site-nav,
  .hero-art,
  .faq-joint,
  .assay-view-joint,
  .terms-joint {
    display: none !important;
  }

  .reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  main a[href]:not(.button):not(.hero-cta)::after {
    content: " (" attr(href) ")";
    font-size: 0.82em;
    word-break: break-word;
  }
}
