/* ============================================================
   RAILING MASTERS — Architectural Systems Design System
   Brand: navy #004975 · cyan #2095C3 · red #C50000
   Type:  Jost (display + UI) · IBM Plex Mono (spec figures)
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* brand */
  --navy:      #004975;
  --navy-deep: #00314f;
  --on-accent: #ffffff;   /* text on a navy/red fill */
  --navy-ink:  #0a2233;
  --cyan:      #2095C3;
  --cyan-soft: #6fbadb;
  --red:       #C50000;
  --red-deep:  #9c0000;

  /* light theme surfaces */
  --bg:         #ffffff;
  --bg-sub:     #f5f7f9;
  --bg-sunk:    #eef2f5;
  --bg-invert:  #00314f;
  --surface:    #ffffff;
  --surface-2:  #fafbfc;

  /* ink */
  --ink:        #0d1b26;
  --ink-2:      #3c4d5a;
  --ink-3:      #6a7b88;
  --ink-4:      #75838f;
  --ink-invert: #ffffff;
  --ink-invert-2: rgba(255,255,255,.72);
  --ink-invert-3: rgba(255,255,255,.48);

  /* lines */
  --rule:       #dde4ea;
  --rule-2:     #c6d1da;
  --rule-strong:#8d9ca8;
  --rule-invert: rgba(255,255,255,.16);

  /* accents by family */
  --f-edge:   #004975;
  --f-vert:   #006A8E;
  --f-pro:    #C50000;
  --f-juliet: #365F91;

  /* type */
  --font-display: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* metrics */
  --maxw: 1280px;
  --maxw-text: 68ch;
  --gut: clamp(20px, 4vw, 56px);
  --sect: clamp(56px, 8vw, 104px);
  --r: 3px;

  --shadow-1: 0 1px 2px rgba(13,27,38,.05), 0 2px 8px rgba(13,27,38,.04);
  --shadow-2: 0 2px 4px rgba(13,27,38,.06), 0 12px 32px rgba(13,27,38,.08);
  --shadow-3: 0 4px 8px rgba(13,27,38,.08), 0 24px 56px rgba(13,27,38,.12);
}


/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

/* ---------- 3. LAYOUT ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.wrap-narrow { max-width: 940px; margin-inline: auto; padding-inline: var(--gut); }
.sect { padding-block: var(--sect); }
.sect-sub { background: var(--bg-sub); }
.sect-sunk { background: var(--bg-sunk); }
.sect + .sect { border-top: 1px solid var(--rule); }
.sect-sub + .sect-sub, .sect-sub + .sect, .sect + .sect-sub { border-top: none; }

/* ---------- 4. TYPE SCALE ---------- */
.d1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); font-weight: 400; letter-spacing: -0.03em; line-height: 1.02; }
.d2 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.025em; line-height: 1.06; }
.d3 { font-size: clamp(1.45rem, 2.6vw, 2rem); letter-spacing: -0.02em; line-height: 1.14; }
.d4 { font-size: clamp(1.12rem, 1.7vw, 1.32rem); letter-spacing: -0.01em; line-height: 1.25; }

