/* ==========================================================================
   Reinhart Hydrocleaning SA — Design System
   Swiss editorial style: grotesque type, strict grid, hairlines, ink + RHC blue
   ========================================================================== */

:root {
  --paper: #f7f6f2;
  --paper-soft: #efede7;
  --ink: #14181c;
  --ink-soft: #3c444c;
  --muted: #6b7480;
  --hairline: rgba(20, 24, 28, 0.14);
  --hairline-strong: rgba(20, 24, 28, 0.32);
  --blue: #009ee0;
  --blue-deep: #0079ad;
  --navy: #0b1620;
  --navy-soft: #11202e;
  --paper-on-dark: rgba(247, 246, 242, 0.92);
  --muted-on-dark: rgba(247, 246, 242, 0.55);
  --hairline-on-dark: rgba(247, 246, 242, 0.16);

  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;

  --w-max: 1380px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-y: clamp(5rem, 11vw, 9.5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: #fff; }

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

a { color: inherit; }

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.display-xl {
  font-size: clamp(2.9rem, 7.4vw, 6.4rem);
  font-weight: 650;
}

.display-lg { font-size: clamp(2.3rem, 5vw, 4.2rem); }

.display-md { font-size: clamp(1.7rem, 3.2vw, 2.6rem); letter-spacing: -0.025em; }

.display-sm { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -0.02em; line-height: 1.2; }

.lede {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--ink-soft);
  font-weight: 420;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

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

.eyebrow--bare::before { display: none; }

.mono {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}

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

.wrap {
  max-width: var(--w-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }

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

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  margin-bottom: clamp(2.6rem, 5vw, 4.5rem);
}

.section-head .display-lg, .section-head .display-md { max-width: 18ch; }

.section-head--split {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: var(--gutter);
}

.section-head--split p { max-width: 46ch; }

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

.dark {
  background: var(--navy);
  color: var(--paper-on-dark);
}

.dark .eyebrow { color: var(--muted-on-dark); }
.dark .lede { color: var(--paper-on-dark); }
.dark .rule { border-color: var(--hairline-on-dark); }

/* --------------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.site-header.is-scrolled { border-bottom-color: var(--hairline); }
.site-header.is-hidden { transform: translateY(-100%); }

.nav {
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo { display: flex; align-items: center; flex: none; }
.nav-logo img { height: 44px; width: auto; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.4vw, 2.4rem);
  list-style: none;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 1.7rem 0;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

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

.nav-menu > li > a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.nav-caret {
  width: 7px; height: 7px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.55;
}

.nav-drop {
  position: absolute;
  top: 100%;
  left: 50%;
  translate: -50% 0;
  min-width: 248px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  box-shadow: 0 24px 48px -24px rgba(11, 22, 32, 0.28);
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.nav-menu > li:hover .nav-drop,
.nav-menu > li:focus-within .nav-drop {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-drop a {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.62rem 1.4rem;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-drop a:hover { color: var(--ink); background: var(--paper-soft); }

.nav-drop .mono { font-size: 0.66rem; color: var(--muted); }

.nav-cta {
  flex: none;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.62rem 1.35rem;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
}

.nav-burger span {
  display: block;
  height: 1.6px;
  background: var(--ink);
  margin: 0 10px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile nav */
@media (max-width: 980px) {
  .nav { height: 68px; }
  .nav-logo img { height: 38px; }
  .nav-menu, .nav-cta { display: none; }
  .nav-burger { display: flex; }

  .site-header.menu-open .nav-burger span:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
  .site-header.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }

  .mobile-menu {
    display: none;
    position: fixed;
    top: 68px;
    left: 0; right: 0; bottom: 0;
    background: var(--paper);
    overflow-y: auto;
    padding: 1.5rem var(--gutter) 4rem;
    z-index: 99;
  }

  .site-header.menu-open + .mobile-menu { display: block; }
}

.mobile-menu { display: none; }

.mobile-menu ul { list-style: none; }

.mobile-menu > ul > li { border-bottom: 1px solid var(--hairline); }

.mobile-menu a {
  display: block;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-menu .mobile-sub a {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  padding: 0.5rem 0 0.5rem 1.2rem;
}

.mobile-menu .mobile-sub { padding-bottom: 0.8rem; }

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.7rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }

.btn--line { background: transparent; color: var(--ink); border-color: var(--hairline-strong); }
.btn--line:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.dark .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.dark .btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.dark .btn--line { background: transparent; color: var(--paper-on-dark); border-color: var(--hairline-on-dark); }
.dark .btn--line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.link-line {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--hairline-strong);
  transition: border-color 0.25s ease, color 0.25s ease;
}

