/*
  Habiff site system v1 (prefix hb-). Loaded after galactic.css and page-sky.css.
  One set of tokens, one type scale, one spacing scale, a few components, and the motion rules.
  Pages follow this system instead of one-off styles. Brand colors come from the brand book only.

  MOTION RULES
  1. Motion explains something: it shows that a thing arrived, connected or settled. No decoration.
  2. Animate transform and opacity only. Nothing that moves layout.
  3. One entrance per element, played once when it scrolls into view. No loops except the core mark's own slow glow.
  3b. Hover changes border and fill only. Nothing lifts, grows or casts a shadow.
  4. Durations: 140 ms for hover, focus and disclosure, 280 ms for entrances (rise 12 px and fade), 60 ms stagger. One easing, --hb-ease.
  5. prefers-reduced-motion: reduce shows the final frame. Nothing moves, fades or draws. Everything stays visible.
  6. Without JavaScript everything is visible and still.
  7. No new external hosts: no extra fonts, scripts, images or video.
*/
:root {
  /* color: brand book tokens only */
  --hb-void: #010207;
  --hb-obsidian: #070A12;
  --hb-glass: rgba(13, 19, 36, 0.72);
  --hb-glass-hi: rgba(20, 28, 50, 0.78);
  --hb-ink: #F8FAFC;
  --hb-ink-soft: #CBD5E1;
  --hb-ink-dim: #94A3B8;
  --hb-solar: #FF8A3D;
  --hb-solar-light: #FFB078;
  --hb-line: rgba(255, 255, 255, 0.075);
  --hb-line-hi: rgba(255, 255, 255, 0.15);

  /* spacing: 4 px base */
  --hb-s1: 4px; --hb-s2: 8px; --hb-s3: 12px; --hb-s4: 16px; --hb-s5: 24px;
  --hb-s6: 32px; --hb-s7: 48px; --hb-s8: 64px; --hb-s9: 96px; --hb-s10: 128px;

  /* type scale (Plus Jakarta Sans; JetBrains Mono for kickers, versions and dates). Walle's audit, section 5. */
  --hb-t-kicker: 0.75rem;                           /* 12 mono, never smaller */
  --hb-t-small: 0.875rem;                           /* 14 */
  --hb-t-body: 1.0625rem;                           /* 17 */
  --hb-t-card: 1.25rem;                             /* 20, card titles */
  --hb-t-lead: 1.25rem;                             /* 20 */
  --hb-t-h3: 1.5rem;                                /* 24 */
  --hb-t-h2: clamp(1.75rem, 3.4vw, 2.25rem);        /* 36 */
  --hb-t-h1: clamp(2.25rem, 5.2vw, 3.25rem);        /* 52 */
  --hb-t-display: clamp(2.75rem, 6.4vw, 4rem);      /* 64, home only */
  --hb-measure: 680px;                              /* longest reading line */
  --hb-container: 1200px;
  --hb-section: 96px;                               /* 64 under 640 px */

  /* shape and elevation */
  --hb-r-sm: 12px; --hb-r-md: 20px; --hb-r-lg: 28px;
  --hb-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.07);

  /* motion */
  --hb-ease: cubic-bezier(0.23, 1, 0.32, 1);
  --hb-t-fast: 140ms;
  --hb-t-enter: 280ms;
  --hb-stagger: 60ms;
}

.hb-hero { text-align: center; padding: 148px 0 var(--hb-s7); max-width: 860px; margin: 0 auto; }
@media (max-width: 640px) { .hb-hero { padding: 112px 0 var(--hb-s6); } }
.hb-main { width: 100%; max-width: var(--hb-container); margin: 0 auto; padding-bottom: var(--hb-section); }

.hb-eyebrow { margin: 0 0 var(--hb-s3); font-size: var(--hb-t-kicker); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hb-solar-light); }
.hb-h1 { margin: 0; font-size: var(--hb-t-h1); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; color: var(--hb-ink); }
.hb-h2 { margin: 0; font-size: var(--hb-t-h2); font-weight: 800; letter-spacing: -0.028em; line-height: 1.1; color: var(--hb-ink); }
.hb-h2-sm { font-size: var(--hb-t-h3); letter-spacing: -0.02em; }
.hb-lede { margin: var(--hb-s4) auto 0; max-width: 34ch; font-size: var(--hb-t-lead); font-weight: 500; line-height: 1.5; color: var(--hb-ink-soft); }
.hb-sub { margin: var(--hb-s3) 0 0; max-width: 52ch; font-size: var(--hb-t-lead); line-height: 1.55; color: var(--hb-ink-soft); }
.hb-line { margin: 0; font-size: var(--hb-t-body); line-height: 1.55; color: var(--hb-ink-soft); }
.hb-ver, .hb-meta time, .hb-old-meta time { font-family: var(--font-mono, 'JetBrains Mono', monospace); font-size: var(--hb-t-kicker); letter-spacing: 0.06em; }

.hb-card {
  position: relative;
  border: 1px solid var(--hb-line);
  border-radius: var(--hb-r-md);
  background: var(--hb-glass);
  box-shadow: var(--hb-shadow);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.hb-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  border: 1px solid rgba(255, 138, 61, 0.55); color: var(--hb-solar-light);
  font-size: var(--hb-t-kicker); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.hb-tag { margin: 0; font-size: var(--hb-t-kicker); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hb-ink-dim); }

/* Quiet disclosure: native details, keyboard friendly, no script. */
.hb-more > summary {
  display: inline-flex; align-items: center; gap: var(--hb-s2); cursor: pointer; list-style: none;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--hb-line-hi);
  color: var(--hb-ink); font-size: var(--hb-t-small); font-weight: 600;
  transition: background var(--hb-t-fast), border-color var(--hb-t-fast);
}
.hb-more > summary::-webkit-details-marker { display: none; }
.hb-more > summary:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.26); }
.hb-more > summary:focus-visible { outline: 2px solid var(--hb-solar-light); outline-offset: 3px; }
.hb-more[open] > summary .hb-chev { transform: rotate(180deg); }
.hb-chev { transition: transform var(--hb-t-fast) var(--hb-ease); }

/* Entrance: only hidden when JavaScript is running and motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .hb-js .hb-reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--hb-t-enter) var(--hb-ease), transform var(--hb-t-enter) var(--hb-ease); transition-delay: var(--d, 0ms); }
  .hb-js .hb-reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hb-reveal, .hb-reveal * { animation: none !important; transition: none !important; }
}
