@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

/* Art-end fraction eases when a taller/shorter clip starts so the band
   tracks the feet without a snap. Layout-core owns the value. */
@property --bb-art-end {
  syntax: "<number>";
  inherits: true;
  initial-value: 0.8403;
}

:root {
  /* Midpoint between idle and emote grounds — no clip differs by more than ~4 levels. */
  /* Match BeeBee clip plate cream (live idle mode ~rgb(246,240,237)) so the
     soft-masked video box never reads as a rounded rectangle at 12x contrast. */
  --porcelain: #F6F0ED;
  --porcelain-rgb: 246, 240, 237;
  /* Content under BB scales ~15% so a heading + 3–4 body lines clear the dock. */
  --content-scale: 0.85;
  --white: #FFFFFF;
  --ink: #15171A;
  --graphite: #5E636B;
  --muted: #6A6E75;  /* 4.5:1 on porcelain (AA). Was #8C9097 (2.8:1). */
  --disabled: #C9CDD2;
  --bloom: #5B8FCA;
  --deep: #3E6EA8;
  --deep-hover: #33608F;
  --mist: #BFD3E6;
  --haze: #E8EFF6;
  --edge: 0 0 0 1px rgba(21, 23, 26, 0.05);
  --hair: 1px solid rgba(21, 23, 26, 0.08);
  --row: 1px solid rgba(21, 23, 26, 0.06);
  --field: 1px solid rgba(21, 23, 26, 0.12);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --rise: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.32, 0.72, 0, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Instrument Serif", Georgia, serif;
  /* Single layout model — BeeLayout.compute() owns these. Fallbacks before JS. */
  --header-h: 56px;
  --bb-src-w: 1080;
  --bb-src-h: 1440;
  --bb-crop-aspect: 0.75;
  --bb-scale: 1;
  --bb-min-scale: 0.65;
  /* Standing art floor (idle paint 1210 + shadow pad 12) / 1440. Home overrides
     to the seated floor until JS boots; layout-core owns live values. */
  --bb-art-end: 0.8486;
  --bb-feather: 12px;
  --bee-gap-above: 4px;
  /* Opaque air (12) + feather (12) — visible feet→glyph stays 10–14. */
  --bee-gap-below: 24px;
  --bee-pad: var(--bee-gap-above);
  /* Pre-JS restH matches main: width clamp capped at 48svh (no dock maxRest). */
  --bee-h: clamp(200px, calc(100vw * 0.85 / 0.75), 48svh);
  /* Band ends at the art floor + breathing gap — not the empty frame bottom. */
  --bee-band: calc(
    var(--header-h) + var(--bee-gap-above)
    + (var(--bee-h) * var(--bb-art-end))
    + var(--bee-gap-below)
  );
  --bee-space-h: var(--bee-band);
  --bee-band-scrolled: var(--bee-band);
  --bee-frame-band: var(--bee-band);
  --bee-frame-band-scrolled: var(--bee-band-scrolled);
  --bee-band-release: 0px;
  --bee-pad-top: var(--bee-gap-above);
  --bee-pad-bottom: var(--bee-gap-below);
  --bee-fade: var(--bee-gap-below);
  --delta: 160px;
  --delta-px: 160;
  --p: 0;
  --dock-h: 140px; /* chips+input (+safe in padding); phone has no fade band */
  --dock-fade-h: 0px;
  --safe-bottom: 0px;
  --avail-h: 100svh;
  --bb-spring-ms: 350ms;
  --bb-dissolve-ms: 250ms;
  /* Only asleep↔standing retunes the band; ease that handoff, not reactions.
     Transition is off until html[data-bb-art-ease] — otherwise the first paint
     eases from the CSS standing default into the seated home floor and CI / 
     WebKit measure a standing artEnd while the spacer is already seated. */
  --bb-art-end-ms: 420ms;
}

html[data-bb-art-ease="1"] {
  transition: --bb-art-end var(--bb-art-end-ms) var(--ease);
}

/* Pre-layout home only: seated art floor so the asleep poster’s shadow
   clears the cover. data-bb-layout is stamped by shrink-boot / layout-core
   and never cleared (BBShrink.clear removes data-bb-shrink-boot on home
   return — that must not revive this override or idle keeps a seated spacer
   under a standing art floor). Override --bee-band here too: :root’s calc()
   resolves --bb-art-end against :root. */
html:not([data-bb-layout]) body.home {
  --bb-art-end: 0.7944; /* (1132+12)/1440 — asleep poster */
  --bee-gap-below: 24px;
  /* Keep main’s --bee-h (48svh clamp). Do not apply dock maxRest here — that
     shrank the noscript/SE poster to 222 vs main’s 263 at 375×548. */
  --bee-band: calc(
    var(--header-h) + var(--bee-gap-above)
    + (var(--bee-h) * var(--bb-art-end))
    + var(--bee-gap-below)
  );
  --bee-space-h: var(--bee-band);
  --bee-band-scrolled: var(--bee-band);
}

/* Pre-JS content pages: standing poster art end + same breathing gap. */
html:not([data-bb-layout]) body.page {
  --bb-art-end: 0.8486; /* (1210+12)/1440 — idle poster */
  --bee-gap-below: 24px;
  --bee-band: calc(
    var(--header-h) + var(--bee-gap-above)
    + (var(--bee-h) * var(--bb-art-end))
    + var(--bee-gap-below)
  );
  --bee-space-h: var(--bee-band);
  --bee-band-scrolled: var(--bee-band);
}

* { box-sizing: border-box; }

html {
  background: var(--porcelain);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--bee-band-scrolled, var(--bee-band)) + 0px);
  scroll-behavior: auto;
}

/* Phone: keep landings / end-scroll clear of the fixed dock band.
   Desktop omits this so home geometry stays pixel-identical to main. */
@media (max-width: 759px) {
  html {
    scroll-padding-bottom: var(--dock-h, 0px);
  }
}

body {
  margin: 0;
  background: var(--porcelain);
  font: 400 16px/1.45 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  /* Direct parent of .bee-space — stop scroll anchoring from fighting BB shrink.
     Never overflow/contain/transform here: the fixed dock is a body child and
     iOS Safari clips position:fixed when an ancestor is a scroll container. */
  overflow-anchor: none;
}

::selection { background: var(--mist); }

a { color: inherit; }

/* SPA: cover the home chat with an opaque page shell (do not park the chat
   tree — showing/hiding it under BeeBee videos freezes WebKit ~10s).
   Parked SPA page shells must NEVER use display:none — that rule later in
   this file still applies to .is-parked, and toggling it under BeeBee freezes
   WebKit’s event loop ~10s on return-home. Keep them in the tree, invisible. */
main[data-view].is-spa-page {
  position: relative;
  z-index: 3;
  background: var(--porcelain);
  min-height: 50dvh;
}
main[data-view].is-parked {
  /* Override the display:none from .is-parked / main.is-parked below. */
  display: block !important;
  position: absolute !important;
  left: 0;
  right: 0;
  top: 0;
  width: 100%;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
  visibility: hidden !important;
}
[data-foot].is-parked,
footer.is-parked {
  /* Footers are small; opacity-park only — never display:none under BeeBee. */
  display: block !important;
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}


