/* =============================================================================
   BEHOLD ISRAEL · CORE COMPONENTS
   -----------------------------------------------------------------------------
   The shared component layer for EVERY surface. Requires ../tokens.css first.

     marketing pages  →  tokens.css + components-core.css
     product / app    →  tokens.css + components-core.css + components-product.css

   Every class is `.bi-*`. Components are THEME-AWARE: they read semantic
   tokens only, so the same markup renders correctly inside a dark section
   (`data-theme="dark"`, the default) or a light one (`data-theme="light"`).
   There are no `--dark` / `--light` modifiers — put data-theme on the section.

   DENSITY is a modifier, never a second class. One `.bi-btn`, one `.bi-input`,
   one `.bi-chip`, one `.bi-badge`; `--lg / --md / --sm / --xs` (and `--compact`
   on chips and badges) move them from marketing scale to working-tool scale.
   Compact sizes (sm / xs) drop the hover lift and the large CTA glow.

   Motion rule: only transform, opacity, color, background-color, border-color
   and box-shadow are ever transitioned. A blanket "all" transition is banned.

   components-product.css EXTENDS this file (app shell, tables, KPI tiles,
   overlays, product-only button variants). It never redefines a class here.
   ========================================================================== */


/* ---------------------------------------------------------------------------
   0. Page base
   --------------------------------------------------------------------------- */
.bi-page,
.bi-page *,
.bi-page *::before,
.bi-page *::after { box-sizing: border-box; }

.bi-page {
  margin: 0;
  background: var(--bi-bg);
  color: var(--bi-body);
  font-family: var(--bi-font);
  font-size: var(--bi-display-body);
  line-height: var(--bi-display-body-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.bi-page img { max-width: 100%; display: block; }
/* The hidden attribute always wins, even over a component's own display value */
:where(.bi-page, .bi-app, .bi-c-root) [hidden], .bi-app[hidden], .bi-c-root [hidden] { display: none !important; }
/* Bare links only. Zero specificity so any .bi-* component color wins. */
:where(.bi-page a:not([class])) { color: var(--bi-link); }
:where(.bi-page, .bi-app, .bi-c-root) :focus-visible {
  outline: 2px solid var(--bi-focus-ring);
  outline-offset: var(--bi-focus-ring-offset);
  border-radius: 2px;
}
:where(.bi-page, .bi-app, .bi-c-root) :focus:not(:focus-visible) { outline: none; }


/* ---------------------------------------------------------------------------
   1. Section shell — dark cinematic / light elevated
   --------------------------------------------------------------------------- */
.bi-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  padding: var(--bi-section-pad) 0;
  background: var(--bi-glow);
  color: var(--bi-body);
}
.bi-section--tight  { padding: var(--bi-section-pad-tight) 0; }
.bi-section--alt    { background: var(--bi-glow-alt); }
.bi-section--flat   { background: var(--bi-bg); }         /* no glow */

/* Grain: fine fractal noise, blended. Dark 0.05 / light 0.025 via token. */
.bi-section--grain::after {
  content: "";
  position: absolute; inset: 0;
  z-index: var(--bi-z-base);
  pointer-events: none;
  background-image: var(--bi-grain);
  opacity: var(--bi-grain-alpha);
  mix-blend-mode: overlay;
}

/* Thin blue hairline seam at the top edge of a section */
.bi-hairline {
  position: absolute; top: 0; left: 0;
  z-index: var(--bi-z-raised);
  display: block; width: 100%; height: 2px;
  opacity: .7;
  background: linear-gradient(90deg, transparent 0%, rgba(24,98,255,0) 8%, var(--bi-primary) 50%, rgba(24,98,255,0) 92%, transparent 100%);
}
.bi-hairline--static { position: static; }   /* inline use inside content */

.bi-inner {
  position: relative;
  z-index: var(--bi-z-content);
  max-width: var(--bi-inner-max);
  margin: 0 auto;
  padding: 0 var(--bi-inner-pad);
}
.bi-inner--narrow { max-width: 760px; }

/* 2-col split. Media-first in source; desktop places media right by default. */
.bi-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--bi-grid-gap);
  align-items: center;
}
@media (min-width: 860px) {
  .bi-split { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .bi-split > .bi-split__text  { grid-column: 1; grid-row: 1; }
  .bi-split > .bi-split__media { grid-column: 2; grid-row: 1; }
  .bi-split--media-left > .bi-split__text  { grid-column: 2; }
  .bi-split--media-left > .bi-split__media { grid-column: 1; }
  .bi-split--wide-media { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); }
}

/* Card grid */
.bi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--bi-card-gap);
}
.bi-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; }


/* ---------------------------------------------------------------------------
   2. Typography
   --------------------------------------------------------------------------- */
