/* Product Shot homepage: the feature screens (src/home/features.ts).
   One panel per feature, each in one of the app's own colors, with one
   phone. Step 01 adds the three ways to start under the copy. Side by
   side from 900px, stacked and centered below. */

.ps-features {
  --pf-inset: clamp(12px, 1.8vw, 24px);
  --pf-radius: clamp(24px, 3vw, 40px);
  --pf-head: 72px; /* the sticky site header, so a panel fits below it */
  --pf-out: cubic-bezier(.2, .7, .2, 1);
  position: relative; z-index: 2; padding: 0 0 var(--ps-section);
}

.pf-list { display: grid; gap: var(--pf-inset); width: min(100% - 2 * var(--ps-gutter), var(--ps-max)); margin: 0 auto; padding: 0; list-style: none; }

.pf {
  --pf-phone: min(300px, 70vw);
  display: grid; justify-items: center; gap: clamp(40px, 7vw, 56px);
  padding: clamp(44px, 9vw, 72px) clamp(20px, 5vw, 56px) clamp(48px, 9vw, 72px);
  border: 1.5px solid var(--plurel-ink); border-radius: var(--pf-radius);
  text-align: center; overflow: clip;
}
.pf--blue { background: var(--ps-blue); }
.pf--blush { background: var(--ps-blush); }
.pf--yellow { background: var(--ps-yellow); }
.pf--orange { background: var(--ps-orange); }
.pf--paper { background: var(--plurel-paper); }

/* Copy. The heading is sized off the copy column so each sentence keeps
   its own line ("One card pays." is the widest). */
.pf-copy { container-type: inline-size; display: grid; justify-items: center; width: min(100%, 36rem); }
.pf-step { display: flex; align-items: center; gap: 12px; }
.pf-num {
  display: inline-grid; place-items: center; min-width: 44px; height: 30px; padding: 0 10px;
  border: 1.5px solid var(--plurel-ink); border-radius: 999px; background: var(--plurel-paper);
  font: 400 .8125rem/1 var(--plurel-label); letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.pf-step .ps-label { font-size: .8125rem; }
.pf-copy > .pf-title {
  margin-top: 20px;
  font: 400 clamp(2rem, 9.3cqi, 4.75rem)/.94 var(--plurel-label);
  letter-spacing: -.015em; text-transform: uppercase; text-wrap: balance;
}
.pf-line { display: block; }
.pf-copy > .pf-body {
  margin-top: 24px; max-width: 36ch;
  font-size: clamp(1.0625rem, 1.5vw, 1.3125rem); line-height: 1.45; text-wrap: pretty;
}

/* Phone, with the hard ink shadow the site's buttons use. */
.pf-shot { display: grid; place-items: center; width: 100%; }
.pf .pf-phone { width: min(var(--pf-phone), 100%); filter: drop-shadow(-6px 8px 0 var(--plurel-ink)); }

/* Step 01: the three ways to start, then a small phone for each. */
.pf-types, .pf-minis { margin: 0; padding: 0; list-style: none; }
.pf-types { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; margin-top: 24px; }
.pf-type {
  display: inline-flex; align-items: center; padding: 7px 12px;
  border: 1.5px solid var(--plurel-ink); border-radius: 999px; background: var(--plurel-canvas); color: var(--plurel-ink);
  font: 400 10px/1 var(--plurel-label); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: -2px 3px 0 var(--plurel-ink);
}
.pf-type--receipt { background: var(--plurel-blush); }
.pf-type--live { background: var(--plurel-paper); }
.pf-type--amount { background: var(--ps-yellow); }
.pf-minis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px;
  width: 100%; max-width: 36rem; margin-top: 28px;
}
.pf-minis > li, .pf-mini, .pf-mini .ps-phone { min-width: 0; }
.pf-mini { display: grid; justify-items: center; gap: 8px; margin: 0; }
.pf-mini .ps-phone { width: 100%; max-width: 150px; filter: drop-shadow(-3px 4px 0 var(--plurel-ink)); }
.pf-mini__label {
  font: 400 9px/1.15 var(--plurel-label); letter-spacing: .07em; text-transform: uppercase; text-align: center;
}

@media (min-width: 600px) and (max-width: 899px) {
  .pf { --pf-phone: 280px; }
}

/* Side by side: the copy takes the wider column, the phone alternates sides.
   The phone is sized off the viewport height so each panel fits one screen. */
@media (min-width: 900px) {
  .pf {
    --pf-phone: clamp(240px, calc((100vh - var(--pf-head) - 2 * var(--pf-inset) - 120px) * .4613), 340px);
    --pf-phone: clamp(240px, calc((100svh - var(--pf-head) - 2 * var(--pf-inset) - 120px) * .4613), 340px);
    grid-template-columns: minmax(0, 1fr) minmax(0, .72fr); grid-template-areas: "copy shot";
    align-items: center; gap: clamp(32px, 4.5vw, 72px);
    min-height: min(calc(100vh - var(--pf-head) - 2 * var(--pf-inset)), 900px);
    min-height: min(calc(100svh - var(--pf-head) - 2 * var(--pf-inset)), 900px);
    padding: 56px clamp(40px, 5.5vw, 88px);
    text-align: left;
  }
  .pf--flip { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); grid-template-areas: "shot copy"; }
  .pf--start { grid-template-areas: "copy shot" "minis shot"; align-items: start; }
  .pf-copy { grid-area: copy; justify-items: start; width: 100%; max-width: 44rem; }
  .pf-shot { grid-area: shot; }
  .pf--start .pf-minis { grid-area: minis; width: 100%; max-width: none; margin-top: 12px; }
  .pf-copy > .pf-title { margin-top: 28px; }
  .pf-copy > .pf-body { margin-top: 32px; }
  .pf .pf-phone { filter: drop-shadow(-10px 12px 0 var(--plurel-ink)); }
}