.link-line:hover { color: var(--blue-deep); border-color: var(--blue-deep); }

.dark .link-line { border-color: var(--hairline-on-dark); }
.dark .link-line:hover { color: var(--blue); border-color: var(--blue); }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(9rem, 16vh, 12.5rem);
  padding-bottom: clamp(3.5rem, 7vw, 6.5rem);
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  padding-bottom: 1.6rem;
  margin-bottom: clamp(2.2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--hairline);
}

.hero-title { max-width: 13ch; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7.5fr) minmax(0, 4.5fr);
  gap: var(--gutter);
  align-items: end;
}

.hero-aside { display: grid; gap: 1.6rem; max-width: 44ch; }

.hero-aside p { color: var(--ink-soft); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }

/* Page hero (sous-pages) */
.page-hero {
  padding-top: clamp(8.5rem, 15vh, 11.5rem);
  padding-bottom: clamp(2.8rem, 6vw, 5rem);
  border-bottom: 1px solid var(--hairline);
}

.page-hero .crumb {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 1.8rem;
  display: flex;
  gap: 0.7rem;
}

.page-hero .crumb a { text-decoration: none; color: inherit; }
.page-hero .crumb a:hover { color: var(--blue-deep); }

.page-hero .lede { margin-top: 1.6rem; max-width: 58ch; }

/* --------------------------------------------------------------------------
   Stats
   -------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
}

.stat {
  padding: 2rem 1.8rem 2.2rem 0;
  border-bottom: 1px solid var(--hairline);
}

.stat + .stat { padding-left: 1.8rem; border-left: 1px solid var(--hairline); }

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.4vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.stat-value .unit {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}

.stat-label {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  line-height: 1.6;
}

.dark .stat, .dark .stats { border-color: var(--hairline-on-dark); }
.dark .stat-value .unit, .dark .stat-label { color: var(--muted-on-dark); }

/* --------------------------------------------------------------------------
   Index lists (services / industries — Swiss numbered rows)
   -------------------------------------------------------------------------- */

.index-list { border-top: 1px solid var(--hairline); list-style: none; }

.index-row {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 4fr) minmax(0, 6fr) auto;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
  padding: clamp(1.4rem, 2.6vw, 2.1rem) 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  position: relative;
  transition: padding-left 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}

.index-row:hover { padding-left: 1.2rem; }

.index-row::after {
  content: "";
  position: absolute;
  left: 0; bottom: -1px;
  height: 1px;
  width: 0;
  background: var(--blue);
  transition: width 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}

.index-row:hover::after { width: 100%; }

.index-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.index-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.index-desc { font-size: 0.95rem; color: var(--muted); max-width: 52ch; }

.index-arrow {
  font-size: 1.3rem;
  color: var(--muted);
  transition: transform 0.3s ease, color 0.3s ease;
}

.index-row:hover .index-arrow { transform: translateX(6px); color: var(--blue-deep); }

.dark .index-list, .dark .index-row { border-color: var(--hairline-on-dark); }
.dark .index-num, .dark .index-desc, .dark .index-arrow { color: var(--muted-on-dark); }

