/* =========================================================
   LineSig — core stylesheet
   Design tokens
   ========================================================= */
:root {
  --bg: #fbfbf2;
  --bg-alt: #f1f1e6;
  --surface: #ffffff;
  --surface-2: #ececdf;
  --line: #dcdccd;
  --red: #ed1c24;
  --red-dark: #ad1217;
  --red-glow: rgba(237, 28, 36, 0.10);
  --text: #000000;
  --text-muted: #606060;
  --text-faint: #8a8a8a;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 4px;
  --max-w: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; letter-spacing: 0.03em; }

p { color: var(--text-muted); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red);
}

/* =========================================================
   Pipeline divider — signature element
   A horizontal red line with flange nodes, echoing the
   pigging/pipeline subject matter and the logo's red pipe.
   ========================================================= */
.pipeline-rule {
  position: relative;
  height: 2px;
  background: var(--line);
  margin: 0;
}
.pipeline-rule::before,
.pipeline-rule::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--red);
  background: var(--bg);
  transform: translateY(-50%);
}
.pipeline-rule::before { left: 6%; }
.pipeline-rule::after { left: 94%; }
.pipeline-rule--flow {
  background: linear-gradient(90deg, var(--red) 0%, var(--red) 6%, var(--line) 6%);
}

/* =========================================================
   Header / navigation
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 251, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo .mark {
  width: 12px;
  height: 24px;
  background: var(--red);
  border-radius: 2px;
  position: relative;
}
.logo .mark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 30px;
  height: 6px;
  background: var(--red);
  border-radius: 2px;
}
.logo span.sig { color: var(--red); }
.logo-img { height: 46px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-weight: bolder;
  color: #000000;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  border-color: var(--red);
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--red);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: none;
}
.nav-cta:hover { background: var(--red-dark); }

/* Products dropdown */
.nav-links li.has-dropdown { position: relative; }
.nav-links li.has-dropdown > a::after {
  content: "▾";
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7em;
  color: var(--text-faint);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 0;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.10);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 200;
}
.nav-links li.has-dropdown:hover .dropdown-menu,
.nav-links li.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li a {
  display: block;
  padding: 11px 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-muted);
  border-bottom: none;
  white-space: nowrap;
}
.dropdown-menu li a:hover {
  color: var(--red);
  background: var(--bg-alt);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 88px 0 48px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, var(--red-glow), transparent),
    var(--bg);
}
.hero-inner { max-width: 720px; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .accent { color: var(--red); }
.hero p.lead {
  font-size: 1.15rem;
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.page-hero {
  padding: 52px 0 36px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-alt);
}
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { max-width: 600px; }
.model-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.42em;
  font-weight: 500;
  vertical-align: middle;
  color: var(--red);
  background: var(--surface);
  border: 1px solid var(--red);
  padding: 5px 14px;
  border-radius: 999px;
  margin-left: 18px;
  text-transform: none;
  letter-spacing: 0.05em;
}
@media (max-width: 680px) {
  .model-tag { display: block; margin: 12px 0 0; }
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline {
  background: transparent;
  color: var(--text);
}
.btn-outline:hover { border-color: var(--red); color: var(--red); }

/* =========================================================
   Sections
   ========================================================= */
section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); }
.section-head {
  max-width: 640px;
  margin-bottom: 32px;
}

/* =========================================================
   Cards — product / category tiles
   ========================================================= */
.grid {
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--red); transform: translateY(-3px); }
.card .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.94rem; margin-bottom: 18px; }
.card a.card-link {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
}

.product-visual {
  height: 160px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.product-visual::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 8px;
  background: var(--line);
  transform: translateY(-50%);
}
.product-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--red);
  transform: translate(-50%, -50%);
}