/* Each block eases in once as it enters the viewport. features.js adds
   .pf-armed only when it can reveal, so the panels stay visible with JS off. */
@media (prefers-reduced-motion: no-preference) {
  /* Hidden at once (no transition), so arming never fades anything out. */
  html.ps-js .ps-features.pf-armed [data-pf-reveal] { opacity: 0; transform: translate3d(0, 24px, 0); }
  html.ps-js .ps-features.pf-armed .pf-shot[data-pf-reveal] { transform: translate3d(0, 40px, 0); }
  html.ps-js .ps-features.pf-armed [data-pf-reveal].is-in {
    opacity: 1; transform: none;
    transition: opacity 560ms var(--pf-out), transform 680ms var(--pf-out);
  }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 900px) {
  /* Side by side, both blocks enter together; the phone follows a beat later. */
  html.ps-js .ps-features.pf-armed .pf-shot[data-pf-reveal].is-in { transition-delay: 90ms; }
}

/* Link, paid chips, and the taped receipt are shared with the guide pages. */
.pf-link {
  position: absolute; left: 4%; right: 4%; bottom: 6%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 10px 10px 20px; border: 1.5px solid var(--plurel-ink); border-radius: 999px; background: var(--plurel-paper);
  box-shadow: -6px 8px 0 var(--plurel-ink); rotate: -3deg; text-align: left;
}
.pf-link__url { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(.9375rem, 1.4vw, 1.125rem); font-weight: 700; }
.pf-link__copy { flex: none; padding: 9px 16px; border: 1.5px solid var(--plurel-ink); border-radius: 999px; background: var(--ps-orange); font: 700 .75rem/1 var(--plurel-body); letter-spacing: .08em; text-transform: uppercase; }
.pf-chip {
  position: absolute; padding: 7px 12px 7px 30px; border: 1.5px solid var(--plurel-ink); border-radius: 999px; background: var(--ps-yellow);
  font: 700 .8125rem/1 var(--plurel-body); white-space: nowrap;
}
.pf-chip::before { content: ""; position: absolute; left: 11px; top: 50%; width: 11px; height: 6px; border-left: 2px solid; border-bottom: 2px solid; translate: 0 -70%; rotate: -45deg; }
.pf-chip--a { left: 0; top: 34%; rotate: -8deg; }
.pf-chip--b { right: 0; top: 50%; rotate: 6deg; background: var(--plurel-blue-soft); }

.pf-receipt {
  position: relative; padding: 30px 24px 64px; border: 1.5px solid var(--plurel-ink); border-radius: 6px; background: var(--plurel-paper);
  box-shadow: -8px 10px 0 var(--plurel-ink); rotate: 2deg; text-align: left; font-size: .9375rem; line-height: 1.3;
}
.pf-receipt::before { content: ""; position: absolute; left: 50%; top: -14px; width: 110px; height: 28px; translate: -50% 0; rotate: -3deg; background: #ece6cd; }
.pf-receipt__name { font: 400 1.375rem/1 var(--plurel-label); text-transform: uppercase; padding-bottom: 14px; border-bottom: 1.5px dashed var(--plurel-ink); }
.pf-receipt ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pf-receipt li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.pf-who { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.5px solid var(--plurel-ink); border-radius: 50%; font: 700 .625rem/1 var(--plurel-body); }
.pf-who--ink { background: var(--plurel-ink); color: #fff; }
.pf-who--blush { background: var(--ps-blush); }
.pf-who--blue { background: var(--plurel-blue-soft); }
.pf-who--yellow { background: var(--ps-yellow); }
.pf-receipt__more { margin-top: 10px; font-size: .8125rem; color: var(--plurel-muted); }
.pf-receipt dl { margin: 14px 0 0; padding-top: 14px; border-top: 1.5px dashed var(--plurel-ink); display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.pf-receipt dl div { display: flex; justify-content: space-between; }
.pf-receipt dd { margin: 0; }
.pf-receipt__total { margin-top: 6px; font-weight: 700; font-size: 1.0625rem; }
.pf-receipt__sticker { position: absolute; right: -40px; bottom: -36px; width: 132px; height: auto; rotate: -10deg; }
@media (max-width: 899px) {
  .pf-types { justify-content: center; margin-top: 20px; }
  .pf--start .pf-copy { order: 1; }
  .pf--start .pf-shot { order: 2; }
  .pf--start .pf-minis { order: 3; max-width: 340px; margin: 28px auto 0; gap: 16px 14px; }
  .pf-receipt__sticker { right: -14px; width: 110px; }
}
