/* "We engineer the virality of your launch" (./launches.ts): the live page's
   Spotlight (Product/components/landing-v4/launches/Look2.tsx, look2.css) on
   the moving page's white, in the story's pixels. A plate is the story's
   (./story.css .story-paper): a frame cut in nine (./pixels.ts plate) laid
   as the box's border, `--cell` a cell of it, and a hard shadow two cells
   down and to the right. */

.launch {
  position: relative;
  width: 100%;
  padding: 120px 20px 96px;
  color: #0b0b12;
  background: #fff;
}

.launch-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
/* the page's head, in its face (./white.css: Reckless) */
.launch-title {
  font-size: 40px;
  text-wrap: balance;
}
.launch-lead {
  max-width: 520px;
  margin-top: 20px;
  font-size: 16px;
  line-height: 1.55;
  color: #6e6e6e;
  text-wrap: balance;
}

/* ------------------------------------------------------------ the plates */

.launch-plate {
  --cell: 2px;
  --plate: var(--launch-stone);
  border: calc(var(--cell) * var(--plate-rim)) solid transparent;
  border-image: var(--plate) var(--plate-cut) / calc(var(--cell) * var(--plate-corner)) stretch;
  background: #fff padding-box;
  filter: drop-shadow(calc(var(--cell) * 2) calc(var(--cell) * 2) 0 rgb(0 0 0 / 0.4));
}

/* ------------------------------------------------------------ the stage */

.launch-play {
  max-width: 1180px;
  margin: 48px auto 0;
}
.launch-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

/* the post in its frame with the medals on it (./launches.ts post): the frame is the post's place on the stage, and
   the medals stand beside the post in it, so the post's hard shadow is drawn round the post alone */
.launch-frame {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 600px;
  justify-self: center;
}

/* the post, on the story's gold: it lifts a cell towards the reader under the pointer, and goes down onto its
   shadow when pressed, as a key does */
.launch-post {
  --cell: 3px;
  --plate: var(--launch-gold);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 16px 18px 18px;
  color: inherit;
  text-decoration: none;
}
/* the box the medals are placed in: the post's own inside its 12 px border, where they were placed when they were in
   it */
.launch-awards {
  --cell: 3px;
  position: absolute;
  inset: calc(var(--cell) * var(--plate-rim));
  pointer-events: none;
}
/* a medal (./launches.ts MEDALS), pinned over the frame's bottom-left corner (Sergei 2026-11-27: "make it little
   bigger and in the left bottm corner"), its disc's middle just in from the frame's outer corner (the box it is
   placed in ends inside the frame) and its ribbons hanging below the post; it rides the post's lift and press with
   it. Its cells are two pixels, finer than the frame's three ("better fidelity"); on a phone, where the post runs
   nearly to the screen's edge, a pixel and a half, and pinned a little further in, so none of it is off the
   screen */
.launch-medal {
  position: absolute;
  bottom: -81px;
  left: -44px;
  width: calc(2px * 36);
}
@media (max-width: 679px) {
  .launch-medal {
    bottom: -44px;
    left: -27px;
    width: calc(1.5px * 36);
  }
}
/* the glazed ones are lit as the story's toys are, and cast a soft shadow on the page and the frame under them */
.launch-medal-glazed {
  filter: drop-shadow(0 3px 4px rgb(0 0 0 / 0.22));
}
/* the gold medal on its striped ribbon, alone (?medal=hanging), hangs from under the frame's foot, behind the frame, a
   step in from its corner, the gold pin bar its ribbon is gathered under right on the frame's outer line: the box's
   foot, past the 12 px border its offsets start inside. On a phone the launch's name is right under the post's left
   half, so it hangs from the right one */
.launch-medal[data-medal='hanging'] {
  z-index: -1;
  top: calc(100% + 10px);
  bottom: auto;
  left: 16px;
}
@media (max-width: 679px) {
  .launch-medal[data-medal='hanging'] {
    left: auto;
    right: 24px;
  }
}
/* the two together, the page's own, are pinned in a row over the frame's foot: the rosette on the corner and its pair
   next to it, as tall as each other, their tops on one line and their feet on another (Sergei 2026-11-30: "make the
   both in the way of the first one so they are on one line and matching"). On a phone they are pinned at the
   bottom-right corner instead, the pair to the rosette's left, clear of the launch's name */
.launch-awards:has(> :nth-child(2)) .launch-medal {
  bottom: -81px;
  width: auto;
  height: 110px;
}
.launch-medal + .launch-medal {
  left: 36px;
}
@media (max-width: 679px) {
  .launch-awards:has(> :nth-child(2)) .launch-medal {
    bottom: -44px;
    height: 83px;
  }
  .launch-awards:has(> :nth-child(2)) .launch-medal:first-child {
    left: auto;
    right: -14px;
  }
  .launch-medal + .launch-medal {
    left: auto;
    right: 46px;
  }
}
.launch-post:hover {
  translate: calc(var(--cell) * -1) calc(var(--cell) * -1);
  filter: drop-shadow(calc(var(--cell) * 3) calc(var(--cell) * 3) 0 rgb(0 0 0 / 0.4));
}
.launch-post:hover + .launch-awards > * {
  translate: calc(var(--cell) * -1) calc(var(--cell) * -1);
}
.launch-post:active {
  translate: var(--cell) var(--cell);
  filter: drop-shadow(var(--cell) var(--cell) 0 rgb(0 0 0 / 0.4));
}
.launch-post:active + .launch-awards > * {
  translate: var(--cell) var(--cell);
}
.launch-post:focus-visible {
  outline: 2px solid #2f55ff;
  outline-offset: 6px;
}