/* --------------------------------------------------------------------------
   Cards / grids
   -------------------------------------------------------------------------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); }

.card {
  border: 1px solid var(--hairline);
  padding: clamp(1.6rem, 2.6vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--paper);
  transition: border-color 0.3s ease, transform 0.3s ease;
}

a.card { text-decoration: none; }
a.card:hover { border-color: var(--hairline-strong); transform: translateY(-4px); }

.card .mono-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--blue-deep);
}

.card h3 { font-size: 1.25rem; }
.card p { font-size: 0.95rem; color: var(--muted); }
.card .card-foot { margin-top: auto; padding-top: 1.2rem; }

.dark .card { background: var(--navy-soft); border-color: var(--hairline-on-dark); }
.dark .card p { color: var(--muted-on-dark); }

/* Figure */
.figure { border: 1px solid var(--hairline); background: var(--paper-soft); }
.figure img { width: 100%; height: auto; filter: saturate(0.88) contrast(1.02); }
.figure figcaption {
  padding: 0.85rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.dark .figure { background: var(--navy-soft); border-color: var(--hairline-on-dark); }
.dark .figure figcaption { border-color: var(--hairline-on-dark); color: var(--muted-on-dark); }

/* --------------------------------------------------------------------------
   Prose blocks (sous-pages)
   -------------------------------------------------------------------------- */

.prose-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--gutter);
  padding: clamp(3rem, 6vw, 5.5rem) 0;
  border-bottom: 1px solid var(--hairline);
}

.prose-grid:last-child { border-bottom: 0; }

.prose-side { position: sticky; top: 7.5rem; align-self: start; display: grid; gap: 1.2rem; }

.prose-side h2 { max-width: 14ch; }

.prose h3 { font-size: 1.18rem; margin: 2rem 0 0.7rem; letter-spacing: -0.015em; }
.prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 1.15rem; color: var(--ink-soft); max-width: 64ch; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { margin: 1.1rem 0 1.4rem; padding-left: 0; list-style: none; max-width: 60ch; }
.prose li {
  padding: 0.55rem 0 0.55rem 1.6rem;
  position: relative;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--hairline);
}
.prose li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--blue-deep);
}
.prose a { color: var(--blue-deep); text-decoration: none; border-bottom: 1px solid currentColor; }
.prose a:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Sub-nav (sticky anchors on long pages)
   -------------------------------------------------------------------------- */

.subnav {
  position: sticky;
  top: 75px;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.subnav ul {
  display: flex;
  gap: clamp(1.4rem, 3vw, 2.8rem);
  list-style: none;
  overflow-x: auto;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  scrollbar-width: none;
}

.subnav ul::-webkit-scrollbar { display: none; }

.subnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.subnav a:hover, .subnav a.is-active { color: var(--ink); border-bottom-color: var(--blue); }

/* --------------------------------------------------------------------------
   Timeline (company history)
   -------------------------------------------------------------------------- */

.timeline { position: relative; padding-left: clamp(1.6rem, 4vw, 3rem); }

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--hairline);
}

.timeline-progress {
  position: absolute;
  left: 0; top: 0;
  width: 1px;
  height: 100%;
  background: var(--blue);
  transform-origin: top;
  transform: scaleY(0);
}

.tl-item {
  position: relative;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * clamp(1.6rem, 4vw, 3rem) - 3.5px);
  top: 2.15rem;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--blue);
}

.tl-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.tl-item p { color: var(--ink-soft); font-size: 0.98rem; max-width: 62ch; }