.lede { font-size: clamp(1.06rem, 1.6vw, 1.24rem); line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.body-lg { font-size: 1.06rem; color: var(--ink-2); }
.small { font-size: .875rem; }
.muted { color: var(--ink-3); }

/* eyebrow — the technical drawing label */
.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.eyebrow::after { display: none; }
.eyebrow--plain::after { display: none; }
.eyebrow--accent { color: var(--red); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* trademark marks — `vertical-align: super` overshoots and inflates the line box */
sup {
  font-size: .55em; vertical-align: baseline; position: relative; top: -.5em;
  letter-spacing: 0; opacity: .6; font-weight: 400; line-height: 0;
}
/* display type needs a proportionally smaller mark set higher */
h1 sup, h2 sup, h3 sup, .d1 sup, .d2 sup, .d3 sup, .d4 sup, .fam__name sup, .sys__name sup {
  font-size: .34em; top: -.85em; opacity: .65;
}

/* ---------- 5. NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav__in {
  max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut);
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: 0 0 auto; }
.logo__mark { width: 38px; height: 26px; flex: 0 0 auto; }
.logo__txt {
  font-family: var(--font-display); font-size: 1.06rem; font-weight: 500;
  letter-spacing: .01em; line-height: 1; white-space: nowrap;
}
.logo__txt b { color: var(--red); font-weight: 500; }
.logo__txt span { color: var(--navy); font-weight: 500; }

.nav__links { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav__links a {
  text-decoration: none; color: var(--ink-2); font-size: .875rem; font-weight: 500;
  padding: 8px 13px; border-radius: var(--r); letter-spacing: .005em;
  transition: color .16s, background .16s;
}
.nav__links a:hover { color: var(--ink); background: var(--bg-sub); }
.nav__links a[aria-current="page"] { color: var(--navy); }
.nav__links a[aria-current="page"] { position: relative; }
.nav__links a[aria-current="page"]::after {
  content:''; position:absolute; left:13px; right:13px; bottom:2px; height:2px; background: var(--red);
}
.nav__cta {
  margin-left: 10px; padding: 9px 18px !important; background: var(--navy);
  color: var(--on-accent) !important; border-radius: var(--r); font-weight: 500;
}
.nav__cta:hover { background: var(--navy-deep) !important; color: var(--on-accent) !important; }

.nav__burger {
  display: none; margin-left: auto; background: none; border: 1px solid var(--rule-2);
  border-radius: var(--r); width: 40px; height: 36px; cursor: pointer; color: var(--ink);
  align-items: center; justify-content: center;
}
@media (max-width: 980px) {
  .nav__links {
    position: absolute; top: 68px; left: 0; right: 0; background: var(--bg);
    border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch;
    padding: 10px var(--gut) 18px; gap: 0; display: none; box-shadow: var(--shadow-2);
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .nav__links a[aria-current="page"]::after { left:0; right:auto; width:22px; bottom:8px; }
  .nav__cta { margin: 12px 0 0; text-align: center; border-bottom: none !important; }
  .nav__burger { display: flex; }
}

/* ---------- 6. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-body); font-size: .9rem; font-weight: 500; letter-spacing: .01em;
  padding: 12px 22px; border-radius: var(--r); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: all .16s ease;
}
.btn--primary { background: var(--navy); color: var(--on-accent); }
.btn--primary:hover { background: var(--navy-deep); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--accent { background: var(--red); color: var(--on-accent); }
.btn--accent:hover { background: var(--red-deep); transform: translateY(-1px); box-shadow: var(--shadow-2); }
.btn--ghost { border-color: var(--rule-2); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--rule-strong); background: var(--bg-sub); }
.btn--invert { background: #fff; color: var(--navy-deep); }
.btn--invert:hover { background: #eef2f5; transform: translateY(-1px); }
.btn--invert-ghost { border-color: rgba(255,255,255,.32); color: #fff; }
.btn--invert-ghost:hover { border-color: rgba(255,255,255,.6); background: rgba(255,255,255,.08); }
.btn__arrow { transition: transform .18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: .875rem; font-weight: 500; color: var(--navy);
  border-bottom: 1px solid transparent; transition: border-color .16s;
}
.link-arrow:hover { border-bottom-color: currentColor; }
.link-arrow svg { transition: transform .18s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- 7. HERO ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f0f6fa 100%);
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(60px, 9vw, 108px);
}
/* the brand arches, oversized and faint — the catalogue cover's motif */
.hero__ribbon {
  position: absolute; top: -150px; right: -130px; width: min(46vw, 640px);
  pointer-events: none; opacity: .1;
}
.hero__ribbon svg { width: 100%; height: auto; }
.hero__in { position: relative; display: grid; grid-template-columns: 1.04fr .96fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (max-width: 940px) { .hero__in { grid-template-columns: 1fr; } }
.hero .eyebrow { color: var(--cyan); }
.hero .eyebrow::after { background: var(--rule-2); }
.hero h1 { color: var(--navy-deep); }
.hero__lede { color: var(--ink-2); font-size: clamp(1.06rem, 1.6vw, 1.2rem); max-width: 52ch; margin-top: 22px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero__stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: 48px; border-top: 1px solid var(--rule-2); padding-top: 24px;
}
.hero__stat { padding-right: 20px; }
.hero__stat + .hero__stat { border-left: 1px solid var(--rule); padding-left: 24px; }
.hero__stat b {
  display: block; font-family: var(--font-display); font-size: 1.85rem; font-weight: 400;
  color: var(--navy); line-height: 1; letter-spacing: -.02em;
}
.hero__stat span {
  display: block; margin-top: 8px; font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); line-height: 1.4;
}
@media (max-width: 560px) {
  .hero__stats { grid-template-columns: 1fr; gap: 18px; }
  .hero__stat + .hero__stat { border-left: none; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 18px; }
}
/* the product itself, front and center */
.hero__fig {
  margin: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 18px 18px 14px; box-shadow: var(--shadow-2);
}
.hero__fig img { width: 100%; height: auto; display: block; border-radius: 2px; }
.hero__fig figcaption {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.hero__fig a { color: var(--navy); text-decoration: none; }
.hero__fig a:hover { text-decoration: underline; }

/* "how to choose" header beside the annotated section drawing */
.choose { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: clamp(30px, 4vw, 48px); }
@media (max-width: 900px) { .choose { grid-template-columns: 1fr; } }
.choose .sect-head { margin-bottom: 0; }
.diagram--annot { max-width: 470px; margin-inline: auto; display: block; }

/* ---------- 8. SECTION DIAGRAM (SVG) ---------- */
.diagram { width: 100%; display: block; }
.dg-slab      { fill: rgba(140,160,175,.16); stroke: var(--dg-line); stroke-width: 1.1; }
.dg-hatch     { stroke: var(--dg-line-faint); stroke-width: .8; }
.dg-metal     { fill: var(--dg-metal); stroke: var(--dg-line); stroke-width: 1.1; }
.dg-glass     { fill: var(--dg-glass); stroke: var(--dg-glass-edge); stroke-width: 1.1; }
.dg-picket    { fill: var(--dg-metal); stroke: var(--dg-line); stroke-width: .7; }
.dg-accent    { fill: var(--dg-accent); stroke: none; }
.dg-dim       { stroke: var(--dg-dim); stroke-width: .8; }
.dg-dim-txt   { fill: var(--dg-dim); font-family: var(--font-mono); font-size: 9px; letter-spacing: .04em; }
.dg-label     { fill: var(--dg-label); font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; text-transform: uppercase; }
.dg-lead      { stroke: var(--dg-dim); stroke-width: .7; stroke-dasharray: 2 2; }

.diagram {
  --dg-line: #5c7383;
  --dg-line-faint: #a9b8c2;
  --dg-metal: #d7e0e7;
  --dg-glass: rgba(32,149,195,.13);
  --dg-glass-edge: #2095C3;
  --dg-accent: #C50000;
  --dg-dim: #8d9ca8;
  --dg-label: #5c7383;
}

/* ---------- 9. CARDS & GRIDS ---------- */
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.grid > * { background: var(--surface); padding: clamp(22px, 3vw, 34px); }

.cardgrid { display: grid; gap: 20px; }
.cardgrid-2 { grid-template-columns: repeat(2, 1fr); }
.cardgrid-3 { grid-template-columns: repeat(3, 1fr); }
.cardgrid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .cardgrid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 940px) { .cardgrid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cardgrid-2, .cardgrid-3, .cardgrid-4 { grid-template-columns: 1fr; } }

/* family card */
.fam {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  padding: 30px 28px 26px; display: flex; flex-direction: column;
  position: relative; overflow: hidden; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.fam::before { content:''; position:absolute; top:0; left:0; right:0; height:3px; background: var(--fam-accent, var(--navy)); }
.fam:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.fam__name { font-family: var(--font-display); font-size: 1.32rem; font-weight: 500; letter-spacing: -.01em; color: var(--fam-accent, var(--navy)); }
.fam__name sup { font-size: .5em; vertical-align: super; opacity: .7; }
.fam__tag { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 7px; }
.fam__desc { margin-top: 16px; font-size: .935rem; color: var(--ink-2); line-height: 1.58; }
.fam__desc { flex: 1; }
.fam__count { margin-top: 22px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rule); }
.fam__count span { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-3); letter-spacing: .06em; }

/* ---------- 10. SYSTEM CARD ---------- */
.sys {
  display: flex; flex-direction: column; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--r);
  text-decoration: none; color: inherit; overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.sys:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.sys__fig {
  background: var(--bg-sub); border-bottom: 1px solid var(--rule);
  padding: 18px 18px 10px; position: relative;
}
.sys__fig .diagram { margin-inline: auto; max-height: 200px; }
.sys__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 5px; flex-wrap: wrap; }
.sys__body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.sys__fam {
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sys-accent, var(--navy)); font-weight: 500;
}
.sys__name { font-family: var(--font-display); font-size: 1.16rem; font-weight: 500; margin-top: 6px; letter-spacing: -.01em; }
.sys__name sup { font-size: .48em; vertical-align: super; opacity: .65; }
.sys__title { font-size: .8rem; color: var(--ink-3); margin-top: 5px; line-height: 1.4; }
.sys__one { font-size: .9rem; color: var(--ink-2); margin-top: 14px; line-height: 1.55; flex: 1; }
.sys__meta {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: 6px;
}

