/* Void Helm — voidhelm.dev home page.
   Page-level styles. Anything shared with other Void Helm surfaces lives in
   css/base/components.css; this file is only the home page's own layout. */

/* ── Document ───────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  background: var(--helm-bg);
}
body {
  overflow-x: hidden;
}

.vh-page {
  min-height: 100vh;
  background: var(--helm-bg);
  font-family: var(--font-sans);
  color: var(--helm-fg);
}

.vh-defs {
  position: absolute;
  width: 0;
  height: 0;
}

/* ── Background stack ───────────────────────────────────────
   z0 particle field · z1 scrim (scrubbed by JS) · z2 vignette. */
#vhField {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}
#vhScrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--helm-bg);
  opacity: 0.62;
  transition: background var(--helm-dur-theme) var(--helm-ease);
}
.vh-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    120% 85% at 50% 50%,
    rgb(0 0 0 / 0) 34%,
    rgb(0 0 0 / 0.4) 78%,
    rgb(0 0 0 / 0.8) 100%
  );
}

/* ── Shared measure ─────────────────────────────────────── */
.vh-wrap {
  margin: 0 auto;
  width: 100%;
  max-width: 1320px;
  box-sizing: border-box;
  padding: 0 clamp(20px, 4vw, 40px);
}

.vh-main {
  position: relative;
  z-index: 5;
}

/* Mono micro-meta: the recurring uppercase hint line. */
.vh-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--helm-fg-mute);
}

/* ── Header ─────────────────────────────────────────────── */
.vh-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
}
.vh-header-inner {
  display: flex;
  height: var(--header-h);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.vh-header-tools {
  display: flex;
  align-items: center;
  gap: 18px;
}
.vh-chapter {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--helm-fg-mute);
}
.vh-chapter b {
  font-weight: inherit;
  color: var(--helm-fg-dim);
}
@media (max-width: 759px) {
  .vh-chapter { display: none; }
}

.vh-helm-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--helm-fg-mute);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.vh-helm-trigger:hover { color: var(--helm-fg); }
.vh-helm-trigger:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: 4px;
}

/* ── HelmMark (brand lockup) ────────────────────────────── */
.helm-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.helm-mark svg { color: var(--helm-accent); }
.helm-mark-word {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: var(--track-wordmark);
  color: var(--helm-fg);
}

/* ── PaletteSwitcher ────────────────────────────────────── */
.helm-palette {
  display: flex;
  align-items: center;
  gap: 12px;
}
.helm-palette-label {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--helm-fg-mute);
}
.helm-palette-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
}
.helm-swatch {
  height: 12px;
  width: 12px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 300ms var(--helm-ease), border-color 300ms var(--helm-ease);
}
.helm-swatch[aria-pressed='true'] {
  border-color: var(--helm-fg);
  transform: scale(1.1);
}

/* ── CommandPalette — "the helm" ────────────────────────── */
.helm-cmdk {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.helm-cmdk[hidden] { display: none; }
.helm-cmdk-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  cursor: default;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: helm-rise 0.2s ease;
}
.helm-cmdk-dialog {
  position: relative;
  z-index: 10;
  margin-top: 16vh;
  width: 560px;
  max-width: 88vw;
  overflow: hidden;
  border-radius: var(--radius-helm-lg);
  border: 1px solid var(--helm-accent-soft);
  background: rgb(var(--helm-surface-rgb) / 0.97);
  box-shadow: var(--shadow-overlay);
  animation: helm-rise 0.22s var(--helm-ease);
}
.helm-cmdk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--helm-line);
  padding: 14px 16px;
}
.helm-cmdk-sigil {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--helm-accent);
}
.helm-cmdk-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--helm-fg);
  outline: none;
}
.helm-cmdk-input::placeholder { color: var(--helm-fg-mute); }
.helm-cmdk-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 8px;
  margin: 0;
  list-style: none;
}
.helm-cmdk-item {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  align-items: baseline;
  gap: 12px;
  border-radius: var(--radius-helm-sm);
  border: none;
  cursor: pointer;
  padding: 12px;
  text-align: left;
  background: transparent;
  transition: background 150ms;
}
.helm-cmdk-item[data-active='true'] { background: var(--helm-accent-bg); }
.helm-cmdk-label {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--helm-fg);
}
.helm-cmdk-item[data-active='true'] .helm-cmdk-label { color: var(--helm-accent); }
.helm-cmdk-hint {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--helm-fg-mute);
}
.helm-cmdk-empty {
  padding: 24px 12px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--helm-fg-mute);
}

