/* ============================================================================
   Hydronet v4 — design system (consolidated)
   Reference language: ekarobotics.com — single grotesk at one weight, tight
   negative tracking, enormous whitespace, hairline rules, no ornament.
   Dark-only: the v3 light colourway and the review theme switch were removed
   in this consolidation (all six pages ship data-theme="dark"; no JS toggle).
   One definition per selector; final cascade values inlined.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  --font-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* type scale — fluid, tight line-heights, negative tracking */
  --t-hero:    clamp(2.9rem, 8vw, 7rem);
  --t-display: clamp(1.9rem, 4.2vw, 3.4rem);
  --t-stmt:    clamp(1.55rem, 3.1vw, 2.6rem);
  --t-sub:     clamp(1.05rem, 1.55vw, 1.3rem);
  --t-body:    clamp(1rem, 1.2vw, 1.125rem);
  --t-micro:   0.6875rem;

  --track-tight: -0.022em;
  --track-micro: 0.09em;

  /* rhythm — spacing steps: 0.35 / 0.75 / 1.1 / 1.5 / 2.2 rem;
     section bands below */
  --gutter: clamp(1.5rem, 5vw, 5.5rem);
  --section-y:       clamp(4rem, 9vh, 7rem);
  --section-y-tight: clamp(2.75rem, 6vh, 4.5rem);
  --section-y-layer: clamp(2.5rem, 5vh, 4rem);
  --maxw: 1560px;
  --measure: 46ch;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* palette — dark canvas. Contrast vs #0c0e0f noted per token. */
  --canvas: #0c0e0f;
  --ink: #eef1f2;                            /* 16.8:1 */
  --ink-mute: #8d9497;                       /*  6.3:1 */
  --ink-faint: #767d80;                      /*  4.6:1 — was #5c6366 (3.2:1, AA fail) */
  --rule: rgba(238, 241, 242, 0.14);
  --rule-soft: rgba(238, 241, 242, 0.07);
  --block: #15191b;
  --block-ink: #eef1f2;
  --block-mute: rgba(238, 241, 242, 0.62);   /* ~6.6:1 on --block */
  --block-rule: rgba(238, 241, 242, 0.14);
  --accent: #76c79d;                         /* brand green — 9.6:1 */
  --brand-green: var(--accent);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 7rem; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--canvas); }
/* one focus style for every interactive element — links, buttons, form fields */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* visually hidden, still read by screen readers and text scrapers */
.vh {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--rule-soft); }
.section--flush { padding-block: 0; }
.section--tight { padding-block: var(--section-y-tight); }
.section--layer { padding-block: var(--section-y-layer); }

.block { background: var(--block); color: var(--block-ink); }
.block .micro, .block .lead { color: var(--block-mute); }

/* ---------- type ---------- */
.hero-h1 {
  margin-top: 1.35rem;
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.display {
  font-size: var(--t-display);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: var(--track-tight);
  text-wrap: balance;
}
.stmt {
  font-size: var(--t-stmt);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: var(--track-tight);
  max-width: 34ch;
  text-wrap: pretty;
}
.stmt--mute { color: var(--ink-mute); }
.lead { color: var(--ink-mute); max-width: var(--measure); line-height: 1.6; }

.micro {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1;
}
.micro--ink { color: var(--ink); }

/* the opening argument — uniform type, hierarchy by colour */
.argument .stmt--arg { max-width: 44ch; }
.argument .stmt--arg + .stmt--arg { margin-top: 1.5rem; }
.argument em { font-style: italic; color: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem var(--gutter);
  color: var(--ink);
  /* translucent canvas + blur so scrolled content never collides with the
     logo; solid-color fallback for browsers without backdrop-filter */
  background: rgba(12, 14, 15, 0.72);
  border-bottom: 1px solid var(--rule-soft);
}
@supports (backdrop-filter: blur(1px)) {
  .nav { background: rgba(12, 14, 15, 0.55); backdrop-filter: blur(14px) saturate(1.15); }
}
.nav a { color: inherit; }
.nav-links { display: flex; align-items: center; gap: clamp(1.1rem, 2.6vw, 2.5rem); }
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.78;
  transition: opacity 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }

/* ---------- brand lockup ----------
   Source: hydronet_logo.ai + hydronet_logo_white_ED.ai (Illustrator 2022),
   flattened to plain vector. The on-dark colourway (white fluke, green arcs
   and wordmark) ships site-wide; the navy primary (#214289) measures only
   2.03:1 on this canvas. Horizontal lockup recomposed to 2.73:1 because the
   supplied 1.4:1 / 0.71:1 files do not sit well in a nav bar. */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand-lockup {
  display: block;
  height: 3.4rem;
  aspect-ratio: 2.73 / 1;
  background: url(../img/brand/hydronet-lockup-h-onDark.svg) center / contain no-repeat;
}
/* two-class selector outweighs the mobile overrides below — footer lockup
   holds 3.6rem at every width */