/* ---------- 11. TAGS / PILLS ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 2px;
  background: var(--bg-sunk); color: var(--ink-2); border: 1px solid var(--rule);
  white-space: nowrap;
}
.tag--mount { background: color-mix(in srgb, var(--navy) 10%, transparent); color: var(--navy); border-color: color-mix(in srgb, var(--navy) 24%, transparent); }
.tag--glass { background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--cyan); border-color: color-mix(in srgb, var(--cyan) 30%, transparent); }
.tag--picket { background: color-mix(in srgb, var(--f-vert) 11%, transparent); color: var(--f-vert); border-color: color-mix(in srgb, var(--f-vert) 26%, transparent); }
.tag--pro { background: color-mix(in srgb, var(--red) 9%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 26%, transparent); }
.tag--solid { background: var(--navy); color: var(--on-accent); border-color: var(--navy); }
.tag--tested { background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 28%, transparent); }

/* ---------- 12. FINDER ---------- */
.finder {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  overflow: hidden; box-shadow: var(--shadow-1);
}
.finder__head {
  padding: 22px clamp(20px, 3vw, 30px); border-bottom: 1px solid var(--rule); background: var(--surface-2);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.finder__head h3 { font-size: 1.12rem; }
.finder__head p { font-size: .875rem; color: var(--ink-3); margin: 6px 0 0; max-width: 56ch; }
.finder__body { padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 30px); }
.finder__axes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px 30px; }
.axis--wide { grid-column: span 2; }
.axis--wide .axis__opts { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
@media (max-width: 1080px) { .finder__axes { grid-template-columns: repeat(3, 1fr); } .axis--wide { grid-column: span 3; } }
@media (max-width: 720px) { .finder__axes { grid-template-columns: repeat(2, 1fr); } .axis--wide { grid-column: span 2; } }
@media (max-width: 480px) { .finder__axes { grid-template-columns: 1fr; } .axis--wide { grid-column: span 1; } .axis--wide .axis__opts { grid-template-columns: 1fr; } }

.axis__label {
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-bottom: 11px;
}
.axis__opts { display: flex; flex-direction: column; gap: 5px; }
.opt {
  display: flex; align-items: flex-start; gap: 9px; cursor: pointer;
  font-size: .875rem; color: var(--ink-2); padding: 6px 8px; margin: -6px -8px;
  border-radius: var(--r); transition: background .14s, color .14s; user-select: none;
}
.opt:hover { background: var(--bg-sub); color: var(--ink); }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt__box {
  width: 15px; height: 15px; margin-top: 4px; flex: 0 0 auto; border: 1.5px solid var(--rule-strong);
  border-radius: 2px; display: grid; place-items: center; transition: all .14s; background: var(--bg);
}
.opt__box svg { opacity: 0; transform: scale(.6); transition: all .14s; }
.opt input:checked ~ .opt__box { background: var(--navy); border-color: var(--navy); }
.opt input:checked ~ .opt__box svg { opacity: 1; transform: scale(1); }
.opt input:focus-visible ~ .opt__box { outline: 2px solid var(--cyan); outline-offset: 2px; }
.opt input:checked ~ .opt__txt { color: var(--ink); font-weight: 500; }
.opt__count { margin-left: auto; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-4); }

.finder__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px clamp(20px, 3vw, 30px); border-top: 1px solid var(--rule); background: var(--surface-2);
}
.finder__result { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-2); letter-spacing: .02em; }
.finder__result b { color: var(--ink); font-weight: 600; }
.btn-reset {
  background: none; border: 1px solid var(--rule-2); border-radius: var(--r);
  font-family: var(--font-body); font-size: .8rem; color: var(--ink-2);
  padding: 7px 14px; cursor: pointer; transition: all .16s;
}
.btn-reset:hover { border-color: var(--rule-strong); color: var(--ink); background: var(--bg-sub); }

.sys.is-hidden { display: none; }
.finder-empty {
  display: none; padding: 56px 24px; text-align: center; border: 1px dashed var(--rule-2);
  border-radius: var(--r); color: var(--ink-3);
}
.finder-empty.show { display: block; }