/* ── SectionRail — the "route" motif ────────────────────── */
.helm-rail {
  pointer-events: none;
  position: fixed;
  right: 16px;
  top: 0;
  z-index: 40;
  height: 100vh;
  width: 96px;
}
@media (max-width: 1023px) {
  .helm-rail { display: none; }
}
.helm-rail-inner {
  position: relative;
  margin: 0 auto;
  height: 100%;
}
.helm-rail-track {
  position: absolute;
  right: 11px;
  top: 0;
  height: 100%;
  width: 2px;
  border-radius: 999px;
  background: var(--helm-line);
}
.helm-rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  border-radius: 999px;
  background: var(--helm-accent);
  opacity: 0.5;
  transition: height 150ms linear;
}
.helm-rail-marker {
  position: absolute;
  left: 50%;
  height: 10px;
  width: 10px;
  transform: translate(-50%, -50%);
  border-radius: 3px;
  background: var(--helm-accent);
  box-shadow: var(--glow-accent);
  transition: top 150ms linear;
}
.helm-rail-label {
  pointer-events: auto;
  position: absolute;
  right: 24px;
  transform: translateY(-50%);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: var(--text-mono-nano);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--helm-fg-mute);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.helm-rail-label[aria-current='true'] { color: var(--helm-accent); }
.helm-rail-label:hover { color: var(--helm-fg); }
.helm-rail-label:focus-visible {
  outline: none;
  box-shadow: var(--ring-focus);
  border-radius: 3px;
}

/* ── 00 Hero ────────────────────────────────────────────── */
.vh-hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16svh 0 14svh;
}
.vh-hero-glyph {
  width: clamp(44px, 4.6vw, 60px);
  height: clamp(44px, 4.6vw, 60px);
  color: var(--helm-accent);
  margin-bottom: clamp(28px, 5.5vh, 56px);
}
.vh-hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 9.4vw, 124px);
  line-height: 0.96;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--helm-fg);
}
.vh-hero-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: clamp(24px, 4vh, 42px) 0 26px;
  max-width: 760px;
}
.vh-hero-lead {
  margin: 0;
  max-width: 40em;
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.8;
  color: var(--helm-fg-soft);
}
.vh-hero-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.vh-hero-hint { margin-top: 26px; }

#vhCue {
  position: absolute;
  left: clamp(20px, 4vw, 40px);
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--helm-fg-mute);
}
.vh-cue-tick {
  display: block;
  width: 1px;
  height: 26px;
  background: linear-gradient(var(--helm-accent-soft), transparent);
}

/* ── Section rhythm ─────────────────────────────────────── */
.vh-section { padding: clamp(96px, 14vh, 180px) 0; }
.vh-section--centered {
  min-height: 88svh;
  display: flex;
  align-items: center;
  padding: 14svh 0;
}
.vh-eyebrow { margin: 0 0 26px; }

.vh-h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 5.2vw, 64px);
  line-height: 1.12;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-h2--loose { line-height: 1.12; max-width: 20ch; }

.vh-copy {
  margin: 0;
  max-width: 54em;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--helm-fg-dim);
}

/* ── 02 The void — sticky scroll-scrubbed stage ─────────── */
.vh-void { padding: 0; }
#vhStage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(20px, 4vw, 40px);
  overflow: hidden;
}
.vh-frag {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter, transform;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(15px, 2.3vw, 30px);
  letter-spacing: 0.02em;
  max-width: min(72vw, 620px);
  color: var(--helm-fg-soft);
}
.vh-frag-m {
  font-family: var(--font-mono);
  font-size: clamp(10px, 1.1vw, 13px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  max-width: none;
  color: var(--helm-fg-dim);
}
#vhResolve {
  position: absolute;
  left: 50%;
  top: 76%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(88vw, 520px);
  opacity: 0;
  pointer-events: none;
}
#vhResolveP {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 5.2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--helm-fg);
}
#vhDepth {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 40px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--helm-fg-mute);
  opacity: 0;
}
#vhDepthVal { color: var(--helm-fg-dim); }

/* ── 03 The return — the panel that irises open ─────────── */
.vh-return { padding: 0; }
.vh-return-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
}
#vhPanel {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 960px);
  height: min(70svh, 620px);
  transform: translate(-50%, -50%);
  opacity: 0;
  clip-path: inset(48% 46% 48% 46% round 18px);
  background: rgb(var(--helm-surface-rgb) / 0.55);
  border: 1px solid var(--helm-line);
  border-radius: var(--radius-helm-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: clip-path, transform, opacity;
  transition: background var(--helm-dur-theme) var(--helm-ease);
}
.vh-panel-body {
  width: min(84vw, 640px);
  text-align: center;
  padding: clamp(28px, 5vw, 64px);
}
#vhSEyebrow { margin: 0 0 30px; opacity: 0; }
.vh-typed-h {
  margin: 0;
  min-height: 1.1em;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 4.6vw, 52px);
  line-height: 1.1;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-typed-caret {
  display: inline-block;
  width: 0.07em;
  height: 0.9em;
  background: var(--helm-accent);
  margin-left: 0.08em;
  vertical-align: -0.06em;
}
#vhSSub {
  margin: 32px auto 0;
  max-width: 52ch;
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--helm-fg-dim);
  opacity: 0;
}

/* ── 04 Ethos ───────────────────────────────────────────── */
.vh-ethos-close { margin: 40px 0 0; }