.bi-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-size: var(--bi-display-kicker);
  font-weight: var(--bi-display-kicker-weight);
  line-height: 1.4;
  letter-spacing: var(--bi-display-kicker-tracking);
  text-transform: uppercase;
  color: var(--bi-muted);
}
.bi-kicker::before {
  content: "";
  flex: none;
  display: inline-block;
  width: var(--bi-display-kicker-rule);
  height: 1px;
  background: var(--bi-primary);
}
.bi-kicker--bare::before { display: none; }
/* Optional brand half of a kicker ("Behold Israel · ", "CONNECT · "): dropped on
   phones so the label holds one line. Kickers stay ≤ 32 characters overall.
   display: contents keeps the prefix in the same flex item as the rest of the
   label, so the kicker's 10px gap does not open between the two halves. */
.bi-kicker__prefix { display: contents; }
@media (max-width: 419px) { .bi-kicker__prefix { display: none; } }

.bi-h1, .bi-h2, .bi-h3, .bi-h4 {
  margin: 0 0 22px;
  color: var(--bi-ink);
  text-wrap: balance;
}
.bi-h1 { font-size: var(--bi-display-h1); line-height: var(--bi-display-h1-lh); letter-spacing: var(--bi-display-h1-tracking); font-weight: var(--bi-display-h1-weight); }
.bi-h2 { font-size: var(--bi-display-h2); line-height: var(--bi-display-h2-lh); letter-spacing: var(--bi-display-h2-tracking); font-weight: var(--bi-display-h2-weight); }
.bi-h3 { font-size: var(--bi-display-h3); line-height: var(--bi-display-h3-lh); letter-spacing: var(--bi-display-h3-tracking); font-weight: var(--bi-display-h3-weight); margin-bottom: 14px; }
.bi-h4 { font-size: var(--bi-display-h4); line-height: var(--bi-display-h4-lh); letter-spacing: var(--bi-display-h4-tracking); font-weight: var(--bi-display-h4-weight); margin-bottom: 10px; }
.bi-accent { color: var(--bi-primary); }

.bi-lead {
  margin: 0 0 18px;
  max-width: 52ch;
  font-size: var(--bi-display-lead);
  line-height: var(--bi-display-lead-lh);
  color: var(--bi-body-strong);
}
.bi-body {
  margin: 0 0 18px;
  max-width: var(--bi-display-measure);
  font-size: var(--bi-display-body);
  line-height: var(--bi-display-body-lh);
  font-weight: 400;
  color: var(--bi-body);
}
.bi-body:last-child, .bi-lead:last-child { margin-bottom: 0; }
.bi-body strong, .bi-lead strong { color: var(--bi-body-strong); font-weight: 600; }
.bi-small {
  margin: 0;
  font-size: var(--bi-display-small);
  line-height: var(--bi-display-small-lh);
  color: var(--bi-muted-2);
}
.bi-caption {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 16px 0 0;
  font-size: var(--bi-display-caption);
  line-height: 1.4;
  letter-spacing: var(--bi-display-caption-tracking);
  text-transform: uppercase;
  color: var(--bi-muted);
}
.bi-dot {
  flex: none;
  width: 6px; height: 6px;
  border-radius: var(--bi-radius-pill);
  background: var(--bi-primary);
  box-shadow: 0 0 0 3px var(--bi-blue-a18);
}
.bi-link {
  color: var(--bi-link);
  font-weight: 600;
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color var(--bi-dur-fast) ease;
}
.bi-link:hover { text-decoration: underline; color: var(--bi-link-hover); }


/* ---------------------------------------------------------------------------
   3. Buttons
   --------------------------------------------------------------------------- */
.bi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.bi-btn {
  --bi-btn-h: 52px;                 /* lg (marketing default). Contexts may override. */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 30px;
  min-height: var(--bi-btn-h);
  min-width: var(--bi-btn-h);
  border-radius: var(--bi-radius-pill);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    transform var(--bi-dur-base) var(--bi-ease),
    box-shadow var(--bi-dur-base) ease,
    background-color var(--bi-dur-fast) ease,
    border-color var(--bi-dur-fast) ease,
    color var(--bi-dur-fast) ease;
  will-change: transform;
}
.bi-btn .bi-c-icon { width: 16px; height: 16px; }
/* Sizes: lg 52 (default) · md 44 · sm 36 · xs 32 */
.bi-btn--md { --bi-btn-h: 44px; padding: 0 22px; font-size: 14px; }
.bi-btn--sm { --bi-btn-h: 36px; padding: 0 16px; font-size: var(--bi-compact-control); gap: 8px; }
.bi-btn--xs { --bi-btn-h: 32px; padding: 0 12px; font-size: 12.5px; gap: 6px; }
.bi-btn--xs .bi-c-icon { width: 14px; height: 14px; }
.bi-btn--block { width: 100%; }

.bi-btn--primary {
  background: var(--bi-primary);
  color: var(--bi-on-primary);
  border-color: var(--bi-primary);
  box-shadow: var(--bi-shadow-cta);
}
.bi-btn--primary:hover {
  background: var(--bi-primary-hover);
  border-color: var(--bi-primary-hover);
  color: var(--bi-on-primary);
  transform: translateY(var(--bi-lift));
  box-shadow: var(--bi-shadow-cta-hover);
}
.bi-btn--primary:active {
  transform: translateY(-1px);
  box-shadow: var(--bi-shadow-cta);
}
/* Compact sizes: no lift, small blue shadow only */
.bi-btn--sm.bi-btn--primary, .bi-btn--xs.bi-btn--primary,
.bi-btn--sm.bi-btn--primary:hover, .bi-btn--xs.bi-btn--primary:hover { box-shadow: var(--bi-shadow-cta-sm); }
.bi-btn--sm.bi-btn--primary:active, .bi-btn--xs.bi-btn--primary:active { box-shadow: none; }

