/* ============================================================
   HyPerComp Engineering — placeholder site
   Rams-informed, dark, hairline-driven. Its own brand (not Werkd).
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Default type system: IBM Plex (engineered, technical). Swappable via Tweaks. */
  --font-display: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-head: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Surfaces — carbon black */
  --bg: #0a0a0b;
  --surface: #101011;
  --surface-2: #16161a;

  /* Text */
  --text: #f5f5f7;
  --text-2: #a8a8b0;
  --text-3: #82828a;

  /* Hairlines replace cards */
  --hairline: #1f1f22;
  --hairline-strong: #2c2c32;

  /* Signal accent — overridable via Tweaks. Default: HEI navy (matches nav bar). */
  --accent: #2a2d5e;
  --accent-rgb: 42, 45, 94;
  --accent-text: #8089cf;  /* same hue, brightened for legible eyebrows/links on dark */
  --accent-ink: #ffffff;   /* readable text on accent-filled buttons */

  /* Corporate nav palette — navy pill + gold edge */
  --nav-navy: #2a2d5e;
  --nav-gold: #c2a14a;
  --gold: #c2a14a;         /* gold accent used sparingly across the page */

  --maxw: 1240px;
  --pad-x: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

::selection { background: rgba(var(--accent-rgb), 0.3); }

/* ── Accessibility helpers ───────────────────────────────────── */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  background: var(--nav-navy);
  color: #fff;
  border: 1.5px solid var(--nav-gold);
  border-radius: 4px;
  padding: 12px 18px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  transition: top 160ms ease;
}
.skip-link:focus { top: 16px; }
/* Visible keyboard focus across all interactive elements */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--nav-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* ── Shared type roles ─────────────────────────────────────── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
.eyebrow.muted { color: var(--text-3); }

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

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

.lede {
  color: var(--text-2);
  font-size: 21px;
  line-height: 1.55;
  font-weight: 400;
  max-width: 46ch;
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  padding: 14px 22px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}
.btn .arrow { transition: transform 200ms cubic-bezier(0.16,1,0.3,1); }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1.5px solid var(--gold);
  font-weight: 600;
}
.btn-primary:hover { background: color-mix(in oklab, var(--accent) 84%, white); border-color: color-mix(in oklab, var(--gold) 75%, white); }
/* Gold CTA variant (Tweak: ctaStyle = gold) */
body.cta-gold .btn-primary {
  background: var(--gold);
  color: #161108;
  border-color: var(--gold);
}
body.cta-gold .btn-primary:hover {
  background: color-mix(in oklab, var(--gold) 88%, white);
  border-color: color-mix(in oklab, var(--gold) 88%, white);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--hairline-strong);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }

/* ── Top nav — full-width bar with gold bottom edge ──────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--nav-navy);
  border-bottom: 2px solid var(--nav-gold);
}
.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
  padding: 0 18px 0 28px;
}
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo { height: 60px; width: auto; display: block; }
.wordmark { display: flex; flex-direction: column; line-height: 1; }
.wm-1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: italic;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: #fff;
}
.wm-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #c6c8da;
  margin-top: 4px;
  padding-left: 2px;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 15px;
  color: #c6c8da;
  transition: color 140ms ease;
}
.nav-links a:hover { color: var(--nav-gold); }
.nav-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: #c6c8da;
  letter-spacing: 0.01em;
  transition: color 140ms ease;
}
.nav-phone:hover { color: #fff; }
.nav-phone .phone-ico { color: var(--nav-gold); flex-shrink: 0; }
.btn-contact {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  padding: 10px 22px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.26);
  background: transparent;
  transition: background 160ms ease, border-color 160ms ease;
  white-space: nowrap;
}
.btn-contact:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.5); }

/* Collapse section links early so the pill never overflows on narrow screens */
@media (max-width: 1080px) {
  .nav-links { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero { position: relative; border-bottom: 1px solid var(--hairline); }
.hero.grid-on::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(120% 90% at 80% 10%, #000 0%, transparent 70%);
  mask-image: radial-gradient(120% 90% at 80% 10%, #000 0%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 92px 0 84px;
}
.hero h1 { font-size: clamp(44px, 5.4vw, 76px); }
.hero h1 .accent { color: inherit; }
.hero .eyebrow { margin-bottom: 26px; }
.hero .lede { margin: 28px 0 38px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--hairline-strong);
}
.hero-media-inner { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  /* Graded toward the brand: cooler, calmer, darker than raw footage */
  filter: grayscale(0.4) contrast(1.06) brightness(0.82) saturate(0.85);
}

/* Full-bleed video layer (behind hero content) */
.hero-fullbleed { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.hero-fullbleed .hero-video { position: absolute; inset: 0; }

/* Hero video pause/play control (WCAG 2.2.2) */
.hero-motion-toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in oklab, var(--nav-navy) 80%, transparent);
  border: 1.5px solid var(--nav-gold);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 160ms ease, transform 120ms ease;
}
.hero-motion-toggle:hover { background: var(--nav-navy); }
.hero-motion-toggle:active { transform: scale(0.94); }
.hero-motion-toggle .hmt-play { display: none; }
.hero-motion-toggle.is-paused .hmt-pause { display: none; }
.hero-motion-toggle.is-paused .hmt-play { display: inline-flex; }
.hero:not(.mode-fullbleed) .hero-motion-toggle,
.hero.mode-photo .hero-motion-toggle { display: none; }
@media (max-width: 760px) { .hero-motion-toggle { right: 14px; bottom: 14px; } }

/* ── Hero media modes ── */
/* panel (default): video lives in the right panel, image-slot hidden */
.hero.mode-panel .hero-fullbleed { display: none; }
.hero.mode-panel #hero-vessel { display: none; }

/* photo: show the drop slot, hide video */
.hero.mode-photo .hero-fullbleed { display: none; }
.hero.mode-photo .hero-video { display: none; }

/* fullbleed: video covers the whole hero, text sits on a scrim, centered */
.hero.mode-fullbleed .hero-inner { grid-template-columns: 1fr; position: relative; z-index: 2; padding: 168px 0 150px; text-align: center; }
.hero.mode-fullbleed .hero-media { display: none; }
.hero.mode-fullbleed .hero-copy { max-width: 920px; margin: 0 auto; text-shadow: 0 1px 2px rgba(0,0,0,0.5), 0 2px 28px rgba(0,0,0,0.55); }
.hero.mode-fullbleed .hero-copy h1 { text-shadow: 0 1px 1px rgba(0,0,0,0.55), 0 2px 10px rgba(0,0,0,0.45), 0 6px 40px rgba(0,0,0,0.5); }
.hero.mode-fullbleed .hero-copy .lede { margin-left: auto; margin-right: auto; color: #e9e9ee; max-width: 840px; text-wrap: balance; }
.hero.mode-fullbleed .hero-actions { justify-content: center; }
/* keep the footage bright; the scrim, not the filter, protects the text */
.hero.mode-fullbleed .hero-video { filter: grayscale(0.18) contrast(1.0) brightness(1.12) saturate(0.95); }
/* uniform scrim — even across the whole frame */
.hero.mode-fullbleed::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: color-mix(in oklab, var(--bg) var(--hero-scrim, 70%), transparent);
  pointer-events: none;
}
.hero.mode-fullbleed.grid-on::before { display: none; }
.hero-media .tag {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2);
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  padding: 6px 10px;
  pointer-events: none;
}