:focus-visible {
  outline: 2px solid var(--bloom);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Programmatic focus on the greeting must not draw the blue ring. */
.greet:focus:not(:focus-visible),
.copy h1:focus:not(:focus-visible) {
  outline: none;
}

code { font-family: var(--mono); letter-spacing: 0; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon { display: block; flex: none; }

/* Header — fixed on every page so BeeBee and nav stay put while content scrolls. */

.home,
.page {
  /* Band/height come from BeeLayout — no per-page pad stacks. */
  --header-h: 56px;
}

.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  width: 100%;
  height: var(--header-h);
  padding: 0 max(20px, calc((100% - 1080px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s var(--ease);
  /* Same flat cream as the band — no seam under the nav. */
  background: var(--porcelain);
}

/* Keyboard mode: BeeLayout writes --bee-h / --bee-band / --kbd-bee-space from visualViewport. */
:root {
  --vv-top: 0px;
  --vv-height: 100dvh;
  --vv-bottom: 0px;
  --foot-h: 0px;
  /* BeeLayout: safe-area when keyboard closed; VV bottom inset when open. */
  --chrome-bottom: 0px;
  --kbd-bee-space: var(--bee-band);
  --kbd-greet-h: 64px;
  --kbd-ease: var(--spring);
  --kbd-ms: var(--bb-spring-ms);
}

.home.kbd,
.page.kbd {
  overscroll-behavior: none;
  /* Keep the layout viewport still; visualViewport vars own the chat shell. */
  overflow: hidden;
  touch-action: none;
}

/* Opaque shell so scrolled page content never peeks through the chat. */
.home.kbd::before {
  content: "";
  position: fixed;
  z-index: 30;
  left: 0;
  right: 0;
  top: var(--vv-top, 0px);
  height: var(--vv-height, 100dvh);
  background: var(--porcelain);
  pointer-events: none;
  transition: top var(--kbd-ms) var(--kbd-ease), height var(--kbd-ms) var(--kbd-ease);
}

.home.kbd .thread,
.home.kbd .dock,
.page.kbd .dock {
  touch-action: manipulation;
}

.home.kbd .top {
  transform: translateY(-110%);
  pointer-events: none;
  transition: transform var(--kbd-ms) var(--kbd-ease);
}

/* Bottom-pack BB + greet + dock onto the keyboard — no blank band under chat.
   --kbd-cover-top is lerped+clamped each frame by BeeLayout so WebKit never
   pans BB off-screen from a stale CSS calc. */
.home.kbd .bee-cover,
.page.kbd .bee-cover {
  top: var(--kbd-cover-top,
    calc(
      var(--vv-top, 0px) + var(--vv-height, 100dvh)
      - var(--kbd-bee-space, var(--bee-band))
      - var(--kbd-greet-h, 0px)
      - var(--dock-h, 88px)
    )
  );
  height: var(--kbd-bee-space, var(--bee-band));
  z-index: 40;
  background: var(--porcelain);
  /* Never overflow:hidden here — that was the chin crop + pink plate. */
  overflow: visible;
  /* Keyboard packs by top/height — disable scroll clip, timeline, feather. */
  clip-path: none;
  animation: none;
  -webkit-mask-image: none;
  mask-image: none;
  /* Height only — top is driven per-frame by JS to avoid overshoot. */
  transition: height var(--kbd-ms) var(--kbd-ease);
}

.home.kbd .bee,
.page.kbd .bee {
  top: var(--bee-gap-above);
  /* Constant rest box — keyboard shrinks via scale, not --bee-h. */
  height: var(--bee-h);
  transform: translate3d(-50%, 0, 0) scale(var(--kbd-scale, var(--bb-scale, 1)));
  transform-origin: top center;
  clip-path: none;
  animation: none;
  transition: transform var(--kbd-ms) var(--kbd-ease), top var(--kbd-ms) var(--kbd-ease);
}

.home.kbd .bee-space {
  height: var(--kbd-bee-space, var(--bee-band));
  visibility: hidden;
}

/* Keyboard idle: compact greet packed under BB, docked above the composer. */
.home.kbd .greet {
  position: fixed;
  /* Above bee-cover (40) so the soft wash never veils the greeting; below dock (45). */
  z-index: 42;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 100%);
  top: calc(
    var(--vv-top, 0px) + var(--vv-height, 100dvh)
    - var(--kbd-greet-h, 64px)
    - var(--dock-h, 88px)
  );
  bottom: auto;
  height: auto;
  margin: 0;
  padding: 2px 16px 6px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  font-size: clamp(15px, 3.6vw, 18px);
  line-height: 1.15;
  background: var(--porcelain);
  pointer-events: none;
  overflow: visible;
  transition: top var(--kbd-ms) var(--kbd-ease), font-size var(--kbd-ms) var(--kbd-ease);
}

/* Conversation (keyboard closed): greet yields to the thread. Keyboard open
   always keeps the compact greet — identical pack on every composer focus. */
.home.is-talking:not(.kbd) .greet {
  display: none;
}

/* Keyboard open: thread yields — greet owns the band under BB every time. */
.home.kbd .thread {
  visibility: hidden;
  pointer-events: none;
}

/* Keyboard + talking: latest exchange above the input (overrides hide above). */
.home.kbd.is-talking {
  /* Room for You + reply under BB; BeeLayout shrinks BB from --kbd-greet-h. */
  --kbd-greet-h: 112px;
}

.home.kbd.is-talking .greet {
  display: none;
}

.home.kbd.is-talking .thread {
  visibility: visible;
  pointer-events: auto;
  position: fixed;
  z-index: 42;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 100%);
  top: calc(
    var(--vv-top, 0px) + var(--vv-height, 100dvh)
    - var(--kbd-greet-h, 112px)
    - var(--dock-h, 88px)
  );
  height: var(--kbd-greet-h, 112px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 6px;
  margin: 0;
  gap: 10px;
  background: var(--porcelain);
  transition: top var(--kbd-ms) var(--kbd-ease), height var(--kbd-ms) var(--kbd-ease);
}

.home.kbd.is-talking .thread .msg.is-past {
  display: none;
}

.home.kbd.is-talking .thread .msg {
  gap: 8px;
}

.home.kbd.is-talking .thread .msg-you > p {
  padding-top: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--graphite);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home.kbd.is-talking .thread .msg-you > p::before {
  content: "You: ";
  color: var(--muted);
}

.home.kbd.is-talking .thread .msg-bee > p {
  font-size: clamp(16px, 4.2vw, 22px);
  line-height: 1.2;
  text-align: left;
}

.home.kbd.is-talking .thread .typing {
  min-height: 28px;
  justify-content: flex-start;
}

/* Dock sits on the keyboard top (VV bottom inset). Use --vv-bottom so the
   composer never drops into the IME band; chrome-bottom is for rest only. */
.home.kbd .dock {
  z-index: 45;
  top: auto;
  bottom: var(--vv-bottom, 0px);
  gap: 5px;
  padding: 4px 12px 6px;
  background: var(--porcelain);
  transition: bottom var(--kbd-ms) var(--kbd-ease), padding var(--kbd-ms) var(--kbd-ease);
}

.home.kbd {
  /* Match compact greet (~3 lines at 15–18px) so dock never overlaps. */
  --kbd-greet-h: 64px;
}

/* Chips: soft edge fade + scroll — never hard-clip "Book a call". */
.home.kbd .suggest {
  justify-content: flex-start;
  gap: 6px;
  margin: 0;
  padding: 2px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent);
}

.home.kbd .suggest .chip-s {
  scroll-snap-align: start;
  height: 28px;
  padding: 0 11px;
  font-size: 12.5px;
}

.home.kbd .composer {
  min-height: 40px;
  padding: 2px 4px 2px 14px;
}

.home.kbd .composer button {
  width: 36px;
  height: 36px;
  border-radius: 18px;
}

.home.kbd .foot-min {
  display: none !important;
}

/* Keyboard pack must match open 1 every time — hide Back to now while the
   IME owns the shell (thread is hidden anyway). */
.home.kbd .back-now {
  display: none !important;
}

.home.kbd .stash,
.home.kbd .dock-space {
  visibility: hidden;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .home.kbd::before,
  .home.kbd .top,
  .home.kbd .bee-cover,
  .page.kbd .bee-cover,
  .home.kbd .bee,
  .page.kbd .bee,
  .home.kbd .dock,
  .home.kbd .thread,
  .home.kbd .greet {
    transition: none;
  }
}

@media (min-width: 760px) {
  .home,
  .page {
    --header-h: 60px;
  }
}

.mark { display: flex; border-radius: 6px; }
.mark img { display: block; width: 72px; height: 50px; object-fit: contain; }

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  height: 36px;
  padding: 0 12px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--graphite);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

/* Current page only — never rely on :hover for "you are here" (WebKit keeps
   :hover stuck on the tapped nav link after soft back/forward). */
.nav a[aria-current="page"] { color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); background: rgba(21, 23, 26, 0.05); }
  .nav .pill:hover { background: var(--deep-hover); }
}

.nav .pill {
  margin-left: 4px;
  padding: 0 16px;
  background: var(--deep);
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.nav .pill:active { transform: scale(0.97); }

/* Plans link to /plans/ (separate app). The four-item header only fits from
   440px; narrower phones keep Work + About + Book a call, and reach Plans from
   the footer and the Websites page. */
@media (max-width: 439px) {
  .nav .nav-plans { display: none; }
}

/* Below 390px the full nav (logo + Work + About + Book a call) is wider than
   the fixed 20/16/12/16 chrome. Ease padding and gaps from a compact 320px
   floor up to the base values at 389px; at 390+ the rules above stay
   pixel-identical. */
@media (max-width: 389px) {
  .top {
    gap: max(4px, calc(4px + (100vw - 320px) * 12 / 69));
    padding: 0 max(8px, calc(8px + (100vw - 320px) * 12 / 69));
  }
  .nav {
    gap: max(0px, calc((100vw - 320px) * 4 / 69));
  }
  .nav a {
    padding: 0 max(6px, calc(6px + (100vw - 320px) * 6 / 69));
  }
  .nav .pill {
    margin-left: max(0px, calc((100vw - 320px) * 4 / 69));
    padding: 0 max(10px, calc(10px + (100vw - 320px) * 6 / 69));
  }
}

/* BeeBee — full 1080×1440 clips, scale only. One fixed soft edge on the
   video wrapper (same for every clip). Two stacked videos dissolve in JS. */

.stage { display: flex; justify-content: center; }

.bee-cover {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  height: var(--bee-band); /* art-floor rest band — clips empty rows under feet */
  background: var(--porcelain);
  pointer-events: none;
  overflow: hidden;
  transform: translateZ(0);
  backface-visibility: hidden;
  /* JS fallback: --p drives clip. CSS timeline overrides when supported. */
  clip-path: inset(0 0 calc(var(--p, 0) * var(--delta, 0px)) 0);
  /* Soft bottom edge: reaction paint past the seated floor dissolves into
     cream instead of a hard cut. Seated feet+shadow sit above the feather
     start (gapB ≥ feather). */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - var(--bb-feather, 12px)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    #000 calc(100% - var(--bb-feather, 12px)),
    transparent 100%
  );
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Spacer matches the art-floor band. Layout sets --bee-space-h; scroll shrink
   is clip/scale on the fixed cover, not a changing spacer height. Content
   (opaque porcelain) starts just under the feet with --bee-gap-below air. */
.bee-space {
  height: var(--bee-space-h, var(--bee-band)); /* always restBand (art floor) */
}

/* Ease cover/space height only on asleep↔standing (same flag as art-end).
   Boot and svc open must snap — a mid-ease seated spacer under a settled
   bee box reads as feet overlap on WebKit SE. */
html[data-bb-art-ease="1"] .bee-cover,
html[data-bb-art-ease="1"] .bee-space {
  transition: height var(--bb-art-end-ms, 420ms) var(--ease);
}

.bee {
  position: absolute;
  top: calc(var(--header-h) + var(--bee-gap-above));
  left: 50%;
  height: var(--bee-h); /* constant restH */
  aspect-ratio: var(--bb-crop-aspect);
  transform: translate3d(-50%, 0, 0) scale(var(--bb-scale, 1));
  transform-origin: top center;
  pointer-events: auto;
  overflow: visible;
  contain: style;
  backface-visibility: hidden;
}

@supports (animation-timeline: scroll()) {
  /* Document (window) scroll on every width — never body/html overflow
     scrollers. iOS Safari clips fixed dock descendants of overflow ancestors.
     Fill is backwards only — not both. After #73 the art-floor band leaves
     home with scrollMax 0, so the scroll timeline goes inactive on soft-nav
     home return; forwards fill froze BB at the shrunk "to" keyframe even
     though scrollY/--p/--bb-scale were rest. Backwards lets the underlying
     scale(var(--bb-scale)) / clip apply when the timeline is inactive. */
  html[data-bb-scroll="css"]:not([data-bb-hidden="1"]) .bee-cover {
    animation: bb-cover-clip linear backwards;
    animation-timeline: scroll(root);
    animation-range: 0 var(--delta);
  }
  html[data-bb-scroll="css"]:not([data-bb-hidden="1"]) .bee {
    animation: bb-bee-scale linear backwards;
    animation-timeline: scroll(root);
    animation-range: 0 var(--delta);
  }
  @keyframes bb-cover-clip {
    from { clip-path: inset(0 0 0 0); }
    to { clip-path: inset(0 0 var(--delta) 0); }
  }
  @keyframes bb-bee-scale {
    from { transform: translate3d(-50%, 0, 0) scale(1); }
    to { transform: translate3d(-50%, 0, 0) scale(var(--bb-min-scale, 0.65)); }
  }
}

/* Disable scroll timelines while the keyboard owns the pack. */
.home.kbd .bee-cover,
.home.kbd .bee,
.page.kbd .bee-cover,
.page.kbd .bee {
  animation: none !important;
  clip-path: none;
}

/* Spring only for keyboard (data-bb-spring) — height/top pack, not scroll.
   Scroll path uses constant cover height + clip-path / scale timeline. */
html[data-bb-spring="1"] .bee-cover,
html[data-bb-spring="1"] .bee-space {
  transition:
    height var(--bb-spring-ms) var(--spring),
    top var(--bb-spring-ms) var(--spring);
}
html[data-bb-spring="1"] .bee {
  transition:
    top var(--bb-spring-ms) var(--spring),
    transform var(--bb-spring-ms) var(--spring);
}

.bb {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
  cursor: pointer;
  transform-origin: 50% 100%;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Unused leftover node from the generator — no wash paint. */
.bb-wash { display: none; }

/* Full-frame video box. One static soft edge: fade the outer ~14% of each
   side into the page cream. Same for every clip — no oval, no radial, no
   per-clip retune, no animation of the edge. Stays clear of body/flower/
   antenna/sheep/Zs.
   Videos only live here. The never-blank still is a sibling underlay outside
   this masked layer — WebKit promotes <video> into composited layers, and an
   opaque poster painted on (or trapped inside) the masked box shows up as a
   hard cream rectangle. Film soft-edge stays on this mask. */
.bb-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%, 100% 100%;
  -webkit-mask-position: 0 0, 0 0;
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 14%, #000 86%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-repeat: no-repeat;
  mask-size: 100% 100%, 100% 100%;
  mask-position: 0 0, 0 0;
  mask-composite: intersect;
}

/* Always-on still under the videos (never-blank). Sibling of .bb-frame (not a
   background, not a masked descendant). Keyed alpha PNGs carry the soft edge
   in the pixels so WebKit cannot resurrect the pale cream disc.
   Asleep / wake show the seated still; idle / standing / still keep idle. */
.bb-underlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  border: 0;
}

