/* Shared components — eyebrow tag, buttons, cards, terminal chrome, grid backdrop */

/* Eyebrow tag: small mono label in a green-bordered pill, e.g. "● About Hypertensor" */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border: 1px solid var(--line-accent);
  border-radius: var(--radius-xs);
  background: var(--bg-eyebrow);
  color: var(--green-text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: none;
  white-space: nowrap;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green-bright);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: filter 120ms ease, background-color 120ms ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--green-grad-top), var(--green-grad-bottom));
  color: var(--text-hi);
  font-weight: 500;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  background: #0b0b0b;
  color: var(--text-hi);
  border: 1px solid var(--line-btn);
}

.btn-secondary:hover {
  background: #121212;
}

/* Outlined card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line-card);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: border-color 140ms ease, background-color 140ms ease;
}

/* Highlight follows the pointer and sticks to the last-hovered card.
   The .is-highlight class is moved between siblings in JS (see main.js);
   these styles just define how a highlighted card looks. */
.card.is-highlight {
  border-color: var(--line-accent-dim);
  background: var(--bg-card-highlight);
}

.card-index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--green-text);
}

.card-title {
  font-size: 20px;
  margin-top: var(--space-3);
}

.card-body {
  margin-top: var(--space-3);
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.65;
}

/* Terminal window chrome */
.terminal {
  background: var(--bg-terminal);
  border: 1px solid var(--line-terminal);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-terminal);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 16px;
  background: var(--bg-terminal-header);
  border-bottom: 1px solid var(--line-terminal);
}

.terminal-dots {
  display: inline-flex;
  gap: 7px;
}

.terminal-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.terminal-dots i:nth-child(1) { background: #f4564e; }
.terminal-dots i:nth-child(2) { background: #f5bf4f; }
.terminal-dots i:nth-child(3) { background: #29c440; }

.terminal-title {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-copy {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.terminal-copy:hover {
  color: var(--text-hi);
}

.terminal-body {
  padding: var(--space-5) var(--space-5) var(--space-6);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-body);
  overflow-x: auto;
}

.terminal-body .t-green { color: var(--green-text); }
.terminal-body .t-dim { color: var(--text-faint); }
.terminal-body .t-white { color: var(--text-hi); }
.terminal-body .t-yellow { color: #e2ac07; }

/* Copy feedback — visible across dark, icon-only, and green copy controls */
[data-copy] {
  transition: color 120ms ease, filter 120ms ease;
}

[data-copy].is-copied {
  color: var(--green-text);
}

/* On already-green controls (e.g. the pip primary button), brighten instead */
.btn-primary[data-copy].is-copied {
  color: var(--text-hi);
  filter: brightness(1.18);
}

/* Hero grid-line backdrop (pure CSS) */
.grid-backdrop {
  position: relative;
}

.grid-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(31, 172, 132, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31, 172, 132, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 35%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 30%, #000 35%, transparent 75%);
}

.grid-backdrop > * {
  position: relative;
}
