/* ══ HERO ANIMATION ═══════════════════════════════════════════════════════
   The band at the head of the Famly case, after the one on Rachel Chen's
   Notion page. Hers is a 5.6s mp4; this is DOM, which matters for three
   reasons: it weighs about 12KB against her megabyte, it is sharp at any
   size rather than at one, and it can be retimed by changing a number
   instead of re-rendering a video.

   What it shows, in one loop of roughly 9.6 seconds:

     three children, one per background, cut hard · a cursor clicks the last
     of them · the card opens and her details arrive · everything but the
     task falls away · the three come back as timeline rows and the task
     flies into its slot on the middle one · the cursor ticks it · the
     composer arrives and an instruction about that same task types itself
     into the writing assistant · the cursor presses Improve writing ·
     repeat.

   ── The coordinate space ──────────────────────────────────────────────────
   Everything inside is laid out at the Figma frame's own 817x464 and then
   scaled to whatever width the band has, the same trick the four product
   screens use. So every number in this file is a number off the design, and
   the whole thing is responsive without a single breakpoint. The cost is
   that the scene cannot reflow — it only ever gets smaller — which is the
   right trade for something whose job is to be one picture.

   ── The colours ───────────────────────────────────────────────────────────
   All measured off the Figma frames: lilac #f2ecfc, mint #ecf8f2,
   blue #e3eff6, the dark #464545, the timeline's #f4f4f4.

   ── The typeface ──────────────────────────────────────────────────────────
   Matter, as asked. It is declared in styles.css with local() sources only,
   so it renders in Matter on a machine that has it and falls back to Geist
   everywhere else. Self-hosting a woff2 would give it to every visitor; that
   is a licensing question, not a technical one. */

.hero {
  --sw: 817;              /* the scene's own width, in its own units  */
  /* Not full bleed. 1240 is a width the page already uses (--w-wide), so
     the band lines up with the widest blocks further down instead of
     being a fourth measure of its own. The inset stays as a floor, which
     is what holds on a phone. */
  --hero-w: 1240px;
  /* 325, not the frame's 464. At 464 the band stood 791px tall at a 1512
     viewport and pushed the page title off the bottom of the screen, so the
     first thing anyone saw was a loop with no idea what it belonged to. A
     cut puts "Making a big platform feel small" back above the fold.
     The scene inside is unchanged — it is the air around it that goes.
     332 is the floor now that the card carries three rows rather than two:
     it is 287 of these units tall, so it clears the top and bottom edges by
     22 each. The allergy row cost about 50px of band height; there is no
     way to add a row to the card and not pay for it somewhere. */
  --sh: 332;
  --hero-inset: clamp(16px, 4vw, 60px);   /* the side gutter, as a floor */
  --hero-top:   clamp(24px, 3.2vw, 48px); /* the step below the back link */

  /* The frame's three, taken down about 3.5% in lightness. Saturation was
     the wrong lever — at 95% lightness these are already near the top of
     their chroma, so turning S up moved nothing. Dropping L is what gives
     the hue room to show, and the cut now reads as a change of colour
     rather than a change of brightness. Still pale: none is below 89% L. */
  --bg-1: #e7dafc;        /* lilac */
  --bg-2: #ddf5e9;        /* mint  */
  --bg-3: #d3e8f4;        /* blue  */
  --bg-dark: #464545;
  --bg-tl: #f4f4f4;

  --ink:  #2d2d39;
  --soft: #656581;
  --line: #e4e4ea;
  --brand: #6910e7;       /* Famly's purple, for the assistant beat */
  --task-card: #e9f7ff;   /* the task as a row inside the card  */
  --task-chip: #dceeff;   /* the task as a chip on the timeline */
  --done:      #e2e2e9;
  --sick:      #ffe3e9;
  --sick-ink:  #c2566f;

  position: relative;
  /* No bottom inset. `margin: var(--hero-inset)` put 60px under the band as
     a side effect of setting the other three, and the page already has its
     own gap below this point — the back link's 40px of padding and the
     header's own step. Those 60px were nobody's decision and they came
     straight off the budget for getting the title above the fold. */
  margin: var(--hero-top) auto 0;
  max-width: min(var(--hero-w), calc(100% - var(--hero-inset) * 2));
  aspect-ratio: var(--sw) / var(--sh);
  /* Square. The band is the one thing on the site that is not media sitting
     on the page — it is a window cut into it — so it does not take the
     shared --radius the way every picture does. The card inside keeps its
     own 30px; that one IS an object on a surface. */
  border-radius: 0;
  overflow: hidden;
  container-type: inline-size;
  background: var(--bg-1);
  /* No transition on the ground, deliberately. The reference cuts hard and
     the snap IS the effect — any easing at all, even 260ms, turns three
     cuts into one wash and the sequence stops reading as three children. */
  font-family: "MatterUI", "Matter", var(--font-sans);
  color: var(--ink);
}