/* Ghost is theme-aware: white-ish outline on dark, ink outline on light,
   hover goes brighter on dark / blue on light (matches shipped sections). */
.bi-btn--ghost {
  background: transparent;
  color: var(--bi-ghost-text);
  border-color: var(--bi-ghost-border);
  font-weight: 500;
}
.bi-btn--ghost:hover {
  border-color: var(--bi-ghost-border-hover);
  color: var(--bi-ink);
  transform: translateY(var(--bi-lift));
  box-shadow: var(--bi-shadow-ghost-hover);
}
[data-theme="light"] .bi-btn--ghost:hover { color: var(--bi-primary); box-shadow: none; }
.bi-btn--ghost:active { transform: translateY(-1px); }
.bi-btn--sm.bi-btn--ghost:hover, .bi-btn--xs.bi-btn--ghost:hover { box-shadow: none; background: var(--bi-surface-chip); }

/* Compact sizes press down instead of lifting */
.bi-btn--sm:hover, .bi-btn--xs:hover { transform: none; }
.bi-btn--sm:active:not([disabled]), .bi-btn--xs:active:not([disabled]) { transform: translateY(1px); }

.bi-btn__arrow { display: inline-flex; transition: transform var(--bi-dur-base) ease; }
.bi-btn__arrow svg { display: block; }
.bi-btn:hover .bi-btn__arrow { transform: translateX(4px); }
.bi-btn__icon { display: inline-flex; margin-left: -4px; }
.bi-btn__icon svg { display: block; }

.bi-btn:focus-visible {
  outline: 2px solid var(--bi-focus-ring);
  outline-offset: var(--bi-focus-ring-offset);
}
.bi-btn[disabled], .bi-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
  transform: none;
}
.bi-btn[disabled]:hover, .bi-btn[aria-disabled="true"]:hover { transform: none; box-shadow: none; }


/* ---------------------------------------------------------------------------
   4. Chips + badges
   --------------------------------------------------------------------------- */
.bi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bi-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--bi-radius-pill);
  border: 1px solid var(--bi-hairline);
  background: var(--bi-surface-chip);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--bi-chip-text);
  white-space: nowrap;
}
.bi-chip__dot {
  flex: none;
  width: 5px; height: 5px;
  border-radius: var(--bi-radius-pill);
  background: var(--bi-accent-dot);
  box-shadow: 0 0 0 3px var(--bi-accent-dot-ring);
}
.bi-chip__dot--blue { background: var(--bi-primary); box-shadow: 0 0 0 3px var(--bi-blue-a18); }
.bi-chip svg { width: 14px; height: 14px; color: var(--bi-muted); }
.bi-chip--interactive, button.bi-chip {
  cursor: pointer;
  font-family: inherit;
  transition: border-color var(--bi-dur-fast) ease, color var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-chip--interactive:hover, button.bi-chip:hover { border-color: var(--bi-primary); color: var(--bi-ink); }
/* Filter chip selected state (aria-pressed on a <button>) */
.bi-chip[aria-pressed="true"], .bi-chip.is-selected { background: var(--bi-info-bg); border-color: var(--bi-primary); color: var(--bi-ink); }
.bi-chip[aria-pressed="true"] .bi-c-icon { color: var(--bi-link); }
.bi-chip[disabled] { opacity: .45; cursor: not-allowed; }
.bi-chip .bi-c-icon { width: 13px; height: 13px; }
/* Density: compact 28px (product filters, meta), touch 36px (mobile) */
.bi-chip--compact { min-height: 28px; padding: 0 11px; font-size: 12px; letter-spacing: 0.01em; }
.bi-chip--touch   { min-height: 36px; padding: 0 14px; font-size: var(--bi-compact-control); }

/* Badges: solid, small, status-like. Blue is the only "brand" badge.
   --live is the ONLY animated badge and is reserved for a genuinely live
   stream/event indicator; never decorative. */
.bi-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--bi-radius-pill);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bi-badge--primary { background: var(--bi-primary); color: var(--bi-on-primary); }
.bi-badge--sale    { background: var(--bi-primary); color: var(--bi-on-primary); }
.bi-badge--soon    { background: var(--bi-info-bg); color: var(--bi-info); border: 1px solid var(--bi-hairline); }
.bi-badge--soldout { background: var(--bi-surface-2); color: var(--bi-muted); border: 1px solid var(--bi-hairline); }
.bi-badge--live    { background: var(--bi-danger-bg); color: var(--bi-danger); border: 1px solid var(--bi-hairline); }
.bi-badge--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor;
  animation: bi-blink 1.6s ease-in-out infinite;
}
.bi-badge--live:has(.bi-c-dot)::before { display: none; }   /* product supplies its own pulsing dot */
.bi-badge--neutral { background: var(--bi-surface-chip); color: var(--bi-chip-text); border: 1px solid var(--bi-hairline); }
/* Status tints — the same four hues the product surface uses for state */
.bi-badge--success { background: var(--bi-success-bg); color: var(--bi-success); }
.bi-badge--warning { background: var(--bi-warning-bg); color: var(--bi-warning); }
.bi-badge--danger  { background: var(--bi-danger-bg);  color: var(--bi-danger); }
.bi-badge--info    { background: var(--bi-info-bg);    color: var(--bi-info); }
.bi-badge .bi-c-icon { width: 12px; height: 12px; }
@keyframes bi-blink { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
/* Density: compact = sentence-case 20px status pill (tables, lists, KPI) */
.bi-badge--compact {
  min-height: 20px;
  padding: 0 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1;
}
.bi-badge--compact.bi-badge--neutral { background: var(--bi-surface-chip); color: var(--bi-body); border: 0; }
.bi-badge--compact.bi-badge--live { border: 0; letter-spacing: 0.08em; font-weight: 700; }


/* ---------------------------------------------------------------------------
   5. Cards
   --------------------------------------------------------------------------- */
.bi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border-radius: var(--bi-radius-card);
  border: 1px solid var(--bi-hairline);
  background: var(--bi-surface-card);
  color: var(--bi-body);
  box-shadow: var(--bi-shadow-card);
  transition:
    border-color var(--bi-dur-base) ease,
    transform var(--bi-dur-base) var(--bi-ease),
    box-shadow var(--bi-dur-base) ease;
}
.bi-card--hover:hover, a.bi-card:hover {
  border-color: var(--bi-blue-a55);
  transform: translateY(var(--bi-lift));
  box-shadow: var(--bi-shadow-card-hover);
}
[data-theme="light"] .bi-card--hover:hover,
[data-theme="light"] a.bi-card:hover { border-color: var(--bi-hairline); }
.bi-card--pad-lg { padding: 28px 28px; }
a.bi-card { text-decoration: none; }

