/* How it works: the easy-peasy page. Only what this page needs on top of base, pea2 and next. */

/* Hero */
/* a little smaller than other heroes, so the buttons and price pill show on a laptop screen */
.how-hero__pea { width: clamp(140px, 16vw, 196px); }
.how-hero .kicker { margin-top: 8px; }
.how-hero h1 { margin-top: 14px; }
.how-hero .lede { max-width: 32em; text-wrap: balance; }
/* Desktop breaks the two-part ledes at the full stop; phones let them wrap */
@media (max-width: 600px) { .how-br { display: none; } }
.how-hero .cta-row { margin-top: 26px; }
.how-hero__own { margin-top: 18px; }

/* Section rhythm: the setup follows the hero closely, and the gaps between
   sections stay close to Home's so the page keeps its momentum */
.how-plant { padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(40px, 5vw, 64px); }
.how-plant .shead .lede { max-width: 32em; text-wrap: balance; }

/* What to have ready: three things, close under the animation */
.how-ready { padding-top: clamp(36px, 5vw, 64px); }
.how-ready .needs { margin-top: 38px; }
.needs li a { font-weight: 600; text-underline-offset: 3px; }
.how-ready__note { text-align: center; margin-top: 8px; }
.how-ready__note .okline { margin-top: 18px; max-width: 620px; border-radius: 20px; }

/* The video: "Watch a day with Pea" lands on #video (the player itself) */
.how-film { padding-top: 0; padding-bottom: clamp(56px, 7vw, 80px); }
.how-film__frame { margin-top: 38px; }
#video { scroll-margin-top: calc(var(--nav-h) + 18px); }
/* Phones: the progress dots get their own full-width row, so the controls never run off the edge */
@media (max-width: 640px) {
  .how-film .pf-bar { flex-wrap: wrap; justify-content: center; row-gap: 12px; }
  .how-film .pf-dots { flex: 1 0 100%; }
  .how-film .pf-dots i { flex: 1 1 0; width: auto; }
  .how-film .pf-bigplay { bottom: calc(60px + 4%); }
}

/* Like having a brilliant assistant (the Ask animation) */
.how-ask { padding-top: clamp(56px, 7vw, 80px); padding-bottom: clamp(40px, 5vw, 64px); }
.how-ask .shead .lede { max-width: 32em; text-wrap: balance; }
.how-ask .shead .lede b { color: var(--ink); }

/* ---------- Your morning, sorted (moved from Home) ---------- */
.how-card { padding-block: clamp(28px, 4vw, 48px) 0; }
.how-today { max-width: 1040px; margin-inline: auto; }
.how-today .today-copy__h { margin-top: 14px; font-weight: 800; font-size: clamp(34px, 4.4vw, 54px); line-height: 1; letter-spacing: -.035em; }
.how-today .today-copy p { margin-top: 12px; color: var(--muted); font-size: 17px; }
.how-today .today-copy p + p { margin-top: 10px; }
.how-today .today-copy p b { color: var(--ink); }

/* The level line: "Busy Pea" with its streak chip, the bar under it */
.how-card .today__lvl { min-width: 0; }
.how-card .today__lvlrow { display: flex; align-items: center; justify-content: flex-end; gap: .55em; white-space: nowrap; }
.how-card .today__streak { display: inline-flex; align-items: center; gap: .3em; padding: .3em .65em .3em .45em; border-radius: 999px; background: var(--brass-soft); color: var(--brass); font-weight: 800; font-size: .92em; line-height: 1; }
.how-card .today__streak svg { width: 1.1em; height: 1.1em; flex: none; }
.how-card .today__bar { margin-top: .5em; }
.how-card .today__bar i { width: 72%; transform-origin: 0 50%; }

/* Rows: one ticked, the rest waiting */
.how-card .trow--ticked .trow__tick { background: var(--pea-hi); border-color: var(--pea-hi); }
.how-card .trow--ticked .trow__tick svg { opacity: 1; }

/* Badges, each with its name under it; the dashed one is the next to earn */
.how-card .today__badges { gap: .9em; align-items: flex-start; }
.how-card .today__blabel { align-self: center; }
.how-card .today__badges .tbdg { display: flex; flex-direction: column; align-items: center; gap: .35em; min-width: 3.4em; }
/* a fixed size, so the names read on a laptop too (the tray's own type is tiny) */
.how-card .tbdg b { font-size: 10.5px; font-weight: 700; line-height: 1.1; color: var(--muted); white-space: nowrap; }
.how-card .tbdg--next b { color: var(--muted); opacity: .75; }
.how-card .bdg svg { width: 1.25em; height: 1.25em; }

/* A little life as the card scrolls in: the rows settle one by one, the bar fills, the badges follow */
.how-card .today.rv .trow { opacity: 0; transform: translateY(10px); transition: opacity .45s ease calc(.3s + var(--k, 0) * .12s), transform .6s cubic-bezier(.3, 1.4, .5, 1) calc(.3s + var(--k, 0) * .12s); }
.how-card .today.rv.is-in .trow { opacity: 1; transform: none; }
.how-card .today.rv .today__bar i { transform: scaleX(0); transition: transform 1.4s cubic-bezier(.3, .7, .2, 1) .5s; }
.how-card .today.rv.is-in .today__bar i { transform: none; }
.how-card .today.rv .trow--ticked .trow__tick { transform: scale(.5); transition: transform .45s cubic-bezier(.3, 1.6, .5, 1) 1.3s; }
.how-card .today.rv.is-in .trow--ticked .trow__tick { transform: none; }
.how-card .today.rv .tbdg { opacity: 0; transform: translateY(8px) scale(.9); transition: opacity .4s ease calc(1.1s + var(--k, 0) * .1s), transform .5s cubic-bezier(.3, 1.5, .5, 1) calc(1.1s + var(--k, 0) * .1s); }
.how-card .today.rv.is-in .tbdg { opacity: 1; transform: none; }

