/* The visual sections (owner, 2026-11-04: "widgets visuals"): How it works as three picture cards
   (swipeable on a phone), every child on a paper path, One new sound at a time as four method
   tiles, the night tabs, the friend row's call to action and the phone's sticky Print bar. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg use { fill: none; }
.badge svg, .rows svg, .chips svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* How it works: picture cards with a short caption. */
.how-cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 78%); gap: 14px; margin: 16px calc(-1 * var(--gutter)) 0;
  padding: 6px var(--gutter) 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain;
}
.how-cards:focus-visible { outline-offset: -3px; }
.how-card { scroll-snap-align: start; padding: 14px 14px 16px; display: grid; gap: 12px; }
.how-card h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.15rem; }
.step-no {
  flex: none; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--card); box-shadow: 0 0 0 3px var(--honey), 0 4px 0 3px var(--honey-edge); font: 800 1.1rem/1 var(--display);
}
.how-pic { position: relative; height: 210px; border-radius: 16px; background: #ead9b680; overflow: hidden; }
.how-guide { position: absolute; right: 6px; bottom: 4px; height: 70%; width: auto; filter: drop-shadow(0 8px 6px rgba(58, 42, 28, .3)); }
.how-book, .how-art { position: absolute; left: 14px; top: 16px; width: 46%; transform: rotate(-4deg); }
.how-book { height: auto; background: var(--page); border-radius: 3px; box-shadow: 0 0 0 1px rgba(58, 42, 28, .14), 0 10px 14px -8px rgba(58, 42, 28, .5); }
.how-art { padding: 4px; width: 52%; top: 30px; aspect-ratio: 220 / 160; }
.how-art img, .how-art svg { width: 100%; height: 100%; }
.mini-phone {
  position: absolute; left: 14px; top: 14px; width: 54%; padding: 10px 8px; border-radius: 16px; background: var(--card);
  border: 4px solid #2a1f15; display: grid; gap: 5px; font: 800 .62rem/1.15 var(--sans); transform: rotate(-3deg);
}
.mini-phone p { margin: 0; }
.mp-q { font: 800 .72rem/1.15 var(--display); margin-bottom: 2px !important; }
.mp-tap { padding: 5px 6px; border-radius: 8px; box-shadow: inset 0 0 0 1.5px var(--line); }
.mp-tap.on { background: var(--ink); color: var(--card); box-shadow: none; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin: 4px 0 0; padding: 8px 14px 8px 10px; border-radius: 999px;
  background: var(--sage-wash); color: var(--sage-ink); font-weight: 800; box-shadow: 0 2px 0 #c9dcd4;
}

/* Every child at their own step: three children on a paper path. */
.kids { position: relative; margin-top: 34px; }
.kids h3 { margin-bottom: 6px; }
.trail { position: absolute; left: 0; right: 0; top: 64px; width: 100%; height: 70px; z-index: -1; }
.trail path { fill: none; stroke-linecap: round; }
.trail .draw { stroke: #d9c29a; stroke-width: 12; }
.trail .dots { stroke: var(--card); stroke-width: 2.5; stroke-dasharray: 2 9; }
.kid-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; margin-top: 4px; }
.kid-path li { display: grid; justify-items: center; gap: 6px; }
.kid-path li:nth-child(2) { margin-top: 28px; }
.age { padding: 3px 10px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font: 800 .82rem/1.3 var(--sans); color: var(--muted); }
.kid { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; font: 800 1.5rem/1 var(--display); color: var(--ink); box-shadow: 0 0 0 4px var(--card), 0 6px 0 4px #e6d3ae; }
.k1 { background: #e9b8a0; } .k2 { background: #9cc2b5; } .k3 { background: var(--honey); }
.kid-path b { font: 800 .98rem/1.25 var(--sans); }
.kids-cap { margin: 14px 0 0; color: var(--muted); text-align: center; }

/* One new sound at a time: four method tiles. */
.method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.method li { padding: 12px 12px 14px; display: grid; gap: 10px; align-content: start; }
.method p { margin: 0; font-weight: 800; line-height: 1.3; }
.m-pic { height: 92px; display: flex; align-items: center; justify-content: center; gap: 5px; border-radius: 14px; background: #ead9b680; }
.tile { display: grid; place-items: center; width: 34px; height: 40px; border-radius: 8px; background: var(--page); box-shadow: 0 3px 0 var(--line-deep); font: 800 1.3rem/1 var(--book); }
.tile.new { box-shadow: 0 0 0 3px var(--honey), 0 4px 0 3px var(--honey-edge); }
.m-page { padding: 14px 12px; background: var(--page); border-radius: 4px; font: 700 1.05rem/1.2 var(--book); box-shadow: 0 6px 10px -6px rgba(58, 42, 28, .5); transform: rotate(-2deg); }
.m-card { display: grid; place-items: center; width: 50px; height: 62px; border-radius: 8px; background: var(--page); font: 800 1.3rem/1 var(--book); box-shadow: 0 3px 0 var(--line-deep); }
.m-card small { font: 700 .62rem/1 var(--sans); color: var(--muted); }
.m-say { padding: 6px 9px; border-radius: 12px 12px 12px 3px; background: var(--sage-wash); color: var(--sage-ink); font: 800 .78rem/1.2 var(--sans); }
.m-art { height: 84px; width: auto; aspect-ratio: 220 / 160; padding: 0; background: transparent; box-shadow: none; }
.m-art img, .m-art svg { width: 100%; height: 100%; }

/* The night tabs. */
.nights { margin-top: 22px; padding: 16px; }
.night-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 16px; background: #ead9b6; margin-bottom: 14px; }
.night-tabs button {
  flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer;
  font: 800 1rem/1 var(--sans); color: var(--muted);
}
.night-tabs [aria-selected=true] { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 var(--line-deep); }
.night-panel { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; }
.night-panel + .night-panel { margin-top: 18px; }
.night-tabs:not([hidden]) ~ .night-panel { margin-top: 0; }
.night-panel .phone { width: 132px; }
.night-panel .phone img { border-width: 5px; border-radius: 20px; }
.night-body h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mins { padding: 4px 12px; border-radius: 999px; background: var(--honey); color: var(--ink); font: 800 1.05rem/1.2 var(--sans); box-shadow: 0 3px 0 var(--honey-edge); }
.mins b { font-size: 1.35rem; }
.rows { display: grid; gap: 8px; }
.rows li { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.rows svg { color: var(--clay-ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chips li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font: 800 .9rem/1.2 var(--sans); }
.chips svg { width: 18px; height: 18px; color: var(--sage-ink); }
.every-step { margin-top: 12px; }
.every-step summary { cursor: pointer; min-height: 44px; display: inline-flex; align-items: center; font-weight: 800; color: var(--clay-ink); text-decoration: underline; text-underline-offset: 3px; }
.cta-again { margin: 22px 0 0; }

/* The phone's Print bar: only under 760px, only once the hero is gone (js/cta.js). */
.sticky-cta { display: none; }
@media (max-width: 759px) {
  .sticky-cta {
    display: flex; justify-content: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fbf4e4f2; box-shadow: 0 -1px 0 var(--line), 0 -10px 20px -14px rgba(58, 42, 28, .5);
    transform: translateY(110%); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s;
  }
  .sticky-cta .button { width: 100%; max-width: 420px; }
  /* Hidden means not painted at all, not just slid below the screen edge. */
  .sticky-cta[data-show] { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
}

@media (min-width: 760px) {
  .how-cards { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 18px 0 0; padding: 6px 0 18px; overflow: visible; }
  .how-pic { height: 230px; }
  .trail { top: 54px; height: 90px; }
  .kid-path { max-width: 760px; margin: 0 auto; }
  .kid { width: 78px; height: 78px; }
  .kids-cap { margin-top: 18px; }
  .method { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .nights { padding: 24px 28px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; column-gap: 40px; align-items: start; }
  .night-tabs, .night-panel, .every-step { grid-column: 1; }
  .chips { grid-column: 2; grid-row: 1 / span 8; align-self: center; flex-direction: column; align-items: stretch; gap: 10px; margin: 0; }
  .chips li { font-size: 1rem; padding: 10px 14px 10px 10px; }
  .night-tabs { max-width: 420px; }
  .night-panel { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .night-panel .phone { width: 220px; }
  .night-body h3 { font-size: 1.6rem; }
  .rows { gap: 12px; }
  .rows li { font-size: 1.2rem; }
  .rows svg { width: 26px; height: 26px; }
}
.motion [data-reveal=cutout]:not([data-revealed]) { opacity: 0; }
.motion .sky[data-reveal]:not([data-revealed]) { clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); }