/* --------------------------------------------------------------------------
   Tables (references)
   -------------------------------------------------------------------------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--hairline); background: var(--paper); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 880px; }

.data-table th {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-align: left;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--hairline-strong);
  background: var(--paper-soft);
  position: sticky;
  top: 0;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.data-table th .sort-ind { color: var(--blue-deep); margin-left: 0.3rem; }

.data-table td {
  padding: 0.78rem 1.1rem;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

.data-table tbody tr { transition: background 0.15s ease; }
.data-table tbody tr:hover { background: rgba(0, 158, 224, 0.05); }

.data-table .num { font-family: var(--font-mono); font-size: 0.82rem; white-space: nowrap; }
.data-table .tag-cell { white-space: nowrap; }

.table-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--hairline);
  color: var(--ink-soft);
  white-space: nowrap;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.4rem;
}

.filters select, .filters input[type="search"] {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  padding: 0.7rem 1rem;
  background: var(--paper);
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  appearance: none;
  border-radius: 0;
  min-width: 150px;
}

.filters select:focus, .filters input:focus { outline: 2px solid var(--blue); outline-offset: -1px; }

.filters .select-wrap { position: relative; }
.filters .select-wrap::after {
  content: "";
  position: absolute;
  right: 0.95rem; top: 50%;
  width: 7px; height: 7px;
  border-right: 1.4px solid var(--muted);
  border-bottom: 1.4px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.filters input[type="search"] { flex: 1; min-width: 200px; }

.filters-result {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-left: auto;
  white-space: nowrap;
}

.filters-result strong { color: var(--blue-deep); font-weight: 500; }

/* --------------------------------------------------------------------------
   Cert strip
   -------------------------------------------------------------------------- */

.cert-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.8rem, 4vw, 3.8rem);
  padding: 1.8rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.cert-strip img { height: 52px; width: auto; filter: grayscale(1) contrast(0.92); opacity: 0.62; transition: filter 0.3s ease, opacity 0.3s ease; }
.cert-strip img:hover { filter: grayscale(0); opacity: 1; }

.cert-strip .cert-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Video embeds (lite — click to load)
   -------------------------------------------------------------------------- */

.video-card { border: 1px solid var(--hairline); background: var(--navy); }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
}

.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.4s ease; }
.video-frame:hover img { transform: scale(1.04); opacity: 1; }

.video-frame .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px; height: 68px;
  background: color-mix(in srgb, var(--navy) 72%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(247, 246, 242, 0.4);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.video-frame:hover .play { background: var(--blue); transform: scale(1.08); }

.video-frame .play::after {
  content: "";
  width: 0; height: 0;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}

.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.video-card .video-meta {
  padding: 1.1rem 1.3rem 1.3rem;
  color: var(--paper-on-dark);
}

.video-card .video-meta h3 { font-size: 1.02rem; letter-spacing: -0.01em; margin-bottom: 0.3rem; }
.video-card .video-meta p { font-size: 0.85rem; color: var(--muted-on-dark); }

/* --------------------------------------------------------------------------
   Download rows
   -------------------------------------------------------------------------- */

.dl-list { list-style: none; border-top: 1px solid var(--hairline); }

.dl-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1.6rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: padding-left 0.3s ease;
}

.dl-row:hover { padding-left: 0.9rem; }
.dl-row:hover .dl-name { color: var(--blue-deep); }

.dl-name { font-weight: 500; font-size: 0.98rem; transition: color 0.25s ease; }
.dl-meta { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); white-space: nowrap; }

.dl-ico {
  width: 34px; height: 34px;
  border: 1px solid var(--hairline-strong);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.dl-row:hover .dl-ico { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Footer — engineering drawing title block
   The footer is laid out like the cartouche of a technical drawing:
   a pipeline band with KP (kilometre point) station links, a CAD-wireframe
   wordmark, and a title-block grid with document metadata.
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--navy);
  color: var(--paper-on-dark);
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
}

/* Station links along the line */
.footer-stations {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.4rem, 3.6vw, 3.4rem);
  padding-bottom: 1.2rem;
}

.footer-stations a {
  text-decoration: none;
  display: grid;
  gap: 0.32rem;
  color: var(--paper-on-dark);
}

.footer-stations .kp {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--muted-on-dark);
  transition: color 0.25s ease;
}

.footer-stations .st {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: color 0.25s ease;
}

.footer-stations a:hover .st { color: var(--blue); }
.footer-stations a:hover .kp { color: var(--blue); }