.launch-who,
.launch-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.launch-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  object-fit: cover;
}
.launch-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.launch-id > b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.launch-id > span {
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgb(10 10 10 / 0.56);
}
.launch-x {
  flex: none;
  width: 18px;
  height: 18px;
  align-self: flex-start;
  margin-top: 4px;
}
/* always three lines' room, the most a post shows, so every post is as tall as the next and nothing under it moves
   when the stage turns (Sergei 2026-12-04, of treg's two-line post: "this post is less height and on click on others
   they jump") */
.launch-lines {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  min-height: calc(3 * 24px);
  font-size: 17px;
  line-height: 24px;
  text-wrap: pretty;
}
.launch-lines > span {
  display: block;
}
/* the post's picture, set into the plate behind a line of the plate's own ink */
.launch-still {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 2px solid #0b0b12;
  background: #eef0f5;
}
.launch-still > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* the words, on the white with nothing round them */
.launch-words {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.launch-brand .launch-id > b {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}
.launch-mark {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #fff;
}
/* the views, the largest thing on the screen, in the page's head face (./white.css: Reckless; "keep the normal
   font", then "font also"), drawn up close to the words under them as the live page's are. Its own figures, not
   the even-width ones: Reckless's even figures stand apart like type set loose. Reckless keeps about a sixth of
   its size under the figures for the tails of letters they never have, so the line gives most of it back (Sergei
   2026-11-27: "less padding from between here") */
.launch-figure {
  margin-top: 22px;
  margin-bottom: -0.14em;
  font-size: clamp(88px, 10vw, 148px);
  white-space: nowrap;
}
.launch-of {
  margin-top: 10px;
  font-size: 17px;
  line-height: 24px;
  color: rgb(10 10 10 / 0.62);
}
/* the news line and what backs it, one under the other */
.launch-extras {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 22px;
}
.launch-more {
  margin-top: 10px;
  font-size: 14px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
  color: rgb(10 10 10 / 0.6);
}

/* what backs it: a tag set into the page rather than a key standing on it (Sergei 2026-11-30: "make it different
   style form the btns"), so it is clearly a label: no plate and no shadow under it, but a flat well in the
   stone's light, ringed by a thin line of the stone's shade and sunk a cell deep along its top and left, the
   reverse of a key's bevel, its corners stepped off a cell as the plates' are. Its backers' marks are bigger in
   it ("the logog a little bigger") */
.launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 14px 6px 7px;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  background: #eef0f5;
  box-shadow:
    inset 0 0 0 2px #b9bdc9,
    inset 4px 4px 0 #d9dce5;
  clip-path: polygon(
    2px 0,
    calc(100% - 2px) 0,
    calc(100% - 2px) 2px,
    100% 2px,
    100% calc(100% - 2px),
    calc(100% - 2px) calc(100% - 2px),
    calc(100% - 2px) 100%,
    2px 100%,
    2px calc(100% - 2px),
    0 calc(100% - 2px),
    0 2px,
    2px 2px
  );
}
.launch-pill[data-stacked] {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  max-width: 340px;
  padding: 8px 14px 10px;
}
.launch-pill-short {
  display: none;
}
.launch-pill > .launch-up {
  flex: none;
  width: 18px;
  height: auto;
  margin-left: 6px;
}
.launch-backers {
  display: flex;
  gap: 6px;
}
/* a mark, 24 px until Sergei 2026-11-30; four of them side by side a little smaller */
.launch-backer {
  flex: none;
  width: 34px;
  height: 34px;
  object-fit: cover;
  background: #fff;
}
.launch-backers > .launch-backer {
  width: 32px;
  height: 32px;
}

/* the news line, a boast between two laurels; its words dotted under, since they can be hovered. A little bigger,
   leaves and words both, than it was (Sergei 2026-11-30: "here i thik we can also make the leaves/this part a
   little bigger") */
.launch-news {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 600;
  line-height: 24px;
  outline: none;
  cursor: help;
}
/* three pixels a cell (two until Sergei 2026-11-30) */
.launch-laurel {
  flex: none;
  width: 33px;
}
.launch-news-words {
  text-decoration: underline dotted rgb(10 10 10 / 0.5) 1.5px;
  text-underline-offset: 5px;
}
.launch-news:focus-visible .launch-news-words {
  outline: 2px solid #2f55ff;
  outline-offset: 4px;
}
/* X's story, on a plate over the line while it is hovered or focused. Hovered only where there is a real pointer:
   a phone keeps its "hover" at the last spot a finger touched, so after a step key (Sergei 2026-12-02, Jason Zhou
   on to White Circle) the new launch's news line came to sit under the finger and the story opened over the post,
   an empty plate while its picture was still on its way. On a phone a tap on the line opens it, by its focus */
