/* 3D hull + CFD service. Scoped to .h3d; static/site.css is not modified.
   Uses the site's --copper and --mono when present, with fallbacks. */
.h3d {
  --h3d-copper: var(--copper, #ea7a2e);
  --h3d-mono: var(--mono, "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
  --h3d-bg: #090c12;
  --h3d-panel: #10151d;
  --h3d-rule: #262c35;
  --h3d-ink: #f4f1ea;
  --h3d-body: #c9c3b8;
  --h3d-muted: #9a9489;
  --h3d-accent: #fdba74;
  --h3d-teal: #5eead4;
  background: var(--h3d-bg);
  color: var(--h3d-ink);
  border-top: 3px solid var(--h3d-copper);
  padding: 56px 0 64px;
}
.h3d .wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; box-sizing: border-box; }
.h3d-kicker, .h3d .n, .h3d-sub {
  font-family: var(--h3d-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--h3d-accent); margin: 0 0 14px;
}
.h3d h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.02em; margin: 0 0 18px; max-width: 18ch; text-wrap: balance; }
.h3d-lede { font-size: 1.15rem; line-height: 1.6; color: #d6d1c7; margin: 0; max-width: 66ch; }
.h3d-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin: 28px 0 0; }
.h3d-cta {
  display: inline-block; background: var(--h3d-copper); color: #160b03; font-weight: 650;
  padding: 13px 22px; border-radius: 3px; text-decoration: none; letter-spacing: 0.01em;
}
.h3d-cta:hover, .h3d-cta:focus-visible { background: #f59e57; color: #160b03; }
.h3d-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.h3d-cta-note { color: var(--h3d-muted); font-size: 14px; }

.h3d .h3d-show { margin-top: 36px; }

.h3d-text { color: var(--h3d-body); font-size: 15px; line-height: 1.6; margin: 0 0 20px; max-width: 80ch; }
.h3d-stern-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.h3d-stern-grid figure { margin: 0; background: #0b1018; border: 1px solid var(--h3d-rule); display: flex; flex-direction: column; justify-content: space-between; }
.h3d-stern-grid .wide { grid-column: 1 / -1; }
.h3d-stern-grid img { display: block; width: 100%; height: auto; }
.h3d-stern-grid figcaption { padding: 8px 14px 10px; color: var(--h3d-muted); font-size: 13.5px; border-top: 1px solid var(--h3d-rule); }

.h3d-h2 { color: #fff; font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.01em; margin: 56px 0 20px; }

.h3d-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.h3d-uses li { background: var(--h3d-panel); border-top: 2px solid var(--h3d-copper); padding: 18px 18px 20px; }
.h3d-uses b { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.h3d-uses span { color: var(--h3d-body); font-size: 15px; line-height: 1.55; }

.h3d-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; }
.h3d-steps > li { border-top: 1px solid var(--h3d-rule); padding-top: 18px; }
.h3d-steps figure { margin: 0 0 16px; background: #0b1018; aspect-ratio: 9 / 5; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.h3d-steps figure img { width: 100%; height: 100%; object-fit: contain; display: block; }
.h3d-steps h3 { color: #fff; font-size: 1.25rem; margin: 0 0 8px; }
.h3d-steps p { color: var(--h3d-body); font-size: 15px; line-height: 1.6; margin: 0 0 12px; }
.h3d-num { font-size: 14px !important; color: var(--h3d-muted) !important; border-left: 2px solid var(--h3d-copper); padding-left: 12px; }
.h3d-num b { font-family: var(--h3d-mono); font-size: 1.3rem; color: #fff; font-weight: 600; margin-right: 8px; }

.h3d-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0 44px; align-items: start; }
.h3d-list { margin: 0 0 8px; padding: 0 0 0 1.1em; color: var(--h3d-body); font-size: 15px; line-height: 1.6; }
.h3d-list li { margin: 0 0 8px; }
.h3d-list li::marker { color: var(--h3d-copper); }
.h3d-sub { margin: 18px 0 8px; }
.h3d-trust, .h3d-scope { background: var(--h3d-panel); border-left: 2px solid var(--h3d-teal); padding: 2px 24px 18px; margin-top: 36px; }
.h3d-trust .h3d-h2, .h3d-scope .h3d-h2 { margin-top: 18px; font-size: 1.35rem; }
.h3d-trust p, .h3d-scope p { color: var(--h3d-body); font-size: 15px; line-height: 1.6; margin: 0 0 12px; }

.h3d-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.h3d-flow li { display: grid; grid-template-rows: auto 1fr; gap: 10px; background: var(--h3d-panel); padding: 16px; border-top: 2px solid var(--h3d-rule); }
.h3d-flow li:nth-child(2), .h3d-flow li:nth-child(3) { border-top-color: var(--h3d-copper); }
.h3d-flow .k { font-family: var(--h3d-mono); color: var(--h3d-accent); font-size: 1.4rem; line-height: 1; }
.h3d-flow b { color: #fff; display: block; margin-bottom: 6px; }
.h3d-flow p { color: var(--h3d-body); font-size: 14px; line-height: 1.55; margin: 0 0 8px; }
.h3d-flow p.t { font-family: var(--h3d-mono); font-size: 12.5px; color: var(--h3d-accent); margin-top: 10px; }

.h3d-time { width: 100%; border-collapse: collapse; margin: 28px 0 10px; font-size: 14.5px; }
.h3d-time caption { text-align: left; font-family: var(--h3d-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--h3d-accent); padding-bottom: 10px; }
.h3d-time th, .h3d-time td { text-align: left; vertical-align: top; padding: 11px 14px 11px 0; border-bottom: 1px solid var(--h3d-rule); color: var(--h3d-body); line-height: 1.5; }
.h3d-time thead th { color: var(--h3d-muted); font-weight: 500; font-size: 13px; }
.h3d-time tbody th { color: #fff; font-weight: 600; width: 34%; }
.h3d-time td:last-child { padding-right: 0; }
.h3d-fine { color: var(--h3d-muted); font-size: 13.5px; line-height: 1.55; margin: 0; max-width: 90ch; }

.h3d-end { margin-top: 60px; border-top: 1px solid var(--h3d-rule); padding-top: 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.h3d-end h2 { color: #fff; font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 0; max-width: 34ch; }
.h3d-end p { margin: 0; }
.h3d-print-only { display: none; }

@media (max-width: 980px) {
  .h3d-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h3d-flow { grid-template-columns: 1fr; }
  .h3d-flow li { grid-template-rows: none; grid-template-columns: 34px 1fr; }
  .h3d-split { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .h3d { padding: 40px 0 48px; }
  .h3d .wrap { padding: 0 16px; }
  .h3d-uses, .h3d-steps, .h3d-stern-grid { grid-template-columns: 1fr; }
  .h3d-time thead { display: none; }
  .h3d-time, .h3d-time tbody, .h3d-time tr, .h3d-time th, .h3d-time td { display: block; width: auto !important; }
  .h3d-time tr { border-bottom: 1px solid var(--h3d-rule); padding: 10px 0; }
  .h3d-time th, .h3d-time td { border: 0; padding: 2px 0; }
  .h3d-time td::before { content: attr(data-label) ": "; color: var(--h3d-muted); }
}

/* A4 brochure, dark panels kept (print backgrounds on). The bottom margin is
   left for the footer band that build_page.py stamps on every page. */
@page { size: A4; margin: 0 0 12mm 0; }
@media print {
  html, body { background: #090c12 !important; margin: 0; }
  .h3d { -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 6mm 0 0; border-top-width: 1.5mm; zoom: 0.86; }
  .h3d .wrap { max-width: none; padding: 0 14mm; }
  .h3d h1 { font-size: 27pt; max-width: 24ch; margin-bottom: 4mm; }
  .h3d-lede { font-size: 11pt; max-width: none; }
  .h3d-cta-row { margin-top: 5mm; }
  .h3d .h3d-show { margin-top: 5mm; }
  .h3d-stern-grid { gap: 4mm; }
  .h3d-stern-grid figcaption { font-size: 8.5pt; padding: 1.5mm 3mm 2mm; }
  .h3d-text { font-size: 10.5pt; margin-bottom: 4mm; max-width: none; }
  .h3d-stern-grid figure { break-inside: avoid; }
  .h3d-h2 { font-size: 16pt; margin: 8mm 0 4mm; break-after: avoid; }
  .h3d-pb { break-before: page; padding-top: 14mm; }
  h2.h3d-pb, .h3d-split.h3d-pb > div > .h3d-h2:first-child, .h3d-stern.h3d-pb > .h3d-h2:first-child { margin-top: 0; }
  .h3d-uses li, .h3d-steps > li, .h3d-flow li, .h3d-trust, .h3d-scope, .h3d-time tr { break-inside: avoid; }
  .h3d-uses { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .h3d-uses li { padding: 3.5mm 4mm 4mm; }
  .h3d-uses b { font-size: 11pt; margin-bottom: 1.5mm; }
  .h3d-uses span { font-size: 9.8pt !important; line-height: 1.45; }
  .h3d-uses span, .h3d-steps p, .h3d-list, .h3d-trust p { font-size: 10.5pt; }
  .h3d-steps { gap: 9mm 8mm; }
  .h3d-steps h3 { font-size: 13.5pt; }
  .h3d-flow { grid-template-columns: 1fr; gap: 3mm; }
  .h3d-flow li { grid-template-rows: none; grid-template-columns: 9mm 1fr; padding: 3.5mm 4mm; }
  .h3d-flow p { font-size: 10pt; margin-bottom: 1mm; }
  .h3d-flow p.t { margin-top: 1.5mm; }
  .h3d-split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0 9mm; }
  .h3d-trust, .h3d-scope { margin-top: 0; }
  .h3d-time { font-size: 10pt; }
  .h3d-end { margin-top: 6mm; padding-top: 5mm; break-inside: avoid; }
  .h3d-list li { margin-bottom: 1.2mm; }
  .h3d-scope .h3d-list, .h3d-scope p, .h3d-split:not(.h3d-pb) .h3d-list { font-size: 9.8pt; line-height: 1.45; }
  .h3d-fine { font-size: 9pt; }
  .h3d-time th, .h3d-time td { padding: 2.2mm 3mm 2.2mm 0; }
  .h3d-cta { border: 0.3mm solid var(--h3d-copper); }
  .h3d-print-only { display: block; }
  .h3d-office { margin-top: 14mm; border-top: 0.4mm solid var(--h3d-copper); padding-top: 5mm; break-inside: avoid; }
  .h3d-office p { color: var(--h3d-body); font-size: 10pt; line-height: 1.55; margin: 0 0 2.5mm; max-width: 150mm; }
  .h3d-office b { color: #fff; font-weight: 600; }
}