/* A hairline inside the edge, after the one on the reference. Drawn as an
   inset box-shadow on a pseudo-element rather than a border, for the two
   reasons she does it that way: a border would take a pixel of layout and
   shift everything inside by one, and a pseudo-element can sit ABOVE the
   content, so the ring stays crisp over a photo that runs to the edge. */
.hero::after,
.hero__card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(50, 64, 79, .07);
}
/* A touch stronger on the card: it sits on white, where .07 disappears. */
.hero__card::after { box-shadow: inset 0 0 0 1px rgba(50, 64, 79, .10); }

/* Inside the shell now, so the frame's own block step applies to it —
   .case > .case__inner > * + * sets 64px on everything, which is the rhythm
   for blocks of copy and far too much under a back link. Equal specificity,
   and this file loads after case.css, so this wins. */
.case__inner > .hero { margin-top: var(--hero-top); }

/* ── the band's two neighbours ────────────────────────────────────────────
   Both of these are scoped with :has to the page that actually carries a
   band, so the other three case pages keep the spacing they were drawn
   with. One line each to make them site-wide if that is wanted. */

/* The back link rides high, close to the top edge — it is a control, not
   part of the page, and the air belongs BELOW it, between it and the band.
   The frame's standard 40 is for a page whose title comes next; here the
   next thing is a 500px picture and the link reads better tucked up out of
   its way. */
.case__inner:has(> .hero) > .backlink { padding-top: 20px; }

/* The header's own 72px of padding IS the step under the band. On top of
   that the frame was also adding --sp-5, its 98px between-sections gap, so
   the band and the title were 195px apart — two steps doing one job. The
   section gap is for one block of copy following another; a band is the
   page's opening image, not a section, and the header already knows how
   far it stands off whatever is above it. */
.case__inner > .hero + .head { margin-top: 0; }

/* The scene is laid out at its own size and scaled down to the band. */
.hero__scene {
  position: absolute;
  left: 0; top: 0;
  width:  calc(var(--sw) * 1px);
  height: calc(var(--sh) * 1px);
  transform-origin: 0 0;
  scale: calc(100cqw / (var(--sw) * 1px));
  transition: opacity .34s var(--ease-out, ease);
}
/* .is-out is retired: the scene no longer fades out as a block, the rows
   fly off and the card pulses back in over the new ground. */

/* Both halves are centred by LAYOUT, not by `translate: -50% -50%`.
   offsetLeft reports where the layout put a box and knows nothing about
   transforms, so a translated centre makes every measurement wrong by half
   the element — which is exactly how the task first flew to the bottom
   right corner instead of into its slot. Grid centring costs nothing and
   keeps measurement honest. */
.hero__mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* ── the profile card ──────────────────────────────────────────────────── */
.hero__card {
  position: relative;
  width: 400px;
  background: #fff;
  border-radius: 30px;
  padding: 20px 0;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(45,45,57,.06), 0 10px 28px -12px rgba(45,45,57,.22);
  /* Height is animated, so it is set in px by the script rather than left to
     the content: a transition needs two numbers and `auto` is not one. */
  transition: height .42s var(--ease-out, cubic-bezier(.22,.8,.3,1)),
              opacity .3s linear, scale .3s var(--ease-out, ease);
}
/* The card goes with them. What the brief asks for is a moment where the
   task is the only thing on screen, and that only happens if the card is
   gone before the timeline arrives. */
.hero.is-closing .hero__card,
.hero.is-tl      .hero__card { opacity: 0; scale: .97; }

/* A pulse on every cut. The grounds change instantly and the card does not
   move, so without this the three children read as one card with the photo
   being swapped underneath. A short scale is enough to say "this is a
   different one" — it is the only motion in that whole first second, and it
   has to be quick or it argues with the hard cut behind it. */
@keyframes hero-pop {
  0%   { scale: .93; }
  55%  { scale: 1.018; }
  100% { scale: 1; }
}
.hero__card.is-pop { animation: hero-pop .28s var(--ease-out, cubic-bezier(.22,.8,.3,1)); }

