/* /how-it-works/: on top of site.css, landing.css and info.css. It lives in assets/how/ with the page's iOS screens,
   so it stays closed until the launch like they do (campaign/phases.mjs, LAUNCH_ONLY). Same language as the
   homepage: one warm panel at the top, then open rows with a soft blob of colour behind each phone. */

/* ── the framed iOS screens (Release Studio's iPhone 18 Pro bezel, baked into the images) ── */
.shot { display: block; filter: drop-shadow(0 30px 44px rgba(46,24,56,.18)) drop-shadow(0 4px 10px rgba(46,24,56,.08)); }
.shot img { display: block; width: 100%; height: auto; }

/* ── hero: one wide warm panel; your app and the sitter's phone rise into it ── */
.hw-hero { padding: 8px max(12px, env(safe-area-inset-left, 0px)) 0; }
.hw-panel { position: relative; overflow: hidden; max-width: 1680px; margin: 0 auto; border-radius: 44px;
  background:
    radial-gradient(60% 70% at 80% 100%, color-mix(in srgb, var(--butter) 50%, transparent) 0%, transparent 70%),
    radial-gradient(70% 80% at 0% 0%, #FFFFFF 0%, transparent 60%),
    linear-gradient(160deg, #FFF0E8 0%, var(--peach) 100%); }
.hw-hero-grid { max-width: 1320px; margin: 0 auto; padding-inline: clamp(24px, 5vw, 72px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.hw-hero-copy { display: grid; gap: 22px; justify-items: start; align-content: center; padding-block: 72px 80px; }
.hw-hero h1 { font-size: clamp(44px, 5.6vw, 80px); letter-spacing: -0.045em; line-height: .95; max-width: 11em; }
.hw-hero .lead { max-width: 31em; font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); }
.hw-jump { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hw-jump a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent);
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; box-shadow: 0 0 0 1px var(--line); transition: background .15s; }
.hw-jump a:hover { background: var(--surface); }
.hw-jump b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); font-family: var(--f-display); font-size: 13px; }
.hw-hero-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(8px, 1.4vw, 20px); padding-top: 56px; }
.hw-dev { margin: 0 0 -22%; display: grid; justify-items: center; gap: 16px; width: clamp(220px, 20vw, 300px); animation: hw-rise 1.1s cubic-bezier(.2,.8,.2,1) both; }
.hw-dev.you { margin-bottom: -36%; }
.hw-dev.them { animation-delay: .12s; }
.hw-dev figcaption { order: -1; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); }
.hw-dev.them figcaption { background: var(--mint); color: var(--on-mint); }
.hw-dev .shot { width: 100%; }
.hw-dev.them { position: relative; }
.hw-hero-arrow { position: absolute; width: 78px; right: calc(100% + 2px); top: -18px; rotate: 4deg; z-index: 2; }
@keyframes hw-rise { from { translate: 0 60px; opacity: 0; } to { translate: 0 0; opacity: 1; } }

/* ── the journey: a line with the six numbers on the left, copy and a real screen per step ── */
.hw-journey { padding-block: 88px 24px; }
.hw-steps { list-style: none; margin: 0 auto; padding: 0 max(20px, env(safe-area-inset-left, 0px)); max-width: 1240px; position: relative; display: grid; gap: clamp(64px, 9vw, 128px); }
.hw-steps::before { content: ""; position: absolute; top: 28px; bottom: 28px; left: calc(max(20px, env(safe-area-inset-left, 0px)) + 27px); border-left: 3px dashed color-mix(in srgb, var(--ink) 18%, transparent); }
.hw-step { --tint: var(--butter); position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(28px, 5vw, 72px); align-items: center; scroll-margin-top: 100px; }
.hw-step:nth-child(2), .hw-step:nth-child(4) { --tint: var(--mint); }
.hw-step:nth-child(3) { --tint: #FFD3C4; }
.hw-step:nth-child(6) { --tint: color-mix(in srgb, var(--ink) 14%, var(--bg)); }
.hw-num { align-self: start; position: sticky; top: 110px; z-index: 1; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg); border: 3px solid color-mix(in srgb, var(--ink) 18%, transparent); color: var(--ink); font-family: var(--f-display); font-weight: 900; font-size: 22px; transition: background .3s, color .3s, border-color .3s; }
.hw-step.is-past .hw-num { background: var(--mint); color: var(--on-mint); border-color: var(--mint); }
.hw-step.is-on .hw-num { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.hw-copy { display: grid; gap: 14px; justify-items: start; max-width: 32em; }
.hw-copy h2 { font-size: clamp(32px, 3.6vw, 50px); letter-spacing: -0.035em; line-height: 1; }
.hw-copy p { color: var(--muted); font-size: clamp(16.5px, 1.3vw, 18px); }
.hw-copy p b { color: var(--ink); }
.hw-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.hw-who { font-size: 12.5px !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; color: var(--ink); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.hw-who.phone { background: var(--mint); color: var(--on-mint); box-shadow: none; }
.hw-quick { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; padding: 14px 18px; border-radius: 20px; background: color-mix(in srgb, var(--butter) 45%, var(--bg)); color: var(--ink) !important; font-size: 16px !important; }
.hw-quick svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--butter-label); }
.hw-try a { font-weight: 700; color: var(--ink); }