.card[id] { scroll-margin-top: 96px; }
.card-thumb {
  height: 160px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-links { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.dl-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: #fff;
  transition: all 0.15s;
}
.dl-link span {
  font-size: 0.68rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 2px 8px;
}
.dl-link:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.dl-link:hover span { border-color: #fff; color: #fff; }
.dl-link.disabled { opacity: 0.5; pointer-events: none; }

/* =========================================================
   Product dossier layout — sticky anchor subnav + newspaper
   style 2-column text, used on detailed product pages
   ========================================================= */
.product-subnav {
  position: sticky;
  top: 81px;
  z-index: 90;
  background: rgba(251, 251, 242, 0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.product-subnav .subnav-inner {
  display: flex;
  gap: 28px;
  padding: 14px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
  overflow-x: auto;
}
.product-subnav a {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: bold;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.product-subnav a:hover { color: var(--red); border-color: var(--red); }

.dossier-section { padding: 44px 0; border-bottom: 1px solid var(--line); }
.dossier-section:last-of-type { border-bottom: none; }
.dossier-section[id] { scroll-margin-top: 150px; }
.dossier-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.dossier-section h2 {
  font-size: 1.7rem;
  border-bottom: 3px solid var(--red);
  display: inline-block;
  padding-bottom: 6px;
  margin-bottom: 24px;
}

/* True newspaper column-flow for prose */
.newspaper-columns {
  column-count: 2;
  column-gap: 48px;
  column-rule: 1px solid var(--line);
}
.newspaper-columns p {
  margin-bottom: 16px;
  -webkit-column-break-inside: avoid;
  break-inside: avoid-column;
}

/* Two-column grid for bullet lists */
.col-list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 40px;
}
.col-list-grid .feature-list { margin: 0; }

@media (max-width: 780px) {
  .newspaper-columns { column-count: 1; column-rule: none; }
  .col-list-grid { grid-template-columns: 1fr; }
  .product-subnav .subnav-inner { padding: 12px 20px; gap: 20px; }
}

/* =========================================================
   Stats strip
   ========================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.stat .value {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--red);
  line-height: 1;
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}

/* =========================================================
   Spec table
   ========================================================= */
.spec-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.spec-table tr[id] { scroll-margin-top: 96px; }
.spec-table th {
  font-family: var(--font-mono);
  color: var(--text-faint);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.72rem;
  width: 220px;
}
.spec-table td { color: var(--text); }

.variant-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 4px 10px;
  border-radius: 999px;
  margin-right: 8px;
  margin-bottom: 8px;
}

.feature-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 10px;
  height: 2px;
  background: var(--red);
}

/* =========================================================
   Contact / forms
   ========================================================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.form-field input,
.form-field select,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-status {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: none;
}
.form-status.show { display: block; color: var(--red); }
.form-status.success { color: #1f7a3d; }
.form-field .req { color: var(--red); margin-left: 2px; }
.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid { border-color: var(--red); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.contact-info-item {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info-item .label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  width: 110px;
  flex-shrink: 0;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  background: var(--bg-alt);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { color: var(--text-muted); font-size: 0.92rem; }
.footer-grid ul li a:hover { color: var(--red); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-faint);
  flex-wrap: wrap;
  gap: 12px;
}

/* =========================================================
   Breadcrumb
   ========================================================= */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--red); }

/* =========================================================
   Two-column layout (product pages)
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

/* =========================================================
   Feature rows — alternating photo/text, used on the homepage
   product showcase
   ========================================================= */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px dashed #000;
}
.feature-row:last-child { border-bottom: none; }
.feature-row-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
}
.feature-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feature-row-media.placeholder {
  background: var(--surface-2);
  position: relative;
}
.feature-row-media.placeholder::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 8px;
  background: var(--line);
  transform: translateY(-50%);
}
.feature-row-media.placeholder::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--red);
  transform: translate(-50%, -50%);
}
.feature-row-text .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  display: block;
}
.feature-row-text h3 { margin-bottom: 14px; }
.feature-row-text p { font-size: 0.98rem; margin-bottom: 20px; }
.feature-row.reverse .feature-row-media { order: 2; }
.feature-row.reverse .feature-row-text { order: 1; }

@media (max-width: 780px) {
  .feature-row,
  .feature-row.reverse .feature-row-media,
  .feature-row.reverse .feature-row-text {
    order: initial;
  }
  .feature-row { grid-template-columns: 1fr; gap: 20px; padding: 24px 0; }
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .nav-links { display: none; font-weight: bold; color: #000000; }
  .nav-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    padding: 20px 32px;
    border-bottom: 1px solid var(--line);
    gap: 18px;
    font-weight: bold;
  }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 4px 0 4px 14px;
    margin-top: 10px;
  }
  .dropdown-menu li a { padding: 8px 0; }
  .nav-links li.has-dropdown > a::after { display: none; }
  .hero { padding: 64px 0 40px; }
  section { padding: 40px 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .stats { grid-template-columns: 1fr 1fr; }
}

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

/* =========================================================
   Product visuals with real photos, figures, groups, steps
   ========================================================= */
.product-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.product-visual:has(img)::before,
.product-visual:has(img)::after { display: none; }
.product-visual.contain { height: 280px; background: #fff; }
.product-visual.contain img { object-fit: contain; padding: 10px; }

.spec-figure {
  margin: 24px 0 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  justify-content: center;
}
.spec-figure img { max-height: 460px; width: auto; object-fit: contain; }

/* Lone last card in a 3-column grid sits centred */
@media (min-width: 901px) {
  .grid-3 > .card:last-child:nth-child(3n+1) { grid-column: 2; }
}

/* Downloads page: grouped flyer + datasheet pairs */
.dl-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.dl-group:first-child { border-top: 0; padding-top: 0; }
.dl-group-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* VRU "How it works" */
.step-list {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 40px;
}
.step-list li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.94rem;
}
.step-list li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
}
.step-list li strong { font-family: var(--font-display); font-size: 1.1rem; }
@media (max-width: 780px) { .step-list { grid-template-columns: 1fr; } }