.bb-underlay-asleep { display: none; }

.bb[data-clip="asleep"] .bb-underlay-idle,
.bb[data-clip="wake"] .bb-underlay-idle {
  display: none;
}

.bb[data-clip="asleep"] .bb-underlay-asleep,
.bb[data-clip="wake"] .bb-underlay-asleep {
  display: block;
}

/* Two stacked native videos — opacity dissolve owned by bb.js (~250ms).
   Inactive layer is visibility:hidden after the fade (iOS still paints opacity-0).
   data-on videos sit above the underlay; without a painted frame the still shows. */
.bb video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  background: transparent;
  opacity: 0;
  visibility: hidden;
}

.bb video[data-on="1"] { opacity: 1; visibility: visible; z-index: 2; }

/* Gaze is tracked in JS; the film box itself never rotates. */

.glow {
  position: absolute;
  z-index: 3;
  left: 59%;
  top: 2%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(closest-side, var(--gc, #FFFFFF), transparent);
  opacity: var(--g0, 0.18);
  animation: glow var(--gt, 4.8s) ease-in-out infinite;
  transition: opacity 0.6s;
}

.bb:not([data-clip="idle"]) .glow { opacity: 0; animation: none; }

.bee[data-state="listening"] .bb { animation: lean 0.5s var(--ease) forwards; }
.bee[data-state="thinking"] .bb { animation: think 1.4s ease-in-out infinite; }
.bee[data-state="looking"] .bb { animation: look 1.6s var(--ease) both; }
.bee[data-state="bored"] .bb { animation: look 3.2s ease-in-out infinite; }
.bee[data-state="pleased"] .bb,
.bee[data-state="greet"] .bb,
.bee[data-state="hop"] .bb { animation: wiggle 0.7s cubic-bezier(0.3, 0.7, 0.3, 1) both; }
.bee[data-state="watered"] .bb { animation: wiggle 0.6s 0.45s cubic-bezier(0.3, 0.7, 0.3, 1) both; }

.drops { position: absolute; left: 74%; top: 4%; width: 0; height: 0; pointer-events: none; }

.drops i {
  position: absolute;
  top: 0;
  width: 7px;
  height: 10px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: linear-gradient(var(--haze), #7FA7D6);
  opacity: 0;
}

.drops i:nth-child(1) { left: -14px; }
.drops i:nth-child(2) { left: 0; }
.drops i:nth-child(3) { left: 12px; }
.drops.is-on i { animation: drop 0.7s cubic-bezier(0.5, 0, 0.75, 0) both; }
.drops.is-on i:nth-child(2) { animation-delay: 0.12s; }
.drops.is-on i:nth-child(3) { animation-delay: 0.22s; }

.bee-note {
  position: absolute;
  left: 50%;
  bottom: -30px;
  margin: 0;
  transform: translateX(-50%);
  white-space: nowrap;
  font: 12px/1 var(--mono);
  color: var(--graphite);
  opacity: 0;
  pointer-events: none;
}

.bee-note.is-on { animation: note 2.6s both; }

/* Home: the conversation */

/* Match main: no stacking context on .chat — a z-index here trapped the
   keyboard greet (z 42) under the kbd cream panel (z 30 on body). */
.chat {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  overflow-anchor: none;
}

.greet {
  position: relative;
  z-index: 5; /* Below bee-cover (10); keyboard mode raises to 42. */
  margin: 0;
  text-align: center;
  font-size: clamp(22px, min(6vw, 4.6svh), 38px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}

.greet span { display: block; }
.greet span:nth-child(2) { color: #868A91; } /* large display text: 3:1 on porcelain */

.thread { display: flex; flex-direction: column; gap: 28px; padding-top: 28px; }

.msg { display: flex; flex-direction: column; gap: 20px; animation: rise 0.5s var(--rise) both; }

.msg > p {
  margin: 0;
  text-align: center;
  font-size: clamp(26px, 6vw, 38px);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: pretty;
}

.msg-you > p { padding-top: 20px; color: var(--deep); }

/* Conversation: one hierarchy — quiet user line, then BB’s reply once. No second
   faded giant copy of the same turn. Thread starts tight under BB’s feet. */
.home.is-talking:not(.kbd) .thread {
  gap: 14px;
  padding-top: 4px;
}

.home.is-talking:not(.kbd) .msg {
  gap: 10px;
}

.home.is-talking:not(.kbd) .msg-you > p {
  padding-top: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--graphite);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home.is-talking:not(.kbd) .msg-you > p::before {
  content: "You: ";
  color: var(--muted);
}

.home.is-talking:not(.kbd) .msg-bee > p {
  font-size: clamp(20px, 5vw, 28px);
  line-height: 1.2;
  text-align: left;
  opacity: 1;
}

.home.is-talking:not(.kbd) .msg.is-past {
  opacity: 0.5;
}

.home.is-talking:not(.kbd) .msg.is-past > p {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

/* Panels in the thread sit on porcelain — no white plate / rounded card edge under BB. */
.home.is-talking:not(.kbd) .thread .card,
.home.is-talking:not(.kbd) .thread .rows.card,
.home.is-talking:not(.kbd) .thread .svc-menu,
.home.is-talking:not(.kbd) .thread .faq,
.home.is-talking:not(.kbd) .thread .about-card,
.home.is-talking:not(.kbd) .thread .book-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

.typing { display: flex; justify-content: center; align-items: center; gap: 5px; min-height: 42px; animation: fade 0.3s both; }
.typing span { width: 7px; height: 7px; border-radius: 4px; background: var(--bloom); animation: dot 1.1s ease-in-out infinite; }
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

.dock {
  position: fixed;
  z-index: 25;
  left: 50%;
  /* Phone: pinned to the visual bottom (safe-area in padding). Desktop: sit
     above foot-min exactly as on main (--chrome-bottom + --foot-h). */
  bottom: calc(var(--chrome-bottom, 0px) + var(--foot-h, 0px));
  transform: translateX(-50%);
  width: min(680px, 100%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px 12px;
  /* Desktop matches main’s soft top wash. Phone overrides to opaque below. */
  background: linear-gradient(to top, var(--porcelain) 78%, rgba(var(--porcelain-rgb), 0));
}

@media (max-width: 759px) {
  .dock {
    bottom: 0;
    padding: 12px 16px max(env(safe-area-inset-bottom, 0px), 8px);
    /* Opaque porcelain — hard top edge. No gradient fade above the dock. */
    background: var(--porcelain);
  }
}

/* Soft dissolve pseudo — desktop wash era only. Phones force it off below. */
.dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: var(--dock-fade-h, 0px);
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.2s var(--ease),
    height 0.2s var(--ease),
    background 0.2s var(--ease);
  background: linear-gradient(
    to top,
    var(--porcelain) 0,
    rgba(var(--porcelain-rgb), 0.85) 10px,
    rgba(var(--porcelain-rgb), 0.35) 18px,
    rgba(var(--porcelain-rgb), 0) 24px
  );
}

.home.kbd .dock::before,
body.svc-open.home:not(.kbd) .dock::before {
  display: none;
}

/* Phones: kill any dissolve above the dock. Hard porcelain edge only —
   a line is fully visible above it or fully hidden under it, never half-faded. */
@media (max-width: 759px) {
  .dock::before {
    content: none;
    display: none;
  }
}

/* Rest conversation only — never override the keyboard compact pack. */
.home.is-talking:not(.kbd) .dock { padding-bottom: 10px; }
.home.is-talking .foot-min { display: none; }

/* Chip strip is full-width. “Back to now” is out of flow so show/hide never
   moves chips, input, or dock top — it only fades in/out. */
.dock-row {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.dock-row .suggest {
  flex: 1;
  min-width: 0;
  margin: 0;
  width: 100%;
}

.back-now {
  position: absolute;
  z-index: 2;
  right: 4px;
  /* Phone: pinned just above the chip row. */
  bottom: calc(100% + 8px);
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  /* Same porcelain as the solid dock — one surface, no tone mismatch. */
  background: var(--porcelain);
  box-shadow: 0 0 0 4px var(--porcelain);
  color: var(--muted);
  font: 500 12px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  white-space: nowrap;
}

/* Desktop: same right-side slot main used, still out of flow (zero shift). */
@media (min-width: 760px) {
  .back-now {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
  }

  .back-now[hidden] { display: none; }
}

/* Phone: pill fades in/out over the hard dock edge. No gradient wash above. */
@media (max-width: 759px) {
  .back-now {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
  }

  .back-now[hidden] {
    /* Keep the absolute box so opacity can ease; no layout impact. */
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .dock:has([data-back]:not([hidden])) {
    background: var(--porcelain);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock::before {
    transition: none;
  }

  .back-now {
    transition: none;
  }
}

.back-now:hover { color: var(--ink); }

.suggest {
  display: flex;
  justify-content: flex-start;
  gap: 7px;
  overflow-x: auto;
  margin: 0 -4px;
  padding: 2px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent);
}

.suggest::-webkit-scrollbar, .gallery::-webkit-scrollbar { display: none; }
.suggest[hidden] { display: none; }

.chip-s, .chip span {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(21, 23, 26, 0.1);
  background: var(--white);
  color: var(--ink);
  font: 500 13.5px/1 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.chip-s:hover, .chip span:hover { background: var(--haze); border-color: var(--mist); }
.chip-s:active { transform: scale(0.97); }

.home .chip-s { height: 32px; padding: 0 12px; font-size: 13px; }

.chip-s.is-primary, .chip-s.is-primary:hover {
  background: var(--deep);
  border-color: transparent;
  color: var(--white);
}

.chip-s.is-glow { animation: chipglow 0.6s ease-in-out 1; }

@keyframes chipglow { 50% { transform: scale(1.03); } }

.composer {
  position: relative;
  display: grid;
  /* Text + send only. Explicit columns so the .sr label cannot steal a cell. */
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-rows: auto;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 3px 5px 3px 14px;
  border: 1px solid rgba(21, 23, 26, 0.1);
  border-radius: 22px;
  background: var(--white);
  transition: border-color 0.3s;
}

.composer > span[aria-hidden="true"] { display: none; }

.composer > label.sr {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  pointer-events: none;
}

.composer[hidden] { display: none; }
.composer:focus-within { border-top-color: var(--mist); }

.composer textarea {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  min-height: 1.15em;
  margin: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  overflow: hidden;
  text-align: left;
  /* ≥16px so iOS does not zoom the page on focus. */
  font: 500 16px/1.35 var(--sans);
  letter-spacing: -0.02em;
  color: var(--ink);
  caret-color: var(--bloom);
  field-sizing: content;
}

.composer textarea::placeholder {
  color: var(--muted);
  text-align: left;
  opacity: 1;
}

@media (min-width: 760px) {
  .composer textarea { font-size: 17px; letter-spacing: -0.03em; line-height: 1.3; }
}

.composer button {
  grid-column: 2;
  grid-row: 1;
  width: 40px;
  height: 40px;
  margin-bottom: -2px;
  border: 0;
  border-radius: 20px;
  background: var(--deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease), background 0.2s;
}

.composer.has-text button { opacity: 1; transform: none; pointer-events: auto; }
.composer button:hover { background: var(--deep-hover); }

/* Reserved band under content = full --dock-h (chrome+safe on phone).
   Desktop: match main — dock chrome + foot-min + safe chrome. */
.dock-space {
  flex: none;
  height: calc(var(--dock-h, 0px) + var(--foot-h, 0px) + var(--chrome-bottom, 0px));
  pointer-events: none;
}

.foot-min {
  position: fixed;
  left: 0;
  right: 0;
  /* Under the dock, above Safari’s bottom chrome — never over the composer. */
  bottom: var(--chrome-bottom, 0px);
  z-index: 20;
  padding: 6px 20px 8px;
  display: flex;
  justify-content: center;
  gap: 10px;
  background: var(--porcelain);
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.foot-min .forget,
.foot-min a { pointer-events: auto; }
.foot-min a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Author display:flex would otherwise beat the [hidden] UA rule and leave the
   home copyright parked over About/Work after in-page navigation. */
.foot-min[hidden],
footer.foot-min.is-parked,
body.page .foot-min {
  display: none !important;
}

.forget { display: inline-flex; gap: 10px; }
.forget[hidden] { display: none; }

.forget button {
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.forget button:hover { color: var(--ink); }

/* Panels BeeBee shows. The originals live in .stash; the thread holds copies. */

.stash[hidden] { display: none; }

.card { background: var(--white); border-radius: 22px; box-shadow: var(--edge); overflow: hidden; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li .row { border-top: var(--row); }
.home .rows li.is-extra { display: none; }

.more-rows {
  display: block;
  width: 100%;
  padding: 14px 20px 16px;
  border: 0;
  background: transparent;
  color: var(--deep);
  font: 600 15px/1 var(--sans);
  text-align: left;
  cursor: pointer;
}

/* ── Services interactive garden menu ──────────────────────────────────
   Full-bleed garden backdrop + readable copy/CTA. Transform/opacity motion only.
   Phone: coverflow carousel. Desktop: expanding flex rail. */
.svc-menu {
  --svc-accent: var(--bloom);
  --svc-accent-soft: rgba(91, 143, 202, 0.16);
  --svc-gold: #C4A574;
  --svc-pop: cubic-bezier(0.22, 1.22, 0.36, 1);
  --svc-spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.104, 1.115, 1.112, 1.096, 1.003 38%, 0.985, 0.975, 0.975, 0.997 61.5%, 1.004, 0.999);
  position: relative;
  margin: 0;
  padding: 0;
  width: 100%;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
  transform-origin: center top;
}

.home.is-talking:not(.kbd) .thread .svc-menu {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

.home.is-talking:not(.kbd) .msg-bee:has(.svc-menu) { gap: 6px; }

body.svc-open.home:not(.kbd) .dock,
body.svc-open.home:not(.kbd) .dock-row,
body.svc-open.home:not(.kbd) .dock-space {
  background: transparent;
  box-shadow: none;
}
body.svc-open.home:not(.kbd) .chat {
  padding-inline: 16px;
}

.svc-menu.is-enter { animation: svc-panel-in 0.5s var(--svc-pop) both; }
.svc-menu.is-leave { animation: svc-panel-out 0.28s var(--ease) both; }

@keyframes svc-panel-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes svc-panel-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(8px) scale(0.97); }
}

.svc-track {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 2px 0;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  perspective: 900px;
  transform-style: preserve-3d;
}

.svc-track::-webkit-scrollbar { display: none; }

/* Hit target is the untransformed <a>. Paint + motion live on .svc-face so
   WebKit hit-testing tracks the flex box, not a lagging composited transform. */
.svc-tile {
  --svc-tilt-x: 0deg;
  --svc-tilt-y: 0deg;
  --svc-scale: 1;
  --svc-lift: 0px;
  --svc-rot: 0deg;
  --svc-art-x: 0%;
  --svc-art-y: 0%;
  --svc-shadow: 12px;
  --svc-press: 1;
  --svc-pos-x: 50%;
  --svc-pos-y: 28%;
  position: relative;
  flex: none;
  display: block;
  /* Phone: JS writes --svc-card-h/w from the real BB→dock gap. Fallback keeps
     a sensible size before the first measure. Desktop overrides below. */
  width: var(--svc-card-w, min(72vw, 280px));
  height: var(--svc-card-h, clamp(168px, calc(100dvh - var(--bee-band) - 12.5rem), 228px));
  min-height: 44px;
  padding: 0;
  border-radius: 20px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  scroll-snap-align: center;
  background: transparent;
  /* Flex size only — never transform this box. */
  transition:
    flex-grow 0.55s var(--svc-pop),
    flex-basis 0.55s var(--svc-pop);
  opacity: 1;
}

.svc-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
  background:
    linear-gradient(135deg, var(--svc-c-tl) 0%, transparent 58%),
    linear-gradient(225deg, var(--svc-c-tr) 0%, transparent 58%),
    linear-gradient(45deg, var(--svc-c-bl) 0%, transparent 58%),
    linear-gradient(315deg, var(--svc-c-br) 0%, transparent 58%),
    linear-gradient(165deg, var(--svc-c-tl), var(--svc-c-br));
  box-shadow:
    0 calc(var(--svc-shadow) * 0.4) var(--svc-shadow) rgba(21, 23, 26, 0.08),
    0 1px 2px rgba(21, 23, 26, 0.03),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transform:
    translate3d(0, var(--svc-lift), 0)
    scale(calc(var(--svc-scale) * var(--svc-press)))
    rotateX(var(--svc-tilt-x))
    rotateY(calc(var(--svc-rot) + var(--svc-tilt-y)));
  transform-style: preserve-3d;
  transition:
    box-shadow 0.35s var(--ease),
    background 0.4s var(--ease),
    transform 0.35s var(--ease);
  isolation: isolate;
  will-change: transform;
}

/* Entrance runs only under .svc-menu.is-enter so the hidden stash never
   sticks at opacity 0 from animation-fill-mode: both. */
.svc-menu.is-enter .svc-track > .svc-tile .svc-face {
  animation: svc-rise 0.58s var(--svc-pop) both;
}
.svc-menu.is-enter .svc-track > .svc-tile:nth-child(1) .svc-face { animation-delay: 0s; }
.svc-menu.is-enter .svc-track > .svc-tile:nth-child(2) .svc-face { animation-delay: 0.06s; }
.svc-menu.is-enter .svc-track > .svc-tile:nth-child(3) .svc-face { animation-delay: 0.12s; }
.svc-menu.is-enter .svc-track > .svc-tile:nth-child(4) .svc-face { animation-delay: 0.18s; }
.svc-menu.is-enter .svc-track > .svc-tile:nth-child(5) .svc-face { animation-delay: 0.24s; }

@keyframes svc-rise {
  from { opacity: 0; transform: translate3d(0, 18px, 0) scale(0.92); }
  to {
    opacity: 1;
    transform:
      translate3d(0, var(--svc-lift, 0px), 0)
      scale(calc(var(--svc-scale, 1) * var(--svc-press, 1)))
      rotateX(var(--svc-tilt-x, 0deg))
      rotateY(calc(var(--svc-rot, 0deg) + var(--svc-tilt-y, 0deg)));
  }
}

/* Accent + 16px corner samples from each slug's poster. */
.svc-websites {
  --svc-accent: #5B8FCA;
  --svc-accent-soft: rgba(91, 143, 202, 0.2);
  --svc-c-tl: #DFD5C9;
  --svc-c-tr: #EDE9E3;
  --svc-c-bl: #CFCABC;
  --svc-c-br: #E8E6E7;
  --svc-pos-x: 72%;
  --svc-pos-y: 22%;
}
.svc-apps {
  --svc-accent: #3E6EA8;
  --svc-accent-soft: rgba(62, 110, 168, 0.18);
  --svc-c-tl: #CFC7B2;
  --svc-c-tr: #F0EBE2;
  --svc-c-bl: #D5CEBF;
  --svc-c-br: #F0EFE8;
  --svc-pos-x: 62%;
  --svc-pos-y: 24%;
}
.svc-interactive {
  --svc-accent: #C4A574;
  --svc-accent-soft: rgba(196, 165, 116, 0.22);
  --svc-c-tl: #C4AD8E;
  --svc-c-tr: #E5D5C6;
  --svc-c-bl: #D2C1A9;
  --svc-c-br: #E8DBCE;
  --svc-pos-x: 54%;
  --svc-pos-y: 22%;
}
.svc-ai {
  --svc-accent: #7FA7D6;
  --svc-accent-soft: rgba(127, 167, 214, 0.22);
  --svc-c-tl: #BFB59F;
  --svc-c-tr: #DFD9D2;
  --svc-c-bl: #CEC5B4;
  --svc-c-br: #DDD7D0;
  --svc-pos-x: 56%;
  --svc-pos-y: 24%;
}
.svc-videos {
  --svc-accent: #B8955E;
  --svc-accent-soft: rgba(184, 149, 94, 0.2);
  --svc-c-tl: #BCAB8F;
  --svc-c-tr: #D7CCBD;
  --svc-c-bl: #C4BBAA;
  --svc-c-br: #D7CEC6;
  --svc-pos-x: 58%;
  --svc-pos-y: 24%;
}

.svc-tile.is-active .svc-face,
.svc-tile:focus-visible .svc-face {
  background:
    linear-gradient(135deg, var(--svc-c-tl) 0%, transparent 58%),
    linear-gradient(225deg, var(--svc-c-tr) 0%, transparent 58%),
    linear-gradient(45deg, var(--svc-c-bl) 0%, transparent 58%),
    linear-gradient(315deg, var(--svc-c-br) 0%, transparent 58%),
    linear-gradient(165deg, var(--svc-c-tl), var(--svc-accent-soft) 72%, var(--svc-c-br));
  box-shadow:
    0 calc(var(--svc-shadow) * 0.5) calc(var(--svc-shadow) * 1.15) rgba(21, 23, 26, 0.1),
    0 0 0 1px color-mix(in srgb, var(--svc-accent) 24%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.85);
}

/* Glow blooms behind the art, never over it. */
.svc-glow {
  position: absolute;
  inset: 6% 10% 38%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 45%, var(--svc-c-tl) 0%, transparent 72%);
  opacity: 0;
  transform: scale(0.72);
  pointer-events: none;
}

.svc-tile.is-bloom .svc-glow {
  animation: svc-glow-bloom 0.85s var(--svc-pop) both;
}

@keyframes svc-glow-bloom {
  0% { opacity: 0; transform: scale(0.72); }
  40% { opacity: 0.7; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(1.12); }
}

/* Full-bleed garden backdrop. Parallax vars move this layer only. */
.svc-art {
  position: absolute;
  inset: -8%;
  z-index: 1;
  display: block;
  overflow: hidden;
  pointer-events: none;
  transform: translate3d(var(--svc-art-x), var(--svc-art-y), 0);
  will-change: transform;
}

/* Still poster under the loop — identical to frame 0 — so src attach / first
   decode never flashes the gradient plate. Replaced elements (img/video) get
   explicit pointer-events:none: WebKit can otherwise hit-test composited
   masked/opacity layers during flex-expand and drop the PR #56 <a> target. */
.svc-poster,
.svc-loop {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--svc-pos-x) var(--svc-pos-y);
  background: transparent;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%, 100% 100%;
  -webkit-mask-position: 0 0, 0 0;
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 90%, transparent 100%);
  mask-repeat: no-repeat;
  mask-size: 100% 100%, 100% 100%;
  mask-position: 0 0, 0 0;
  mask-composite: intersect;
}

.svc-poster {
  z-index: 0;
}

.svc-loop {
  z-index: 1;
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}

.svc-loop.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .svc-loop { transition: none; }
  .svc-loop.is-ready { opacity: 1; }
}

/* Cursor sheen on the card surface (not the art). */
.svc-sheen {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--svc-spot-x, 50%) var(--svc-spot-y, 40%),
    rgba(255, 255, 255, 0.42) 0%,
    rgba(255, 255, 255, 0.08) 28%,
    transparent 52%
  );
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.svc-tile.is-active .svc-sheen,
.svc-tile:focus-visible .svc-sheen {
  opacity: 0.9;
}

/* Readable overlay — text never fades or moves with parallax. */
.svc-copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 18px 16px 16px;
  pointer-events: none;
}

.svc-scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Phone keeps a light tonal wash; desktop active panels deepen below. */
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--svc-c-br) 92%, #FFFEFB) 0%,
    color-mix(in srgb, var(--svc-c-bl) 78%, #FFFEFB) 42%,
    transparent 100%
  );
}

.svc-name {
  display: block;
  margin: 0;
  max-width: 100%;
  font-size: clamp(20px, 5.4vw, 26px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.svc-hook {
  display: block;
  margin: 0;
  max-width: 100%;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.3;
  /* Darker than page graphite so AA holds on the brightest garden frames. */
  color: #3A3E44;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svc-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 8px 14px 8px 12px;
  border-radius: 999px;
  background: rgba(255, 254, 251, 0.92);
  box-shadow:
    0 1px 2px rgba(21, 23, 26, 0.06),
    inset 0 0 0 1px color-mix(in srgb, var(--svc-accent) 28%, rgba(21, 23, 26, 0.08));
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}

.svc-cta-arrow {
  display: inline-block;
  width: 0.7em;
  font-size: 1.05em;
  line-height: 1;
  transform: translateX(0);
  transition: transform 0.35s var(--svc-pop);
}
.svc-cta-arrow::before {
  content: "→";
}

.svc-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.7) 48%, transparent 66%);
  transform: translateX(-120%);
  opacity: 0;
  pointer-events: none;
}

