:root {
  /* Silhouette of card-face.svg (alpha only), inlined as a data URI. CSS
     mask-image is fetched in CORS mode, and this page runs in a sandboxed
     iframe (opaque origin) whose CDN sends no CORS headers, so a file URL
     here silently fails and hides the glare. Keep in sync with the outer
     path of card-face.svg. */
  --card-face-url: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20254%20160'%3E%3Cpath%20d='M240.933%200C248.15%205.76972e-05%20254%205.84804%20254%2013.0615V99.8467L247.645%20102.716V131.981L254%20134.388V146.938C254%20154.152%20248.15%20160%20240.933%20160H13.0674C5.85046%20160%200%20154.152%200%20146.938V13.0615C0%205.84806%205.85045%207.72728e-05%2013.0674%200H240.933Z'/%3E%3C/svg%3E");

  --pemo-color-plate-photo: #f4f4f4;
  --pemo-color-ink: #222529;
  --pemo-color-ink-secondary: #62666a;
  --pemo-color-surface: #ffffff;
  --pemo-color-card-green-chip: #e9f7f1;

  --pemo-font-sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --pemo-text-2xs: 11px;
  --pemo-text-xs: 12px;
  --pemo-text-sm: 14px;
  --pemo-text-base: 16px;
  --pemo-text-xl: 24px;
  --pemo-leading-2xs: 16px;
  --pemo-leading-xs: 16px;
  --pemo-leading-sm: 20px;
  --pemo-leading-base: 22px;
  --pemo-leading-xl: 28px;
  --pemo-weight-regular: 400;
  --pemo-weight-medium: 500;
  --pemo-weight-semibold: 600;
  --pemo-tracking-caption: .4px;
  --pemo-tracking-overline: 1.5px;

  --pemo-space-0: 0px;
  --pemo-space-1: 4px;
  --pemo-space-2: 8px;
  --pemo-space-3: 12px;
  --pemo-space-4: 16px;
  --pemo-space-5: 20px;
  --pemo-space-6: 24px;
  --pemo-space-8: 32px;
  --pemo-space-10: 40px;
  --pemo-space-12: 48px;
  --pemo-space-16: 64px;

  --pemo-radius-md: 8px;
  --pemo-radius-lg: 12px;
  --pemo-shadow-md: 0px 5px 20px 5px rgba(0, 0, 0, .12);

  /* Fluid card sizing. The authored 254x160 art is built entirely out of
     multiples of a 16px base, so the whole card scales by scaling ONE
     length: --pemo-card-unit is that base, set as the font-size on
     .signup-panel__card-scene, and every measurement below is em against
     it. This panel is its own iframe document, so vw/vh are the panel's
     box rather than the host page's.

       4.061vw          = holds the card at ~65% of the panel's width
       2.912vh          = holds it at ~29% of the panel's height
       (100cqw - 48px) / 15.875
                        = never wider than the card stage, less the scene's
                          24px padding each side
       (100cqh - 64px) / 10
                        = never taller than the card stage, less that padding
                          and room for the hover lift
       34.944px ceiling = 555x349, where it stops growing
       10px floor       = 159x100, only reached in a panel far smaller than
                          the app ever renders

     min() takes whichever is the binding constraint. The cq terms read the
     card stage (container-type: size), so a narrow or short panel shrinks
     the card instead of clipping it. At the usual 696x852 panel the vh term
     wins and the card is 393x250. */
  --pemo-card-unit: clamp(10px, min(4.061vw, 2.912vh, (100cqw - 48px) / 15.875, (100cqh - 64px) / 10), 34.944px);

  /* em against --pemo-card-unit. Every use site below inherits that
     font-size from the scene, so these stay in proportion. */
  --pemo-radius-card: .8125em;              /* 13 */
  --pemo-size-card-w: 15.875em;             /* 254 */
  --pemo-size-card-h: 10em;                 /* 160 */
  --pemo-perspective-card-scene: 106.25em;  /* 1700 */
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--pemo-color-plate-photo);
  font-family: var(--pemo-font-sans);
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* ---------- layout shell ---------- */

.signup-panel {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  overflow: hidden;
}

.signup-panel__header {
  flex-shrink: 0;
  padding: var(--pemo-space-10) var(--pemo-space-8) 0;
}

.signup-panel__header-spacer {
  height: var(--pemo-space-16);
}

.signup-panel__trusted-by {
  margin: var(--pemo-space-3) 0 0;
  text-align: center;
  font-size: var(--pemo-text-base);
  line-height: var(--pemo-leading-base);
  font-weight: var(--pemo-weight-semibold);
  letter-spacing: .1px;
  color: var(--pemo-color-ink-secondary);
}

