/* Berri product pages: /product/, /research/, /canvas/, /reminders/, /modes/, /features/. Prefix pd-.
   Builds on /b2.css, /home.css and /home-motion.css (scenes, tabs, sky, marks). Transform and opacity only.
   Every start state is either scoped to html.js or driven by a scroll timeline that only moves things,
   so with JS off, reduced motion or an older browser the page simply shows. */

/* ---------- Hero ---------- */
.pd-hero { padding-bottom: clamp(24px, 4vw, 48px); }
.pd-hero .hm-hero__title { max-width: 15ch; }
.pd-acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin-top: 32px; }
.pd-acts .b2-btn { min-height: 48px; padding-inline: 24px; }
.pd-acts--start { justify-content: flex-start; }
.js .pd-acts { animation: hm-fade-up .5s var(--b2-ease) .35s both; }
.pd-trail { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 22px 0 0; padding: 0; }
.pd-trail a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: rgb(255 255 255 / .75); border: 1px solid var(--b2-line); text-decoration: none; font-size: .9rem; color: var(--b2-ink-2); transition: transform .3s var(--b2-ease), color .2s; }
.pd-trail a:hover { color: var(--b2-ink); transform: translateY(-2px); }
.pd-trail a::before { content: ""; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--b2-strawberry); }
.pd-trail li:nth-child(2) a::before { background: var(--b2-blueberry); }
.pd-trail li:nth-child(3) a::before { background: var(--b2-mango); }
.pd-trail li:nth-child(4) a::before { background: var(--b2-leaf); }
.pd-trail li:nth-child(5) a::before { background: #E0773A; }

/* ---------- Photographs: real stills in a soft frame, gliding as they scroll ---------- */
.pd-ph, .pd-shot {
  position: relative; margin: 0; overflow: hidden; aspect-ratio: 3 / 2; border-radius: clamp(18px, 2.4vw, 28px);
  background: radial-gradient(120% 90% at 20% 10%, #FFF6EC, transparent 60%), linear-gradient(135deg, var(--b2-light-peach), var(--b2-light-berry) 55%, var(--b2-light-gold));
  box-shadow: 0 1px 0 rgb(255 255 255 / .9) inset, 0 2px 6px rgb(27 26 31 / .05), 0 40px 80px -30px rgb(120 40 70 / .32);
  isolation: isolate;
}
.pd-ph img, .pd-shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); color: transparent; } /* a missing photo shows the soft frame, not its alt text */
.pd-shot { width: 100%; max-width: 1080px; margin: clamp(48px, 7vw, 80px) auto 0; }
.pd-shot::after, .pd-ph::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 1px rgb(27 26 31 / .06) inset; pointer-events: none; }
@keyframes pd-glide { from { opacity: 0; transform: translateY(56px) scale(.94); } }
.js .pd-shot { animation: pd-glide 1s var(--b2-ease) .2s both; }
.is-instant .pd-shot, .is-instant .pd-acts { animation: none; }
@keyframes pd-par { from { transform: translateY(-5%) scale(1.12); } to { transform: translateY(5%) scale(1.12); } }
@keyframes pd-lift { from { transform: translateY(90px) scale(.93); } to { transform: none; } }
@keyframes pd-drift { from { transform: translateX(-24px); } to { transform: translateX(24px); } }
@keyframes pd-grow { from { transform: scale(1.32); } to { transform: scale(1.04); } }
@supports (animation-timeline: view()) {
  .pd-ph img, .pd-shot img { animation: pd-par linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  .pd-media { animation: pd-lift linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
  .pd-mode__ph img { animation: pd-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  .pd-mode__fruit { animation: pd-drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
}

/* ---------- Sections and washes of light ---------- */
.pd-sec { position: relative; padding-block: clamp(72px, 10vw, 128px); }
.pd-sec--tight { padding-block: clamp(48px, 7vw, 88px); }
.pd-wash--peach { background: linear-gradient(180deg, var(--b2-bg), #FDEEE3 20%, #FCEFE6 80%, var(--b2-bg)); }
.pd-wash--blue { background: linear-gradient(180deg, var(--b2-bg), #EEF1FC 20%, #EDF0FB 80%, var(--b2-bg)); }
.pd-wash--mint { background: linear-gradient(180deg, var(--b2-bg), #E8F5EE 20%, #E7F4ED 80%, var(--b2-bg)); }
.pd-wash--gold { background: linear-gradient(180deg, var(--b2-bg), #FCF3DC 20%, #FBF2DA 80%, var(--b2-bg)); }
.pd-wash--berry { background: linear-gradient(180deg, var(--b2-bg), #FCEBF1 20%, #FBEAF0 80%, var(--b2-bg)); }
.pd-intro { display: grid; gap: 18px; max-width: 46rem; }
.pd-intro--c { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Capability story: alternating copy and media ---------- */
.pd-cap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.pd-cap--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.pd-cap--flip .pd-media { order: -1; }
.pd-cap__copy { display: grid; gap: 18px; justify-items: start; max-width: 32rem; }
.pd-cap__copy .b2-lede { margin: 0; }
.pd-media { position: relative; min-width: 0; }
.pd-media::before {
  content: ""; position: absolute; z-index: -1; inset: -6% -8% -12%; border-radius: 50%; filter: blur(56px);
  background: radial-gradient(closest-side at 28% 45%, rgb(246 193 211 / .85), transparent), radial-gradient(closest-side at 74% 62%, rgb(246 226 168 / .85), transparent);
}
.pd-media--blue::before { background: radial-gradient(closest-side at 30% 40%, rgb(207 214 247 / .95), transparent), radial-gradient(closest-side at 72% 66%, rgb(246 193 211 / .7), transparent); }
.pd-media--mint::before { background: radial-gradient(closest-side at 30% 40%, rgb(205 235 221 / .95), transparent), radial-gradient(closest-side at 72% 66%, rgb(246 226 168 / .8), transparent); }
.pd-media { isolation: isolate; }
@media (max-width: 900px) {
  .pd-cap, .pd-cap--flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .pd-cap--flip .pd-media { order: 0; }
}
.pd-story > * + * { margin-top: clamp(88px, 12vw, 160px); }
/* Each chapter of the story gets its own pool of morning light behind it */
.pd-story > .pd-cap { position: relative; isolation: isolate; }
.pd-story > .pd-cap::before { content: ""; position: absolute; z-index: -2; inset: -18% -30%; pointer-events: none; background: radial-gradient(40% 50% at 70% 50%, rgb(251 217 194 / .55), transparent 70%); }
.pd-story > .pd-cap--flip::before { background: radial-gradient(40% 50% at 30% 50%, rgb(207 214 247 / .5), transparent 70%); }
.pd-story > .pd-cap:nth-child(3n)::before { background: radial-gradient(40% 50% at 70% 50%, rgb(205 235 221 / .6), transparent 70%); }
.pd-sec:has(> .pd-story) { overflow-x: clip; }

/* A small fact line under a capability: coloured dots, plain words */
.pd-facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.pd-facts li { position: relative; padding-left: 22px; color: var(--b2-ink-2); }
.pd-facts li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 8px; height: 8px; border-radius: 50%; background: var(--b2-strawberry); }
.pd-facts li:nth-child(2)::before { background: var(--b2-mango); }
.pd-facts li:nth-child(3)::before { background: var(--b2-blueberry); }
.pd-facts li:nth-child(4)::before { background: var(--b2-leaf); }

/* Helper names as calm chips */
.pd-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pd-chips .hm-marq__chip { margin: 0; white-space: normal; }
.pd-chipwall { padding: clamp(20px, 3vw, 32px); border-radius: 28px; background: rgb(255 255 255 / .7); border: 1px solid #DADFF4; box-shadow: 0 1px 0 #fff inset, var(--b2-shadow-1); }

/* Memory chips inside a scene */
.pd-memo { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #EEF8F3; border: 1px solid #CBE6D8; color: #1D5A43; }
.pd-memo::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--b2-leaf); box-shadow: inset 0 0 0 5px #CDEBDD; }
.pd-memo--gone { background: #FDF0F4; border-color: #F6CFDC; color: #7A1238; }
.pd-memo--gone::before { background: var(--b2-strawberry); box-shadow: inset 0 0 0 5px #F6C1D3; }

/* Canvas edit: the old paragraph gives way to the new one in the same place */
.pd-swap { display: grid; }
.pd-swap > * { grid-area: 1 / 1; }
.pd-new { border-radius: 8px; box-shadow: -10px 0 0 #FDF6E2, 10px 0 0 #FDF6E2; background: #FDF6E2; }
.hm-sc:not(.is-play) .pd-old { visibility: hidden; }
.pd-old { transition: opacity .5s var(--b2-ease); }
.pd-swap:has(.pd-new.is-on) .pd-old { opacity: 0; }
.pd-code { font: 500 .82rem/1.7 var(--b2-mono); background: #1F1E24; color: #F3F0EA; border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; word-break: break-word; }
.pd-code b { color: #F6E2A8; font-weight: 500; }
.pd-code i { color: #F6C1D3; font-style: normal; }

/* Reminder arriving at the top of the phone */
.pd-ping { align-self: stretch; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgb(255 255 255 / .92); box-shadow: 0 12px 28px -12px rgb(27 26 31 / .35); font-size: .82rem; }
.pd-ping > span:last-child { display: grid; gap: 1px; }
.pd-ping > span:last-child span { color: var(--b2-ink-2); font-size: .75rem; }
.hm-sc.is-play .pd-ping[data-s]:not(.is-on) { transform: translateY(-30px) scale(.94); }
.hm-sc.is-play .pd-ping.is-on { transition: opacity .4s, transform .8s cubic-bezier(.3, 1.5, .5, 1); }

/* Stage under a hero */
.pd-stage { max-width: 980px; }
.pd-stage .hm-app { min-height: 460px; }

/* ---------- Three short points ---------- */
.pd-points { list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.6vw, 28px); }
.pd-points li { display: grid; gap: 10px; align-content: start; padding: 26px 24px 28px; border-radius: 22px; background: rgb(255 255 255 / .72); border: 1px solid var(--b2-line); }
.pd-points h3 { margin: 0; font: 650 clamp(1.15rem, 1.8vw, 1.3rem)/1.3 var(--b2-display); letter-spacing: -.012em; }
.pd-points p { margin: 0; color: var(--b2-ink-2); }
.pd-points .pd-ico { margin-bottom: 6px; }
@media (max-width: 820px) { .pd-points { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Line icons that draw themselves in ---------- */
.pd-ico { width: 48px; height: 48px; flex: none; color: var(--b2-strawberry); }
.pd-ico path, .pd-ico circle, .pd-ico rect, .pd-ico polyline, .pd-ico line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pd-ico .d { stroke-dasharray: 1 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--b2-ease) .15s; }
.pd-ico .p { transition: transform .9s cubic-bezier(.3, 1.4, .5, 1) .55s, opacity .5s .55s; transform-box: fill-box; transform-origin: center; }
.js .b2-rise:not(.is-in) .pd-ico .d { stroke-dashoffset: 1; }
.js .b2-rise:not(.is-in) .pd-ico .p { transform: scale(.4); opacity: 0; }
.pd-ico--blue { color: var(--b2-blueberry); } .pd-ico--mango { color: #C77812; } .pd-ico--leaf { color: var(--b2-leaf); } .pd-ico--peach { color: #D0652A; }
@keyframes pd-nod { 0%, 100% { transform: none; } 40% { transform: rotate(-8deg) scale(1.06); } 70% { transform: rotate(4deg); } }
.pd-fg:hover .pd-ico { animation: pd-nod .7s var(--b2-ease); }

/* ---------- FAQ: native details ---------- */
.pd-faq { max-width: 860px; margin: clamp(32px, 5vw, 48px) auto 0; border-top: 1px solid var(--b2-line); }
.pd-faq details { border-bottom: 1px solid var(--b2-line); }
.pd-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 14px 4px; cursor: pointer; list-style: none; font: 600 clamp(1.05rem, 1.7vw, 1.2rem)/1.35 var(--b2-display); letter-spacing: -.01em; }
.pd-faq summary::-webkit-details-marker { display: none; }
.pd-faq summary::after { content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--b2-line-strong); background: linear-gradient(var(--b2-ink), var(--b2-ink)) center / 12px 1.6px no-repeat, linear-gradient(var(--b2-ink), var(--b2-ink)) center / 1.6px 12px no-repeat; transition: transform .35s var(--b2-ease), background-color .2s; }
.pd-faq details[open] summary::after { transform: rotate(135deg); background-color: var(--b2-berry-soft); }
.pd-faq summary:hover::after { background-color: var(--b2-surface); }
.pd-faq__a { margin: 0; padding: 0 56px 24px 4px; color: var(--b2-ink-2); max-width: 44em; }
.pd-faq details[open] .pd-faq__a { animation: hm-fade-up .45s var(--b2-ease) both; }

/* ---------- Modes: big cinematic fruit ---------- */
.pd-mode { position: relative; overflow: clip; padding-block: clamp(72px, 10vw, 140px); }
.pd-mode--straw { background: linear-gradient(180deg, var(--b2-bg), #FCE8EF 18%, #FCE8EF 82%, var(--b2-bg)); }
.pd-mode--mango { background: linear-gradient(180deg, var(--b2-bg), #FCF0D6 18%, #FCF0D6 82%, var(--b2-bg)); }
.pd-mode--blue { background: linear-gradient(180deg, var(--b2-bg), #ECEDFB 18%, #ECEDFB 82%, var(--b2-bg)); }
.pd-mode--code { background: linear-gradient(180deg, var(--b2-bg), #ECEAF0 18%, #ECEAF0 82%, var(--b2-bg)); }
.pd-mode__in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.pd-mode--flip .pd-mode__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.pd-mode--flip .pd-mode__fig { order: 2; }
.pd-mode__ph { aspect-ratio: 4 / 3.4; }
.pd-mode__copy { display: grid; gap: 18px; justify-items: start; }
.pd-mode__name { margin: 0; font: 700 clamp(2.4rem, 4.6vw, 3.9rem)/.98 var(--b2-display); letter-spacing: -.04em; text-wrap: balance; }
.pd-mode__name small { display: block; font-size: .42em; letter-spacing: -.02em; color: var(--b2-ink-2); margin-bottom: 8px; }
.pd-mode__line { margin: 0; font: 600 clamp(1.2rem, 2.2vw, 1.6rem)/1.3 var(--b2-display); letter-spacing: -.015em; }
.pd-mode__fruit { position: absolute; z-index: 3; right: 6%; bottom: -26px; width: 84px; height: 84px; border-radius: 24px; }
.pd-mode__fruit i { transform-origin: center; }
.pd-mode__fruit.hm-fruit--blueberry i { width: 46px; height: 46px; }
.pd-mode__fruit.hm-fruit--mango i { width: 52px; height: 40px; }
.pd-mode__fruit.hm-fruit--strawberry i { width: 46px; height: 52px; }
.pd-mode__fig { position: relative; margin: 0; min-width: 0; }
.pd-live { display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 14px 0 10px; border-radius: 999px; background: rgb(255 255 255 / .85); border: 1px solid #CBE6D8; color: #1D5A43; font: 600 .82rem/1 var(--b2-body); }
.pd-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--b2-leaf); box-shadow: 0 0 0 0 rgb(47 143 107 / .5); animation: pd-beat 2.4s ease-out infinite; }
@keyframes pd-beat { 0% { box-shadow: 0 0 0 0 rgb(47 143 107 / .45); } 70%, 100% { box-shadow: 0 0 0 8px rgb(47 143 107 / 0); } }
.pd-mode .hm-soon { min-height: 30px; padding: 0 14px; font-size: .82rem; }
@media (max-width: 900px) {
  .pd-mode__in, .pd-mode--flip .pd-mode__in { grid-template-columns: minmax(0, 1fr); }
  .pd-mode--flip .pd-mode__fig { order: 0; }
  .pd-mode__fruit { width: 68px; height: 68px; right: 16px; bottom: -20px; }
}

/* Which mode: a calm comparison, cards on phones */
.pd-cmp { width: 100%; margin-top: clamp(32px, 5vw, 48px); border-collapse: separate; border-spacing: 0; background: var(--b2-surface); border: 1px solid var(--b2-line); border-radius: 22px; overflow: hidden; box-shadow: var(--b2-shadow-1); }
.pd-cmp th, .pd-cmp td { padding: 18px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--b2-line); }
.pd-cmp thead th { font: 600 .82rem/1.2 var(--b2-body); color: var(--b2-ink-2); background: #FCFAF6; }
.pd-cmp tbody tr:last-child > * { border-bottom: 0; }
.pd-cmp tbody th { font: 650 1.1rem/1.3 var(--b2-display); letter-spacing: -.01em; white-space: nowrap; }
.pd-cmp tbody th .hm-dot { display: inline-block; margin-right: 10px; vertical-align: 1px; }
.pd-cmp td { color: var(--b2-ink-2); }
.hm-dot--mango { background: var(--b2-mango); } .hm-dot--blue { background: var(--b2-blueberry); } .hm-dot--code { background: var(--b2-ink); }
@media (max-width: 720px) {
  .pd-cmp, .pd-cmp tbody, .pd-cmp tr, .pd-cmp th, .pd-cmp td { display: block; }
  .pd-cmp thead { display: none; }
  .pd-cmp tbody tr { border-bottom: 1px solid var(--b2-line); padding: 16px 18px; }
  .pd-cmp tbody tr:last-child { border-bottom: 0; }
  .pd-cmp th, .pd-cmp td { border: 0; padding: 4px 0; }
  .pd-cmp td::before { content: attr(data-k) ": "; font-weight: 600; color: var(--b2-ink); }
}

/* ---------- Features index ---------- */
.pd-fgrid { list-style: none; margin: clamp(40px, 6vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 24px); }
.pd-fg { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 6px 20px; align-content: start; padding: clamp(22px, 3vw, 32px); border-radius: 24px; background: rgb(255 255 255 / .78); border: 1px solid var(--b2-line); box-shadow: 0 1px 0 #fff inset; transition: transform .45s var(--b2-ease), box-shadow .45s var(--b2-ease); }
.pd-fg:hover { transform: translateY(-4px); box-shadow: 0 1px 0 #fff inset, 0 24px 48px -20px rgb(27 26 31 / .22); }
.pd-fg > .pd-ico { grid-row: span 3; width: 56px; height: 56px; padding: 10px; border-radius: 16px; background: var(--b2-bg-soft); }
.pd-fg h2 { margin: 0; font: 700 clamp(1.35rem, 2.4vw, 1.7rem)/1.15 var(--b2-display); letter-spacing: -.02em; }
.pd-fg ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.pd-fg li { position: relative; padding-left: 18px; color: var(--b2-ink-2); }
.pd-fg li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 1.5px; border-radius: 2px; background: var(--b2-line-strong); }
.pd-fg .hm-link { justify-self: start; margin-top: 4px; }
@media (max-width: 760px) { .pd-fgrid { grid-template-columns: minmax(0, 1fr); } .pd-fg { grid-template-columns: minmax(0, 1fr); } .pd-fg > .pd-ico { grid-row: auto; } }

/* Section headline sizes reused across pages */
.pd-h { font: 700 clamp(2rem, 4.6vw, 3.25rem)/1.06 var(--b2-display); letter-spacing: -.032em; margin: 0; text-wrap: balance; }

/* ---------- Reduced motion and ?still ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .pd-shot, .js .pd-acts, .pd-ph img, .pd-shot img, .pd-media, .pd-mode__ph img, .pd-mode__fruit, .pd-live::before, .pd-fg:hover .pd-ico, .pd-faq details[open] .pd-faq__a { animation: none !important; }
  .pd-ph img, .pd-shot img { transform: none; }
  .pd-ico .d, .pd-ico .p, .pd-old, .pd-fg, .pd-trail a, .pd-faq summary::after { transition: none !important; }
  .pd-fg:hover, .pd-trail a:hover { transform: none; }
}
.is-still .pd-shot, .is-still .pd-acts, .is-still .pd-live::before { animation: none !important; }

/* Modes page hero: the four fruit cards are links to their sections */
.pd-modes { margin-top: clamp(48px, 7vw, 72px); }
.pd-modes li { display: grid; }
.pd-modes .hm-mode { text-decoration: none; color: inherit; min-height: 100%; }
.pd-modes .hm-mode:focus-visible { outline-offset: 4px; border-radius: 22px; }