.bi-card__title {
  margin: 0 0 8px;
  color: var(--bi-ink);
  font-size: var(--bi-card-title);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.bi-card__text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--bi-body);
}
.bi-card__icon {
  width: 40px; height: 40px;
  margin-bottom: 14px;
  border-radius: var(--bi-radius-tile);
  display: flex; align-items: center; justify-content: center;
  background: var(--bi-blue-a10);
  color: var(--bi-primary);
}
.bi-card__icon svg { width: 22px; height: 22px; }
.bi-card__foot { margin-top: auto; padding-top: 16px; }

/* Event card — faithful to the Israel Decree city card */
.bi-event__state {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bi-accent-dot);
}
.bi-event__city {
  margin: 0 0 6px;
  color: var(--bi-ink);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.bi-event__date {
  margin: 0 0 10px;
  color: var(--bi-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.bi-event__venue {
  margin: 0 0 16px;
  font-size: var(--bi-compact-control);
  line-height: 1.5;
  color: var(--bi-muted);
}
.bi-event__venue span { display: block; }
.bi-event__note {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bi-muted-2);
}
.bi-event__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}
.bi-event__actions .bi-btn {
  flex: 1 1 auto;
  min-height: 50px;
  padding: 13px 16px;
  font-size: 13.5px;
  gap: 9px;
}
@media (min-width: 940px) {
  .bi-event__actions .bi-btn { flex: 1 1 0; min-width: 0; }
  .bi-event__actions--single .bi-btn { flex: 0 0 calc(50% - 5px); }
}


/* ---------------------------------------------------------------------------
   6. Media frame + play button
   --------------------------------------------------------------------------- */
.bi-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--bi-radius-media);
  border: 1px solid var(--bi-frame);
  background: var(--bi-media-ph);
  box-shadow: var(--bi-shadow-media);
}
.bi-media--square { aspect-ratio: 1 / 1; }
.bi-media--portrait { aspect-ratio: 2 / 3; }
.bi-media--auto { aspect-ratio: auto; }
.bi-media > img, .bi-media > video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* blue accent edge under the frame, revealed on hover */
.bi-media::after {
  content: "";
  position: absolute; left: 14%; right: 14%; bottom: -1px;
  height: 2px;
  z-index: 4;
  background: linear-gradient(90deg, transparent, var(--bi-primary), transparent);
  opacity: 0;
  transition: opacity var(--bi-dur-slow) ease;
}
.bi-media:hover::after, .bi-media--edge::after { opacity: .9; }

.bi-media__ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--bi-muted);
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  background: radial-gradient(60% 60% at 50% 45%, rgba(24,98,255,0.16), transparent 70%);
}
.bi-media__overlay {
  position: absolute; inset: 0;
  z-index: var(--bi-z-overlay);
  display: flex; align-items: center; justify-content: center;
  margin: 0; padding: 0; border: 0;
  cursor: pointer;
  background:
    radial-gradient(60% 60% at 50% 50%, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.42) 60%, rgba(0,0,0,0.62) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.35) 100%);
  transition: opacity var(--bi-dur-slow) ease, visibility var(--bi-dur-slow) ease;
}
.bi-media.is-playing .bi-media__overlay { opacity: 0; visibility: hidden; pointer-events: none; }