/* ---------- 13. SPEC TABLE ---------- */
.tablewrap {
  overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  /* the two gradients pinned to the edges stay put; the shadows scroll with the
     content, so a shadow only shows on a side that has more content off-screen */
  background-image:
    linear-gradient(to right, var(--surface) 30%, transparent),
    linear-gradient(to left,  var(--surface) 30%, transparent),
    linear-gradient(to right, rgba(13,27,38,.10), transparent 14px),
    linear-gradient(to left,  rgba(13,27,38,.10), transparent 14px);
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 44px 100%, 44px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll;
}
table.spec { width: 100%; border-collapse: collapse; font-size: .875rem; min-width: 640px; }
table.spec th, table.spec td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.spec thead th {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; background: var(--surface-2);
  border-bottom: 1px solid var(--rule-2); position: sticky; top: 0; z-index: 2;
}
table.spec tbody tr:last-child td { border-bottom: none; }
table.spec tbody tr:hover { background: var(--bg-sub); }
table.spec td.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.spec th.rowhead, table.spec td.rowhead { font-weight: 500; color: var(--ink); }

/* comparison matrix */
table.matrix { min-width: 1000px; }
table.matrix th.sysname { min-width: 190px; }
table.matrix td { font-size: .84rem; }
table.matrix .cell-yes { color: var(--navy); font-weight: 500; }
table.matrix .cell-no { color: var(--ink-4); }
table.matrix thead th:first-child { position: sticky; left: 0; z-index: 3; }
table.matrix tbody th {
  position: sticky; left: 0; background: var(--surface-2); z-index: 1;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500; border-right: 1px solid var(--rule-2); min-width: 160px;
}

/* ---------- 14. SPEC SHEET (system page) ---------- */
.spec-hero { background: var(--bg-sub); border-bottom: 1px solid var(--rule); padding-block: clamp(34px, 5vw, 56px); }
.spec-hero__in { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .spec-hero__in { grid-template-columns: 1fr; } }
.spec-hero__fig { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px 24px 18px; }
.spec-hero__fig .diagram { width: 100%; }
.spec-hero__fig figcaption {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
  text-align: center;
}

.crumb { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px; }
.crumb a { text-decoration: none; color: var(--ink-3); }
.crumb a:hover { color: var(--navy); }
.crumb span { margin-inline: 7px; color: var(--ink-4); }

.keyfacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-top: 26px; }
.keyfact { box-shadow: 0 0 0 1px var(--rule); }
@media (max-width: 520px) { .keyfacts { grid-template-columns: 1fr; } }
.keyfact { background: var(--surface); padding: 14px 16px; position: relative; }
.keyfact dt { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.keyfact dd { margin: 5px 0 0; font-size: .9rem; font-weight: 500; color: var(--ink); }

.speclayout { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .speclayout { grid-template-columns: 1fr; } }
.specnav { position: sticky; top: 92px; }
.specnav ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.specnav a {
  display: block; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent;
  text-decoration: none; font-size: .82rem; color: var(--ink-3); transition: all .16s;
}
.specnav a:hover { color: var(--ink); border-left-color: var(--rule-strong); }
.specnav a.active { color: var(--navy); border-left-color: var(--red); font-weight: 500; }
@media (max-width: 900px) { .specnav { display: none; } }

.specblock { scroll-margin-top: 96px; }
.specblock + .specblock { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--rule); }
.specblock h2 { font-size: 1.24rem; letter-spacing: -.01em; }
.specblock__num {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; color: var(--red);
  display: block; margin-bottom: 8px;
}

ul.speclist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
ul.speclist li {
  position: relative; padding: 10px 0 10px 24px; font-size: .925rem; color: var(--ink-2);
  border-bottom: 1px solid var(--rule); line-height: 1.55;
}
ul.speclist li:last-child { border-bottom: none; }
ul.speclist li::before {
  content: ''; position: absolute; left: 2px; top: 18px;
  width: 9px; height: 1px; background: var(--rule-strong);
}
ul.speclist--2 { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
@media (max-width: 700px) { ul.speclist--2 { grid-template-columns: 1fr; } }

.note {
  margin-top: 16px; padding: 13px 16px; background: var(--bg-sub); border-left: 2px solid var(--cyan);
  font-size: .855rem; color: var(--ink-2); border-radius: 0 var(--r) var(--r) 0;
}
.note--accent { border-left-color: var(--red); }

/* ---------- 15. TEST DATA VIS ---------- */
.loadbar { display: grid; gap: 0; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.loadbar__row { display: grid; grid-template-columns: 190px 1fr 92px; align-items: center; gap: 18px; padding: 15px 20px; border-bottom: 1px solid var(--rule); }
.loadbar__row:last-child { border-bottom: none; }
@media (max-width: 720px) { .loadbar__row { grid-template-columns: 1fr; gap: 9px; } }
.loadbar__name { font-size: .885rem; font-weight: 500; }
.loadbar__track { position: relative; height: 26px; background: var(--bg-sunk); border-radius: 2px; overflow: hidden; }
.loadbar__req { position: absolute; top: 0; bottom: 0; left: 0; background: color-mix(in srgb, var(--ink-4) 30%, transparent); }
.loadbar__app { position: absolute; top: 0; bottom: 0; left: 0; background: var(--navy); border-radius: 2px; display: flex; align-items: center; justify-content: flex-end; padding-right: 9px; }
.loadbar__app span { font-family: var(--font-mono); font-size: .7rem; color: var(--on-accent); font-weight: 500; }
.loadbar__mark { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--red); }
.loadbar__marklbl { position: absolute; top: 50%; transform: translateY(-50%); left: calc(100% + 7px); font-family: var(--font-mono); font-size: .64rem; color: var(--red); white-space: nowrap; }
.loadbar__pass {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em; font-weight: 600;
  color: var(--f-vert); text-align: right;
}

.margin-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
@media (max-width: 760px) { .margin-strip { grid-template-columns: repeat(2, 1fr); } }
.margin-cell { background: var(--surface); padding: 22px 20px; }
.margin-cell b { display: block; font-family: var(--font-display); font-size: 2.1rem; font-weight: 400; color: var(--navy); letter-spacing: -.02em; line-height: 1; }
.margin-cell span { display: block; margin-top: 9px; font-size: .8rem; color: var(--ink-3); line-height: 1.45; }

/* deflection gauge */
.gauge { display: flex; align-items: center; gap: 10px; }
.gauge__track { flex: 1; height: 7px; background: var(--bg-sunk); border-radius: 4px; overflow: hidden; min-width: 90px; }
.gauge__fill { height: 100%; background: linear-gradient(90deg, var(--f-vert), var(--cyan)); border-radius: 4px; }
.gauge__val { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); min-width: 40px; text-align: right; }