/* ---------- logo marquee ---------- */

.signup-panel__marquee-wrap {
  position: relative;
  z-index: 20;
  margin-top: var(--pemo-space-6);
  flex-shrink: 0;
}

.signup-panel__marquee {
  display: flex;
  width: max-content;
  overflow: hidden;
  animation: pemo-marquee 60s linear infinite;
}

.signup-panel__marquee[data-paused="true"] {
  animation-play-state: paused;
}

.signup-panel__logo-lane {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: var(--pemo-space-10);
  padding: 0 var(--pemo-space-4);
  margin: 0;
  list-style: none;
}

.signup-panel__logo-button {
  display: flex;
  align-items: center;
  border-radius: 999px;
  padding: var(--pemo-space-2);
  transition: background-color .15s ease;
}

.signup-panel__logo-button.is-active {
  background: var(--pemo-color-surface);
}

.signup-panel__logo-button img {
  height: var(--pemo-space-12);
  width: var(--pemo-space-12);
  border-radius: 999px;
  object-fit: cover;
}

.signup-panel__testimonial {
  position: absolute;
  left: var(--pemo-space-8);
  right: var(--pemo-space-8);
  top: 100%;
  z-index: 30;
  margin-top: var(--pemo-space-6);
}

.signup-panel__testimonial[hidden] { display: none; }

.signup-panel__testimonial-card {
  border-radius: var(--pemo-radius-lg);
  background: var(--pemo-color-surface);
  padding: var(--pemo-space-6);
  box-shadow: var(--pemo-shadow-md);
}

.signup-panel__quote-mark {
  display: block;
  margin-bottom: var(--pemo-space-4);
  height: var(--pemo-space-5);
  width: auto;
  color: var(--pemo-color-ink);
}

.signup-panel__testimonial-quote {
  margin: 0 0 var(--pemo-space-5);
  font-size: var(--pemo-text-base);
  line-height: var(--pemo-leading-base);
  font-weight: var(--pemo-weight-regular);
  letter-spacing: .5px;
  color: var(--pemo-color-ink-secondary);
}

.signup-panel__testimonial-person {
  display: flex;
  align-items: center;
  gap: var(--pemo-space-4);
}

.signup-panel__testimonial-avatar {
  height: var(--pemo-space-12);
  width: var(--pemo-space-12);
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.signup-panel__testimonial-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.signup-panel__testimonial-name {
  font-size: var(--pemo-text-base);
  line-height: var(--pemo-leading-base);
  font-weight: var(--pemo-weight-semibold);
  letter-spacing: .1px;
  color: var(--pemo-color-ink);
}

.signup-panel__testimonial-role,
.signup-panel__testimonial-extra {
  font-size: var(--pemo-text-sm);
  line-height: var(--pemo-leading-sm);
  font-weight: var(--pemo-weight-regular);
  letter-spacing: .25px;
  color: var(--pemo-color-ink-secondary);
}

@keyframes pemo-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .signup-panel__marquee { animation: none; }
}

/* ---------- 3D card ---------- */

.signup-panel__card-stage {
  position: relative;
  min-height: 0;
  width: 100%;
  flex: 1 1 0%;
  overflow: hidden;
  /* The card sizes against this box; see --pemo-card-unit. */
  container-type: size;
}

.signup-panel__card-scene {
  position: absolute;
  inset: var(--pemo-space-0);
  display: grid;
  place-items: center;
  padding: var(--pemo-space-6);
  /* Not for text — this is the card's base unit, which every em below reads. */
  font-size: var(--pemo-card-unit);
  perspective: var(--pemo-perspective-card-scene);
}

.signup-panel__card-float {
  position: relative;
  transform-style: preserve-3d;
  animation: pemo-card-float 6s ease-in-out infinite;
}

.signup-panel__card-shadow {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 33%;
  transform: translate3d(0, 0, -5.625em);   /* -90 */
  border-radius: 999px;
  color: var(--pemo-color-ink);
  filter: blur(1em);                        /* 16 */
  opacity: .4;
  background: radial-gradient(ellipse at center, currentColor, transparent 70%);
  pointer-events: none;
}