.bi-playbtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px;
  border-radius: var(--bi-radius-pill);
  border: 1px solid rgba(255,255,255,0.55);
  background: rgba(10,10,18,0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  box-shadow: var(--bi-shadow-play);
  transition:
    transform var(--bi-dur-slow) var(--bi-ease),
    background-color var(--bi-dur-slow) ease,
    border-color var(--bi-dur-slow) ease,
    box-shadow var(--bi-dur-slow) ease;
}
.bi-playbtn--sm { width: 60px; height: 60px; }
.bi-playbtn svg { display: block; margin-left: 4px; }
.bi-media__overlay:hover .bi-playbtn,
.bi-media__overlay:focus-visible .bi-playbtn {
  background: var(--bi-primary);
  border-color: var(--bi-primary);
  transform: scale(1.06);
  box-shadow: var(--bi-shadow-play-hover);
}
.bi-media__overlay:focus-visible { outline: 2px solid #fff; outline-offset: -6px; border-radius: var(--bi-radius-media); }
.bi-pulse {
  position: absolute;
  width: 88px; height: 88px;
  border-radius: var(--bi-radius-pill);
  border: 1px solid rgba(24,98,255,0.5);
  pointer-events: none;
  animation: bi-pulse 2.8s ease-out infinite;
}
@keyframes bi-pulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}


/* ---------------------------------------------------------------------------
   7. Forms (marketing: newsletter / email capture)
   --------------------------------------------------------------------------- */
.bi-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 520px;
}
.bi-form-inline .bi-input { flex: 1 1 240px; }
.bi-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bi-muted);
}
.bi-label--plain {                          /* form labels in dense UI: sentence case */
  font-size: 12.5px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bi-body-strong);
}
.bi-input, .bi-select, .bi-textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--bi-radius-pill);
  border: 1px solid var(--bi-ghost-border);
  background: var(--bi-surface-chip);
  color: var(--bi-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--bi-dur-fast) ease, box-shadow var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-input::placeholder, .bi-textarea::placeholder { color: var(--bi-muted); font-weight: 400; }
.bi-input:hover, .bi-select:hover, .bi-textarea:hover { border-color: var(--bi-ghost-border-hover); }
.bi-input:focus, .bi-select:focus, .bi-textarea:focus { outline: none; border-color: var(--bi-primary); box-shadow: 0 0 0 3px var(--bi-blue-a18); }
.bi-input:focus-visible, .bi-select:focus-visible, .bi-textarea:focus-visible { outline: none; }
.bi-input[aria-invalid="true"], .bi-select[aria-invalid="true"], .bi-textarea[aria-invalid="true"] { border-color: var(--bi-danger); box-shadow: 0 0 0 3px var(--bi-danger-bg); }
.bi-input:disabled, .bi-select:disabled, .bi-textarea:disabled { opacity: .5; cursor: not-allowed; background: var(--bi-surface-2); }
/* Sizes: lg 52 pill (default) · md 44 pill · sm 36 / xs 32 compact (8px radius) */
.bi-input--md { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.bi-input--sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; font-weight: 500; border-radius: var(--bi-radius-sm); background: var(--bi-surface); border-color: var(--bi-control-border); }
.bi-input--xs { min-height: 32px; padding: 0 10px; font-size: var(--bi-compact-control);   font-weight: 500; border-radius: var(--bi-radius-sm); background: var(--bi-surface); border-color: var(--bi-control-border); }
/* compact fields hover to the muted ink, not the bright ghost outline */
.bi-input--sm:hover, .bi-input--xs:hover { border-color: var(--bi-muted); }
.bi-textarea { min-height: 88px; padding-top: 12px; padding-bottom: 12px; resize: vertical; }
.bi-textarea.bi-input--sm, .bi-textarea.bi-input--xs { padding-top: 10px; padding-bottom: 10px; }
.bi-select {
  appearance: none; -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a8f9c' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.bi-select.bi-input--sm, .bi-select.bi-input--xs { padding-right: 34px; background-position: right 10px center; }
.bi-select option { background: var(--bi-surface); color: var(--bi-ink); }
.bi-input[type="date"] { color-scheme: dark; }
[data-theme="light"] .bi-input[type="date"] { color-scheme: light; }
.bi-help { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--bi-muted); }
.bi-help--error { color: var(--bi-danger); }
.bi-help--success { color: var(--bi-success); }
.bi-help--error, .bi-help--success { display: flex; align-items: center; gap: 6px; }
.bi-help .bi-c-icon { width: 14px; height: 14px; }

