/* Void Helm — component classes.
   Plain-CSS translation of the Tailwind/cva recipes in components/helm/*.
   Exact values preserved; breakpoints: sm 640px, md 768px, lg 1024px. */

/* ── Button ─────────────────────────────────────────────── */
.helm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  user-select: none;
  border-radius: var(--radius-helm-pill);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  border: 1px solid transparent;
  background: none;
  color: inherit;
  transition: all var(--helm-dur-fast) var(--helm-ease);
}
.helm-btn:hover { transform: translateY(-1px); }
.helm-btn:active { transform: translateY(0); }
.helm-btn:focus-visible { outline: none; box-shadow: var(--ring-focus); }
.helm-btn:disabled { pointer-events: none; opacity: 0.4; }

.helm-btn--sm { height: 32px; padding: 0 14px; font-size: 10px; }
.helm-btn--md { height: 40px; padding: 0 20px; font-size: 11px; }
.helm-btn--lg { height: 48px; padding: 0 28px; font-size: 12px; }

.helm-btn--solid { border-color: transparent; background: var(--helm-accent); color: var(--helm-bg); }
.helm-btn--solid:hover { opacity: 0.9; }
.helm-btn--accent { border-color: var(--helm-accent); background: var(--helm-accent-bg); color: var(--helm-accent); }
.helm-btn--accent:hover { background: rgb(var(--helm-accent-rgb) / 0.2); }
.helm-btn--line { border-color: var(--helm-line-strong); color: var(--helm-fg); }
.helm-btn--line:hover { border-color: var(--helm-accent); color: var(--helm-accent); }
.helm-btn--ghost { border-color: transparent; color: var(--helm-fg-dim); }
.helm-btn--ghost:hover { color: var(--helm-fg); background: rgb(var(--helm-surface-rgb) / 0.6); }

/* ── Chip ───────────────────────────────────────────────── */
.helm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  border-radius: var(--radius-helm-pill);
  border: 1px solid;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: color var(--helm-dur-fast) var(--helm-ease),
    background var(--helm-dur-fast) var(--helm-ease),
    border-color var(--helm-dur-fast) var(--helm-ease);
}
.helm-chip--sm { padding: 4px 10px; font-size: 9px; }
.helm-chip--md { padding: 6px 12px; font-size: 10px; }

.helm-chip--line { border-color: var(--helm-line); color: var(--helm-fg-dim); }
.helm-chip--strong { border-color: var(--helm-line-strong); color: var(--helm-accent); }
.helm-chip--accent { border-color: var(--helm-accent); background: var(--helm-accent-bg); color: var(--helm-accent); }
.helm-chip--mute { border-color: transparent; background: rgb(var(--helm-surface-rgb) / 0.7); color: var(--helm-fg-mute); }

/* ── Panel — the signature glass surface ────────────────── */
.helm-panel {
  background: rgb(var(--helm-surface-rgb) / 0.55);
  border: 1px solid var(--helm-line);
  border-radius: var(--radius-helm-panel);
  backdrop-filter: blur(var(--helm-blur));
  -webkit-backdrop-filter: blur(var(--helm-blur));
  transition: background var(--helm-dur-quiet) var(--helm-ease),
    border-color var(--helm-dur-quiet) var(--helm-ease);
}
.helm-panel--flat {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--helm-surface);
}
.helm-panel--interactive {
  transition: all var(--helm-dur-quiet) var(--helm-ease);
}
.helm-panel--interactive:hover {
  transform: translateY(-2px);
  border-color: var(--helm-line-strong);
}

/* ── Container ──────────────────────────────────────────── */
.helm-container {
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  max-width: var(--container-lg);
  padding: 0 var(--gutter-base);
}
.helm-container--md { max-width: var(--container-md); }
.helm-container--xl { max-width: var(--container-xl); }
@media (min-width: 640px) { .helm-container { padding: 0 var(--gutter-sm); } }
@media (min-width: 1024px) { .helm-container { padding: 0 var(--gutter-lg); } }

/* ── Typography ─────────────────────────────────────────── */
.helm-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-mono-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--track-eyebrow);
  color: var(--helm-accent);
}
.helm-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
  margin: 0;
}
.helm-display--hero { font-size: var(--text-display-hero); line-height: 1.12; }
.helm-display--xl { font-size: var(--text-display-xl); line-height: 1.15; }
.helm-display--lg { font-size: var(--text-display-lg); line-height: 1.375; }
.helm-display--md { font-size: var(--text-display-md); line-height: 1.375; }
@media (min-width: 640px) { .helm-display--lg { font-size: 1.75rem; } }