/* ---------- 16. STAMP CARD ---------- */
.stampcard {
  display: grid; grid-template-columns: auto 1fr; gap: 30px; align-items: start;
  border: 1px solid var(--rule); border-radius: var(--r); padding: 26px 28px; background: var(--surface);
}
@media (max-width: 640px) { .stampcard { grid-template-columns: 1fr; } }
.stampbadge {
  display: grid; justify-items: center; gap: 2px; text-align: center;
  width: 168px; padding: 22px 16px; color: var(--navy);
  border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--bg-sub);
}
.stampbadge svg { margin-bottom: 10px; }
.stampbadge__lbl {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3);
}
.stampbadge__val { font-family: var(--font-display); font-size: 1.06rem; font-weight: 500; color: var(--ink); margin-top: 4px; }
.stampbadge__date { font-family: var(--font-mono); font-size: .7rem; color: var(--ink-3); }

/* ---------- 17. DOWNLOAD ROW ---------- */
.dl {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  text-decoration: none; color: inherit; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.dl:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-1); transform: translateY(-1px); }
.dl__icon { width: 40px; height: 48px; }
.dl__t { font-size: .985rem; font-weight: 500; }
.dl__s { font-size: .8rem; color: var(--ink-3); margin-top: 3px; }
.dl__meta { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-4); letter-spacing: .06em; text-align: right; white-space: nowrap; }
@media (max-width: 620px) { .dl { grid-template-columns: 40px 1fr; } .dl__meta { grid-column: 2; text-align: left; } }

/* ---------- 18. PROCESS ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border-block: 1px solid var(--rule); }
@media (max-width: 940px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); padding: 30px 26px 32px; }
.step__n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; color: var(--red); }
.step h3 { font-size: 1.05rem; margin-top: 12px; }
.step p { font-size: .875rem; color: var(--ink-2); margin-top: 10px; line-height: 1.55; }

/* ---------- 19. CTA BAND ---------- */
.cta {
  background: var(--bg-invert); color: #fff; padding-block: clamp(52px, 8vw, 88px);
  position: relative; overflow: hidden;
}
.cta__ribbon {
  position: absolute; top: -110px; right: -90px; width: min(36vw, 460px);
  opacity: .08; pointer-events: none;
}
.cta__ribbon svg { width: 100%; height: auto; }
.cta__in { position: relative; display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: center; }
@media (max-width: 840px) { .cta__in { grid-template-columns: 1fr; } }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.72); margin-top: 16px; max-width: 52ch; }
.cta__acts { display: flex; gap: 12px; flex-wrap: wrap; }
.cta__contact { display: grid; gap: 12px; }
.cta__contact a { color: #fff; text-decoration: none; font-size: .925rem; display: flex; gap: 10px; align-items: center; }
.cta__contact a:hover { color: var(--cyan-soft); }
.cta__contact .lbl { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); display:block; margin-bottom: 3px; }