/* 20, not 16. At 16 the avatar and the column beside it read as one
   crowded block rather than a picture and the facts about it. */
.hero__top { display: flex; gap: 20px; align-items: center; padding: 0 20px; }

.hero__av {
  width: 72px; height: 72px; flex: none;
  border-radius: 25%;          /* the house rule: a quarter of the width */
  object-fit: cover;
  background: var(--line);
  transition: width .42s var(--ease-out, ease), height .42s var(--ease-out, ease),
              border-radius .42s var(--ease-out, ease);
}
/* Open, the avatar is as tall as the column beside it: its top edge on the
   name's cap line and its bottom on the icon buttons. Measured — the text
   block runs 113 units from the top of the name to the bottom of the
   buttons, and the avatar was 91, so it sat 8 short at the top and 14 short
   at the bottom and the row looked lopsided.

   25%, not a pixel value, because the house rule is a quarter of the width
   whatever the width is. */
.hero.is-open .hero__av { width: 113px; height: 113px; border-radius: 25%; }

.hero__id   { flex: 1 1 auto; min-width: 0; }
.hero__name { font-size: 28px; font-weight: 500; letter-spacing: -.28px; line-height: 1.2; }
.hero__room { font-size: 20px; font-weight: 400; line-height: 1.15; margin-top: 2px; }

/* The three icon buttons, the age and the task all arrive on the same
   stagger. Each carries its own delay as a custom property so the script
   never has to know the order. */
.hero__pop {
  opacity: 0;
  translate: 0 8px;
  transition: opacity .28s linear var(--d, 0ms),
              translate .34s var(--ease-out, cubic-bezier(.22,.8,.3,1)) var(--d, 0ms);
}
.hero.is-open .hero__pop { opacity: 1; translate: 0 0; }
/* On the way out they go together, not in sequence: the stagger is an
   arrival, and staggering the exit as well reads as hesitation.
   This has to restate opacity and not merely retime it — .is-open is still
   on the element at this point, so a rule that only changed the duration
   would lose to it and nothing would move. */
.hero.is-closing .hero__pop {
  opacity: 0;
  translate: 0 6px;
  transition-delay: 0ms;
  transition-duration: .22s;
}

/* The buttons take no height until the card is open.
   They are only transparent when closed, not absent, so they still took
   their 40px — which made the name-and-room column 109px tall against a
   72px avatar. `align-items: center` then centred a column half of which
   was invisible, and the text sat high above the face. Collapsing the row
   lets the two actually centre on each other, and it gives the card its
   112px closed height, which is what the frame draws.

   The transition list is restated in full rather than inherited from
   .hero__pop: a second `transition` on the same element replaces it
   outright, so the opacity and translate have to be named again here or
   the buttons would snap in. */
.hero__btns {
  display: flex;
  gap: 8px;
  height: 0;
  margin-top: 0;
  overflow: hidden;
  transition: opacity .28s linear var(--d, 0ms),
              translate .34s var(--ease-out, cubic-bezier(.22,.8,.3,1)) var(--d, 0ms),
              height .42s var(--ease-out, cubic-bezier(.22,.8,.3,1)),
              margin-top .42s var(--ease-out, cubic-bezier(.22,.8,.3,1));
}
.hero.is-open .hero__btns { height: 40px; margin-top: 12px; }
.hero__btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--ink);
}
.hero__btn svg { width: 20px; height: 20px; }

/* The two facts about the child, above the task. Same shape, so they read
   as one list; 12px apart rather than 16, because a third row in a card
   this size is 50px of band height and the step is where it is cheapest to
   find some of it back. */
.hero__age,
.hero__alert {
  display: flex; align-items: center; gap: 12px;
  padding: 0 28px; margin-top: 12px; height: 28px;
  font-size: 16px;
}
.hero__age svg,
.hero__alert .hero__ico { width: 22px; height: 22px; flex: none; }
/* The allergy carries the product's own warning mark: a filled yellow
   triangle, and the quiet info dot that follows it on the real profile.

   The dot belongs to the WORDS, not to the row — it is a footnote on
   "Peanut allergy", so it sits 4px off the text rather than taking the
   row's 12px step and floating halfway to nothing. That pairing is its own
   flex box, which is how the room view sets it (.krow .kt, gap 4). */