.signup-panel__card-tilt {
  position: relative;
  width: var(--pemo-size-card-w);
  height: var(--pemo-size-card-h);
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(-6deg) translate3d(0, 0, 0) scale(1);
  transition: transform .6s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

/* box-shadow (not used here) draws around the element's own border-radius
   rectangle, blind to the card art's own silhouette. The card face isn't a
   plain rounded rect — card-face.svg cuts a notch into its right edge — so
   a box-shadow would square that notch off with a straight shadow edge the
   art itself doesn't have. filter: drop-shadow reads the actual rendered
   alpha instead, so the shadow follows the cut. */
.signup-panel__card-face {
  position: absolute;
  inset: var(--pemo-space-0);
  border-radius: var(--pemo-radius-card);
  filter: drop-shadow(0px 5px 14px rgba(0, 0, 0, .16));
  color: var(--pemo-color-ink);
}

/* The card art (background, wordmark, chip, contactless mark, holder name,
   network logo) is one flattened asset now — see card-face.svg — rather
   than separately positioned elements, so it's exported at native
   resolution instead of scaling up a small raster chip icon. */
.signup-panel__card-image {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
}

.signup-panel__card-glare {
  position: absolute;
  inset: var(--pemo-space-0);
  border-radius: var(--pemo-radius-card);
  color: var(--pemo-color-surface);
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
  /* Masked to the card art's own alpha channel — same source the shadow
     reads via drop-shadow — so the glare only lights the actual card
     surface instead of also washing out the transparent notch cut. */
  -webkit-mask-image: var(--card-face-url);
  mask-image: var(--card-face-url);
  -webkit-mask-mode: alpha;
  mask-mode: alpha;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

@keyframes pemo-card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-.5em); }      /* 8 */
}
@media (prefers-reduced-motion: reduce) {
  .signup-panel__card-float { animation: none; }
}

/* ---------- stat carousel ----------
   Under the card, one stat at a time: a large figure, its line, and
   pager dots, on the plate with no background of its own. */

.signup-panel__carousel {
  flex-shrink: 0;
  padding: 0 var(--pemo-space-8) var(--pemo-space-16);
  text-align: center;
}

/* Slides share one grid cell, so the tallest sets the height and the
   swap is a crossfade rather than a layout change. */
.signup-panel__slides {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signup-panel__slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pemo-space-2);
  opacity: 0;
  translate: 0 8px;
  transition: opacity .6s ease, translate .6s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.signup-panel__slide.is-active {
  opacity: 1;
  translate: 0 0;
  pointer-events: auto;
}

.signup-panel__slide-value {
  display: inline-flex;
  align-items: baseline;
  font-size: 45px;     /* 56 x 0.8 */
  line-height: 52px;
  font-weight: var(--pemo-weight-semibold);
  letter-spacing: -.02em;
  color: var(--pemo-color-ink);
}

.signup-panel__slide-currency {
  height: .78em;
  width: auto;
  align-self: center;
  margin-right: 4px;
}

.signup-panel__slide-desc {
  margin: 0;
  font-size: var(--pemo-text-base);
  line-height: var(--pemo-leading-base);
  font-weight: var(--pemo-weight-regular);
  color: var(--pemo-color-ink);
}

/* The log-in pager, copied: #BEC2C7 dots, the active one stretching into
   a 24x8 track over .7s, and a #62666A fill running across it for as long
   as the slide is up. The fill finishing is what advances the carousel
   (see the script in signup-content.html), so the bar and the slide change can
   never drift apart. Hovering the carousel pauses the fill, and with it
   the carousel. */
.signup-panel__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--pemo-space-2);
  margin-top: var(--pemo-space-5);
}

.signup-panel__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: #bec2c7;
  cursor: pointer;
  transition: width .7s cubic-bezier(.22, 1, .36, 1);
}

/* 8px is no target; the hit area is bigger than the dot. */
.signup-panel__dot::after {
  content: "";
  position: absolute;
  inset: -10px -4px;
}

.signup-panel__dot.is-active { width: 24px; }

.signup-panel__dot:focus-visible {
  outline: 2px solid #339970;
  outline-offset: 3px;
}

.signup-panel__dot-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 4px;
  background: #62666a;
  pointer-events: none;
}

.signup-panel__dot.is-active .signup-panel__dot-fill {
  animation: pemo-dot-load 3.5s linear both;
}

.signup-panel__carousel:hover .signup-panel__dot-fill {
  animation-play-state: paused;
}

/* Starts at 8px, the dot's own width, as the log-in pager does. */
@keyframes pemo-dot-load {
  from { width: 8px; }
  to   { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .signup-panel__slide, .signup-panel__dot { transition: none; }
  .signup-panel__dot.is-active .signup-panel__dot-fill { animation: none; width: 100%; }
}