.svc-tile.is-active .svc-cta-arrow,
.svc-tile:focus-visible .svc-cta-arrow {
  transform: translateX(3px);
}

.svc-tile.is-active .svc-cta::after,
.svc-tile:focus-visible .svc-cta::after {
  animation: svc-cta-sheen 1.1s var(--ease) 0.15s both;
}

@keyframes svc-cta-sheen {
  from { transform: translateX(-120%); opacity: 0; }
  35% { opacity: 0.9; }
  to { transform: translateX(120%); opacity: 0; }
}

.svc-tile:focus-visible {
  outline: 2px solid var(--bloom);
  outline-offset: 3px;
}

.svc-tile.is-pressed { --svc-press: 0.97; }
.svc-tile.is-lift { --svc-press: 1.02; }

/* Phone: hook + CTA only on the active card; name always readable. */
@media (max-width: 799px) {
  .svc-tile:not(.is-active):not(:focus-visible) .svc-hook,
  .svc-tile:not(.is-active):not(:focus-visible) .svc-cta {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .svc-menu,
  .svc-track {
    background: transparent;
    box-shadow: none;
  }
  .svc-track {
    padding-inline: 0;
    margin-inline: 0;
  }

  /* Tighter copy padding on short cards so name + hook + CTA stay inside. */
  .svc-copy {
    padding: 14px 14px 12px;
    gap: 5px;
  }
  .svc-name {
    font-size: clamp(18px, 4.8vw, 22px);
  }
  .svc-hook {
    font-size: 12.5px;
  }
  .svc-cta {
    margin-top: 2px;
    padding: 7px 12px 7px 11px;
    font-size: 12.5px;
  }
  .svc-dots {
    padding: 8px 0 0;
  }
}

/* Short phones (e.g. 375×667): compress copy so the CTA clears the dock. */
@media (max-width: 799px) and (max-height: 720px) {
  .svc-copy {
    padding: 10px 12px 10px;
    gap: 4px;
  }
  .svc-name {
    font-size: 17px;
  }
  .svc-hook {
    font-size: 12px;
  }
  .svc-cta {
    margin-top: 1px;
    padding: 6px 11px 6px 10px;
    font-size: 12px;
  }
  .svc-dots {
    padding: 6px 0 0;
  }
}

.svc-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
}

