/* ═══════════════════════════════════════════════════════════════════
   HIVE.TECH — public site (house-brand page)
   Style: softened industrial-brutalist "datasheet"
   Derived from the Nexus console design system (projects/development/
   src/web/webcomponents/DESIGN.md): --ib-* palette, square corners,
   no shadows/gradients, hairline compartments, bimodal density.
   Model: house brand first (Apple), products as posters beneath it.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --accent: #DBA433;
  --live: #4AF626;

  --paper: #F4F4F0;
  --band: #E8E6E0;
  --hover: #EAE8E2;
  --hairline: #d8d6d0;
  --hairline-soft: #e4e2dc;
  --ink: #2B2A25;
  --body-c: #3a3a35;
  --muted: #4a4a45;
  --subtle: #6b6b66;
  --faint: #8a8a85;
  --frame: #4A4943;
  --frame-soft: #4A4943;
  --fill: #2B2A25;
  --fill-text: #F4F4F0;

  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151515;
    --band: #1B1B19;
    --hover: #1F1F1D;
    --hairline: #2a2a2a;
    --hairline-soft: #1f1f1f;
    --ink: #D6D6D0;
    --body-c: #c0c0c0;
    --muted: #9a9a9a;
    --subtle: #8a8a8a;
    --faint: #555555;
    --frame: #55554F;
    --frame-soft: #3a3a3a;
    --fill: #C9C9C4;
    --fill-text: #151515;
  }
}

/* ── Base ─────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--body-c);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: transparent;
}

::selection { background: var(--accent); color: #1a1914; }

.mono { font-family: var(--font-mono); }

.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 48px);
}

a { color: inherit; }

.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--faint);
}
.text-link:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ── Header band ──────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--band);
  border-bottom: 2px solid var(--frame);
}

section[id] { scroll-margin-top: 72px; }

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding-block: 14px;
}

.header-inner .brand { justify-self: start; }
.header-inner .header-nav { justify-self: center; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 34px; height: 34px; display: block; }

.brand-word {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.brand-word sup { font-size: 8px; letter-spacing: 0; }
.brand-word .bracket { color: inherit; }

.header-nav {
  display: flex;
  gap: 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.header-nav a {
  color: var(--subtle);
  text-decoration: none;
  padding: 4px 0;
}
.header-nav a::before {
  content: "// ";
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.15s;
}
.header-nav a:hover { color: var(--accent); }
.header-nav a.is-current { color: var(--ink); }
.header-nav a.is-current::before { opacity: 1; }

@media (max-width: 640px) {
  .header-nav { display: none; }
}

/* ── Type ─────────────────────────────────────────────────────────── */

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 22px;
}

.display {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.headline {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(1.55rem, 2.9vw, 2.3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 26ch;
  margin-bottom: 20px;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  max-width: 58ch;
}

.section-lede {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  max-width: 62ch;
  margin-bottom: 26px;
}
.section-lede + .section-lede { margin-top: -12px; }

/* ── Buttons ──────────────────────────────────────────────────────── */

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
  display: inline-block;
  border: 1px solid var(--frame);
  background: transparent;
  padding: 13px 22px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }

.btn-block { display: block; width: 100%; text-align: center; }

.btn-solid { background: var(--fill); color: var(--fill-text); border-color: var(--fill); }
.btn-solid:hover { background: transparent; color: var(--ink); border-color: var(--frame); }

.btn:focus-visible, .text-link:focus-visible, .brand:focus-visible,
.header-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Hero — the house ─────────────────────────────────────────────── */

.hero { position: relative; overflow: hidden; }

.hex-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hex-field { width: 100%; height: 100%; display: block; }

.hxo {
  fill: none;
  stroke: var(--hairline-soft);
  stroke-width: 1;
}

.phx {
  position: absolute;
  width: 48.5px;
  height: 56px;
  margin-left: -24.25px;
  margin-top: -28px;
  fill: var(--band);
  opacity: 0;
  animation: hexpulse 8s ease-in-out infinite;
}

@keyframes hexpulse {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.hero-house {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(48px, 6.5vw, 92px);
}

.mark-anim { margin-bottom: 32px; }

.house-mark {
  display: block;
  margin-inline: auto;
  width: clamp(190px, 24vw, 270px);
  color: var(--ink);
  overflow: visible;
}

.house-mark .halo { fill: var(--paper); }

.hexL, .hexR {
  transition: transform 1.15s cubic-bezier(0.65, 0, 0.25, 1);
}
.mark-anim.apart .hexL { transform: translateX(-240px); }
.mark-anim.apart .hexR { transform: translateX(240px); }

.mark-label {
  display: flex;
  justify-content: center;
  align-items: baseline;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  color: var(--subtle);
  white-space: nowrap;
}

.mark-label .mid {
  position: relative;
  width: 30px;
  height: 1em;
  transition: width 1.15s cubic-bezier(0.65, 0, 0.25, 1);
}
.mark-anim.apart .mid { width: 140px; }

.mid-brackets {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  transition: opacity 0.2s ease 0.55s;
}
.mark-anim.apart .mid-brackets { opacity: 1; transition: opacity 0.15s ease; }

.mid-plus {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  transition: opacity 0.25s ease 0.7s;
}
.mark-anim.apart .mid-plus { opacity: 0; transition: opacity 0.1s ease; }

.house-title { margin-bottom: 14px; }

.house-sub {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.house-lede { margin-inline: auto; color: var(--muted); }

.hero-ctas { justify-content: center; margin-top: 28px; }

/* ── Product posters ──────────────────────────────────────────────── */

.product-section { padding-block: clamp(34px, 4.5vw, 54px); }

.section-banded {
  background: var(--band);
  border-top: 2px solid var(--frame);
  border-bottom: 2px solid var(--frame);
}
.section-banded + .section-banded { border-top: none; }
.section-banded .panel { background: var(--paper); }

.product-name {
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.9rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.pn-word { display: inline-block; white-space: nowrap; }

.reel {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  vertical-align: bottom;
}

.reel-strip {
  display: block;
  transform: translateY(0);
  transition: transform 0.95s cubic-bezier(0.15, 0.85, 0.25, 1);
}

.reel-strip.spun { transform: translateY(-8em); }

.reel-strip span {
  display: block;
  height: 1em;
  line-height: 1;
}

.product-role {
  color: var(--muted);
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 500;
  margin-bottom: 22px;
}

.product-copy {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  max-width: 58ch;
  margin-bottom: 28px;
}

/* ── Sections (company, start) ────────────────────────────────────── */

.section { padding-block: clamp(34px, 4.5vw, 54px); }

/* Drafting-sheet section heads */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-head .eyebrow { margin-bottom: 0; }

.sheet-ref {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--faint);
  white-space: nowrap;
}

/* Capability flow strip */

.cap-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 14px 2px;
  margin-bottom: 26px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.cap-flow .arrow { color: var(--accent); font-weight: 400; }

/* Field console instrument */

.console {
  border: 2px solid var(--frame);
  background: var(--paper);
}

.console-tabs {
  display: flex;
  overflow-x: auto;
  background: var(--band);
  border-bottom: 2px solid var(--frame);
}

.tab {
  flex: 1 0 auto;
  border: none;
  border-right: 1px solid var(--hairline);
  background: transparent;
  padding: 13px 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.tab:last-child { border-right: none; }
.tab:hover { color: var(--ink); background: var(--hover); }
.tab.is-active, .tab.is-active:hover {
  background: var(--fill);
  color: var(--fill-text);
}
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.console-panel[hidden] { display: none; }

.cp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 0;
}

.cp-head h3 {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pill {
  border: 1px solid var(--frame);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}

.cp-body { padding: 12px 22px 22px; }
.cp-body p { font-size: 15px; max-width: 70ch; }
.cp-body p + p { margin-top: 8px; }

/* Panel instruments */

.cp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--frame);
  border: 2px solid var(--frame);
  margin-top: 18px;
}

.cp-grid span {
  background: var(--band);
  text-align: center;
  padding: 11px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 720px) { .cp-grid { grid-template-columns: repeat(2, 1fr); } }

.brand-plate {
  border: 2px dashed var(--frame-soft);
  text-align: center;
  padding: 30px 20px;
  margin-top: 18px;
}

.bp-name {
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--faint);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--frame);
  border: 2px solid var(--frame);
  margin-top: 18px;
}