.brand--foot .brand-lockup { height: 3.6rem; }
.foot .brand { margin-bottom: 0.5rem; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background: #0a0c0d;
  color: #f6f6f6;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.04);
  animation: slowdrift 26s var(--ease) infinite alternate;
}
@keyframes slowdrift { to { transform: scale(1.11); } }
/* strong bottom scrim so the hero type never fights the photograph */
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top,
    rgba(6,8,9,0.94) 0%, rgba(6,8,9,0.72) 22%, rgba(6,8,9,0.30) 52%, rgba(6,8,9,0.55) 100%);
}
.hero-inner {
  position: relative;
  width: 100%;
  padding-block: clamp(3rem, 9vh, 6.5rem);
}
.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1.4rem, 2.5vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: var(--track-tight);
  color: rgba(246, 246, 246, 0.88);
  max-width: 38ch;
}

/* ---------- two headline pillars — connectivity + intelligence ---------- */
.duo-pillars { display: grid; gap: 1px; background: var(--rule); }
@media (min-width: 860px) { .duo-pillars { grid-template-columns: repeat(2, 1fr); } }
.duo-pillar {
  background: var(--canvas);
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 3rem);
  display: flex; flex-direction: column; gap: 1.15rem;
}
.duo-pillar .display { font-size: var(--t-stmt); line-height: 1.1; }
.pillar-figure {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--block);
  margin-top: auto;
}
.pillar-figure img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- index list (products) ---------- */
.index-list { border-top: 1px solid var(--rule); }
.index-row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding: clamp(1.35rem, 2.6vw, 2.1rem) 0;
  border-bottom: 1px solid var(--rule);
  transition: opacity 0.4s var(--ease);
}
/* mobile: number | name, desc below in col 2, arrow hidden */
.index-row .index-name, .index-row .index-desc { grid-column: 2; }
.index-row .index-arrow { display: none; }
@media (min-width: 860px) {
  .index-row { grid-template-columns: 3.5rem minmax(0, 15rem) minmax(0, 1fr) auto; }
  .index-row .index-name { grid-column: 2; }
  .index-row .index-desc { grid-column: 3; }
  .index-row .index-arrow { display: block; grid-column: 4; }
}
.index-list:hover .index-row { opacity: 0.42; }
.index-list:hover .index-row:hover { opacity: 1; }
.index-row:focus-within { opacity: 1; }
.index-name { font-size: clamp(1.3rem, 1.9vw, 1.65rem); letter-spacing: var(--track-tight); line-height: 1.1; }
.index-desc { color: var(--ink-mute); font-size: 1rem; line-height: 1.45; }
.index-arrow { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-faint); }
.index-row:hover .index-arrow { color: var(--ink); }

/* ---------- two-column editorial ---------- */
.duo { display: grid; gap: clamp(2rem, 5vw, 4.5rem); }
@media (min-width: 940px) {
  .duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .duo--aside { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .duo--form { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

/* ---------- key/value tables ----------
   .spec (roomy, form-friendly) and .record (deliberately dense) share one
   skeleton: same row padding, same gaps, same mono key treatment. */
.spec, .record { border-top: 1px solid var(--rule); }
.spec-row, .record-item {
  display: grid;
  gap: 0.35rem 1.75rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
@media (min-width: 760px) { .spec-row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); } }
@media (min-width: 560px) { .record-item { grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); } }
.spec-key {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.2em;
  color: var(--ink-mute);
}
.record-key {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-top: 0.2em;
  color: var(--ink-faint);
}
.spec-val { line-height: 1.5; }
.record-val { font-size: 1rem; line-height: 1.45; }
.record-grid { display: grid; }
@media (min-width: 900px) {
  .record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2.5rem, 6vw, 6rem); }
}
.block .record, .block .record-item { border-color: var(--block-rule); }
.block .record-key { color: var(--block-mute); }