.svc-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--svc-gold);
  opacity: 0.45;
  transform: scale(1);
  transition: opacity 0.25s, transform 0.35s var(--svc-pop), color 0.25s;
}

.svc-leaf {
  display: block;
  width: 10px;
  height: 13px;
  fill: currentColor;
}

.svc-dot.is-on {
  opacity: 1;
  color: var(--svc-gold);
  transform: scale(1.35);
}

@media (hover: hover) and (pointer: fine) {
  .svc-tile:hover .svc-cta-arrow { transform: translateX(3px); }
  .svc-tile:hover .svc-cta::after {
    animation: svc-cta-sheen 1.1s var(--ease) both;
  }
  .svc-tile:hover .svc-sheen { opacity: 0.85; }
}

@media (prefers-reduced-motion: reduce) {
  .svc-menu.is-enter,
  .svc-menu.is-leave,
  .svc-menu.is-enter .svc-track > .svc-tile .svc-face,
  .svc-face,
  .svc-tile.is-bloom .svc-glow,
  .svc-tile.is-active .svc-cta::after,
  .svc-tile:focus-visible .svc-cta::after,
  .svc-tile:hover .svc-cta::after {
    animation: none !important;
  }
  .svc-tile,
  .svc-face,
  .svc-cta-arrow,
  .svc-dot,
  .svc-sheen {
    transition: none !important;
  }
  .svc-tile {
    --svc-tilt-x: 0deg !important;
    --svc-tilt-y: 0deg !important;
    --svc-rot: 0deg !important;
    --svc-scale: 1 !important;
    --svc-lift: 0px !important;
    --svc-art-x: 0% !important;
    --svc-art-y: 0% !important;
    --svc-press: 1 !important;
  }
  .svc-loop { pointer-events: none; }
}