.pipeline span {
  background: var(--band);
  text-align: center;
  padding: 11px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.pipeline .pl-end { background: var(--fill); color: var(--fill-text); }

@media (max-width: 720px) { .pipeline { grid-template-columns: repeat(2, 1fr); } }

.product-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-top: 1px solid var(--hairline);
  margin-top: 16px;
  padding-top: 16px;
}

.prod-icon { height: 28px; width: auto; flex: none; }

.prod-name {
  color: var(--ink);
  font-weight: 800;
  font-size: 15px;
}

.prod-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--subtle);
  margin-left: 8px;
}

.prod-desc { font-size: 14px; color: var(--muted); }
.product-row p { max-width: none; }
.prod-link { font-size: 12px; margin-left: 6px; }

.prod-store { white-space: nowrap; }
.prod-store svg {
  height: 11px;
  width: auto;
  margin-right: 4px;
  vertical-align: -1px;
}

/* Two-column panel body: prose left, action/instrument right */

.cp-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 40px;
  align-items: center;
}

.cp-cols .btn { white-space: nowrap; justify-self: end; }

.cp-cols .brand-plate {
  margin-top: 0;
  min-width: 300px;
  padding: 26px 28px;
}

@media (max-width: 800px) {
  .cp-cols { grid-template-columns: 1fr; }
  .cp-cols .btn { justify-self: start; }
  .cp-cols .brand-plate { min-width: 0; }
}

.cp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--hairline);
  padding: 12px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--subtle);
  text-transform: uppercase;
}

/* Figures */

.fig-card {
  border: 2px solid var(--frame);
  background: var(--paper);
  margin-bottom: 24px;
}

.fig-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  background: var(--band);
  border-bottom: 2px solid var(--frame);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.fig-title { color: var(--ink); }
.fig-sub { color: var(--subtle); }

.fig-img {
  display: block;
  width: 100%;
  height: auto;
}

/* Panels + people */

.panel {
  border: 2px solid var(--frame);
  background: var(--paper);
}

.panel-body { padding: 18px 16px; }
.panel-body p { font-size: 15px; margin-bottom: 12px; }
.panel-body p:last-child { margin-bottom: 0; }

.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 780px) { .people { grid-template-columns: 1fr; } }

.person { display: block; }

.person h3 {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.person-role {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 4px 0 10px;
}

/* Start */

.start-wrap { text-align: center; }
.start-wrap .section-lede { margin-inline: auto; }
.start-display { font-size: clamp(2.2rem, 5.5vw, 4.2rem); margin-bottom: 24px; }
.start-wrap .cta-row { justify-content: center; }

/* ── Footer ───────────────────────────────────────────────────────── */

.site-footer {
  background: var(--band);
  border-top: 2px solid var(--frame);
  padding-block: 28px 36px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--subtle);
  margin-bottom: 14px;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }

.legal { font-size: 12px; color: var(--faint); }

/* ── Reveal motion ────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hexL, .hexR, .mid, .mid-brackets, .mid-plus { transition: none; }
  .phx { animation: none; opacity: 0.3; }
}