.helm-lead {
  font-family: var(--font-sans);
  font-size: var(--text-lead);
  line-height: 1.8;
  color: var(--helm-fg-soft);
  margin: 0;
}
.helm-body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.75;
  color: var(--helm-fg-dim);
  margin: 0;
}
.helm-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-serif);
  line-height: 1.6;
  color: var(--helm-fg-soft);
  margin: 0;
}
.helm-label {
  font-family: var(--font-mono);
  font-size: var(--text-mono-label);
  text-transform: uppercase;
  letter-spacing: var(--track-label);
  color: var(--helm-fg-dim);
}

/* ── Input / Textarea ───────────────────────────────────── */
.helm-input {
  width: 100%;
  box-sizing: border-box;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--helm-fg);
  border: 1px solid var(--helm-line);
  border-radius: var(--radius-helm-md);
  padding: 10px 16px;
  outline: none;
  transition: border-color var(--helm-dur-fast) var(--helm-ease),
    box-shadow var(--helm-dur-fast) var(--helm-ease);
}
.helm-input::placeholder { color: var(--helm-fg-mute); }
.helm-input:hover { border-color: var(--helm-line-strong); }
.helm-input:focus { border-color: var(--helm-accent); box-shadow: var(--ring-focus); }
.helm-input:disabled { opacity: 0.4; pointer-events: none; }
textarea.helm-input { min-height: 96px; resize: vertical; line-height: 1.7; }

/* ── Kbd ────────────────────────────────────────────────── */
.helm-kbd {
  display: inline-flex;
  height: 20px;
  min-width: 20px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 6px;
  border: 1px solid var(--helm-line-strong);
  background: rgb(var(--helm-surface-rgb) / 0.7);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--helm-fg-dim);
}

/* ── Divider ────────────────────────────────────────────── */
.helm-divider { border: none; border-top: 1px solid var(--helm-line); width: 100%; margin: 0; }
.helm-divider--vertical { border-top: none; border-left: 1px solid var(--helm-line); width: auto; height: 100%; }

/* ── Stat ───────────────────────────────────────────────── */
.helm-stat { display: flex; flex-direction: column; gap: 6px; }
.helm-stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 500;
  letter-spacing: var(--track-display);
  color: var(--helm-fg);
}
.helm-stat-hint { font-family: var(--font-sans); font-size: 12px; color: var(--helm-fg-mute); }

/* ── ListRow — the signature index row ──────────────────── */
.helm-listrow {
  display: flex;
  cursor: pointer;
  align-items: baseline;
  gap: 16px;
  border-top: 1px solid var(--helm-line);
  padding: 24px 0;
  transition: padding 400ms var(--helm-ease);
}
.helm-listrow:hover { padding-left: 16px; }
.helm-listrow-num { font-family: var(--font-mono); font-size: 11px; color: var(--helm-accent); }
.helm-listrow-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--helm-fg);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.helm-listrow:hover .helm-listrow-title { color: var(--helm-accent); }
.helm-listrow-desc {
  display: none;
  max-width: 26em;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--helm-fg-dim);
}
.helm-listrow-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--helm-fg-mute);
}
@media (min-width: 640px) {
  .helm-listrow { gap: 24px; }
  .helm-listrow-title { font-size: 1.25rem; }
}
@media (min-width: 768px) { .helm-listrow-desc { display: block; } }

/* ── Field ──────────────────────────────────────────────── */
.helm-field { display: flex; flex-direction: column; gap: 8px; }
.helm-field-hint { font-family: var(--font-sans); font-size: 12px; color: var(--helm-fg-mute); }

/* ── TopNav / SideNav hover states ──────────────────────── */
.helm-topnav-link:hover { color: var(--helm-fg) !important; }
.helm-topnav-link:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 4px; }
.helm-sidenav-off-name {
  color: var(--helm-fg-mute);
  transition: color var(--helm-dur-fast) var(--helm-ease);
}
.helm-sidenav-off-ring {
  background: transparent;
  transition: border-color var(--helm-dur-fast) var(--helm-ease),
    background var(--helm-dur-fast) var(--helm-ease);
}
.helm-sidenav-off:hover .helm-sidenav-off-name { color: var(--helm-fg); }
.helm-sidenav-off:hover .helm-sidenav-off-ring {
  border-color: rgb(var(--helm-text-rgb) / 0.75);
  background: rgb(var(--helm-text-rgb) / 0.55);
}

/* ── Scrim — fixed top protection gradient ──────────────── */
.helm-scrim-top {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: 96px;
  background: linear-gradient(to bottom, var(--helm-bg), transparent);
}