/* Desktop: expanding flex rail — art backdrop, copy stays readable. */
@media (min-width: 800px) {
  .svc-menu { padding: 0; background: transparent; }
  .svc-track {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 4px 0;
    background: transparent;
    overflow: visible;
    scroll-snap-type: none;
    perspective: 900px;
    height: clamp(220px, calc(100svh - var(--bee-band) - 210px), 300px);
  }

  .svc-tile {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 100%;
    /* Clear phone measure vars so desktop rail sizing stays as shipped. */
    --svc-card-h: initial;
    --svc-card-w: initial;
    border-radius: 18px;
    scroll-snap-align: unset;
    transition:
      flex-grow 0.55s var(--svc-pop),
      flex-basis 0.55s var(--svc-pop);
  }

  .svc-tile.is-active,
  .svc-tile:focus-visible {
    flex-grow: 2.85;
  }

  /* Deeper cream scrim on expanded desktop panels so name/hook clear AA
     against the brightest garden frames (layout only — art untouched). */
  .svc-tile.is-active .svc-scrim,
  .svc-tile:focus-visible .svc-scrim {
    background: linear-gradient(
      to top,
      #FFFEFB 0%,
      color-mix(in srgb, var(--svc-c-br) 55%, #FFFEFB) 22%,
      color-mix(in srgb, var(--svc-c-bl) 35%, #FFFEFB) 48%,
      color-mix(in srgb, var(--svc-c-tl) 18%, transparent) 72%,
      transparent 100%
    );
  }

  .svc-tile.is-active .svc-cta,
  .svc-tile:focus-visible .svc-cta {
    background: #FFFEFB;
  }

  .svc-tile.is-active .svc-name,
  .svc-tile:focus-visible .svc-name {
    font-size: clamp(22px, 2vw, 28px);
  }

  .svc-tile.is-active .svc-hook,
  .svc-tile:focus-visible .svc-hook {
    white-space: normal;
    text-wrap: pretty;
    overflow: visible;
    text-overflow: clip;
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-face {
    justify-content: flex-end;
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-hook,
  .svc-tile:not(.is-active):not(:focus-visible) .svc-cta {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-copy {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    align-items: center;
    justify-content: center;
    padding: 12px 6px;
    gap: 0;
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-scrim {
    background: linear-gradient(
      to left,
      color-mix(in srgb, var(--svc-c-br) 90%, #FFFEFB) 0%,
      color-mix(in srgb, var(--svc-c-bl) 70%, #FFFEFB) 55%,
      transparent 100%
    );
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-name {
    font-size: 12px;
    letter-spacing: 0.04em;
    max-height: 100%;
    text-overflow: clip;
  }

  .svc-tile:not(.is-active):not(:focus-visible) .svc-art {
    inset: -4%;
  }

  .svc-name { font-size: 22px; }
  .svc-hook { font-size: 13.5px; white-space: normal; }
  .svc-dots { display: none; }
}

@media (min-width: 800px) and (max-height: 760px) {
  .svc-track {
    height: clamp(180px, calc(100svh - var(--bee-band) - 200px), 240px);
    gap: 10px;
  }
  .svc-name { font-size: 18px; }
  .svc-hook { font-size: 12.5px; }
  .svc-copy { padding: 14px 14px 12px; }
}

/* Legacy row styles (non-services panels / stash). */
.row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s;
}

.row:hover { background: #F7F9FC; }
.row code { flex: none; font-size: 12px; color: var(--bloom); }
.row span { flex: 1; min-width: 0; }
.row b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.row i { display: block; margin-top: 2px; font-size: 15px; font-style: normal; color: var(--graphite); text-wrap: pretty; }

.gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -20px;
  padding: 4px 20px 8px;
  scroll-padding-left: 20px;
  scrollbar-width: none;
}

.work-card {
  flex: none;
  width: min(53vw, 188px);
  scroll-snap-align: start;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s var(--rise);
}

@media (hover: hover) and (pointer: fine) {
  .work-card:hover { transform: translateY(-4px); }
}
.work-card:active { transform: scale(0.98); }

.cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  overflow: hidden;
  background: var(--haze);
  box-shadow: var(--edge);
}

.cover img { position: absolute; display: block; }
.cover-bust img { left: 50%; bottom: -6%; width: 108%; height: auto; transform: translateX(-50%); }
.cover-logo { background: var(--white); }
.cover-logo img { inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cover-scene img { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }

.cover-name {
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: var(--haze);
}

.cover-name b { font-size: 19px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }

.live { margin: 12px 0 0; font-size: 15px; }
.live a { color: var(--deep); }

.work-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 8px 4px 0; }
.work-row b { font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.work-row code { font-size: 11px; color: var(--graphite); }
.work-kind { display: block; padding: 2px 4px 0; font-size: 12.5px; color: var(--graphite); }

/* Featured Doc Mastro funnel. Studio palette: card #0a0e0f→#101819, teal
   #14696b / #7cc2bb, amber #e0a23b, text #eef3f1 / #9bb8b3. Head art sits on
   a flat #000 plate — no teal glow behind or beside the image — then a long
   soft fade into the card tone. Phone: tight centered stack (head → pill →
   wordmark → tagline); frame the head with object-fit so PNG black margins
   do not open a dead band above the pill. */
.work-featured {
  --dm-card-0: #0a0e0f;
  --dm-card-1: #101819;
  --dm-ink-black: #000;
  --dm-teal-rim: #14696b;
  --dm-teal-accent: #7cc2bb;
  --dm-amber: #e0a23b;
  --dm-ink: #eef3f1;
  --dm-muted: #9bb8b3;
  --dm-line: rgba(155, 184, 179, 0.16);
  /* Phone plate: modest pad + framed head size (kept in sync with gradient). */
  --dm-head-w: clamp(210px, 58vw, 248px);
  --dm-head-h: clamp(198px, 54vw, 232px);
  /* Keep antennae inside the rounded card; bottom pad stays tight to the pill. */
  --dm-art-pad-top: 22px;
  --dm-art-pad-x: 12px;
  --dm-art-pad-bottom: 6px;
  --dm-plate-h: calc(var(--dm-art-pad-top) + var(--dm-head-h) + var(--dm-art-pad-bottom));
  position: relative;
  display: grid;
  /* Phone-first: head stacked above copy. Desktop restores side-by-side. */
  grid-template-columns: 1fr;
  justify-items: stretch;
  gap: 0;
  align-items: stretch;
  width: 100%;
  margin: 0 0 14px;
  padding: 0 0 16px;
  border-radius: 22px;
  color: var(--dm-ink);
  text-decoration: none;
  text-align: center;
  /* Flat #000 through the art plate, then a long soft fade into the card.
     Stops are length-based so the fade cannot start under the plate. */
  background: linear-gradient(
    180deg,
    var(--dm-ink-black) 0,
    var(--dm-ink-black) var(--dm-plate-h),
    #030405 calc(var(--dm-plate-h) + 72px),
    var(--dm-card-0) calc(var(--dm-plate-h) + 160px),
    var(--dm-card-1) 100%
  );
  border: 1px solid var(--dm-line);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--rise), border-color 0.35s var(--rise), box-shadow 0.35s var(--rise);
}
.work-featured-wrap {
  margin: 22px 0 8px;
}
.work-featured-art {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  box-sizing: border-box;
  width: 100%;
  /* Tight plate: head fully in view, no 48px dead band under the chin. */
  padding: var(--dm-art-pad-top) var(--dm-art-pad-x) var(--dm-art-pad-bottom);
  background: transparent;
  flex: none;
}
.work-featured-art picture {
  position: relative;
  z-index: 1;
  display: block;
  width: var(--dm-head-w);
  height: var(--dm-head-h);
  max-width: 100%;
  overflow: hidden;
}
.work-featured-art img {
  position: relative;
  z-index: 1;
  display: block;
  /* Phone: frame the head (object-fit) so PNG black margins collapse. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Bias up so antennae stay inside the frame; crop empty floor. */
  object-position: 50% 38%;
  /* Safety net: opaque over head/ears; fully transparent before the square. */
  -webkit-mask-image: radial-gradient(closest-side, #000 68%, transparent 98%);
  mask-image: radial-gradient(closest-side, #000 68%, transparent 98%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
.work-featured-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 2px 18px 0;
  justify-items: center;
}
.work-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 5px 12px 5px 6px;
  border: 1px solid rgba(124, 194, 187, 0.32);
  border-radius: 999px;
  color: var(--dm-teal-accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  background: rgba(20, 105, 107, 0.18);
}
/* Official Grok Bot 3D app icon — dark card only; 20–24 CSS px, rounded. */
.work-featured-badge [data-slot="grokbot-logo"] {
  display: inline-flex;
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}
.work-featured-badge [data-slot="grokbot-logo"] picture,
.work-featured-badge [data-slot="grokbot-logo"] img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: cover;
}
.work-featured-name {
  /* Shrink-wrap so justify-items:center can center the mark; a full-width
     block left the 280px SVG sitting on the left edge of the card. */
  display: block;
  width: min(280px, 100%);
  max-width: 100%;
  justify-self: center;
  line-height: 0;
}
.work-featured-name .dm-wordmark,
.work-featured-name img {
  display: block;
  width: 100%;
  height: auto;
  margin-inline: auto;
}
.work-featured-tagline {
  display: block;
  margin: 0;
  font-size: clamp(17px, 4.2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--dm-ink);
  text-wrap: pretty;
}
.work-featured-hook {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--dm-muted);
  text-wrap: pretty;
}
.work-featured-price {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--dm-amber);
}
.work-featured-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Full-width on phone; always one line at every width. */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--dm-amber);
  color: var(--dm-card-0);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
@media (hover: hover) and (pointer: fine) {
  .work-featured:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 194, 187, 0.4);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
  }
  .work-featured:hover .work-featured-cta {
    background: #ebb04f;
  }
}
.work-featured:active {
  transform: scale(0.99);
}

/* Desktop: side-by-side product frame, about twice a normal work card. */
@media (min-width: 900px) {
  .work-featured {
    --dm-head-w: 280px;
    --dm-head-h: 280px;
    --dm-art-pad-top: 48px;
    --dm-art-pad-x: 48px;
    --dm-art-pad-bottom: 48px;
    --dm-plate-w: calc(var(--dm-art-pad-x) + var(--dm-head-w) + var(--dm-art-pad-x));
    grid-template-columns: auto 1fr;
    justify-items: stretch;
    text-align: left;
    gap: 0;
    min-height: 420px;
    padding: 0;
    /* Flat #000 through art plate, then long soft fade right. */
    background: linear-gradient(
      90deg,
      var(--dm-ink-black) 0,
      var(--dm-ink-black) var(--dm-plate-w),
      #030405 calc(var(--dm-plate-w) + 120px),
      var(--dm-card-0) calc(var(--dm-plate-w) + 280px),
      var(--dm-card-1) 100%
    );
  }
  .work-featured-art {
    width: auto;
    align-self: stretch;
    align-items: center;
    padding: var(--dm-art-pad-top) var(--dm-art-pad-x) var(--dm-art-pad-bottom);
    background: transparent;
  }
  .work-featured-art picture {
    width: var(--dm-head-w);
    height: var(--dm-head-h);
    max-width: var(--dm-head-w);
  }
  .work-featured-art img {
    object-position: 50% 50%;
  }
  .work-featured-body {
    justify-items: start;
    align-content: center;
    gap: 9px;
    padding: 28px 36px 28px 24px;
  }
  .work-featured-name {
    justify-self: start;
    margin-inline: 0;
  }
  .work-featured-tagline {
    max-width: 18em;
  }
  .work-featured-hook {
    max-width: 34em;
    font-size: 15px;
  }
  .work-featured-cta {
    width: fit-content;
    margin-top: 10px;
    padding: 12px 22px;
    font-size: 15px;
    white-space: nowrap;
  }
  .work-featured-wrap {
    margin: 28px 0 12px;
  }
}

.about-card { border-radius: 20px; }
.headshot { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.headshot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }

.home.is-broken .bee { filter: grayscale(1); opacity: 0.55; }
.home.is-broken .composer,
.home.is-broken .suggest { display: none; }
.about-body { padding: 16px 16px 18px; }
.about-body h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.03em; }
.about-body p { margin: 5px 0 0; font-size: 15px; color: var(--graphite); text-wrap: pretty; }
.about-body .serif { margin-top: 12px; font: italic 400 19px/1.2 var(--serif); letter-spacing: 0; color: var(--deep); }
.about-body .buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.about-body .nap { margin-top: 12px; font-size: 13px; }
.about-body .nap a { color: inherit; text-underline-offset: 2px; }

.btn {
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--deep);
  color: var(--white);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s, transform 0.2s;
}

.btn:hover { background: var(--deep-hover); }
.btn:active { transform: scale(0.97); }
.btn-soft { background: var(--haze); color: var(--deep); }
.btn-soft:hover { background: #DCE6F0; }

.more {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;
  background: var(--haze);
  color: var(--deep);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.more:hover { background: #DCE6F0; }

.book-card { padding: 20px; border-radius: 24px; }

/* Forms */

.lead { display: grid; gap: 10px; margin: 28px 0 40px; }
.book-card .lead { margin: 0; }
.lead label { display: block; }
.lead .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { margin: 0; }
.note summary { cursor: pointer; font-size: 15px; color: var(--graphite); }
.note label { margin-top: 8px; }

@media (max-width: 380px) {
  .lead .pair { grid-template-columns: 1fr; }
}
.lead .trap { position: absolute; left: -9999px; }

.choices { min-width: 0; margin: 0 0 6px; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choices legend { padding: 0; margin-bottom: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.lead-call .choices { flex-direction: column; }

.chip, .call { position: relative; }
.chip input, .call input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.chip input:checked + span { background: var(--deep); border-color: var(--deep); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--bloom); outline-offset: 2px; }

.lead .call {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(21, 23, 26, 0.1);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.call:hover { border-color: var(--bloom); background: #F7F9FC; }
.call:has(input:checked) { border-color: var(--deep); box-shadow: 0 0 0 1px var(--deep); }
.call:has(input:focus-visible) { outline: 2px solid var(--bloom); outline-offset: 2px; }
.call b { display: block; font-size: 16px; font-weight: 600; }
.call i { display: block; margin-top: 2px; font-size: 14px; font-style: normal; color: var(--graphite); }
.call code { flex: none; font-size: 13px; color: var(--deep); }

.lead input[type="text"], .lead input[type="email"], .lead textarea {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: var(--field);
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  letter-spacing: -0.01em;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lead textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.lead input:focus, .lead textarea:focus { border-color: var(--bloom); box-shadow: 0 0 0 4px rgba(91, 143, 202, 0.15); }
.lead ::placeholder { color: var(--muted); }

.lead button[type="submit"] {
  justify-self: start;
  margin-top: 6px;
  height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 25px;
  background: var(--deep);
  color: var(--white);
  font: 600 16px/1 var(--sans);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
}

.book-card .lead button[type="submit"] { justify-self: stretch; }
.lead button[type="submit"]:hover { background: var(--deep-hover); }
.lead button[type="submit"]:active { transform: scale(0.98); }
.lead button[type="submit"]:disabled { background: var(--disabled); cursor: default; }
.lead-status { margin: 0; min-height: 1.45em; font-size: 15px; color: var(--graphite); }
.lead-status[data-state="error"] { color: var(--ink); font-weight: 500; }

.done { display: grid; justify-items: center; gap: 4px; padding: 8px 0 4px; text-align: center; animation: rise 0.5s var(--rise) both; }
.done-mark { width: 56px; height: 56px; margin-bottom: 10px; border-radius: 28px; background: var(--haze); display: flex; align-items: center; justify-content: center; }
.done b { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; }
.done span:last-child { font-size: 15px; color: var(--graphite); }

/* Case study sheet */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--porcelain);
  transform: translateY(100%);
  transition: transform 0.55s var(--ease);
}

.sheet[hidden] { display: none; }
.sheet.is-open { transform: none; }
.is-locked, .is-locked body { overflow: hidden; }
body.is-sheet { position: fixed; left: 0; right: 0; width: 100%; }

.sheet-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 60px;
  padding: 0 max(16px, calc((100% - 848px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(var(--porcelain-rgb), 0.8);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.sheet-bar code { font-size: 13px; color: var(--graphite); font-variant-numeric: tabular-nums; }
.sheet-steps { display: flex; gap: 6px; }

.round {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: rgba(21, 23, 26, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.round:hover { background: rgba(21, 23, 26, 0.1); }

.sheet-body { max-width: 880px; margin: 0 auto; padding: 8px 16px 0; }
.sheet .film-play, .sheet .still { aspect-ratio: 16 / 11; border-radius: 28px; }
.case-body { max-width: 620px; margin: 0 auto; padding: 36px 4px 0; }
.case-body > .meta { margin: 0; font: 13px/1.3 var(--mono); color: var(--graphite); }
.case-body h3 { margin: 10px 0 0; font-size: clamp(40px, 9vw, 64px); line-height: 1; font-weight: 600; letter-spacing: -0.045em; }

.case-facts, .facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: var(--hair);
}

.case-facts dt, .facts dt { font-size: 13px; color: var(--graphite); }
.case-facts dd, .facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: var(--ink); }

.beats { display: flex; flex-direction: column; gap: 32px; margin-top: 44px; }
.beats .meta { margin: 0; font: 12px/1.3 var(--mono); color: var(--bloom); }
.beats .meta + p { margin: 8px 0 0; font-size: clamp(22px, 5vw, 28px); line-height: 1.25; font-weight: 500; letter-spacing: -0.025em; text-wrap: pretty; }

.sheet-next {
  width: calc(100% - 32px);
  max-width: 620px;
  margin: 64px auto 120px;
  padding: 20px;
  border: 0;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--edge);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.3s var(--ease);
}

.sheet-next:hover { transform: translateY(-2px); }
.sheet-next i { display: block; font-size: 13px; font-style: normal; color: var(--graphite); }
.sheet-next b { display: block; margin-top: 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.03em; }

/* Interior pages */

.page { min-height: 100svh; display: flex; flex-direction: column; }

/* padding-top 0 so the first heading sits just below --bee-band (art floor + gap).
   Opaque porcelain so any empty frame rows clipped by the cover never show through.
   min-height uses the full-frame band (not the art floor) so shortening the feet
   gap does not inflate empty page min-height below the content. */
/* Match main stacking — no z-index / relative on content. */
.copy {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 18px 56px;
  transition: opacity 0.24s ease;
}

body.page .copy,
main.copy.is-spa-page {
  min-height: calc(100svh - var(--bee-frame-band-scrolled, var(--bee-band-scrolled, 50svh)));
}

/* Phone end clearance is on footer.foot (--dock-h + 16px), not .copy / body. */
.page .copy > h1:first-child,
.page .copy > .case-crumb:first-child {
  scroll-margin-top: var(--bee-band-scrolled);
}

/* Parked SPA views must not intercept clicks while another view is showing.
   Dock is a direct body child (not inside main), so parking main never clips it. */
.is-parked,
main.is-parked,
footer.is-parked {
  display: none !important;
  pointer-events: none !important;
}

/* Home chat parked under videos: hide greet/thread/stash; dock lives on body.
   Do NOT force display:none on home under BeeBee (WebKit freeze guard above).
   Parent SPA park uses opacity:0 — undo it on the home shell only. */
main[data-home-view].is-parked {
  opacity: 1 !important;
  visibility: visible !important;
  height: 0 !important;
  min-height: 0 !important;
  /* Must stay overflow:visible — never clip. Dock is outside this node now,
     but keep the home shell free of overflow/transform/contain for iOS. */
  overflow: visible !important;
  z-index: 3 !important;
  pointer-events: none !important;
}
main[data-home-view].is-parked .dock-space {
  display: block !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
main[data-home-view].is-parked .greet,
main[data-home-view].is-parked .thread,
main[data-home-view].is-parked .stash,
main[data-home-view].is-parked .sr {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Direct-load content pages have no dock; SPA keeps the body-level dock. */
body.page .chat .dock-space {
  display: none !important;
  pointer-events: none !important;
}
.copy.is-out { opacity: 0; }

.copy h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 6.3vw, 44px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-wrap: balance;
  outline: none;
}

.copy h2 {
  margin: 40px 0 12px;
  font-size: clamp(20px, 4vw, 26px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.copy h3 { margin: 18px 0 3px; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
/* Body ≥15px on phone after the ~15% content scale. */
.copy p, .copy li { font-size: 15px; line-height: 1.5; text-wrap: pretty; }
@media (min-width: 760px) {
  .copy p, .copy li { font-size: 15.5px; }
}
.copy p { margin: 0 0 11px; }
.copy a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.copy a:hover { color: var(--deep-hover); }

/* Compact related-services row on each service page. */
.related-services {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 28px 0 0;
  padding: 16px 0 0;
  border-top: var(--hair);
}

.related-services > p {
  margin: 0;
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.related-services > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  min-width: 0;
}

.related-services a {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--deep);
}

.related-services a:hover { color: var(--deep-hover); }
.related-services a[aria-current="page"] { color: var(--ink); }
/* Buttons that are also links: keep white label (.copy a would otherwise win). */
.copy a.btn,
.copy button.btn:not(.btn-soft),
.case-product-cta .btn {
  color: var(--white);
  text-decoration: none;
}
.copy a.btn:hover,
.copy a.btn:focus-visible,
.copy button.btn:not(.btn-soft):hover,
.copy button.btn:not(.btn-soft):focus-visible,
.case-product-cta .btn:hover,
.case-product-cta .btn:focus-visible {
  color: var(--white);
}
.copy button.btn-soft,
.copy a.btn-soft {
  color: var(--deep);
}
.lede { font-size: clamp(16px, 2.2vw, 18px) !important; line-height: 1.45 !important; letter-spacing: -0.015em; }

.copy ul, .copy ol { margin: 0 0 14px; padding-left: 1.2em; }
.copy li { margin: 0 0 8px; }
.copy li::marker { color: var(--bloom); }

.offers { margin: 0; background: var(--white); border-radius: 18px; box-shadow: var(--edge); overflow: hidden; }
.offers dt { padding: 14px 16px 0; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.offers dt:not(:first-child) { border-top: var(--row); }
.offers dd { margin: 0; padding: 2px 16px 14px; font-size: 14px; line-height: 1.45; color: var(--graphite); }

.faq { background: var(--white); border-radius: 22px; box-shadow: var(--edge); overflow: hidden; }
.faq details + details { border-top: var(--row); }

.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  border-radius: 0;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 14px; font-size: 22px; font-weight: 400; color: var(--bloom); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0; padding: 0 20px 18px; font-size: 16px; color: var(--graphite); }

.films { display: grid; gap: 28px; margin: 8px 0 0; }
.film { margin: 0; }
.film figcaption { margin-top: 12px; font-size: 15px; line-height: 1.45; color: var(--graphite); }
.film figcaption h3 { display: inline; margin: 0; font-size: 17px; color: var(--ink); }
.film .tag { font: 12px/1 var(--mono); color: var(--graphite); }

.film-play, .still {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--edge);
  text-decoration: none;
}

.film-play img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--rise); }
.film-play:hover img { transform: scale(1.02); }

.play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  height: 36px;
  padding: 0 14px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  box-shadow: var(--edge);
  transition: transform 0.3s var(--ease);
}

.film-play:hover .play { transform: scale(1.04); }

.still .cover { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.still .cover-bust img { width: auto; height: 118%; bottom: -18%; }

.film-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 22px; background: #000; }

.projects { display: grid; gap: 52px; margin-top: 28px; }
.project { scroll-margin-top: var(--bee-band); }
.project > .meta { margin: 14px 0 4px; font: 11px/1 var(--mono); color: var(--bloom); }
.copy .project h2 { margin: 0 0 8px; font-size: clamp(28px, 6.5vw, 46px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; }

.case-index-title { margin: 64px 0 8px; font-size: clamp(24px, 4.2vw, 30px); letter-spacing: -0.035em; }
.case-index-lede { margin: 0 0 6px; color: var(--graphite); }
.case-index { margin-top: 22px; gap: 44px; }

.case-teaser { margin: 0; }
.case-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.case-card:hover { color: var(--ink); }
.case-card .cover {
  margin: 0;
  aspect-ratio: 16 / 9;
}
.case-card .cover img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
.case-card .meta { margin: 14px 0 4px; font: 11px/1 var(--mono); color: var(--bloom); }
.case-card h2 { margin: 0 0 8px; font-size: clamp(28px, 6.5vw, 46px); line-height: 1.02; font-weight: 600; letter-spacing: -0.045em; color: var(--ink); }
.case-card > p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--graphite); text-wrap: pretty; }
.case-card:hover .case-open { color: var(--deep-hover); }
.case-open {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--deep);
  letter-spacing: -0.015em;
}

.scope {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.scope li {
  margin: 0;
  padding: 6px 10px;
  font: 12px/1 var(--mono);
  color: var(--graphite);
  background: var(--haze);
  border-radius: 999px;
}

.case-crumb {
  margin: 0 0 10px !important;
  font: 13px/1.3 var(--mono);
  color: var(--graphite);
}
.copy > .case-crumb + h1 { margin-top: 0; }
.case-crumb a { color: var(--deep); text-decoration: none; }
.case-crumb a:hover { color: var(--deep-hover); }

.credit {
  margin: 0 0 28px !important;
  font-size: 16px !important;
  color: var(--graphite);
  text-wrap: pretty;
}

.contact-sheet { margin: 20px 0 0; }
.contact-sheet-frame {
  display: block;
  max-height: none;
  overflow: visible;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--edge);
}
.contact-sheet-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}
.contact-sheet figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--graphite);
}
.contact-sheet figcaption a { color: var(--deep); }

.case-video {
  margin: 20px 0 0;
  border-radius: 22px;
  overflow: hidden;
  background: #0d1014;
  box-shadow: var(--edge);
}
.case-video.is-wide .case-player { aspect-ratio: 16 / 9; }
.case-player {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  max-height: min(78vh, 860px);
  margin: 0 auto;
  background: #000;
  object-fit: contain;
}
.case-video-note {
  margin: 0 !important;
  padding: 12px 16px 14px;
  color: rgba(255, 255, 255, 0.72);
  background: #0d1014;
  font-size: 13px !important;
}

.case-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 48px 0 12px;
  padding-top: 28px;
  border-top: var(--hair);
}
.case-next .btn { color: var(--white); }
.case-next .btn-soft { color: var(--deep); }
.case-all {
  margin-left: auto;
  font-size: 15px;
  color: var(--graphite);
  text-decoration: none;
}
.case-all:hover { color: var(--deep); }
.case-more { margin: 28px 0 0; }

.contact { font-size: 22px !important; line-height: 1.5 !important; font-weight: 500; letter-spacing: -0.02em; margin: 24px 0 !important; }

.foot {
  width: 100%;
  max-width: 680px;
  margin: auto auto 0;
  padding: 28px 20px calc(40px + env(safe-area-inset-bottom));
  border-top: var(--hair);
  font-size: 14px;
  color: var(--graphite);
}

/* Phone: end clearance on the footer (pages that have one), not on body —
   so home (no .foot) gains no extra scroll height. Last line clears dock + 16px. */
@media (max-width: 759px) {
  body .foot {
    padding-bottom: max(
      calc(40px + env(safe-area-inset-bottom, 0px)),
      calc(var(--dock-h, 0px) + 16px)
    );
  }
}

.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 10px; }
.foot nav a { padding: 4px 0; color: var(--ink); text-decoration: none; }
.foot nav a[aria-current="page"] { color: var(--deep); }
@media (hover: hover) and (pointer: fine) {
  .foot nav a:hover { color: var(--deep); }
}
.foot p { margin: 0 0 4px; }
.foot p a { text-underline-offset: 2px; }

@media (min-width: 900px) {
  .films { grid-template-columns: 1fr 1fr; }
  .films .film:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Motion */

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
@keyframes glow { 0%, 100% { opacity: var(--g0); transform: scale(1); } 50% { opacity: var(--g1); transform: scale(1.18); } }
@keyframes think { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.6deg); } 75% { transform: rotate(1.6deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 55% { transform: rotate(2.4deg); } 80% { transform: rotate(-1deg); } }
@keyframes look { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.2deg); } 65% { transform: rotate(2deg); } }
@keyframes lean { to { transform: rotate(1.4deg) scale(1.012); } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-40px) scale(0.6); } 20% { opacity: 1; } 80% { opacity: 1; transform: translateY(0) scale(1); } 100% { opacity: 0; transform: translateY(6px) scale(1.3, 0.4); } }
@keyframes note { 0% { opacity: 0; transform: translate(-50%, 6px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bb video { display: none; }
  .bee-note.is-on { opacity: 1; }
}