.launch-shot {
  position: absolute;
  z-index: 5;
  left: -8px;
  bottom: calc(100% + 14px);
  width: min(400px, 80vw);
  visibility: hidden;
  pointer-events: none;
}
.launch-shot > img {
  display: block;
  width: 100%;
  height: auto;
}
.launch-news:focus .launch-shot {
  visibility: visible;
}
@media (hover: hover) {
  .launch-news:hover .launch-shot {
    visibility: visible;
  }
}

/* ------------------------------------------------------------ the chips */

.launch-rail {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  margin-top: 48px;
}
.launch-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
/* a key, its mark set in from the frame a few pixels all round (Sergei 2026-11-30: "add some space so the logo
   has a padding"); the pause key is as tall */
.launch-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 12px 0 5px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: inherit;
  cursor: pointer;
}
.launch-chip:hover {
  translate: 0 calc(var(--cell) * -1);
}
.launch-chip:focus-visible,
.launch-pause:focus-visible {
  outline: 2px solid #2f55ff;
  outline-offset: 4px;
}
.launch-chip[aria-selected='true'] {
  --plate: var(--launch-gold);
}
.launch-chip-mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  object-fit: cover;
  background: #fff;
}
.launch-chip-views {
  position: relative;
}
/* the hold, as the chip on show fills from the left in the gold's light, a twentieth at a time */
.launch-chip-fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: #fbe9a6;
}
.launch-chip[aria-selected='true'] > .launch-chip-fill {
  animation: launch-fill var(--launch-hold) steps(20) forwards paused;
}
.launch[data-running] .launch-chip[aria-selected='true'] > .launch-chip-fill {
  animation-play-state: running;
}
@keyframes launch-fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}
.launch-pause {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  padding: 0;
  cursor: pointer;
}
.launch-pause > svg {
  width: 10px;
}
/* the phone's step keys under the launch's words (./launches.ts words): none on a wider screen, where the chips are */
.launch-steps {
  display: none;
}
/* On a phone the chips and the pause key are gone (Sergei 2026-12-01, of a board of them: "this is too complex for
   mobile, lets just add arrow btns (simple)"): two small stone keys step back and on. The chips are only hidden, not
   taken out, since the one on show filling is what moves the stage on until a step key is pressed. The words are kept
   as tall as the tallest launch's on this page (--launch-words, measured by ./launches.ts hold), so the page under
   them is not pushed down and pulled back up each time the stage moves on. The keys stand level with the launch's
   mark and name, at the words' top right, so they never move under a finger and a shorter launch's spare room is at
   the section's foot, not a hole between its words and its keys (2026-12-04 feedback, of the keys at the foot of that
   room: "дырк, … надо как-то получше сделать") */
@media (max-width: 679px) {
  .launch {
    padding-bottom: 40px;
  }
  .launch-rail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    margin: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .launch-words {
    position: relative;
    min-height: var(--launch-words, 0px);
  }
  .launch-pill[data-stacked] {
    flex-direction: row;
    align-items: center;
    padding: 6px 14px;
  }
  .launch-pill[data-stacked] > .launch-pill-long {
    display: none;
  }
  .launch-pill[data-stacked] > .launch-pill-short {
    display: inline;
  }
  .launch-steps {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 12px;
  }
  .launch-step {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    color: inherit;
    cursor: pointer;
  }
  .launch-step > svg {
    width: 10px;
  }
  /* pressed, it goes down onto its shadow, as the post does */
  .launch-step:active {
    translate: var(--cell) var(--cell);
    filter: none;
  }
  .launch-step:focus-visible {
    outline: 2px solid #2f55ff;
    outline-offset: 4px;
  }
}

/* the product's landing breakpoint */
@media (min-width: 680px) {
  .launch {
    padding: 160px 32px 128px;
  }
  .launch-title {
    font-size: clamp(52px, 4.9vw, 72px);
  }
  .launch-lead {
    font-size: 17px;
  }
  .launch-play {
    margin-top: 64px;
  }
}
/* a desk: the post at the left, the words at the right, the pair centred as one (Sergei: "center the content here
   better = a little more right"); the words' column has a fixed width, so the pair stays put while the figure
   counts, and the widest figure (660.6K, about 400px at 144px) runs just past it */
@media (min-width: 1024px) {
  .launch-stage {
    grid-template-columns: minmax(0, 600px) minmax(0, 380px);
    justify-content: center;
    gap: 64px;
  }
  .launch-frame {
    justify-self: end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .launch-chip[aria-selected='true'] > .launch-chip-fill {
    width: 100%;
    animation: none;
  }
}