/* Quantity stepper (commerce) */
.bi-stepper {
  display: inline-flex;
  align-items: stretch;
  min-height: 52px;
  border-radius: var(--bi-radius-pill);
  border: 1px solid var(--bi-ghost-border);
  background: var(--bi-surface-chip);
  overflow: hidden;
}
.bi-stepper__btn {
  width: 48px;
  border: 0; margin: 0; padding: 0;
  background: transparent;
  color: var(--bi-ink);
  font: inherit; font-size: 18px; font-weight: 500;
  cursor: pointer;
  transition: background-color var(--bi-dur-fast) ease, color var(--bi-dur-fast) ease;
}
.bi-stepper__btn:hover { background: var(--bi-blue-a10); color: var(--bi-primary); }
.bi-stepper__btn:focus-visible { outline: 2px solid var(--bi-focus-ring); outline-offset: -4px; border-radius: 999px; }
.bi-stepper__value {
  width: 44px;
  border: 0; margin: 0; padding: 0;
  text-align: center;
  background: transparent;
  color: var(--bi-ink);
  font: inherit; font-size: 15px; font-weight: 600;
  -moz-appearance: textfield;
}
.bi-stepper__value::-webkit-outer-spin-button,
.bi-stepper__value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }


/* ---------------------------------------------------------------------------
   8. Alert (display scale)
   ---------------------------------------------------------------------------
   The marketing-scale callout: sign-in notices, form-level errors, "you're
   signed out", "preorders open". Same grammar as the compact `.bi-c-alert`
   (tint fill · status icon · tile radius) grown to the display scale: 14px
   type, 16px 18px padding, a 20px 1.5px-stroke Lucide icon. The ground is
   `--bi-surface-2` with the variant's translucent status tint laid over it,
   inside a 1px hairline, so it reads as one raised step on either tone.
   Deliberate difference from the compact alert: the display alert KEEPS the
   hairline on tinted variants (a marketing page has no app chrome around it
   to give the tint an edge); `.bi-c-alert` drops it to transparent. The tint
   is layered as `linear-gradient(tint, tint) var(--bi-surface-2)` so the
   translucent status token composites over surface-2, not the page.
   Default is neutral; `--info` / `--success` / `--danger` tint it.
     role="status" for info / success · role="alert" for danger.
     .bi-alert__actions holds compact buttons (.bi-btn--sm).
     .bi-alert__dismiss is the optional close (32px ghost square).
   --------------------------------------------------------------------------- */
.bi-alert {
  --bi-alert-tint: transparent;                /* variants set this; layered over surface-2 */
  --bi-alert-accent: var(--bi-muted);          /* icon colour */
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--bi-radius-tile);
  border: 1px solid var(--bi-hairline);
  background: linear-gradient(var(--bi-alert-tint), var(--bi-alert-tint)) var(--bi-surface-2);
  color: var(--bi-body);
  font-size: 14px;
  line-height: 1.5;
  text-align: left;
}
.bi-alert--info    { --bi-alert-tint: var(--bi-info-bg);    --bi-alert-accent: var(--bi-info); }
.bi-alert--success { --bi-alert-tint: var(--bi-success-bg); --bi-alert-accent: var(--bi-success); }
.bi-alert--danger  { --bi-alert-tint: var(--bi-danger-bg);  --bi-alert-accent: var(--bi-danger); }