.hw-stage { position: relative; isolation: isolate; display: flex; justify-content: center; align-items: flex-start; gap: clamp(14px, 2vw, 28px); }
.hw-stage::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -50%; width: min(500px, 104%); aspect-ratio: 1.05;
  border-radius: 52% 48% 46% 54% / 56% 50% 50% 44%; background: var(--tint); }
.hw-step:nth-child(even) .hw-stage::before { border-radius: 46% 54% 58% 42% / 48% 56% 44% 52%; }
.hw-stage .shot { width: clamp(240px, 23vw, 310px); }
.hw-stage .shot.back, .hw-stage .shot.front { width: clamp(190px, 18vw, 250px); }
.hw-stage .shot.back { margin-top: 56px; }

/* ── good to know: three short answers on the page itself ── */
.hw-know { padding-block: 72px 16px; }
.hw-know-wrap { max-width: 1240px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)); display: grid; gap: 28px; }
.hw-know-title { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; }
.hw-know-list { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 56px); }
.hw-know-list div { border-top: 2px solid var(--line); padding-top: 18px; display: grid; gap: 8px; align-content: start; }
.hw-know-list dt { font-family: var(--f-display); font-weight: 800; font-size: 20px; letter-spacing: -0.015em; }
.hw-know-list dd { margin: 0; color: var(--muted); }
.hw-know-more { margin: 0; }

/* the final call: as wide as the panels */
.cta .wrap { max-width: 1352px; }
.cta-panel { border-radius: 44px; padding-inline: clamp(28px, 6vw, 96px); }

@media (prefers-color-scheme: dark) {
  .shot { filter: drop-shadow(0 30px 50px rgba(0,0,0,.5)); }
  .hw-panel { background:
    radial-gradient(60% 70% at 80% 100%, rgba(255,224,138,.14) 0%, transparent 70%),
    radial-gradient(70% 80% at 0% 0%, #3B2147 0%, transparent 60%),
    linear-gradient(160deg, #2A1A31 0%, #24142B 100%); }
  .hw-step { --tint: color-mix(in srgb, var(--butter) 14%, var(--bg)); }
  .hw-step:nth-child(2), .hw-step:nth-child(4) { --tint: color-mix(in srgb, var(--mint) 16%, var(--bg)); }
  .hw-step:nth-child(3) { --tint: color-mix(in srgb, var(--coral) 16%, var(--bg)); }
  .hw-step:nth-child(6) { --tint: color-mix(in srgb, #BCA9C2 14%, var(--bg)); }
  .hw-quick { background: color-mix(in srgb, var(--butter) 12%, var(--bg)); }
  .hw-quick svg { color: var(--butter); }
}

/* ── smaller screens ── */
@media (max-width: 1000px) {
  .hw-hero-grid { grid-template-columns: 1fr; }
  .hw-hero-copy { padding-block: 44px 8px; }
  .hw-hero-stage { padding-top: 16px; }
  .hw-dev { width: min(230px, 40vw); margin-bottom: -40%; }
  .hw-dev.you { margin-bottom: -52%; }
  .hw-step { grid-template-columns: 56px minmax(0, 1fr); row-gap: 28px; }
  .hw-stage { grid-column: 2; max-height: clamp(400px, 72vw, 560px); overflow-x: visible; overflow-y: clip;
    -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent 100%); mask-image: linear-gradient(to bottom, #000 68%, transparent 100%); }
  .hw-stage::before { width: min(420px, 90%); }
  .hw-stage .shot { width: min(300px, 60vw); }
  .hw-stage .shot.back, .hw-stage .shot.front { width: auto; flex: 0 1 46%; max-width: 240px; }
  .hw-know-list { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hw-hero { padding-top: 4px; }
  .hw-panel { border-radius: 32px; }
  .hw-hero-copy { gap: 18px; padding: 36px 4px 4px; }
  .hw-jump a { font-size: 13.5px; padding-right: 12px; }
  .hw-dev figcaption { font-size: 11.5px; }
  .hw-hero-arrow { width: 54px; top: -20px; }
  .hw-journey { padding-top: 56px; }
  .hw-steps { gap: 64px; }
  .hw-steps::before { left: calc(max(20px, env(safe-area-inset-left, 0px)) + 19px); }
  .hw-step { grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; row-gap: 24px; }
  .hw-num { width: 40px; height: 40px; font-size: 17px; border-width: 2.5px; top: 92px; }
  .hw-stage { grid-column: 1 / -1; max-height: 380px; }
  .hw-stage .shot { width: min(260px, 66vw); }
  .hw-quick { padding: 12px 14px; font-size: 15px !important; }
  .hw-know { padding-top: 48px; }
  .cta .wrap { padding-inline: max(12px, env(safe-area-inset-left, 0px)); }
  .cta-panel { border-radius: 32px; padding: 32px 22px; }
}
