/* The hive (docs/brand/beecmo.md) — loaded only on pages with bee components (site/_src/layout.mjs). Bees are drawn by src/shared/bee.js; motion lives in bee.css + hive.js.
   Bees are server-rendered at a fixed size, so nothing moves the layout when JS (or motion) is off. Tokens: site.css. */
.bee-badge { display: inline-flex; flex: none; line-height: 0; }
.bee-badge .bee, .cell-bee .bee, .queen-bee .bee, .hero-bee-art .bee, .lost-art .bee { width: 100%; height: 100%; }

/* Heroes with a bee: copy on the left, the bee or the hive on the right (stacked on phones). */
.hero--hive, .hero--bee, .hero--lost { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 48px; align-items: center; }
.hero-copy > :last-child { margin-bottom: 0; }
.hero--hive::before, .hero--bee::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: var(--comb-tile) 50% 0 / 31.18px 54px; -webkit-mask-image: radial-gradient(closest-side at 78% 48%, #000, transparent); mask-image: radial-gradient(closest-side at 78% 48%, #000, transparent); }
@media (min-width: 900px) {
  .hero--hive { grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.8fr); }
  .hero--bee, .hero--lost { grid-template-columns: minmax(0, 1fr) minmax(240px, auto); }
}

/* Home hero: the Queen Bee over a small comb of five cells, one worker bee each. */
.hive-stage { --hex: clamp(100px, 29vw, 122px); display: grid; justify-items: center; padding: 4px 0 8px; }
.hive-queen { display: grid; justify-items: center; text-align: center; color: var(--ink); text-decoration: none; margin-bottom: 2px; }
.queen-bee { display: block; width: 112px; height: 112px; }
.queen-say { display: block; max-width: 25ch; margin-top: 2px; padding: 6px 14px; font-size: 0.9rem; line-height: 1.35; color: var(--ink-2); background: var(--card); border: 2px solid var(--ink); border-radius: 14px; }
.queen-say strong { display: block; color: var(--ink); font-size: 0.95rem; }
.hive-queen:hover .queen-say { border-color: var(--bee-role); }
.hive-cells { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; max-width: calc(var(--hex) * 3 + 12px); }
.hive-cells li { margin: 0; max-width: none; }
.hive-cells .row-break { flex-basis: 100%; height: 0; }
.hive-cells > li:nth-child(n+5) { margin-top: calc(var(--hex) * -0.2887 + 6px); }
.hive-cell { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; width: var(--hex); aspect-ratio: 1 / 1.1547; padding: 14% 12% 8%; text-align: center; color: var(--ink); text-decoration: none; }
.hive-cell::before, .hive-cell::after { content: ""; position: absolute; z-index: -2; inset: 0; background: var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hive-cell::after { z-index: -1; inset: 2.5px; background: var(--card); }
.hive-cell:hover::after, .hive-cell:focus-visible::after { background: color-mix(in srgb, var(--bee-role) 16%, var(--card)); }
.hive-cell:focus-visible { outline: none; }
.hive-cell:focus-visible::before { background: var(--focus); inset: -3px; }
.cell-label { font-weight: 750; font-size: 0.9rem; line-height: 1.15; }
.cell-name { margin-top: 4px; font-size: 0.8rem; font-weight: 650; color: var(--ink-2); line-height: 1.1; }
.cell-name::before { content: ""; display: inline-block; width: 0.6em; height: 0.7em; margin-right: 4px; background: var(--bee-role); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.cell-bee { position: absolute; width: 46px; height: 46px; pointer-events: none; }
/* Each worker bee keeps to the outside of the comb so none of them hide a label. */
.p1 .cell-bee { top: -10px; left: -16px; }
.p2 .cell-bee { top: -10px; right: -16px; }
.p3 .cell-bee { bottom: 8%; left: -26px; }
.p4 .cell-bee { bottom: -26px; left: calc(50% - 23px); }
.p5 .cell-bee { bottom: 8%; right: -26px; }
@media (min-width: 900px) { .hero--hive .hive-stage { align-self: start; margin-top: clamp(0px, 3vw, 36px); } }
@media (max-width: 420px) { .cell-name { display: none; } .cell-label { font-size: 0.875rem; } }
@media (max-width: 480px) { .p3 .cell-bee { left: -6px; bottom: -20px; } .p5 .cell-bee { right: -6px; bottom: -20px; } }

/* Product cards that are bees ("Meet the hive"). */
.cols--hive { gap: 44px 22px; margin-top: 2.4em; }
.col--bee { position: relative; border: 2px solid var(--ink); border-radius: 18px; padding: 18px 18px 4px; background: var(--card); box-shadow: 0 5px 0 color-mix(in srgb, var(--bee-role) 75%, var(--ink)); }
.col--bee h3 { margin: 0 64px 2px 0; }
.col-bee { position: absolute; top: -30px; right: 10px; width: 60px; height: 60px; }
.bee-job { color: var(--ink) !important; font-weight: 650; font-size: 0.95rem; }
@media (prefers-reduced-motion: no-preference) {
  .col--bee, .hive-cell { transition: transform 0.25s ease; }
  .col--bee:hover, .hive-cell:hover { transform: translateY(-3px); }
}
.hive-strip { display: flex; gap: 14px; align-items: center; max-width: none; margin: 4px 0 0; padding: 12px 16px; border: 2px dashed var(--rule); border-radius: 18px; color: var(--ink-2); }
.hive-strip strong { color: var(--ink); }

/* Product page hero: the product's bee on a honey hexagon. */
.hero-bee { margin: 0; display: grid; justify-items: center; text-align: center; gap: 10px; }
.hero-hex { position: relative; isolation: isolate; display: grid; place-items: center; width: 200px; aspect-ratio: 1 / 1.1547; }
.hero-hex::before, .hero-hex::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--ink); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.hero-hex::after { z-index: -1; inset: 3px; background: color-mix(in srgb, var(--bee-role) 18%, var(--card)); }
.hero-bee-art { display: block; width: 132px; height: 132px; }
.hero-bee figcaption { max-width: 24ch; color: var(--ink-2); font-size: 0.95rem; line-height: 1.4; }
.hero-bee figcaption strong { display: block; color: var(--ink); font: 750 1.1rem var(--display); }
@media (max-width: 899px) {
  .hero-bee { grid-template-columns: auto 1fr; justify-items: start; text-align: left; gap: 16px; }
  .hero-hex { width: 104px; }
  .hero-bee-art { width: 72px; height: 72px; }
}

/* 404: a lost Scout Bee. */
.lost-bee { position: relative; width: min(320px, 100%); aspect-ratio: 2 / 1; color: var(--amber); justify-self: center; }
.lost-trail { display: block; width: 100%; height: auto; opacity: 0.7; }
.lost-art { position: absolute; right: -4%; top: -12%; width: 37%; aspect-ratio: 1; }
.lost-q { position: absolute; right: 31%; top: -14%; font: 800 2.2rem/1 var(--display); color: var(--amber); }

/* Timeline: the bee on duty, as a hexagon in its colour. */
.timeline .who[data-role]::before { content: ""; display: inline-block; width: 0.8em; height: 0.92em; margin-right: 0.45em; vertical-align: -0.08em; background: var(--bee-role); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }

/* Small bees beside product names (pricing), drafts (sample week) and tool forms. */
.td-bee { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sw-meta .sw-bee { align-self: center; margin: -4px 0; }
.tool-form h2 { display: flex; align-items: center; gap: 10px; }
.tool-choice label[data-bee] { position: relative; }
.pick-bee { position: absolute; top: -16px; right: -18px; width: 26px; height: 26px; pointer-events: none; }
.pick-bee .bee { width: 100%; height: 100%; }