/* ---------- 20. FOOTER ---------- */
.foot { background: var(--bg-sunk); border-top: 1px solid var(--rule); padding-block: 52px 30px; font-size: .875rem; }
.foot__in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.foot ul + h4 { margin-top: 22px; }
@media (max-width: 900px) { .foot__in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot__in { grid-template-columns: 1fr; } }
.foot h4 { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a { text-decoration: none; color: var(--ink-2); }
.foot a:hover { color: var(--navy); }
.foot__legal {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .78rem; color: var(--ink-4);
}

/* ---------- 21. UTIL ---------- */
.stack-sm > * + * { margin-top: 10px; }
.stack > * + * { margin-top: 18px; }
.stack-lg > * + * { margin-top: 30px; }
.flex { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.mt-0{margin-top:0} .mt-1{margin-top:10px} .mt-2{margin-top:20px} .mt-3{margin-top:30px} .mt-4{margin-top:44px}
.center { text-align: center; }
.sect-head { max-width: 66ch; margin-bottom: clamp(30px, 4vw, 48px); }
.sect-head--center { margin-inline: auto; text-align: center; }
.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; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }
.pull { border-left: 2px solid var(--red); padding-left: 22px; font-size: 1.1rem; line-height: 1.55; color: var(--ink); }

/* letterhead: hidden on screen, printed at the top of the generated PDF */
.printhead { display: none; }

/* print — also drives the PDF generated from the engineering page */
@page { size: letter; margin: 14mm 13mm; }
@media print {
  :root {
    --bg:#fff; --bg-sub:#fff; --bg-sunk:#fff; --surface:#fff; --surface-2:#fff;
    --ink:#0d1b26; --ink-2:#3c4d5a; --ink-3:#5c6b77; --rule:#c9d3da; --rule-2:#b3c0c9;
  }
  .nav, .cta, .foot, .finder, .specnav, .btn, .link-arrow, .spec-hero .crumb { display: none !important; }
  .printhead {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 24pt;
    padding-bottom: 8pt; margin-bottom: 4pt; border-bottom: 1.2pt solid var(--navy);
    font-size: 8pt; line-height: 1.45; color: var(--ink-2);
  }
  .printhead__brand { display: flex; gap: 9pt; align-items: flex-start; }
  .printhead__brand .logo__mark { width: 34pt; height: 23pt; }
  .printhead__doc { text-align: right; }
  .printhead strong { color: var(--ink); }
  body { font-size: 9.6pt; line-height: 1.45; background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sect, .spec-hero { padding-block: 12pt; border: 0; background: #fff !important; }
  .wrap, .wrap-narrow { max-width: none; padding-inline: 0; }
  .d1 { font-size: 22pt; } .d2 { font-size: 17pt; } .d3 { font-size: 13pt; } .d4 { font-size: 11pt; }
  .lede { font-size: 10.4pt; }
  a { text-decoration: none; color: inherit; }
  .stampcard, .tablewrap, .loadbar, .margin-strip, .keyfacts { break-inside: avoid; }
  .loadbar__row, table.spec tr, .specblock { break-inside: avoid; }
  .sect-head { margin-bottom: 12pt; }
  h2, h3 { break-after: avoid; }
  table.spec thead th { position: static; }
  .speclayout { grid-template-columns: 1fr; }

  /* motion never governs what prints */
  [data-reveal], [data-reveal].is-in { opacity: 1 !important; animation: none !important; transform: none !important; }
  .diagram[data-draw] { clip-path: none !important; animation: none !important; }
  .diagram[data-draw] .dg-dim, .diagram[data-draw] .dg-dim-txt,
  .diagram[data-draw] .dg-label, .diagram[data-draw] .dg-lead,
  .diagram[data-draw] .dg-lead-g { opacity: 1 !important; animation: none !important; }
  .loadbar__app, .gauge__fill { width: var(--w) !important; clip-path: none !important; animation: none !important; }
  .loadbar__mark { opacity: 1 !important; animation: none !important; }
  .hero__line > span, .hero .eyebrow, .hero__lede, .hero__cta, .hero__stats, .hero__stat b {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
}

/* ============================================================
   22. MOTION
   The language comes from the subject: technical drawings get
   drawn. Everything else stays quiet so the drawings can move.
   ============================================================ */

:root {
  --ease-out: cubic-bezier(.22, .61, .36, 1);
  --ease-draw: cubic-bezier(.33, .8, .3, 1);
}

/* ---- scroll reveal ---------------------------------------- */
/* JS adds .is-in when the element enters view, then strips both
   attribute and class on animationend so nothing is left holding
   opacity or transform (which would fight the finder's filtering). */
[data-reveal] { opacity: 0; }
[data-reveal].is-in {
  animation: rm-rise .66s var(--ease-out) both;
  animation-delay: calc(var(--d, 0) * 62ms);
}
@keyframes rm-rise {
  from { opacity: 0; transform: translateY(15px); }
  to   { opacity: 1; transform: none; }
}

/* ---- the plotter wipe -------------------------------------- */
/* The drawing is revealed bottom-up — slab, then posts, then the
   handrail — which is the order you would actually draw it in.
   Dimensions and labels arrive after the structure exists. */
.diagram[data-draw] { clip-path: inset(100% 0 0 0); }
.diagram[data-draw] .dg-dim,
.diagram[data-draw] .dg-dim-txt,
.diagram[data-draw] .dg-label,
.diagram[data-draw] .dg-lead,
.diagram[data-draw] .dg-lead-g { opacity: 0; }

.diagram[data-draw].is-drawn {
  animation: rm-plot .78s var(--ease-draw) forwards;
  animation-delay: var(--draw-delay, 0ms);
}
.diagram[data-draw].is-drawn .dg-dim,
.diagram[data-draw].is-drawn .dg-dim-txt,
.diagram[data-draw].is-drawn .dg-label,
.diagram[data-draw].is-drawn .dg-lead {
  animation: rm-fade .5s var(--ease-out) forwards;
  animation-delay: calc(var(--draw-delay, 0ms) + .52s);
}
/* hero leader lines annotate one after another */
.diagram[data-draw].is-drawn .dg-lead-g {
  animation: rm-lead .52s var(--ease-out) forwards;
  animation-delay: calc(var(--draw-delay, 0ms) + .58s + var(--i, 0) * 90ms);
}
@keyframes rm-plot { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rm-fade { to { opacity: 1; } }
@keyframes rm-lead { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }

/* ---- hero ---------------------------------------------------- */
/* each headline line rises out of its own overflow box */
.hero__line { display: block; overflow: hidden; }
.hero__line > span {
  display: block;
  animation: rm-line .9s var(--ease-out) both;
  animation-delay: calc(.06s + var(--i, 0) * .1s);
}
@keyframes rm-line { from { transform: translateY(105%); } to { transform: none; } }

.hero .eyebrow, .hero__lede, .hero__cta, .hero__stats {
  animation: rm-rise .8s var(--ease-out) both;
}
.hero .eyebrow { animation-delay: .02s; }
.hero__lede    { animation-delay: .34s; }
.hero__cta     { animation-delay: .44s; }
.hero__stats   { animation-delay: .54s; }

.hero__stat b { animation: rm-rise .7s var(--ease-out) both; animation-delay: calc(.6s + var(--i,0) * .09s); }

/* the brand arches drift in once, then hold */
.hero__ribbon { animation: rm-ribbon 1.5s var(--ease-out) both .15s; }
@keyframes rm-ribbon { from { opacity: 0; transform: translateX(26px); } to { opacity: .1; transform: none; } }
.hero__fig { animation: rm-rise .9s var(--ease-out) both .48s; }

/* ---- nav ----------------------------------------------------- */
.nav { transition: box-shadow .25s ease, background-color .25s ease; }
.nav.is-stuck { box-shadow: 0 1px 0 var(--rule), 0 6px 24px rgba(13,27,38,.07); }
.nav__links a[aria-current="page"]::after { animation: rm-underline .5s var(--ease-out) both .1s; transform-origin: left; }
@keyframes rm-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---- cards --------------------------------------------------- */
.sys__fig .diagram { transition: transform .45s var(--ease-out); }
.sys:hover .sys__fig .diagram { transform: scale(1.035); }
.fam::before { transform-origin: left; transition: transform .4s var(--ease-out); }
.fam:hover::before { transform: scaleX(1); }

/* ---- finder filtering ---------------------------------------- */
/* JS fades a card out before it is removed from flow, and back in
   when it returns, so the grid reflow reads as a change not a jump */
.sys { transition: opacity .24s ease, transform .24s var(--ease-out), border-color .18s, box-shadow .18s; }
.sys.is-out { opacity: 0; transform: scale(.97); pointer-events: none; }
.finder__result b { transition: color .2s; }
.finder__result.is-pulse b { color: var(--red); }
.opt__count { transition: opacity .2s; }

/* ---- load bars ----------------------------------------------- */
/* The bar is always its true width; a clip wipes it in left to right.
   Animating the width instead would squash the kN label inside it, and
   clip-path composites without a layout pass on every frame. */
.loadbar__app { width: var(--w); clip-path: inset(0 100% 0 0); }
.loadbar.is-charged .loadbar__app { animation: rm-wipe-x 1s var(--ease-draw) forwards; }
.loadbar__mark { opacity: 0; }
.loadbar.is-charged .loadbar__mark { animation: rm-fade .3s ease .55s forwards; }
.gauge__fill { width: var(--w); clip-path: inset(0 100% 0 0); }
tr.is-charged .gauge__fill {
  animation: rm-wipe-x .85s var(--ease-draw) forwards;
  animation-delay: calc(var(--d, 0) * 55ms);
}
@keyframes rm-wipe-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ---- counters ------------------------------------------------ */
.margin-cell b { font-variant-numeric: tabular-nums; }

/* ---- links & buttons ----------------------------------------- */
.dl__t { transition: color .18s; }
.dl:hover .dl__t { color: var(--navy); }
.step { transition: background-color .25s ease; }
.step:hover { background: var(--surface-2); }

/* ---- cross-page transitions ---------------------------------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) { animation: rm-vt-out .18s ease both; }
  ::view-transition-new(root) { animation: rm-vt-in .3s var(--ease-out) both; }
}
@keyframes rm-vt-out { to { opacity: 0; } }
@keyframes rm-vt-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.nav .logo { view-transition-name: rm-logo; }

/* ---- reduced motion: show everything, move nothing ------------ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].is-in,
  .hero .eyebrow, .hero__lede, .hero__cta, .hero__stats, .hero__stat b,
  .hero__line > span, .hero__ribbon, .hero__fig,
  .diagram[data-draw], .diagram[data-draw] .dg-dim, .diagram[data-draw] .dg-dim-txt,
  .diagram[data-draw] .dg-label, .diagram[data-draw] .dg-lead, .diagram[data-draw] .dg-lead-g,
  .nav__links a[aria-current="page"]::after {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .hero__ribbon { opacity: .1 !important; }
  .loadbar__app, .gauge__fill { animation: none !important; clip-path: none !important; width: var(--w) !important; }
  .loadbar__mark { opacity: 1 !important; animation: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}

/* ---------- 23. ROUTES & GLOSSARY ---------- */
.route {
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  padding: 26px 24px 24px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.route:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.route p { font-size: .92rem; color: var(--ink-2); flex: 1; }
.route .link-arrow { margin-top: 4px; }

.gloss { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin: 0; }
@media (max-width: 760px) { .gloss { grid-template-columns: 1fr; } }
.gloss > div { background: var(--surface); padding: 20px 24px 22px; }
.gloss dt { font-family: var(--font-display); font-size: 1.02rem; font-weight: 500; color: var(--navy); }
.gloss dd { margin: 7px 0 0; font-size: .9rem; color: var(--ink-2); line-height: 1.55; }


/* ---------- 24. SKIP LINK & RENDER PLATE ---------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy); color: var(--on-accent);
  padding: 10px 18px; font-size: .875rem; font-weight: 500;
  border-radius: 0 0 var(--r) 0; text-decoration: none;
}
.skip:focus { left: 0; }

/* catalogue renders ship on white — present them as a photo plate so they
   read deliberately in dark mode instead of glaring */
.plate {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--r);
  padding: 10px; margin-bottom: 16px;
}
.plate img { width: 100%; height: auto; border-radius: 2px; display: block; }

/* ---------- 25. PHOTOGRAPHY ON CARDS ---------- */
/* Industry norm is photo-led; the render leads, the diagram stays as the
   comparison device. A fixed aspect box normalises the varied render frames. */
.sys__fig { padding: 0; background: var(--surface); overflow: hidden; }
.sys__photo {
  display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain;
  background: #fff; padding: 12px 16px 6px; transition: transform .55s var(--ease-out);
}
.sys:hover .sys__photo { transform: scale(1.035); }
.sys__dg { padding: 8px 14px 10px; background: var(--bg-sub); border-top: 1px solid var(--rule); }
.sys__dg .diagram { max-height: 148px; margin-inline: auto; }
.sys:hover .sys__fig .diagram { transform: none; }

.fam__thumb { margin: -27px -28px 18px; padding: 12px 20px 6px; background: #fff; border-bottom: 1px solid var(--rule); }
.fam__thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; display: block; }

.mx__thumb {
  display: block; width: 116px; height: 78px; object-fit: contain; background: #fff;
  border: 1px solid var(--rule); border-radius: 2px; margin-bottom: 9px; padding: 4px;
}

/* ---------- 26. SPECIFICATION TEXT ---------- */
.spectext { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; margin-top: 18px; background: var(--surface); }
.spectext__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--rule);
}
.spectext__body { padding: 18px 20px 6px; font-family: var(--font-mono); font-size: .8rem; line-height: 1.62; color: var(--ink-2); }
.spectext__body p { margin: 0 0 .95em; }
.btn-copy {
  font: 500 .78rem var(--font-body); padding: 7px 14px; border: 1px solid var(--rule-2); border-radius: var(--r);
  background: var(--surface); color: var(--ink); cursor: pointer; transition: all .16s; white-space: nowrap;
}
.btn-copy:hover { border-color: var(--rule-strong); background: var(--bg-sub); }
.btn-copy.is-done { background: var(--navy); color: var(--on-accent); border-color: var(--navy); }

/* ---------- 27. STAMPED SHEETS ---------- */
.sheet { margin: 18px 0 0; border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: #fff; }
.sheet img { width: 100%; display: block; }
.sheet figcaption {
  padding: 9px 14px; border-top: 1px solid var(--rule); background: var(--surface-2);
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
.pkg {
  display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.pkg:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.pkg:hover .dl__t { color: var(--navy); }
.pkg__sheet { width: 100%; display: block; background: #fff; border-bottom: 1px solid var(--rule); }
.pkg__body { padding: 16px 20px 18px; }
.pkg__meta { margin-top: 10px; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); }

/* ---------- 28. ENQUIRY FORM ---------- */
.contact { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }
.contact__side a { color: var(--navy); text-decoration: none; }
.contact__side a:hover { text-decoration: underline; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.field label b { color: var(--red); font-weight: 500; }
.field input, .field select, .field textarea {
  font: 400 .95rem var(--font-body); color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-2); border-radius: var(--r); padding: 11px 13px; width: 100%;
  transition: border-color .16s, box-shadow .16s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236a7b88' stroke-width='1.6'/></svg>");
  background-repeat: no-repeat; background-position: right 13px center; }
.field textarea { min-height: 132px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 14%, transparent);
}
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.form__note { font-size: .82rem; color: var(--ink-3); max-width: 40ch; }
.form__status { grid-column: 1 / -1; font-size: .9rem; color: var(--ink-2); min-height: 1.3em; margin: 0; }
.form__status.is-ok { color: var(--f-vert); }

/* ---------- 29. RICHER SURFACES ---------- */
.spec-hero { position: relative; overflow: hidden; }
.spec-hero .wrap { position: relative; z-index: 1; }
.hero__ribbon--sub { top: -210px; right: -170px; width: min(38vw, 520px); }

/* render wall */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
@media (max-width: 1000px) { .mosaic { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .mosaic { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.mosaic__tile {
  display: block; text-decoration: none; color: inherit; background: #fff; overflow: hidden;
  border: 1px solid var(--rule); border-radius: var(--r);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.mosaic__tile:hover { border-color: var(--rule-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.mosaic__tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; display: block; padding: 6px; transition: transform .5s var(--ease-out); }
.mosaic__tile:hover img { transform: scale(1.05); }
.mosaic__cap {
  display: flex; justify-content: space-between; gap: 6px; padding: 7px 9px;
  border-top: 1px solid var(--rule); background: var(--surface-2);
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3);
}
.mosaic__cap b { color: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .mosaic__cap span { display: none; } }

/* twelve sections at one scale */
.strip {
  display: grid; grid-template-columns: repeat(12, minmax(78px, 1fr)); gap: 4px; overflow-x: auto;
  padding: 14px 12px 10px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); margin-bottom: 26px;
}
.strip__item {
  text-decoration: none; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: .56rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  padding: 6px 2px; border-radius: 2px; transition: background .15s, color .15s;
}
.strip__item:hover { background: var(--bg-sub); color: var(--navy); }
.diagram--section { width: 100%; max-width: 92px; }

/* load-test setup */
.testfig { margin: 0 0 26px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); padding: 22px 24px 16px; }
.testfig .diagram { max-width: 760px; margin-inline: auto; }
.testfig figcaption { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: .86rem; color: var(--ink-2); }
.dg-load line { stroke: var(--dg-accent); stroke-width: 1.5; }
.dg-load path { fill: var(--dg-accent); stroke: none; }
.dg-load circle { stroke: var(--dg-accent); stroke-width: 1.4; fill: none; }
.dg-load .dg-load-dot { fill: var(--dg-accent); stroke: none; }
.dg-load-txt { fill: var(--dg-accent); font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: .02em; }

/* exposure scale + appearance */
.scalefig { margin: 0 0 24px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); padding: 18px 22px 8px; }
.scalefig .diagram { max-width: 680px; margin-inline: auto; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
@media (max-width: 640px) { .swatches { grid-template-columns: 1fr; } }
.swatch { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.swatch__chip { height: 112px; }
.swatch--matte .swatch__chip { background: #2c3136; }
.swatch--textured .swatch__chip {
  background-color: #3a4046;
  background-image: radial-gradient(rgba(255,255,255,.16) .7px, transparent .8px), radial-gradient(rgba(0,0,0,.4) .7px, transparent .8px);
  background-size: 4px 4px, 5px 5px; background-position: 0 0, 2px 2px;
}
.swatch--anodized .swatch__chip { background: linear-gradient(100deg, #b6bcc3 0%, #e9ecef 30%, #a5acb4 55%, #dadee2 78%, #b1b7bd 100%); }
.swatch__body { padding: 12px 14px 14px; }
.swatch__body b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1rem; }
.swatch__body span { display: block; margin-top: 3px; font-size: .8rem; color: var(--ink-3); line-height: 1.45; }

/* document covers, stamped sheet gallery */
.pkg--cover { flex-direction: row; }
.pkg--cover .pkg__sheet { width: 34%; flex: 0 0 34%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-bottom: 0; border-right: 1px solid var(--rule); }
@media (max-width: 560px) {
  .pkg--cover { flex-direction: column; }
  .pkg--cover .pkg__sheet { width: 100%; flex: auto; aspect-ratio: auto; max-height: 260px; border-right: 0; border-bottom: 1px solid var(--rule); }
}
.sheetgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .sheetgrid { grid-template-columns: 1fr; } }
.sheetgrid .sheet { margin: 0; }
.sheet a { display: block; }