.bi-alert__icon {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;                             /* optical centre on the 14px/1.5 title line */
  color: var(--bi-alert-accent);
  stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.bi-alert__body { flex: 1 1 auto; min-width: 0; }
.bi-alert__title {
  margin: 0;
  color: var(--bi-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.bi-alert__text {
  margin: 0;
  color: var(--bi-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}
.bi-alert__title + .bi-alert__text { margin-top: 2px; }
.bi-alert__text a:not([class]) { color: var(--bi-link); font-weight: 600; text-decoration: none; text-underline-offset: 3px; }
.bi-alert__text a:not([class]):hover { text-decoration: underline; color: var(--bi-link-hover); }
.bi-alert__text code {
  padding: 1px 6px;
  border-radius: var(--bi-radius-xs);
  border: 1px solid var(--bi-hairline);
  background: var(--bi-surface-chip);
  color: var(--bi-ink);
  font-family: var(--bi-font-mono);
  font-size: 12.5px;
}
/* Actions row: compact buttons, 12px under the text (not the 34px .bi-actions gap) */
.bi-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
/* Dismiss: a 32px ghost square pulled into the padding so its icon sits on the text edge */
.bi-alert__dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px; height: 32px;
  margin: -6px -8px -6px 0;
  padding: 0;
  border: 0;
  border-radius: var(--bi-radius-sm);
  background: transparent;
  color: var(--bi-muted);
  cursor: pointer;
  transition: color var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-alert__dismiss:hover { color: var(--bi-ink); background: var(--bi-hover-tint); }
.bi-alert__dismiss svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bi-alert__dismiss:focus-visible { outline: 2px solid var(--bi-focus-ring); outline-offset: var(--bi-focus-ring-offset); }
.bi-alert + .bi-alert { margin-top: 12px; }


/* ---------------------------------------------------------------------------
   9. Logo
   --------------------------------------------------------------------------- */
.bi-logo { display: inline-block; height: auto; }              /* logos are sized by WIDTH, never height */
.bi-logo--header { width: var(--bi-logo-header); }
.bi-logo--footer { width: var(--bi-logo-footer); }
.bi-logo--hero   { width: var(--bi-logo-hero); }          /* brand panels, sign-in, splash: 280px max = half the 560px retina file */
.bi-logo--min { width: 120px; }


/* ---------------------------------------------------------------------------
   10. Site navigation (display scale)
   ---------------------------------------------------------------------------
   The marketing header's primary nav. Two renderings of ONE menu tree:
     .bi-nav         desktop bar (≥860px) — links, or <button aria-expanded>
                     triggers that open a floating .bi-nav__menu popover
     .bi-nav-drawer  mobile (<860px) — right-side drawer over a scrim, parents
                     are <button aria-expanded> accordions
   State is attribute-driven so the CSS needs no JS to render a specimen:
     [data-open] on .bi-nav__item / .bi-nav-drawer__item / .bi-nav-drawer
     [aria-expanded] on the trigger (rotates the chevron)
     [aria-current="page"] on the active top-level item (link or trigger) — info tint
     html[data-nav-open] locks page scroll while the drawer is open.
   bi-nav.js (data-bi-nav on the header shell) drives the attributes: click,
   hover / focus-within, Escape, outside click, one-open-at-a-time, focus
   return. The header shell itself (sticky bar, logo, Donate) stays page-level.
   NOTE: the drawer is position:fixed — keep it OUTSIDE any header that uses
   backdrop-filter (that property makes the header its containing block).
   --------------------------------------------------------------------------- */
.bi-nav { display: none; }
@media (min-width: 860px) { .bi-nav { display: flex; } }
.bi-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bi-nav__item { position: relative; }
/* Invisible bridge across the 8px gap so a hover doesn't drop between trigger and menu */
.bi-nav__item[data-open]::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }

.bi-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--bi-radius-sm);
  background: transparent;
  color: var(--bi-body-strong);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-nav__link:hover,
.bi-nav__item[data-open] > .bi-nav__link { color: var(--bi-ink); background: var(--bi-hover-tint); }
.bi-nav__link[aria-current="page"] { color: var(--bi-ink); background: var(--bi-info-bg); }
.bi-nav__chev {
  flex: none;
  width: 16px; height: 16px;
  margin-right: -4px;
  color: var(--bi-muted);
  transition: transform var(--bi-dur-base) var(--bi-ease);
}
.bi-nav__link[aria-expanded="true"] .bi-nav__chev,
.bi-nav-drawer__link[aria-expanded="true"] .bi-nav__chev { transform: rotate(180deg); }
.bi-nav__link:hover .bi-nav__chev,
.bi-nav__link[aria-expanded="true"] .bi-nav__chev { color: currentColor; }

/* Floating popover: enters with the house 6px rise + .985 scale */
.bi-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: var(--bi-z-dropdown);
  min-width: 280px;
  padding: 8px;
  border-radius: var(--bi-radius-popover);
  border: 1px solid var(--bi-hairline);
  background: var(--bi-surface-2);
  box-shadow: var(--bi-elev-3-current);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.985);
  transform-origin: top left;
  pointer-events: none;
  transition:
    opacity var(--bi-dur-base) ease,
    transform var(--bi-dur-base) var(--bi-ease),
    visibility 0s linear var(--bi-dur-base);   /* hide only after the fade; show at once so focus can land */
}
.bi-nav__item[data-open] > .bi-nav__menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.bi-nav__menu--end  { left: auto; right: 0; transform-origin: top right; }
.bi-nav__menu--cols { min-width: 480px; column-count: 2; column-gap: 4px; }   /* long lists read down, then across */
.bi-nav__menu--cols .bi-nav__menu-item { break-inside: avoid; }
.bi-nav__menu-item {
  display: block;
  padding: 10px 12px;
  border-radius: var(--bi-radius-sm);
  color: var(--bi-body-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-nav__menu-item:hover { color: var(--bi-ink); background: var(--bi-hover-tint); }
.bi-nav__menu-item[aria-current="page"] { color: var(--bi-ink); background: var(--bi-info-bg); }
.bi-nav__menu-desc {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--bi-muted);
}

/* Hamburger (header) and close X (drawer) share one 40px ghost square */
.bi-nav__toggle, .bi-nav-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px; height: 40px;
  margin: 0; padding: 0;
  border-radius: var(--bi-radius-sm);
  border: 1px solid var(--bi-ghost-border);
  background: transparent;
  color: var(--bi-ink);
  cursor: pointer;
  transition: border-color var(--bi-dur-fast) ease, background-color var(--bi-dur-fast) ease;
}
.bi-nav__toggle:hover, .bi-nav-drawer__close:hover { border-color: var(--bi-ghost-border-hover); }
.bi-nav__toggle svg, .bi-nav-drawer__close svg { width: 18px; height: 18px; }
@media (min-width: 860px) { .bi-nav__toggle { display: none; } }