/* Phones: readable tags and sublines, and a header that wraps cleanly
   (level line on its own row under the greeting; a long Pea name ends in an ellipsis). */
@media (max-width: 480px) {
  .how-today { padding: 22px 14px 14px; gap: 22px; }
  .how-today .today-copy { padding-inline: 6px; }
  .how-today .today { font-size: 12px; }
  .how-card .today .tag { font-size: 10px; padding: .4em .6em; }
  .how-card .today .trow small { font-size: 11px; line-height: 1.35; margin-top: 1px; }
  .how-card .today .trow { gap: .6em; padding: .65em .7em; }
  .how-card .today__rows { padding: .9em .9em; }
  .how-card .today__top { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 7px; align-items: center; padding: .9em 1em; }
  .how-card .today__top .pea-ico { grid-row: 1 / span 2; }
  .how-card .today__who { min-width: 0; }
  .how-card .today__meta { display: flex; gap: .35em; min-width: 0; white-space: nowrap; }
  .how-card .today__meta [data-pea-name] { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .how-card .today__meta [data-today-date] { flex: none; }
  .how-card .today__lvl { grid-column: 2; display: flex; align-items: center; gap: .7em; margin-left: 0; min-width: 0; text-align: left; }
  .how-card .today__lvlrow { justify-content: flex-start; }
  .how-card .today__bar { flex: 1 1 auto; max-width: 7em; margin-top: 0; }
  .how-card .today__badges { justify-content: space-between; padding: .8em 1em 1em; }
  .how-card .tbdg b { font-size: 10.5px; }
}

/* Just tell Pea */
.how-talk { padding-bottom: 0; }
.how-talk .talk { max-width: 920px; margin-inline: auto; }

/* It gets to know you: Pea with its notepad, two little notes it has jotted */
.know-stage { position: relative; width: min(250px, 58vw); margin: 0 auto 10px; }
.know-stage::after { content: ""; position: absolute; left: 50%; bottom: 3%; width: 54%; height: 16px; transform: translateX(-50%); background: radial-gradient(ellipse, rgba(34, 56, 26, .26), transparent 70%); z-index: -1; }
.know-stage__pea { width: 100%; height: auto; filter: drop-shadow(0 20px 24px rgba(34, 56, 26, .18)); }
.know-note { position: absolute; display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 9px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); font: 650 14.5px/1.2 var(--body); color: var(--ink); white-space: nowrap; text-align: left; }
.know-note i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--pea-soft); color: var(--pea); flex: none; }
.know-note svg { width: 16px; height: 16px; }
.know-note--b i { background: var(--brass-soft); color: var(--brass); }
.know-note--a { right: calc(100% + 6px); top: 34%; transform: rotate(-3deg); }
.know-note--b { left: calc(100% + 6px); top: 56%; transform: rotate(2.5deg); }
.know-note.rv { opacity: 0; transition: opacity .5s ease, transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.know-note--a.rv { transform: translateY(14px) rotate(-3deg) scale(.92); }
.know-note--b.rv { transform: translateY(14px) rotate(2.5deg) scale(.92); transition-delay: .35s; }
.know-note--a.rv.is-in { opacity: 1; transform: rotate(-3deg); }
.know-note--b.rv.is-in { opacity: 1; transform: rotate(2.5deg); }
.how-know { padding-bottom: clamp(56px, 7vw, 80px); }
.how-know .lede { max-width: 30ch; }

/* Phones: the notes sit in a little row under Pea instead of beside it */
@media (max-width: 720px) {
  .know-stage { width: auto; margin-bottom: 22px; text-align: center; }
  .know-stage::after { display: none; }
  .know-stage__pea { width: min(190px, 50vw); margin: 0 auto 12px; }
  .know-note { position: static; display: inline-flex; margin: 5px 3px; font-size: 14px; padding: 8px 13px 8px 8px; }
  .know-note i { width: 26px; height: 26px; border-radius: 9px; }
  .know-note--a { margin-right: 34px; }
  .know-note--b { margin-left: 34px; }
}

/* Close */
.how-close { padding-top: clamp(64px, 10vw, 120px); }
.how-close__pea { width: clamp(150px, 18vw, 200px); margin: 0 auto 8px; filter: drop-shadow(0 22px 26px rgba(34, 56, 26, .2)); }
.how-close .price-note { margin-top: 18px; }

/* Phones: the two hero buttons stack full width */
@media (max-width: 480px) {
  .how-hero .cta-row { flex-direction: column; align-items: stretch; }
  .how-hero .cta-row .btn { width: 100%; justify-content: center; }
  .how-hero .own-pill { text-wrap: balance; }
}

@media (prefers-reduced-motion: reduce) {
  .know-note.rv { transition: opacity .4s ease; }
  .how-card .today.rv .trow, .how-card .today.rv .tbdg { transform: none; }
}
