/* The front page's scroll moments (index.html; assets/splash/scroll-clips.js).

   Each feature opens with a moment: its heading over a laptop, a phone or the
   recording card, held in place while the visitor scrolls, and the scroll
   moves the clip forward and back. The heading gives way as the screen rises
   to full size; a numbered caption under it says what is happening.

   Without the script, or for a visitor who asks for less motion, nothing is
   held: the heading, the clip's last frame and every caption stand in order
   (the script adds html.fv-sc only when it will drive them). */

.sc-band {
  padding-top: 0;
}
.sc-band.sc-only {
  padding-bottom: 0;
}
.sc {
  position: relative;
}
.sc-pin {
  position: relative;
  padding: 112px 0 72px;
}
.sc-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto 48px;
  padding: 0 32px;
  text-align: center;
}
.sc-head .lede {
  max-width: 720px;
}
.sc-box {
  display: grid;
  place-items: center;
  padding: 0 32px;
}
.sc-stage {
  position: relative;
  width: min(1080px, 100%);
}
.sc-foot {
  margin-top: 40px;
  padding: 0 32px;
}
.sc-say {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sc-say li {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
.sc-say li b {
  margin-right: 0.4em;
  color: var(--ink-3);
  font-weight: 600;
}
.sc-track {
  display: none;
}
.sc + .wrap {
  align-items: center;
  margin-top: 48px;
}

/* ── The laptop: a screen in a thin dark bezel on a slim base ── */
.sc-laptop {
  position: relative;
  width: 100%;
}
.sc-lid {
  position: relative;
  padding: 1.3% 1.3% 1.6%;
  border-radius: 2.2% / 3.4%;
  background: linear-gradient(180deg, #2a2f3a, #14171e 60%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 50px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -30px rgba(74, 163, 255, 0.45);
}
.sc-lid::before {
  /* the camera */
  content: '';
  position: absolute;
  top: 0.55%;
  left: 50%;
  width: 0.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translateX(-50%);
  background: #0b0d12;
}
.sc-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 0.6%;
  overflow: hidden;
  background: #ffffff;
}
.sc-screen img,
.sc-screen video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sc-screen video {
  opacity: 0;
}
.sc-screen.ready video {
  opacity: 1;
}
/* A glass sheen across the screen, very faint. */
.sc-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 38%);
}
.sc-base {
  position: relative;
  width: 114%;
  height: clamp(10px, 1.6vw, 20px);
  margin-left: -7%;
  border-radius: 0 0 18px 18px / 0 0 100% 100%;
  background: linear-gradient(180deg, #c9ced8 0%, #8d94a3 45%, #5d6372 100%);
  box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.8);
}
.sc-base::before {
  /* the thumb notch */
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 15%;
  height: 42%;
  transform: translateX(-50%);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, #7b8190, #a3a9b6);
}

