/* Families: a recording of a child's phone beside the steps it shows, then the child features
   in a row that swipes sideways. Kept in its own file so it doesn't collide with styles.css. */
.fam-split { align-items: center; }
.fam-phone { max-width: 330px; width: 100%; margin: 0 auto; }
.fam-phone .phone-full { max-width: 300px; background: #101114; border-color: #101114; box-shadow: 0 30px 60px -20px rgba(5, 10, 30, .55); }
.fam-caption { margin: 14px 0 0; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); }
.fam-note { margin-top: 20px; font-size: 16px; color: var(--muted); }

/* The steps the recording goes through. The one on screen now is lit, and each one jumps there. */
.fam-story { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; counter-reset: fam; }
.fam-story li { counter-increment: fam; }
.fam-story button {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; line-height: 1.45; color: var(--ink2);
  background: transparent; border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px 14px 58px;
  transition: background .3s, border-color .3s, color .3s;
}
.fam-story button::before {
  content: counter(fam); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  background: var(--line); color: var(--muted); transition: background .3s, color .3s;
}
.fam-story b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 2px; }
.fam-story button:hover { border-color: var(--accent); }
.fam-story button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.fam-story li.on button { background: var(--accent-tint); border-color: var(--accent); }
.fam-story li.on button::before { background: var(--accent-fill); color: #fff; }
/* Without the script, or with less motion, the steps are a plain list. */
.no-story .fam-story button { cursor: default; }
.no-story .fam-story button:hover { border-color: var(--border); }

/* Made for a teenager's phone: cards that swipe sideways */
.fam-more { margin-top: 96px; }
.fam-h3 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; }
.fam-hint { color: var(--muted); margin: 0; }
.kids-scroll { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-top: 36px; padding: 4px 0 8px; }
.kids-scroll::-webkit-scrollbar { display: none; }
.kids-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 24px; }
.kids { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.kid { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 22px 24px; overflow: hidden; }
.kid .phone { max-width: 230px; border-width: 9px; }
.kid .phone img { display: block; width: 100%; aspect-ratio: 860 / 1100; object-fit: cover; object-position: top; border-radius: 34px 34px 0 0; }
.kid-tag { display: inline-block; margin: 18px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--success-tint); color: var(--success); }
.kid h4 { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; color: var(--ink); }
.kid p:last-child { margin: 0; font-size: 15.5px; line-height: 1.5; color: var(--ink2); }

@media (max-width: 960px) { .kid { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 860px) {
  .fam-phone { margin-top: 8px; }
  .fam-phone .phone-full { max-width: 270px; }
}
@media (max-width: 700px) {
  .fam-story { margin-top: 22px; }
  .fam-story button { font-size: 15px; padding: 12px 14px 12px 52px; }
  .fam-story button::before { left: 14px; top: 12px; }
  .fam-story b { font-size: 16px; }
  .fam-more { margin-top: 64px; }
  .kids-scroll { margin: 28px calc(-1 * var(--gutter)) 0; scroll-padding: 0 var(--gutter); }
  .kids { padding: 0 var(--gutter); gap: 14px; width: max-content; }
  .kid { flex: 0 0 auto; width: min(78vw, 320px); scroll-snap-align: center; padding: 20px 18px; }
  .kid .phone { max-width: 210px; }
}

/* Phones and narrow screens: the recording comes straight after the opening words, so the steps
   it lights up sit just under it. */
@media (max-width: 860px) {
  .fam-split { gap: 0; }
  .fam-split .split-copy { display: contents; }
  .fam-split .eyebrow, .fam-split h2, .fam-split .split-copy > p:not(.fam-note) { order: 1; }
  .fam-split .fam-phone { order: 2; margin: 16px auto 0; }
  .fam-split .fam-story { order: 3; margin-top: 32px; }
  .fam-split .fam-note { order: 4; }
}
