/* FocusCap project page: the scenes of its sections (case-kit.css lays
 * the sections out and walks their steps; see its header).
 *
 * Unlike the Legends page, the pictures here are not drawn in HTML: they
 * are the product itself. The Mac app's windows were captured from
 * FocusCap at 2x, with demo recordings made for this page; the share page
 * and focuscap.co from the browser. What only exists on screen while
 * recording (the menu bar popover, the bar, the camera bubble, the upload
 * card, the meeting toast) comes from FocusCap's Figma design system, laid
 * on the right half of a Mac desktop at Figma's own size, so the canvas
 * pixels of those scenes are the design's pixels. Sizes are canvas pixels;
 * positions on a window are percentages of the window. */

.cs {
  --fc-lime: #c6eb4f;
  --fc-ink: #1b1b1b;
}

/* ---------------------------------------------------------------- hero */

/* The app's window and the popover over the dithered desktop, crisp. With
 * the live picture they wait until it has developed, then rise in. */
.fc-hero__app {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.fc-hero__app img {
  display: block;
  width: 100%;
  height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .js .fc-hero.is-live .fc-hero__app {
    opacity: 0;
    transform: translateY(16px);
  }

  .js .fc-hero.is-live.is-developed .fc-hero__app {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 1.1s var(--ease-out);
  }
}

/* ---------------------------------------------------------------- pieces */

/* A window captured from the app: its corners are already cut. */
.fc-win {
  position: absolute;
  display: block;
  height: auto;
  border-radius: 1.72% / 2.75%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 30px 70px -28px rgba(10, 10, 14, 0.55);
}

/* A popover from the design system, with its own soft shadow. */
.fc-pop {
  position: absolute;
  display: block;
  width: 487px;
  height: auto;
}

/* A window that carries marks: the marks are placed in % of it. */
.fc-shot {
  position: absolute;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 30px 70px -28px rgba(10, 10, 14, 0.55);
}

/* The window sets the size; pictures over it (another state of the same
 * window, a menu) are placed on it. */
.fc-shot > img {
  display: block;
  width: 100%;
  height: auto;
}

.fc-shot > img + img {
  position: absolute;
  left: 0;
  top: 0;
}

/* A mark: the app's lime ring around one part, the rest of the window
 * dimmed while its step is the current one. */
.fc-hl {
  position: absolute;
  z-index: 3;
  border-radius: 10px;
  opacity: 0;
  box-shadow: 0 0 0 3px var(--fc-lime), 0 0 0 2400px rgba(8, 8, 10, 0.42);
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.fc-hl.is-now {
  opacity: 1;
}

.fc-hl--dot {
  border-radius: 50%;
}

/* A second mark in the same step does not darken the window twice. */
.fc-feedback__hl-1b {
  box-shadow: 0 0 0 3px var(--fc-lime);
}

/* The camera: a window zoomed to the part a step is about (translate in %
 * of the window, then scale from its top left). */
.fc-cam {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 18px;
}

.fc-cam > .fc-shot {
  inset: 0;
  border-radius: 0;
  box-shadow: none;
  transform-origin: 0 0;
  transform: translate(var(--tx, 0%), var(--ty, 0%)) scale(var(--s, 1));
  transition: transform 0.9s var(--ease);
}

/* One picture per step, the current one shown (the first before the
 * steps begin). */
.fc-piece {
  position: absolute;
  inset: 24px 28px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--fc-ink);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 30px 70px -28px rgba(10, 10, 14, 0.55);
}

.fc-piece > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.cs:not(.st-1) .fc-piece > img[data-s="1"],
.fc-piece > img.is-now {
  opacity: 1;
}

/* ---------------------------------------------------------------- 01 · The product */

.fc-glance__lib {
  left: 0;
  top: 150px;
  width: 780px;
}

.fc-glance__web {
  left: 564px;
  top: 432px;
  width: 560px;
}

.fc-glance__web .win__body {
  flex: none;
  height: 350px;
}

.fc-glance__pop {
  left: 744px;
  top: 0;
  width: 380px;
}

.fc-glance__cap-a { left: 520px; top: 22px; }
.fc-glance__cap-b { left: 0; top: 104px; }
.fc-glance__cap-c { left: 564px; top: 388px; }

/* ---------------------------------------------------------------- the desktop (03, 09, 10) */

/* The right half of the Mac desktop from FocusCap's Figma, at its own size:
 * the menu bar's FocusCap icon sits at x 796. */
.fc-desk-box {
  background: #6f9bc4;
}

.fc-desk__bg,
.fc-desk__bar {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 1124px;
}

.fc-desk__bg {
  height: 822px;
}

.fc-desk [data-s] {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}

/* Each piece is on screen only during its own step. */
.fc-desk [data-s].is-now {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- 03 · Record */

.fc-rec__pop {
  left: 553px;
  top: 36px;
}

.fc-rec__bubble {
  position: absolute;
  left: 792px;
  top: 452px;
  width: 296px;
}

.fc-rec__rbar {
  position: absolute;
  left: 409px;
  top: 728px;
  width: 306px;
}

/* The bubble and the bar stay while the bar is pointed at. */
.fc-rec.st-3:not(.st-4) .fc-rec__bubble,
.fc-rec.st-3:not(.st-4) .fc-rec__rbar {
  opacity: 1;
  transform: none;
}

.fc-rec__ring {
  position: absolute;
  left: 404px;
  top: 726px;
  width: 316px;
  height: 60px;
  border-radius: 16px;
  box-shadow: 0 0 0 3px var(--fc-lime), 0 0 26px 4px rgba(198, 235, 79, 0.55);
}

.fc-rec__cards {
  position: absolute;
  left: 60px;
  top: 520px;
  width: 348px;
  height: 246px;
}

.fc-rec__card {
  position: absolute;
  inset: 0;
  display: block;
  width: 348px;
  opacity: 0;
}

/* Stopping: it uploads, it transcribes, it is ready. */
.fc-rec__cards.is-now .fc-rec__card--1 { animation: fc-card-a 3.6s ease both; }
.fc-rec__cards.is-now .fc-rec__card--2 { animation: fc-card-b 3.6s ease both; }
.fc-rec__cards.is-now .fc-rec__card--3 { animation: fc-card-c 3.6s ease both; }

@keyframes fc-card-a {
  0%, 2% { opacity: 0; }
  8%, 34% { opacity: 1; }
  40%, 100% { opacity: 0; }
}

@keyframes fc-card-b {
  0%, 34% { opacity: 0; }
  40%, 66% { opacity: 1; }
  72%, 100% { opacity: 0; }
}

@keyframes fc-card-c {
  0%, 66% { opacity: 0; }
  72%, 100% { opacity: 1; }
}

/* ---------------------------------------------------------------- 04 · Library */

.fc-lib__shot {
  left: 32px;
  top: 80px;
  width: 1060px;
}

.fc-shot > .fc-lib__search {
  left: 36.72%;
  top: 2%;
  width: 32.03%;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.fc-lib__ai {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.fc-lib.st-2:not(.st-3) .fc-lib__search,
.fc-lib.st-3 .fc-lib__ai {
  opacity: 1;
}

.fc-lib__hl-tabs { left: 7%; top: 11.4%; width: 32.6%; height: 6.4%; }
.fc-lib__hl-search { left: 38.6%; top: 18.4%; width: 28.4%; height: 6%; }
.fc-lib__hl-ai { left: 66.2%; top: 18.4%; width: 31.4%; height: 26.8%; }

/* ---------------------------------------------------------------- 05 · Share */

.fc-share .fc-cam {
  left: 32px;
  top: 80px;
  right: auto;
  bottom: auto;
  width: 1060px;
  height: 662.5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 30px 70px -28px rgba(10, 10, 14, 0.55);
}

.fc-share.st-1 .fc-share__shot { --s: 1.75; --tx: -75%; --ty: -27%; }
.fc-share.st-2 .fc-share__shot { --s: 1.75; --tx: -75%; --ty: -75%; }
.fc-share.st-3 .fc-share__shot { --s: 1.75; --tx: -75%; --ty: 0%; }

.fc-share__hl-1 { left: 69.2%; top: 30.6%; width: 28.4%; height: 27.6%; }
.fc-share__hl-2 { left: 69.2%; top: 59.2%; width: 28.4%; height: 31%; }
.fc-share__hl-3 { left: 67.6%; top: 11.8%; width: 30.2%; height: 6.6%; }

/* ---------------------------------------------------------------- 06 · Feedback */

.fc-feedback .fc-cam {
  left: 32px;
  top: 80px;
  right: auto;
  bottom: auto;
  width: 1060px;
  height: 662.5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 30px 70px -28px rgba(10, 10, 14, 0.55);
  transition: opacity 0.5s ease;
}

.fc-feedback.st-1 .fc-feedback__shot { --s: 1.6; --tx: 0%; --ty: -60%; }
.fc-feedback.st-2 .fc-feedback__shot { --s: 1.6; --tx: -32%; --ty: -60%; }

.fc-feedback__hl-1 { left: 26.1%; top: 68.2%; width: 2.6%; height: 4.4%; }
.fc-feedback__hl-1b { left: 8.6%; top: 93.6%; width: 5.4%; height: 4.8%; }
.fc-feedback__hl-2 { left: 41.9%; top: 88.2%; width: 19.2%; height: 5.4%; }

.fc-feedback__web {
  left: 62px;
  top: 64px;
  width: 1000px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.8s var(--ease);
}

.fc-feedback__web .win__body {
  flex: none;
  height: 625px;
}

.fc-feedback.st-3 .fc-cam {
  opacity: 0;
}

.fc-feedback.st-3 .fc-feedback__web {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- 07, 08 · Tools */

.fc-tools__canvas {
  --w: 1180;
  --h: 1010;
}

/* ---------------------------------------------------------------- 09 · Meetings */

.fc-meet__pop-1,
.fc-meet__pop-3 {
  left: 553px;
  top: 36px;
}

.fc-meet__toast {
  position: absolute;
  left: 718px;
  top: 54px;
  width: 390px;
}

.fc-desk .fc-meet__dim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 10, 0.36);
  transform: none;
}

.fc-meet__modal {
  position: absolute;
  left: 155px;
  top: 214px;
  width: 814px;
}

/* ---------------------------------------------------------------- 10 · Screenshots */

.fc-shots__pop {
  left: 553px;
  top: 36px;
}

.fc-desk .fc-shots__app {
  left: 40px;
  top: 96px;
  width: 1044px;
}

/* ---------------------------------------------------------------- 11, 12 · focuscap.co */

.fc-site__canvas {
  --h: 744;
}

.fc-site__win {
  left: 0;
  top: 0;
  width: 1124px;
}

.fc-site__body {
  flex: none;
  height: 702.5px;
}

.fc-site__body > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
}

.fc-site__body > img[data-s] {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.fc-site__body > img.is-now {
  opacity: 1;
}

/* ---------------------------------------------------------------- 13 · Design system */

/* Figma's own canvas, dark like the design system file. */
.fc-figma-box {
  background: #1e1e1e;
}

.fc-figma {
  background: #1e1e1e;
}

.fc-figma > img {
  position: absolute;
  display: block;
  height: auto;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease);
}

.fc-figma__pops { left: 32px; top: 40px; width: 1060px; }
.fc-figma__cards { left: 32px; top: 236px; width: 1060px; }
.fc-figma__cams { left: 312px; top: 34px; width: 500px; }

.fc-figma__label {
  position: absolute;
  left: 32px;
  top: 22px;
  color: #a6a6a6;
  font: 500 15px/1 var(--sans);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.fc-ds:not(.st-1) .fc-figma [data-s="1"],
.fc-figma .is-now {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------- 14 · Tech */

.fc-arch { position: absolute; inset: 24px; display: grid; grid-template-columns: 1fr 210px; gap: 16px; font-family: var(--sans); }
.fc-arch__layers { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)) auto; gap: 12px; }
.fc-arch__l { display: grid; grid-template-columns: 116px 1fr; gap: 12px; align-items: stretch; }
.fc-arch__l > b { display: flex; align-items: center; padding: 0 12px; background: #000; color: #fff; font: 600 13px/1.25 var(--sans); }
.fc-arch__row { display: grid; gap: 10px; }
.fc-arch__box { padding: 14px; background: #fff; box-shadow: 0 0 0 1px #e1e1e1; }
.fc-arch__box b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.fc-arch__box b .ic { color: #5d8f00; font-size: 18px; }
.fc-arch__box span { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.fc-arch__mono { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #f4fbe0; box-shadow: inset 3px 0 0 #9dd600; font-size: 14px; line-height: 1.45; color: #45454c; }
.fc-arch__mono .ic { flex: none; color: #5d8f00; font-size: 20px; }
.fc-arch__side { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #fff; box-shadow: 0 0 0 1px #e1e1e1; }
.fc-arch__side h6 { margin: 0 0 4px; font: 600 13px/1.2 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.fc-arch__side span { padding: 9px 10px; background: #f5f5f5; font-size: 14px; }

/* ---------------------------------------------------------------- 15 · Gallery */

/* Three columns of real screens drifting past each other; a strip to swipe
 * on a phone. */
.case-gallery {
  margin: 140px auto 0;
}

.case-gallery__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(680px, 100% - 2 * var(--gutter));
  margin: 0 auto;
}

.case-gallery__title {
  margin: 20px 0 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.case-gallery__sub {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.fc-wall {
  position: relative;
  margin-top: 28px;
}

.fc-wall__cols {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px var(--gutter) 24px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.fc-wall__cols::-webkit-scrollbar {
  display: none;
}

.fc-wall__col {
  display: contents;
}

.fc-wall__card {
  flex: none;
  width: min(84vw, 520px);
  overflow: hidden;
  border-radius: 10px;
  background: var(--fc-ink);
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.07), 0 20px 40px -26px rgba(16, 24, 40, 0.4);
  scroll-snap-align: start;
}

.fc-wall__card img {
  display: block;
  width: 100%;
  height: auto;
}

@media (min-width: 1024px) {
  .case-gallery__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 40px;
    width: auto;
    max-width: 1800px;
    padding: 0 clamp(24px, 4vw, 72px);
  }

  .case-gallery__head .tag {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .case-gallery__title {
    font-size: clamp(30px, 1.15vw + 2.3vh, 46px);
  }

  .case-gallery__sub {
    margin: 0 0 6px;
  }

  .fc-wall {
    height: min(88vh, 980px);
    margin-top: 40px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  }

  .fc-wall__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    overflow: visible;
    max-width: 1840px;
    margin: 0 auto;
    padding: 0 clamp(24px, 4vw, 72px);
  }

  .fc-wall__col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    transform: translateY(var(--y));
  }

  .fc-wall__card {
    width: auto;
    border-radius: 14px;
  }

  .fc-wall.is-in .fc-wall__col {
    animation: fc-drift 16s ease-in-out infinite alternate;
    animation-delay: calc(var(--i) * -3.4s);
  }
}

@keyframes fc-drift {
  from { transform: translateY(var(--y)); }
  to { transform: translateY(calc(var(--y) + var(--dy))); }
}

/* ---------------------------------------------------------------- the numbers, each leading to its section */

.case-numbers .stat__link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.case-numbers .stat__go {
  margin-left: auto;
  padding-left: 16px;
  color: var(--quiet);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition: color 0.2s, transform 0.3s var(--ease-out);
}

.case-numbers .stat__link:hover .stat__go,
.case-numbers .stat__link:focus-visible .stat__go {
  color: var(--ink);
  transform: translateX(3px);
}

@media (max-width: 899px) {
  .case-numbers .stat__go {
    display: none;
  }
}

/* ---------------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  .fc-wall.is-in .fc-wall__col {
    animation: none;
  }

  /* The upload card shows where it ends: ready. */
  .fc-rec__cards.is-now .fc-rec__card--1,
  .fc-rec__cards.is-now .fc-rec__card--2 {
    animation: none;
    opacity: 0;
  }

  .fc-rec__cards.is-now .fc-rec__card--3 {
    animation: none;
    opacity: 1;
  }
}