/* ── The phone: the student's page in a dark handset ── */
.sc-phone .sc-stage {
  width: min(340px, 78vw);
}
.sc-handset {
  padding: 3.2%;
  border-radius: 13% / 6%;
  background: linear-gradient(180deg, #2a2f3a, #14171e 60%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 50px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -30px rgba(74, 163, 255, 0.45);
}
.sc-handset .sc-screen {
  aspect-ratio: 390 / 844;
  border-radius: 10.5% / 4.9%;
}

/* ── The recording card: a group's recording, drawn from Demo Mode's data ── */
.wv-card {
  box-sizing: border-box;
  padding: 24px 28px 20px;
  border-radius: 20px;
  background: #ffffff;
  color: #1d1d1f;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 50px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 120px -30px rgba(74, 163, 255, 0.45);
  font-size: 15px;
}
.wv-card[hidden] {
  display: none;
}
.wv-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 16px;
}
.wv-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.wv-group {
  color: #6e6e73;
}
.wv-part {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  background: #f2f2f5;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.wv-part i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c, #0066cc);
}
.wv-wave {
  display: block;
  width: 100%;
  height: 112px;
}
.wv-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: #6e6e73;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.wv-play {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e5ea;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.wv-play i {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #0066cc;
}
.wv-play i::before {
  content: '';
  margin-left: 2px;
  border-left: 9px solid #ffffff;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}
.wv-who-h {
  margin: 14px 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.wv-who {
  display: grid;
  grid-template-columns: max-content minmax(0, 170px) minmax(24px, 1fr) max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.wv-row {
  display: contents;
}
.wv-row > span {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding-right: 12px;
  transition: background-color 0.3s ease;
}
.wv-row > span:first-child {
  padding-left: 8px;
  border-radius: 10px 0 0 10px;
}
.wv-row > span:last-child {
  padding-right: 8px;
  border-radius: 0 10px 10px 0;
}
.wv-row.on > span {
  background: var(--soft);
  font-weight: 700;
}
.wv-face {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}
.wv-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wv-bar b {
  display: block;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--c);
  transform-origin: 0 50%;
  transform: scaleX(var(--w, 0));
}
.wv-meta {
  justify-content: flex-end;
  color: #6e6e73;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wv-row.none .wv-meta {
  color: #b3261e;
  font-weight: 600;
}

/* ══ Held in place, with the script and with motion ══ */
.fv-sc .sc {
  height: var(--sc-len, 420vh);
}
.fv-sc .sc-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  padding: 0;
  overflow: hidden;
}
.fv-sc .sc-head {
  position: absolute;
  top: calc(68px + 7svh);
  right: 0;
  left: 0;
  margin: 0 auto;
  will-change: opacity, transform;
}
.fv-sc .sc-box {
  position: absolute;
  top: 84px;
  right: 0;
  bottom: 120px;
  left: 0;
  padding: 0;
}
.fv-sc .sc-stage {
  width: min(1080px, 90vw, calc((100svh - 228px) * 1.55));
  transform-origin: 50% 0;
  will-change: transform;
}
.fv-sc .sc-phone .sc-stage {
  width: min(340px, 78vw, calc((100svh - 228px) * 0.455));
}
.fv-sc .sc-wave .sc-stage {
  width: min(1000px, 90vw);
}
.fv-sc .sc-foot {
  position: absolute;
  top: calc(100% - 100px);
  right: 0;
  left: 0;
  margin: 0;
}
.fv-sc .sc-say {
  position: relative;
  display: block;
  height: 60px;
}
.fv-sc .sc-say li {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(20px, 2.4vw, 30px);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.45s ease,
    transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.fv-sc .sc-say li.on {
  opacity: 1;
  transform: none;
}
.fv-sc .sc-track {
  display: block;
  width: min(220px, 40vw);
  height: 3px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.fv-sc .sc-track i {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--sky), var(--prf));
}

@media (max-width: 720px) {
  .sc-head,
  .sc-box,
  .sc-foot {
    padding-right: 20px;
    padding-left: 20px;
  }
  .sc-base {
    width: 106%;
    margin-left: -3%;
  }
  .fv-sc .sc {
    height: calc(var(--sc-len, 420vh) * 0.85);
  }
  .fv-sc .sc-stage {
    width: 92vw;
  }
  .fv-sc .sc-phone .sc-stage {
    width: min(300px, 70vw, calc((100svh - 260px) * 0.455));
  }
  .fv-sc .sc-box {
    bottom: 150px;
  }
  .fv-sc .sc-say {
    height: 72px;
  }
  .wv-card {
    padding: 18px 16px 14px;
    border-radius: 16px;
    font-size: 14px;
  }
  .wv-part {
    margin-left: 0;
  }
  .wv-wave {
    height: 84px;
  }
  .wv-who {
    grid-template-columns: max-content minmax(0, 1fr) minmax(24px, 42%);
  }
  .wv-meta {
    display: none !important;
  }
  .wv-row > span {
    min-height: 30px;
  }
  .wv-row > span:nth-child(3) {
    padding-right: 8px;
    border-radius: 0 10px 10px 0;
  }
}