.hero__alert-t { display: inline-flex; align-items: center; gap: 4px; }
.hero__alert .hero__info { width: 17px; height: 17px; flex: none; opacity: .8; }

/* The slots are invisible. They exist so the task's two homes are real boxes
   the script can measure, instead of two sets of coordinates to keep in step
   with the layout by hand. */
.hero__slot { pointer-events: none; visibility: hidden; }
.hero__slot--card { margin: 10px 20px 0; height: 48px; }

/* ── the timeline ──────────────────────────────────────────────────────── */
.hero__tl {
  position: relative;
  /* 440, not 498. The rows were half again as wide as the card they grow
     out of, so the cut from card to timeline read as a jump in scale as
     well as in form. 440 against the card's 400 keeps the two the same
     object seen two ways. */
  width: 440px;
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0;
  pointer-events: none;
}
.hero.is-tl .hero__tl { opacity: 1; }

.hero__trk {
  display: flex; align-items: center; gap: 12px;
  opacity: 0;
  translate: -34px 0;
  /* The stagger is a custom property, not an inline transition-delay: the
     exit wants a tighter one than the entrance, and an inline style cannot
     be overridden by a stylesheet rule. */
  transition: opacity .3s linear, translate .46s var(--ease-out, cubic-bezier(.22,.8,.3,1));
  transition-delay: calc(var(--i, 0) * 70ms);
}
.hero.is-tl .hero__trk { opacity: 1; translate: 0 0; }

/* Out to the left, fast, each one a touch behind the last. The rows came
   in from the left, so leaving the same way reads as the strip moving on
   rather than the picture being switched off — which is what the old fade
   of the whole scene looked like. Short and sharp: a 240ms ease-IN, where
   the entrance is a 460ms ease-out, because an exit wants to accelerate
   away and an entrance wants to settle.

   These rules must come after the .is-tl ones above — same specificity, so
   order is what decides. */