/* Drawer: fixed overlay = scrim + right-side panel */
.bi-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: var(--bi-z-modal);
  visibility: hidden;
  transition: visibility 0s linear var(--bi-dur-slow);   /* same rule: instant show, delayed hide */
}
.bi-nav-drawer[data-open] { visibility: visible; transition-delay: 0s; }
@media (min-width: 860px) { .bi-nav-drawer { display: none; } }
.bi-nav-drawer__scrim {
  position: absolute;
  inset: 0;
  margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--bi-bg) 60%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  cursor: pointer;
  transition: opacity var(--bi-dur-slow) ease;
}
.bi-nav-drawer[data-open] .bi-nav-drawer__scrim { opacity: 1; }
.bi-nav-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 360px;
  background: var(--bi-surface-2);
  color: var(--bi-body);
  border-left: 1px solid var(--bi-hairline);
  box-shadow: var(--bi-elev-3-current);
  outline: none;
  transform: translateX(100%);
  transition: transform var(--bi-dur-slow) var(--bi-ease);
}
.bi-nav-drawer[data-open] .bi-nav-drawer__panel { transform: none; }
@media (max-width: 420px) { .bi-nav-drawer__panel { max-width: none; border-left: 0; } }
.bi-nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--bi-hairline-2);
}
/* Logo follows the page tone: white on Night, black on Paper (img-qualified to outrank .bi-page img) */
img.bi-nav-drawer__logo { display: block; width: var(--bi-logo-footer); height: auto; }
img.bi-nav-drawer__logo--paper { display: none; }
[data-theme="light"] img.bi-nav-drawer__logo--paper { display: block; }
[data-theme="light"] img.bi-nav-drawer__logo--night { display: none; }
.bi-nav-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 20px;
}
.bi-nav-drawer__list, .bi-nav-drawer__sub { margin: 0; padding: 0; list-style: none; }
.bi-nav-drawer__item { border-bottom: 1px solid var(--bi-hairline-2); }
.bi-nav-drawer__item:last-child { border-bottom: 0; }
.bi-nav-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 14px 0;
  border: 0;
  background: transparent;
  color: var(--bi-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--bi-dur-fast) ease;
}
.bi-nav-drawer__link:hover { color: var(--bi-link); }
.bi-nav-drawer__link[aria-current="page"] { color: var(--bi-link); }
.bi-nav-drawer__link .bi-nav__chev { width: 18px; height: 18px; margin: 0; }
.bi-nav-drawer__sub { display: none; padding: 0 0 10px; }
.bi-nav-drawer__item[data-open] > .bi-nav-drawer__sub { display: block; }
.bi-nav-drawer__sublink {
  display: block;
  padding: 10px 0 10px 16px;
  color: var(--bi-body-strong);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color var(--bi-dur-fast) ease;
}
.bi-nav-drawer__sublink:hover { color: var(--bi-ink); }
.bi-nav-drawer__sublink[aria-current="page"] { color: var(--bi-link); }
.bi-nav-drawer__foot {
  flex: none;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--bi-hairline-2);
}
html[data-nav-open] { overflow: hidden; }

/* Focus ring, explicit (mirrors .bi-btn) so it holds outside a .bi-page/.bi-app wrapper */
.bi-nav__link:focus-visible, .bi-nav__menu-item:focus-visible, .bi-nav__toggle:focus-visible,
.bi-nav-drawer__close:focus-visible, .bi-nav-drawer__link:focus-visible, .bi-nav-drawer__sublink:focus-visible {
  outline: 2px solid var(--bi-focus-ring);
  outline-offset: var(--bi-focus-ring-offset);
}

@media (prefers-reduced-motion: reduce) {
  .bi-nav__chev, .bi-nav__menu, .bi-nav-drawer, .bi-nav-drawer__scrim, .bi-nav-drawer__panel { transition: none; }
}


/* ---------------------------------------------------------------------------
   11. Motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .bi-reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: bi-rise var(--bi-reveal-dur) var(--bi-ease) forwards;
  }
  .bi-reveal--d1 { animation-delay: var(--bi-reveal-d1); }
  .bi-reveal--d2 { animation-delay: var(--bi-reveal-d2); }
  .bi-reveal--d3 { animation-delay: .30s; }
  @keyframes bi-rise { to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) {
  .bi-pulse, .bi-badge--live::before { animation: none; }
  .bi-btn, .bi-card, .bi-playbtn, .bi-media::after, .bi-btn__arrow, .bi-chip--interactive { transition: none; }
  .bi-btn:hover, .bi-card--hover:hover, a.bi-card:hover, .bi-media__overlay:hover .bi-playbtn { transform: none; }
  .bi-btn:hover .bi-btn__arrow { transform: none; }
}


/* ---------------------------------------------------------------------------
   12. Utilities
   --------------------------------------------------------------------------- */
.bi-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.bi-interactive, .bi-interactive * { pointer-events: auto; }  /* counters WP's global img{pointer-events:none} */
.bi-center { text-align: center; }
.bi-center .bi-body, .bi-center .bi-lead { margin-left: auto; margin-right: auto; }
.bi-center .bi-actions { justify-content: center; }
.bi-mt-0 { margin-top: 0 !important; }