/* ── 05 Products ────────────────────────────────────────── */
.vh-products-h { margin: 0 0 48px; max-width: 16ch; }
.vh-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}
.vh-card {
  padding: clamp(28px, 3.4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  min-height: 280px;
}
.vh-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vh-card-glyph {
  width: 26px;
  height: 26px;
  color: rgb(var(--helm-text-rgb) / 0.75);
}
.vh-card-h {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(19px, 2vw, 26px);
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-card-p {
  margin: 0;
  max-width: 44ch;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--helm-fg-dim);
}
.vh-card-status { margin-top: auto; }
.vh-products-close { margin: 30px 0 0; }

/* ── 06 The mark ────────────────────────────────────────── */
.vh-mark-h { margin: 0 0 18px; max-width: 18ch; }
.vh-mark-intro { margin: 0 0 48px; }
.vh-marks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr));
  gap: 16px;
}
.vh-mark-card { padding: 30px 26px 26px; }
.vh-mark-art {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(var(--helm-text-rgb) / 0.7);
}
.vh-mark-art--primary { color: var(--helm-fg); }
.vh-mark-art svg { width: 62px; height: 62px; }
.vh-mark-cap {
  margin: 20px 0 8px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--helm-fg-soft);
}
.vh-mark-cap--primary { color: var(--helm-fg); }
.vh-mark-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--helm-fg-dim);
}

/* ── 07 Principles ──────────────────────────────────────── */
.vh-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.vh-rule {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--helm-line);
}
.vh-rule:last-child { border-bottom: 1px solid var(--helm-line); }
.vh-rule-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--helm-accent);
  flex: 0 0 auto;
  padding-top: 3px;
}
.vh-rule-text {
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--helm-fg-soft);
}

.vh-not {
  position: relative;
  width: fit-content;
  padding: 11px 0;
  font-size: 15px;
  color: var(--helm-fg-dim);
}
.vh-strike {
  position: absolute;
  left: 0;
  top: 50%;
  height: 1px;
  width: 100%;
  background: rgb(var(--helm-text-rgb) / 0.35);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.7s var(--helm-ease);
}
/* staggered so the four strike through in sequence */
#vhNots .vh-not:nth-child(1) .vh-strike { transition-delay: 0.2s; }
#vhNots .vh-not:nth-child(2) .vh-strike { transition-delay: 0.31s; }
#vhNots .vh-not:nth-child(3) .vh-strike { transition-delay: 0.42s; }
#vhNots .vh-not:nth-child(4) .vh-strike { transition-delay: 0.53s; }

.vh-rules-close { margin: 36px 0 0; max-width: 44em; }

/* ── 08 Closing ─────────────────────────────────────────── */
.vh-end {
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding: 10svh 0;
}
.vh-end-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: 0 0 52px;
}
.vh-quote {
  margin: 0;
  max-width: 26ch;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 42px);
  line-height: 1.45;
  color: var(--helm-fg-soft);
}
.vh-end-actions {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.vh-end-keys {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--helm-fg-mute);
}

/* ── Footer ─────────────────────────────────────────────── */
.vh-footer { padding: 0 clamp(20px, 4vw, 40px) 46px; }
.vh-footer-inner {
  margin: 0 auto;
  max-width: 1320px;
  border-top: 1px solid var(--helm-line);
  padding-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 40px;
  align-items: center;
  justify-content: space-between;
}
.vh-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--helm-fg-mute);
}
.vh-footer-links a { text-decoration: none; }

/* ── Reduced motion ─────────────────────────────────────────
   The scroll choreography is driven by JS, which checks the same query and
   falls back to a static field plus instantly-resolved copy. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .helm-caret { animation: none; }
  .vh-strike { transition: none; transform: scaleX(1); }
}

/* ── 404 ────────────────────────────────────────────────────
   Its own page (404.html), sharing this file's tokens and shell.
   No canvas and no JavaScript — a wrong turn should cost nothing. */
.vh-404 { display: flex; flex-direction: column; }
.vh-404-main {
  position: relative;
  z-index: 5;
  flex: 1;
  display: flex;
  align-items: center;
  padding: 18svh 0 14svh;
}
.vh-404-glyph {
  width: clamp(44px, 4.6vw, 60px);
  height: clamp(44px, 4.6vw, 60px);
  color: var(--helm-accent);
  margin-bottom: clamp(28px, 5.5vh, 56px);
}
.vh-404-eyebrow { margin: 0 0 22px; }
.vh-404-title {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 6.4vw, 76px);
  line-height: 1.06;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.vh-404-rule {
  border: none;
  border-top: 1px solid var(--helm-line-strong);
  margin: clamp(24px, 4vh, 42px) 0 26px;
  max-width: 620px;
}
.vh-404-copy {
  margin: 0;
  max-width: 46em;
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.8;
  color: var(--helm-fg-soft);
}
.vh-404-actions {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.vh-404-actions .helm-btn { text-decoration: none; }