.hero.is-exit .hero__trk {
  translate: -150px 0;
  opacity: 0;
  transition-duration: .24s, .2s;
  transition-timing-function: cubic-bezier(.4, 0, .9, .4);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.hero.is-exit .hero__task {
  opacity: 0;
  transition-duration: .24s;
  transition-timing-function: cubic-bezier(.4, 0, .9, .4);
  transition-delay: 40ms;              /* it rides on row 2 */
}

.hero__face { position: relative; flex: none; }
.hero__tav {
  display: block;
  width: 45px; height: 45px;
  border-radius: 11.25px;      /* the same quarter */
  object-fit: cover;
  background: var(--line);
}
/* Signed in, or out sick. Drawn on the avatar rather than beside it, which
   is where the frame puts it and what the room view already does. */
.hero__badge {
  position: absolute;
  right: -3px; bottom: -3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  border: 2px solid var(--bg-tl);
  background: #17a673;
  display: grid; place-items: center;
}
.hero__badge svg { width: 10px; height: 10px; stroke: #fff; }
.hero__badge--out { background: #e5484d; }

.hero__bar {
  position: relative;
  flex: 1 1 auto;
  height: 47px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.25;
}
.hero__bar small { display: block; color: var(--soft); font-size: 12px; }
.hero__bar--muted { background: #f9f9fb; }
/* Sick: the hatch is the fill, so there is nothing to keep in register. */
.hero__bar--sick {
  background: repeating-linear-gradient(45deg,
    var(--sick) 0 6px, #fff0f4 6px 12px);
  border-color: #f7cdd8;
  color: var(--sick-ink);
}

/* Centred with calc and not with `top:50%; translate:0 -50%`, for the same
   reason the two halves are: the script finds this box with offsetTop, and
   offsetTop reports where layout put it and cannot see a transform. With
   the translate the chip landed half its own height low, every time. */
/* The 10am dose, already given. The room prototype and the frame both show
   two chips on this row — the point of the picture is that one is done and
   one is not, and with a single chip the row says nothing. This one is
   static and permanently ticked; the 2pm is the one that flies in.

   It repeats the chip geometry rather than sharing a class with
   .hero__task.is-chip, because that one is absolutely positioned in the
   scene, carries the morph transitions, and is mid-flight for half a
   second. Two short rules that agree are easier to keep true than one rule
   bent to cover both. */
.hero__chip {
  position: absolute;
  left: 23%;
  top: calc(50% - 20.5px);
  width: 67px; height: 41px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "cb label" ".  time";
  justify-content: start;
  align-content: center;
  gap: 1px 6px;
  padding: 4px 5px;
  border-radius: 8px;
  background: var(--done);
  font-size: 11px;
  color: var(--soft);
}
.hero__chip .hero__cb {
  grid-area: cb;
  width: 15px; height: 15px; border-radius: 4px;
  background: #5b5b6e; border-color: #5b5b6e;
}
.hero__chip .hero__cb svg { width: 10px; height: 10px; opacity: 1; }
.hero__chip b { grid-area: label; font-weight: 400; }
.hero__chip i { grid-area: time; justify-self: start; font-style: normal; }
/* Struck with a gradient, as the flying chip is, so the two match exactly. */
.hero__chip b, .hero__chip i {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 58%;
}

.hero__slot--tl {
  position: absolute;
  right: 12px;
  top: calc(50% - 20.5px);
  width: 67px; height: 41px;
}

/* ── the task, the one thing that crosses between the two ──────────────── */
.hero__task {
  position: absolute;
  left: 0; top: 0;
  display: flex; align-items: center; gap: 10px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--task-card);
  font-size: 16px;
  opacity: 0;
  /* The box is animated and the text inside it reflows in one step, so for
     a frame or two in the middle of the morph the content is bigger than
     what holds it. Clipped, that frame is invisible; unclipped, the chevron
     slides out of the chip and sits on the background on its own. */
  overflow: hidden;
  /* Everything that changes between the row and the chip transitions, so the
     morph is one movement rather than a move followed by a restyle. */
  transition: translate .52s var(--ease-out, cubic-bezier(.22,.8,.3,1)),
              width  .52s var(--ease-out, cubic-bezier(.22,.8,.3,1)),
              height .52s var(--ease-out, cubic-bezier(.22,.8,.3,1)),
              background-color .4s linear, font-size .4s linear,
              padding .4s linear, gap .4s linear, opacity .24s linear;
}
.hero.is-open    .hero__task,
.hero.is-closing .hero__task,
.hero.is-tl      .hero__task { opacity: 1; }

.hero__task-l { flex: 1 1 auto; min-width: 0; white-space: nowrap; }
.hero__task-t { color: var(--soft); }
.hero__task-c { flex: none; opacity: .55; transition: opacity .2s linear; }
.hero__task-c svg { width: 18px; height: 18px; display: block; }

.hero__cb {
  width: 22px; height: 22px; flex: none;
  border: 1.6px solid #b9b9c8;
  border-radius: 5px;
  background: #fff;
  display: grid; place-items: center;
  transition: background-color .18s, border-color .18s, width .4s, height .4s;
}
.hero__cb svg { width: 14px; height: 14px; stroke: #fff; opacity: 0;
                transition: opacity .16s linear; }

/* The chip form. Narrow, two lines, no chevron.

   A grid rather than a wrapped flex row, for one reason: the strike-through
   is drawn as a background on the text's own box, so that box has to be as
   wide as the text. `flex-basis: 100%` forces the wrap but also makes the
   time span the whole chip, and the rule then runs out either side of
   "2pm" and reads as a divider. Two auto columns wrap just the same and
   size to their content, and the indent falls out of the checkbox column
   instead of being a padding that has to be subtracted again. */
.hero__task.is-chip {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas: "cb label" ".  time";
  justify-content: start;
  align-content: center;
  gap: 1px 6px;
  padding: 4px 5px;
  font-size: 11px;
  background: var(--task-chip);
  border-radius: 8px;
}
.hero__task.is-chip .hero__cb     { grid-area: cb; width: 15px; height: 15px; border-radius: 4px; }
.hero__task.is-chip .hero__cb svg { width: 10px; height: 10px; }
.hero__task.is-chip .hero__task-l { grid-area: label; }
/* justify-self, or the cell stretches to the width of "Inhaler" above it
   and the strike runs out past "2pm" again — the same bug the grid was
   meant to fix, one level down. */
.hero__task.is-chip .hero__task-t { grid-area: time; justify-self: start; }
.hero__task.is-chip .hero__task-c { display: none; }

/* Ticked. The strike is drawn with a gradient rather than line-through so it
   can be animated from nothing to full width; line-through is all or none. */
.hero__task.is-done { background: var(--done); }
.hero__task.is-done .hero__cb { background: #5b5b6e; border-color: #5b5b6e; }
.hero__task.is-done .hero__cb svg { opacity: 1; }
.hero__task.is-done .hero__task-l,
.hero__task.is-done .hero__task-t {
  color: var(--soft);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 58%;
  transition: background-size .22s var(--ease-out, ease);
}
.hero__task:not(.is-done) .hero__task-l,
.hero__task:not(.is-done) .hero__task-t {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 58%;
  transition: background-size .22s var(--ease-out, ease);
}

/* ── the writing assistant ─────────────────────────────────────────────────
   The last beat before the loop turns over, from frame six of the Figma
   (6849:24519). Every number here is that frame's: the card is 465x200 and
   centred, exactly as the profile card is, so it uses the same .hero__mid
   wrapper and is measured the same way.

   It stands on the dark ground the card opened on, which is what makes it
   read as the same product rather than a second animation — the grey is the
   one colour in the loop that has already meant "look at this". */
.hero__wa {
  width: 465px;
  background: #fff;
  border-radius: 20px;           /* measured off the frame's own corner */
  box-shadow: 0 1px 2px rgba(45,45,57,.06), 0 10px 28px -12px rgba(45,45,57,.22);
  opacity: 0;
  scale: .97;
  transition: opacity .28s linear, scale .3s var(--ease-out, cubic-bezier(.22,.8,.3,1));
}
.hero.is-wa .hero__wa { opacity: 1; scale: 1; }

/* The acknowledgement. Everything in the composer except the pill that was
   just pressed drops back the instant the press lands — before anything
   moves, before anything fades out. A click that produces nothing for half
   a second reads as a click that missed, and no amount of polish further
   down the beat list repairs that impression. */
.hero.is-wa-ack .hero__wa-top,
.hero.is-wa-ack .hero__wa-row,
.hero.is-wa-ack .hero__wa-pill:not(.is-hit) {
  opacity: .26;
  transition: opacity .16s linear;
}

/* The composer's own row: the message field's placeholder and the send
   button. Neither does anything — the beat is about the assistant below —
   but without them the panel floats with no idea what it is attached to. */
.hero__wa-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 20px;
}
.hero__wa-ph { font-size: 16px; line-height: 1.2; color: var(--soft); }
.hero__wa-send {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--brand, #6910e7);
  display: grid;
  place-items: center;
  flex: none;
}
.hero__wa-send svg { width: 18px; height: 18px; display: block; }

/* The assistant panel. The gradient is the frame's, not an approximation:
   107.43deg from #f7f0ff to #fcf9ff. A flat lilac loses the lift the angle
   gives it against the white card. */
.hero__wa-panel {
  margin: 0 16px 16px;
  padding: 12px 16px;
  border: 1px solid #e2d2f9;
  border-radius: 16px;
  background: linear-gradient(107.43deg, #f7f0ff 7.82%, #fcf9ff 95.58%);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__wa-pills { display: flex; gap: 8px; }
.hero__wa-pill {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 12px 0 8px;
  border: 1px solid #c6c6d2;
  border-radius: 8px;
  background: rgba(255,255,255,.8);
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  transition: background .16s linear, border-color .16s linear;
}
.hero__wa-pill svg { width: 18px; height: 18px; flex: none; display: block; }
/* The pressed state. This is the beat's full stop: the cursor hits one pill
   and the loop cuts on it, so the press has to be legible in the two frames
   it is on screen — a tint alone reads as a hover. */
.hero__wa-pill.is-hit {
  background: #ece0fd;
  border-color: var(--brand, #6910e7);
}

.hero__wa-row { display: flex; align-items: center; gap: 10px; height: 36px; }
.hero__wa-spark { width: 18px; height: 18px; flex: none; }
.hero__wa-spark svg { width: 100%; height: 100%; display: block; }

/* [typed][caret][placeholder]. Empty, that is caret-then-placeholder, which
   is the frame exactly; as the characters arrive the placeholder goes and
   the caret is pushed along in front of them. */
.hero__wa-field {
  display: flex;
  align-items: center;
  gap: 1px;
  font-size: 16px;
  line-height: 1.2;
  min-width: 0;
}
.hero__wa-typed { font-weight: 400; color: var(--ink); white-space: pre; }
.hero__wa-ph2   { color: var(--soft); opacity: .6; white-space: nowrap; }
.hero.is-typing .hero__wa-ph2 { display: none; }

.hero__wa-caret {
  width: 1.6px;
  height: 21.6px;
  background: var(--ink);
  flex: none;
  animation: hero-caret 1.06s steps(1) infinite;
}
@keyframes hero-caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* The task has already flown off to the left by now, but it is still a
   visible element sitting at x -170; hide it rather than trust that the
   scene never gets wide enough to show it. */
.hero.is-wa .hero__task { opacity: 0; }

/* ── the cursor ────────────────────────────────────────────────────────── */
.hero__cur {
  --cur: 26px;              /* the rigs' own size */
  position: absolute;
  left: 0; top: 0;
  width: var(--cur); height: var(--cur);
  opacity: 0;
  pointer-events: none;
  /* The element's own origin IS the hotspot: each glyph inside is offset by
     its own, so the box sits on the point and the press scales about it. */
  transform-origin: 0 0;
  transition: translate .62s var(--ease-io, cubic-bezier(.5,.05,.2,1)),
              opacity .22s linear, scale .12s ease-out;
  filter: drop-shadow(0 2px 4px rgba(20,20,25,.3));
}
.hero__cur.is-on   { opacity: 1; }
.hero__cur.is-down { scale: .82; }
/* Each glyph offset by its hotspot, in its own 24-unit viewBox scaled to
   --cur — the same arithmetic rig.css does, so the two cursors behave
   identically at any size. */
.hero__cur svg { position: absolute; width: 100%; height: 100%; display: block; }
.hero__cur .c-arrow { left: calc(-2.5 * var(--cur) / 24); top: calc(-1.5 * var(--cur) / 24); }
.hero__cur .c-hand  { left: calc(-9.8 * var(--cur) / 24); top: calc(-1.5 * var(--cur) / 24); }
.hero__cur .c-hand { display: none; }
.hero__cur.is-hand .c-arrow { display: none; }
.hero__cur.is-hand .c-hand  { display: block; }

/* The ring that marks the click. One element, re-triggered by removing and
   re-adding the class, because an animation cannot be restarted otherwise. */
.hero__ring {
  position: absolute;
  left: 0; top: 0;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 2px solid rgba(45,45,57,.5);
  opacity: 0;
  pointer-events: none;
}
.hero__ring.is-go { animation: hero-ring .42s var(--ease-out, ease) forwards; }
@keyframes hero-ring {
  0%   { opacity: .8; scale: .3; }
  100% { opacity: 0;  scale: 1.25; }
}

/* ── off screen, and reduced motion ────────────────────────────────────── */
/* The script pauses the loop out of view; this stops the CSS transitions
   that were mid-flight when it did. */
.hero.is-idle *, .hero.is-idle { transition: none !important; }

/* Movement is the content here, so refusing it cannot mean an empty box. It
   means the opened card — the frame that actually says what the product
   does — held as a still. */
@media (prefers-reduced-motion: reduce) {
  .hero, .hero *, .hero *::before, .hero *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ══ THE BAND AS A TILE ═══════════════════════════════════════════════════
   The same animation on the index's Famly tile. Two things change and
   nothing else does:

     · the scene gets taller. The band is 817x332; a tile is 4:3. Rather
       than letterbox the scene into a squarer box, --sh is raised until the
       scene's own ratio IS the tile's, which just gives the card more air
       around it — at tile scale that reads better than a wide strip.
     · the margins and the max-width go, because the tile is the frame now.

   Everything else — the cut grounds, the pulse, the cursor, the morph, the
   pause when it scrolls out of view — is the band's and is untouched. */
.thumb__cover--hero { background: none; }
.thumb__cover--hero .hero {
  /* A smaller scene, so everything in it is bigger against the tile. The
     card is a fixed 400 scene units wide: in the band's 817 that is half
     the width, and at tile scale it came out too small to read. In 560 it
     is 71%, which fills the tile the way a thumbnail should.
     560 x 420 is 4:3, the tile's own shape. */
  --sw: 560;
  --sh: 420;
  --hero-top: 0px;
  width: 100%;
  margin: 0;
  max-width: none;
}

/* ── the mark, as a last beat ─────────────────────────────────────────────
   Only on the tile. The band inside the case ends on the ticked task and
   starts again; the tile signs off with the logo, because a thumbnail has
   to say whose work it is and the band does not — the page around it
   already has. The loop SVG is cropped to the lockup with no ground of its
   own, so the beat paints one. */
.hero__logo {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .34s linear;
}
.hero.is-logo .hero__logo { opacity: 1; }
.hero__logo img { width: 52%; height: auto; display: block; }
