/* Product Shot homepage: sticky header and the first screen.
   Markup: src/home/hero.ts. Motion: hero.js. */
.ps { --ps-header-h: 72px; }
@media (max-width: 640px) { .ps { --ps-header-h: 60px; } }

/* Header: a floating capsule, outlined in ink like the buttons. The paper
   is translucent so the page shows through; once the page scrolls it picks
   up the hard offset shadow (hero.js adds .is-scrolled). */
.ps-header { position: sticky; top: 0; z-index: 50; height: var(--ps-header-h); padding-top: 12px; pointer-events: none; }
.ps-header__bar {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: calc(var(--ps-header-h) - 12px); padding: 0 8px 0 22px;
  border: 1px solid var(--plurel-ink); border-radius: 999px;
  background: color-mix(in srgb, var(--plurel-canvas) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(18px); backdrop-filter: saturate(1.4) blur(18px);
  box-shadow: 0 0 0 var(--plurel-ink);
  transition: box-shadow .25s var(--ps-ease), background-color .25s var(--ps-ease);
}
.ps .ps-header__bar { width: calc(100% - 2 * var(--ps-gutter)); max-width: var(--ps-max); }
.ps-header.is-scrolled .ps-header__bar { box-shadow: -4px 5px 0 var(--plurel-ink); background: color-mix(in srgb, var(--plurel-canvas) 92%, transparent); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ps-header__bar { background: var(--plurel-canvas); }
}
@media (prefers-reduced-transparency: reduce) {
  .ps-header__bar { background: var(--plurel-canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
.ps-header__logo { display: flex; align-items: center; min-width: 44px; min-height: 44px; border-radius: 999px; }
.ps-header__logo img { width: auto; height: 40px; }
.ps-header__nav { display: flex; align-items: center; gap: 2px; }
.ps-header__link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  font: 700 .8125rem/1 var(--plurel-body); letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border-radius: 999px; transition: background-color .15s var(--ps-ease);
}
@media (hover: hover) { .ps-header__link:hover { background: var(--plurel-yellow); } }
.ps-header__link:active { background: var(--ps-yellow); }
/* The pill sits inside the capsule, so it drops its offset shadow. */
.ps .ps-header__cta { min-height: 44px; margin-left: 8px; padding: 0 20px; box-shadow: none; }
@media (hover: hover) { .ps .ps-header__cta:hover { transform: none; background: var(--plurel-orange-hover); box-shadow: none; } }
.ps .ps-header__cta:active { transform: scale(.97); box-shadow: none; }
@media (max-width: 640px) {
  .ps-header { padding-top: 8px; }
  .ps-header__bar { height: calc(var(--ps-header-h) - 8px); padding: 0 4px 0 16px; }
  .ps-header__link { display: none; }
  .ps .ps-header__cta { margin-left: 0; }
  .ps-header__logo img { height: 34px; }
}

/* Hero: fills the first screen. Phones rise from its bottom edge. */
.ps-hero {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--ps-header-h));
  min-height: calc(100svh - var(--ps-header-h));
}
.ps-hero__copy {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: clamp(8px, 1.6svh, 20px);
}
.ps .ps-hero__title {
  margin-top: clamp(8px, 1.2svh, 14px);
  /* Sized so "One card pays the bill." (about 14.4em) holds one line on
     tablets and up; phones get four balanced lines. */
  font-size: clamp(2.375rem, (min(100vw, var(--ps-max) + 2 * var(--ps-gutter)) - 2 * var(--ps-gutter)) / 14.6, 5.25rem);
  line-height: .92; letter-spacing: -.035em; word-spacing: .06em;
}
.ps-hero__line { display: block; text-wrap: balance; }
/* Tablet portrait and phones: each sentence takes two balanced lines at a
   larger size, which fills the taller screen better than two thin lines. */
@media (max-width: 820px) {
  .ps .ps-hero__title { font-size: clamp(2.375rem, 8.6vw, 4.5rem); }
}

/* The stage takes whatever height is left. A clear band under the invite
   line, tighter than the original hero, so the phones stay higher on the fold. */
.ps-hero__stage {
  position: relative; flex: 1 0 auto; min-height: 260px;
  margin-top: clamp(32px, 4.5svh, 48px);
  overflow: clip;
}
.ps-hero__phones {
  --w: clamp(200px, min(78cqh, 40cqw), 344px);
  position: absolute; inset: 0; container-type: size;
}
.ps-hero__shot {
  position: absolute; top: 0; left: 50%;
  width: var(--w); margin-left: calc(var(--w) / -2);
  container-type: inline-size;
  transform-origin: 50% 100%;
}
.ps-hero__shot .ps-phone { width: 100%; }
.ps-hero__shot--centre { z-index: 2; }
.ps-hero__shot--left, .ps-hero__shot--right {
  z-index: 1; width: calc(var(--w) * .9); top: calc(var(--w) * .2);
  will-change: transform;
}
.ps-hero__shot--left { margin-left: calc(var(--w) * -1.18); rotate: -8deg; }
.ps-hero__shot--right { margin-left: calc(var(--w) * .28); rotate: 8deg; }

/* Phones: tighter overlap so the side phones peek in from the edges. */
@media (max-width: 640px) {
  .ps-hero__phones { --w: clamp(200px, min(80cqh, 70cqw), 300px); }
  .ps-hero__shot--left { margin-left: calc(var(--w) * -1.08); }
  .ps-hero__shot--right { margin-left: calc(var(--w) * .18); }
}

/* Rise in. With JS on, phones wait below until hero.js adds .is-in (after
   the centre screen loads). If hero.js never runs, a late fallback shows
   them anyway. With JS off they simply sit in place. */
.ps-hero__shot {
  transition: translate .78s cubic-bezier(.16, 1, .3, 1), opacity .5s ease-out;
  transition-delay: var(--ps-delay, 0ms);
}
.ps-hero__shot--centre { --ps-delay: 0ms; }
.ps-hero__shot--left { --ps-delay: 90ms; }
.ps-hero__shot--right { --ps-delay: 160ms; }
.ps-js .ps-hero__phones:not(.is-in) .ps-hero__shot {
  opacity: 0; translate: 0 22%;
  animation: ps-hero-fallback .6s ease-out 2.5s forwards;
}
@keyframes ps-hero-fallback { to { opacity: 1; translate: 0 0; } }

/* Reduced motion: a short fade, no travel, no parallax (hero.js). */
@media (prefers-reduced-motion: reduce) {
  .ps-js .ps-hero__phones:not(.is-in) .ps-hero__shot { translate: none; }
  .ps .ps-hero__shot { transition: opacity .4s ease-out !important; transition-delay: 0ms !important; }
}


.ps-hero { position: relative; }
.ps-hero__copy, .ps-hero__stage { position: relative; z-index: 1; }

/* Sign-up block: the email row with one small line under it. */
.ps-hero__cta { width: 100%; max-width: 500px; margin: clamp(24px, 4.4svh, 44px) auto 0; }
.ps-hero__cta .ps-signup { max-width: none; }
.ps-hero__cta .ps-note { margin-top: 10px; text-align: center; }

/* Short headline: two lines at every width, leaving room for the phones. */
.ps .ps-hero__title { font-size: clamp(2.75rem, 8.4vw, 6.25rem); line-height: .92; }
@media (max-width: 820px) { .ps .ps-hero__title { font-size: clamp(2.75rem, 11vw, 5.25rem); } }
.ps .ps-hero__lede { margin-top: clamp(12px, 1.8svh, 20px); max-width: none; font-size: clamp(1rem, 1.4vw, 1.1875rem); }
.ps-hero .ps-hero__cta { margin-top: clamp(12px, 1.6svh, 18px); }