/* ── Stat strip ────────────────────────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--hairline);
}
.stat {
  padding: 30px var(--pad-x);
  border-right: 1px solid var(--hairline);
}
.stat:last-child { border-right: none; }
.stat .k {
  font-family: var(--font-mono);
  font-size: clamp(36px, 4.4vw, 58px);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: block;
}
.stat .v {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 8px;
  display: block;
}
.stats-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  border-left: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}

/* ── Differentiator strip ──────────────────────────────────── */
.diff-strip {
  background: var(--nav-navy);
  border-top: 1px solid var(--nav-gold);
  border-bottom: 1px solid var(--nav-gold);
  padding: 60px 0;
}
.diff-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.diff-item {
  padding: 0 52px;
  border-right: 1px solid rgba(194, 161, 74, 0.25);
}
.diff-item:first-child { padding-left: 0; }
.diff-item:last-child { border-right: none; }
.diff-label {
  display: block;
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 1000;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
.diff-body {
  color: rgba(245, 245, 247, 0.82);
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  max-width: 52ch;
  text-wrap: pretty;
}
@media (max-width: 760px) {
  .diff-inner { grid-template-columns: 1fr; gap: 44px; }
  .diff-item { padding: 0; border-right: none; border-bottom: 1px solid rgba(194, 161, 74, 0.25); padding-bottom: 44px; }
  .diff-item:last-child { border-bottom: none; padding-bottom: 0; }
}

/* ── Section scaffolding ───────────────────────────────────── */
section { scroll-margin-top: 76px; }
.block { padding: var(--block-pad, 104px) 0; border-bottom: 1px solid var(--hairline); }
.block-head { max-width: 720px; margin-bottom: 64px; }
.block-head .eyebrow { margin-bottom: 20px; }
.block-head h2 { font-size: clamp(32px, 3.6vw, 50px); }
.block-head p { color: var(--text-2); font-size: 19px; margin: 22px 0 0; max-width: 58ch; text-wrap: pretty; }
/* Let the "What we do" heading lay out on 2 lines (container is otherwise capped at 720px) */
#capabilities .block-head { max-width: 1000px; }
#capabilities .block-head p { max-width: 58ch; }

/* ── Capabilities list ─────────────────────────────────────── */
.cap-list { border-top: 1px solid var(--hairline); }
.cap-row {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  padding: 28px 8px;
  border-bottom: 1px solid var(--hairline);
}
.cap-row .idx { font-family: var(--font-mono); font-size: 13px; color: var(--gold); letter-spacing: 0.1em; }
.cap-row .name { font-size: 23px; font-weight: 500; letter-spacing: -0.01em; }
.cap-row .desc { color: var(--text-2); font-size: 16px; line-height: 1.55; }

/* ── Applications grid ─────────────────────────────────────── */
.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.app {
  border: 1px solid var(--hairline-strong);
  display: flex;
  flex-direction: column;
}
.app-media { position: relative; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--hairline-strong); }
.app-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-body { padding: 28px 30px 34px; }
.app-body .idx { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.app-body h3 { font-size: 25px; margin: 14px 0 12px; }
.app-body p { color: var(--text-2); font-size: 16px; line-height: 1.55; margin: 0; text-wrap: pretty; }

/* ── Heritage ──────────────────────────────────────────────── */
.heritage-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.heritage-copy p { color: var(--text-2); font-size: 18px; line-height: 1.65; margin: 0 0 20px; max-width: 52ch; }
.heritage-copy p strong { color: var(--text); font-weight: 500; }
.heritage-stats { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.heritage-stats .hs .k { font-family: var(--font-mono); font-size: 34px; font-weight: 500; color: var(--gold); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; display: block; }
.heritage-stats .hs .v { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin-top: 8px; display: block; max-width: 18ch; }
.heritage-media { position: relative; aspect-ratio: 3 / 4; border: 1px solid var(--hairline-strong); }
.heritage-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Testing & R&D ─────────────────────────────────────────── */
.testing-inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.testing-media { position: relative; aspect-ratio: 4 / 5; border: 1px solid var(--hairline-strong); }
.testing-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.testing-list { border-top: 1px solid var(--hairline); }
.test-row {
  position: relative;
  padding: 22px 8px 22px 20px;
  border-bottom: 1px solid var(--hairline);
}
.test-row .t-name { display: block; font-size: 19px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.test-row .t-desc { display: block; color: var(--text-2); font-size: 15px; line-height: 1.5; margin-top: 6px; }

/* ── Quality / certifications ──────────────────────────────── */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.cert {
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 30px 28px;
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cert .name { font-family: var(--font-mono); font-size: 17px; font-weight: 500; letter-spacing: -0.01em; color: var(--text); }
.cert .note { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: var(--text-3); text-transform: uppercase; }

/* ── Contact / CTA ─────────────────────────────────────────── */
.contact { padding: 116px 0; border-bottom: 1px solid var(--hairline); }
.contact-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 72px; align-items: end; }
.contact h2 { font-size: clamp(38px, 4.6vw, 64px); }
.contact .lede { margin: 28px 0 36px; font-size: 20px; }
.contact-actions { display: flex; gap: 14px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .contact-actions .btn, .hero-actions .btn { flex: 1 1 100%; justify-content: center; }
}
.contact-detail { border-top: 1px solid var(--hairline); }
.contact-detail .row { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.contact-detail .row .l { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.contact-detail .row .r { font-family: var(--font-mono); font-size: 15px; color: var(--text); text-align: right; }
.contact-detail .row a.r:hover { color: var(--gold); }

/* ── Footer ────────────────────────────────────────────────── */
.footer { padding: 48px 0 60px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer .copy { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 26px; }
.footer-links a { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--text-3); text-transform: uppercase; }
.footer-links a:hover { color: var(--text); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 920px) {
  :root { --pad-x: 24px; }
  .nav-links { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; padding: 64px 0; }
  .hero-media { aspect-ratio: 16 / 11; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--hairline); }
  .cap-row { grid-template-columns: 1fr; gap: 8px; }
  .app-grid { grid-template-columns: 1fr; }
  .heritage-inner { grid-template-columns: 1fr; gap: 44px; }
  .testing-inner { grid-template-columns: 1fr; gap: 36px; }
  .testing-media { display: none; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-inner { grid-template-columns: 1fr; gap: 44px; align-items: start; }
  .block { padding: 72px 0; }
}
@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--hairline); }
  .cert-grid { grid-template-columns: 1fr; }
}



/* ── Gold eyebrow accent ─────────────────────────────────────── */
.block-head .eyebrow::after {
  content: "";
  display: block;
  width: 36px;
  height: 2px;
  background: var(--gold);
  margin-top: 14px;
}

/* ── Download links ──────────────────────────────────────────── */
.dl-row { margin: 36px 0 0; }
.dl-link {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-2);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 140ms ease, border-color 140ms ease;
}
.dl-link:hover { color: var(--gold); border-bottom-color: var(--gold); }