/* ---------- operational timeline ---------- */
.tl { border-top: 1px solid var(--rule); }
.tl-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: 0.35rem 1.5rem;
  padding: clamp(1.1rem, 2vw, 1.6rem) 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: baseline;
}
@media (min-width: 880px) {
  .tl-row { grid-template-columns: 4.25rem minmax(0, 16rem) minmax(0, 9rem) minmax(0, 1fr); }
}
.tl-year { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink); letter-spacing: 0.04em; }
.tl-name { font-size: clamp(1.1rem, 1.5vw, 1.3rem); letter-spacing: var(--track-tight); line-height: 1.2; }
.tl-loc { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.tl-desc { color: var(--ink-mute); font-size: 1rem; line-height: 1.45; }
.block .tl { border-color: var(--block-rule); }
.block .tl-row { border-color: var(--block-rule); }
.block .tl-year { color: var(--block-ink); }
.block .tl-desc, .block .tl-loc { color: var(--block-mute); }

/* ---------- IP / patents ---------- */

/* ---------- team grid — compact grayscale headshots + credential bullets ---------- */
.team { display: grid; gap: 1px; background: var(--rule); }
@media (min-width: 620px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px) and (max-width: 999.98px) { .team-cell:last-child { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .team { grid-template-columns: repeat(3, 1fr); } }
.team-cell { background: var(--canvas); padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 0.35rem; }
.team-photo {
  width: 9rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: grayscale(1);
  margin-bottom: 0.9rem;
}
.team-bullets {
  margin-top: 0.5rem;
  padding-left: 1.05rem;
  list-style: disc;
  color: var(--ink-mute);
  font-size: 0.875rem;
  line-height: 1.45;
}
.team-bullets li + li { margin-top: 0.35rem; }
.team-bullets li::marker { color: var(--ink-faint); }
.team-name { font-size: 1.0625rem; letter-spacing: var(--track-tight); }
.team-role { font-family: var(--font-mono); font-size: var(--t-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }

/* ---------- applications: market rows with proof lines ---------- */
.vert { border-top: 1px solid var(--rule); }
.vert-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 2fr;
  gap: 1.5rem 3rem;
  padding-block: clamp(1.8rem, 3.5vw, 2.6rem);
  border-bottom: 1px solid var(--rule);
}
.vert-name {
  font-size: clamp(1.3rem, 2.1vw, 1.9rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: var(--track-tight);
}
.vert-desc { color: var(--ink-mute); max-width: 56ch; line-height: 1.6; }
.vert-proof {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--accent);
}
@media (max-width: 720px) {
  .vert-row { grid-template-columns: 1fr; gap: 0.8rem; }
}

/* ---------- deployment scene (deck render + callout overlay) ---------- */
.scene-wrap { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--rule, rgba(255,255,255,0.08)); }
.scene-wrap img { display: block; width: 100%; height: auto; }
.scene-overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.dg-chip { fill: rgba(12, 14, 15, 0.9); stroke: rgba(255, 255, 255, 0.10); stroke-width: 1; }
.dg-inset-frame { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
@media (max-width: 1000px) {
  .scene-overlay { display: none; }
}
.dg-leader { fill: none; stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 1; }
.dg-lab { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.09em; fill: var(--ink); }
.dg-lab--acc { fill: var(--brand-green); }
.dg-sub  { font-family: var(--font-sans); font-size: 13px; fill: var(--ink-mute); letter-spacing: -0.01em; }

/* ---------- media figure ---------- */
.fig { overflow: hidden; background: var(--block); }
.fig--wide { aspect-ratio: 16 / 8; }
.fig img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- links / cta ---------- */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid currentColor;
  transition: color 0.3s var(--ease), gap 0.3s var(--ease);
}
.link:hover { color: var(--accent); gap: 0.85rem; }
.block .link:hover { color: #fff; }
.link-row { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 7vh, 5rem) 2rem; }
.foot-grid { display: grid; gap: 2.5rem; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.foot-col { display: flex; flex-direction: column; gap: 0.75rem; }
.foot-col a, .foot-col span { font-size: 0.875rem; color: var(--ink-mute); transition: color 0.3s var(--ease); }
.foot-col a:hover { color: var(--ink); }
.foot-legal {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
}
.foot-legal p {
  font-family: var(--font-mono);
  font-size: var(--t-micro);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- breadcrumb ---------- */
.crumb { padding-top: clamp(7rem, 13vh, 9rem); }
.crumb .micro { color: var(--ink-faint); }

/* ---------- reveal ---------- */
html.js .rv { opacity: 0; transform: translateY(18px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
html.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  html.js .rv { opacity: 1; transform: none; transition: none; }
  .hero-media img { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- mobile ---------- */
@media (max-width: 720px) {
  .nav-links { gap: 0.9rem; }
  .nav-links a { font-size: 0.6875rem; letter-spacing: 0.06em; }
  .nav-links a[href="index.html"] { display: none; }
  .brand-lockup { height: 2.6rem; }
  .hero { padding-top: 4rem; }
  .index-list:hover .index-row { opacity: 1; }
  }
/* vertical lockup on narrow screens — must come after the 720px block so it
   wins the equal-specificity cascade at ≤480px */
@media (max-width: 480px) {
  .brand-lockup {
    height: 3.8rem;
    aspect-ratio: 0.71 / 1;
    background-image: url(../img/brand/hydronet-lockup-v-onDark.svg);
  }
}

/* centered section heading — used above the two pillars */
.section-h {
  text-align: center;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}

/* pillar tags — the two-word claim above each pillar heading */
.pillar-tag {
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
}

/* looping demo video inside figure frames */
.fig-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* product header inside a layer — name + kicker on one baseline */
.prod-head {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.prod-name {
  font-size: clamp(1.45rem, 2.1vw, 1.9rem);
  font-weight: 400;
  letter-spacing: var(--track-tight);
  line-height: 1;
}

/* section-header labels were 11px — hard to read; raise every label-row pair */
.label-row .micro {
  font-size: 0.875rem;           /* 14px */
  letter-spacing: 0.11em;
}

/* field-photo strip under the operational record */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: clamp(2rem, 4vw, 3rem);
  background: var(--block-rule);
}
.photo-strip figure { margin: 0; background: var(--block); }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.photo-strip figcaption { padding: 0.7rem 0.2rem 0.7rem; color: var(--block-mute); }
@media (max-width: 720px) { .photo-strip { grid-template-columns: 1fr; } }