/* Pipeline band with the travelling mini tool */
.footer-pipeline {
  position: relative;
  height: 44px;
  border-top: 1px solid var(--hairline-on-dark);
  border-bottom: 1px solid var(--hairline-on-dark);
}

.footer-pipeline::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px dashed rgba(247, 246, 242, 0.13);
}

.footer-tool {
  position: absolute;
  top: 4px;
  left: 0;
  height: 36px;
  width: auto;
  display: block;
}

/* CAD-wireframe wordmark */
.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(2.6rem, 10vw, 9.5rem);
  line-height: 0.94;
  letter-spacing: -0.035em;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2rem, 4.5vw, 3.4rem);
  color: rgba(247, 246, 242, 0.16);
  user-select: none;
}

@supports (-webkit-text-stroke: 1px #fff) {
  .footer-wordmark {
    color: transparent;
    -webkit-text-stroke: 1px rgba(247, 246, 242, 0.32);
  }
}

.footer-wordmark .dot {
  color: var(--blue);
  -webkit-text-stroke-color: var(--blue);
}

/* Title block (cartouche) */
.cartouche {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1px;
  background: var(--hairline-on-dark);
  border: 1px solid var(--hairline-on-dark);
}

.cart-cell { background: var(--navy); padding: 1.15rem 1.25rem 1.3rem; }

.cart-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted-on-dark);
  margin-bottom: 0.65rem;
}

.cart-value { font-size: 0.9rem; line-height: 1.7; font-style: normal; }

.cart-value a { color: var(--paper-on-dark); text-decoration: none; transition: color 0.2s ease; }
.cart-value a:hover { color: var(--blue); }

.cart-value.mono-sm {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  line-height: 1.85;
  text-transform: uppercase;
}

.cart-index { font-size: 0.84rem; line-height: 2.1; color: var(--muted-on-dark); }
.cart-index a { color: var(--paper-on-dark); opacity: 0.85; }
.cart-index a:hover { opacity: 1; }
.cart-index .sep { color: var(--muted-on-dark); padding: 0 0.35rem; }

.c-span2 { grid-column: span 2; }
.c-span3 { grid-column: span 3; }
.c-span4 { grid-column: span 4; }
.c-span8 { grid-column: span 8; }

.cart-bottom {
  grid-column: 1 / -1;
  background: var(--navy);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.6rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted-on-dark);
  padding: 1rem 1.25rem;
}

@media (max-width: 1000px) {
  .cartouche { grid-template-columns: 1fr 1fr; }
  .c-span2, .c-span3, .c-span4 { grid-column: auto; }
  .c-span8 { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .cartouche { grid-template-columns: 1fr; }
  .c-span8 { grid-column: auto; }
  .footer-stations { gap: 1.1rem 1.6rem; }
}

/* --------------------------------------------------------------------------
   Hero schematic (animated SVG)
   -------------------------------------------------------------------------- */

.schematic { width: 100%; height: auto; display: block; }
.schematic .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }

/* --------------------------------------------------------------------------
   Reveal initial states (JS adds motion; no-JS stays visible)
   -------------------------------------------------------------------------- */

html.has-gsap [data-reveal] { opacity: 0; transform: translateY(28px); }
html.has-gsap .hero [data-hero-line] { opacity: 0; transform: translateY(40px); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-grid, .section-head--split, .prose-grid, .grid-2 { grid-template-columns: 1fr; }
  .prose-side { position: static; }
  .grid-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat + .stat { padding-left: 0; border-left: 0; }
  .stat:nth-child(even) { padding-left: 1.8rem; border-left: 1px solid var(--hairline); }
  .index-row { grid-template-columns: 3rem minmax(0, 1fr) auto; }
  .index-desc { display: none; }
  .subnav { top: 67px; }
}

@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .stat:nth-child(even) { padding-left: 0; border-left: 0; }
  .footer-top { grid-template-columns: 1fr; }
  .filters-result { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.has-gsap [data-reveal],
  html.has-gsap .hero [data-hero-line] { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
