/* components.css — Reusable design-system primitives.
 * Loaded after site.css, before page-specific CSS.
 * The product page (and any future page) composes its UI from these.
 */

/* ========================================================================
 * .pill — small label/badge for status, metadata, taxonomy.
 * Variants: default (faint), --accent (warm), --cool (verification states)
 * ======================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.32em 0.85em;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--surface-dark-subtle);
  border: 1px solid var(--accent-faint);
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.pill--accent {
  color: var(--accent);
  background: rgba(234, 160, 28, 0.08);
  border-color: var(--accent-glow);
}

.pill--cool {
  color: var(--accent-cool);
  background: rgba(158, 201, 214, 0.08);
  border-color: var(--accent-cool-glow);
}

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* ========================================================================
 * .card — generic surface with hairline accent border.
 * Replaces ad-hoc card styles across the site. Sizes: sm/md/lg.
 * ======================================================================== */
.card {
  position: relative;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: var(--surface-card);
  border: 1px solid var(--accent-faint);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 48px var(--shadow-soft), inset 0 1px 0 rgba(244, 239, 226, 0.04);
}

.card--sm { padding: clamp(0.85rem, 1.5vw, 1.25rem); }
.card--lg { padding: clamp(1.75rem, 4vw, 3rem); border-radius: var(--radius-lg); }

.card--accent {
  border-color: var(--accent-glow);
  box-shadow: 0 18px 48px var(--shadow-soft), 0 0 0 1px var(--accent-faint), inset 0 1px 0 rgba(244, 239, 226, 0.04);
}

/* ========================================================================
 * .grid-2 / .grid-3 — simple responsive grids.
 * Collapses to 1 column under 768px. Use for feature lists, comparison rows.
 * ======================================================================== */
.grid-2,
.grid-3 {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ========================================================================
 * .spec-block — annotated code/specification snippet.
 * The brand asset for showing what HOARDE actually outputs.
 * Used on home page now; will be reused on product page for API examples.
 * ======================================================================== */
.spec-block {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
  background: linear-gradient(180deg, rgba(14, 14, 22, 0.95), rgba(20, 20, 30, 0.92));
  border: 1px solid var(--accent-faint);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid var(--accent-faint);
  font-size: 0.72rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

.spec-block__filename {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.spec-block__filename::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cool-soft);
  box-shadow: 0 0 8px var(--accent-cool-glow);
}

.spec-block__body {
  padding: 1rem 1.25rem 1.15rem;
  overflow-x: auto;
  color: var(--text-strong);
  white-space: pre;
  font-variant-ligatures: none;
}

.spec-block__body .tok-kw { color: var(--accent-cool); }
.spec-block__body .tok-fn { color: var(--accent); }
.spec-block__body .tok-type { color: var(--accent-cool-soft); }
.spec-block__body .tok-num { color: #d6c79e; }
.spec-block__body .tok-str { color: #c9a36b; }
.spec-block__body .tok-comment { color: var(--text-faint); font-style: italic; }
.spec-block__body .tok-op { color: var(--text-muted); }
.spec-block__body .tok-pre { color: var(--accent-cool); font-weight: 600; }

.spec-block__footer {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: rgba(0, 0, 0, 0.18);
  border-top: 1px solid var(--accent-faint);
  font-size: 0.72rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent-cool);
}

.spec-block__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--accent-cool);
  color: var(--accent-cool);
  font-size: 0.6rem;
  line-height: 1;
}

/* ========================================================================
 * Notation watermark — subtle background formal-methods glyphs.
 * Sits behind everything, fixed, very low opacity. Created once in base.njk.
 * ======================================================================== */
.notation-watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  mix-blend-mode: screen;
  opacity: 0.06;
}

.notation-watermark__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.notation-watermark__glyph {
  font-family: var(--font-display);
  font-size: 64px;
  fill: var(--accent);
  font-style: italic;
}

.notation-watermark__glyph--sans {
  font-family: var(--font-mono);
  font-style: normal;
  fill: var(--accent-cool);
  font-size: 28px;
  letter-spacing: 0.05em;
}

/* ========================================================================
 * .reveal-* — opt-in reveal classes consumed by motion.css.
 * Without .motion-enabled on body, these have no effect (static layout).
 * ======================================================================== */
.reveal-fade,
.reveal-rise,
.reveal-cascade > * {
  /* Initial state declared here so it applies even before motion.css loads,
   * preventing FOUC. motion.css animates these into their resting state. */
}
