/* ============================================================
   HONEYBELL: identity tokens, wordmark and presence ring.
   honeybell-identity 1.0.0-rc.1 (2026-10-31). Base tokens are the
   Identity System 0.2.0 / 0.3.1 set (copied unchanged from the 0.3.1
   corrected package, tokens/honeybell.css); the presence ring section
   at the end is new in 1.0.0-rc.1.
   Mirrors tokens/honeybell.tokens.json. Load after colors.css,
   typography.css and motion.css. Status per value is in the JSON;
   PROVISIONAL and PROPOSED values are marked here too.
   Color values are never restated here: every brand color is a
   reference to tokens/colors.css, so a brand ruling (HD-9) changes
   one place. See guidelines/honeybell/decisions/COLOR_DECISION_RECORD.md.
   ============================================================ */
:root {
  --hb-ink:            var(--sl-black, #171717);
  --hb-charcoal:       var(--sl-charcoal, #1E1E24);
  --hb-slate:          var(--sl-slate, #2B2B35);
  --hb-stone:          var(--sl-stone, #F0EDE6);
  --hb-white:          var(--sl-white, #FFFFFF);
  --hb-lime:           var(--sl-green, #C6FF62); /* ring and active cues (HD-9) */
  --hb-dot-pink:       #FF4FA3;                   /* PROVISIONAL: wordmark dot only */
  --hb-approval:       var(--sl-purple, #6A63F0); /* approval badge, same purple as user messages (HD-9) */
  --hb-muted:          #8A8A93;                   /* can't act and error badge (HD-9) */
  --hb-text-secondary: #5C5C66;                   /* PROPOSED: secondary text on light grounds */

  --hb-font:            var(--font-display, "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif);
  --hb-font-email:      Arial, Helvetica, sans-serif;
  --hb-weight-wordmark: 800;  /* PROPOSED */
  --hb-dot-size:        0.16em; /* PROVISIONAL */
  --hb-dot-gap:         0.04em; /* PROVISIONAL */

  --hb-ease-in:     var(--ease-out, cubic-bezier(0.16, 1, 0.3, 1));
  --hb-dur-enter:   400ms;
  --hb-dur-exit:    150ms;
  --hb-arc-period:  1600ms; /* PROPOSED. 0.2/0.3.1 tokens said 1200ms; the 0.3.1 hb-ring.css and the OS ship 1600ms. Reconciled to the shipped value in 1.0.0-rc.1 (CHANGELOG) */
  --hb-halo-period: 1600ms;
  --hb-found-hold:  2400ms;

  --hb-ring-width:  2px;  /* static .hb-avatar treatment (0.2). HoneybellAvatar uses --hb-ring-stroke */
  --hb-touch:       44px;

  /* ---- Presence ring (HoneybellAvatar, components/honeybell/) 1.0.0-rc.1 ----
     Sizes: canonical review sizes from the Identity System. Below 32px the
     face is not used (lightning mark, no exported file yet: O3). */
  --hb-size-xs: 32px;  /* minimum face size */
  --hb-size-sm: 44px;  /* widget launcher, chat rows (also the touch target) */
  --hb-size-md: 64px;  /* OS header, cards */
  --hb-size-lg: 96px;  /* largest size the approved 96px exports cover at 1x */

  /* Ring geometry. The base ring is the core Avatar ring (components/core/Avatar.jsx,
     2.5px solid). Overlay strokes are SVG units on a 120 unit viewBox drawn at 128%
     of the avatar size. */
  --hb-ring-stroke:      2.5px; /* equals core Avatar ring border; not configurable there */
  --hb-ring-overlay-inset: -14%;
  --hb-ring-arc-stroke:  4;
  --hb-ring-halo-stroke: 2;

  /* State colors: references only. */
  --hb-state-active:   var(--hb-lime);      /* ring, arcs, halo, orbit, complete badge */
  --hb-state-approval: var(--hb-approval);  /* approval badge (follows --sl-purple, #6A63F0, HD-9) */
  --hb-state-muted:    var(--hb-muted);     /* error, offline, disabled ring and error badge */
  --hb-state-sweep:    var(--hb-white);     /* found sweep (HD-9) */
  --hb-badge-border:   var(--hb-ink);
  --hb-badge-glyph:    var(--hb-ink);

  /* Motion (PROPOSED, P3 ring motion contract). One table; the same values are in
     components/honeybell/honeybell.states.json and are checked by
     scripts/check-honeybell-identity.mjs. */
  --hb-ring-dur-breathe:  4800ms;              /* idle, ambient */
  --hb-ring-dur-orbit:    6000ms;              /* background, ambient */
  --hb-ring-dur-halo:     var(--hb-halo-period); /* listening, loop */
  --hb-ring-dur-arc:      var(--hb-arc-period);  /* thinking, loop */
  --hb-ring-dur-search:   900ms;               /* searching, loop */
  --hb-ring-dur-tool-arc: 1800ms;              /* tool, loop */
  --hb-ring-dur-tool-seg: 6000ms;              /* tool, loop */
  --hb-ring-dur-sweep:    1200ms;              /* found, once */
  --hb-ring-dur-settle:   600ms;               /* complete, once */
  --hb-ring-ease-once:    var(--hb-ease-in);
  --hb-ring-ease-search:  cubic-bezier(0.5, 0.1, 0.5, 0.9);
}

/* Wordmark: the text node stays "Honeybell"; the dot is drawn, never typed or announced. */
.hb-wordmark { font-family: var(--hb-font); font-weight: var(--hb-weight-wordmark); letter-spacing: -0.02em; white-space: nowrap; }
.hb-wordmark::after {
  content: ""; display: inline-block; width: var(--hb-dot-size); height: var(--hb-dot-size);
  margin-left: var(--hb-dot-gap); border-radius: 50%; background: var(--hb-dot-pink); vertical-align: baseline;
}
.hb-on-stone .hb-wordmark::after { box-shadow: 0 0 0 1px var(--hb-ink); } /* 2.60:1 on stone: ink keyline */

/* Avatar: lime ring unchanged; on light grounds the avatar sits on an ink backing. */
.hb-avatar { border-radius: 50%; border: var(--hb-ring-width) solid var(--hb-lime); background: var(--hb-ink); padding: 2px; box-sizing: border-box; }
.hb-on-light .hb-avatar { box-shadow: 0 0 0 1px var(--hb-ink); }

/* Status badges are functional: on light grounds each gets a 2px ink border. */
.hb-on-light .hb-badge { border: 2px solid var(--hb-ink); }

/* Reduced motion: the presence ring stops every animation in its own stylesheet
   (components/honeybell/honeybell-presence.css). These zeroed periods cover any
   other consumer that animates from the tokens directly. */
@media (prefers-reduced-motion: reduce) {
  :root { --hb-arc-period: 0ms; --hb-halo-period: 0ms; --hb-dur-enter: 0ms; }
}
