/* Figma 654:15900. Native copy and store links surround the exact exported
   phone composition; artwork proportions stay constant across screen sizes. */
.paper-app-promo {
  width: calc(100% - 2 * var(--paper-gutter, clamp(1.25rem, 5.5556vw, 5rem)));
  margin-inline: auto;
  padding-block: clamp(2.5rem, 4.4444vw, 4rem);
  container-type: inline-size;
}
.paper-app-promo-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 45cqw;
  padding: 3.75cqw;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--paper-card-radius, var(--radius-2xl));
  background: var(--color-paper);
  color: var(--ink);
}
.paper-app-promo-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.875cqw;
  width: 39.21875cqw;
}
.paper-app-promo-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.390625cqw;
  margin: 0;
  font: var(--weight-bold) clamp(0.875rem, 1.7262cqw, 2rem) / 1 var(--font-display);
  font-variation-settings: var(--font-kicker-axes);
  white-space: nowrap;
}
.paper-app-promo-laurel {
  flex: 0 0 auto;
  width: 1.73125cqw;
  height: auto;
}
.paper-app-promo-laurel:last-child {
  transform: scaleX(-1);
}
.paper-app-promo-copy h2 {
  font: var(--weight-display) 5cqw / var(--leading-heading-tight) var(--font-display);
  font-variation-settings: var(--font-display-axes);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.paper-app-promo-copy h2 span {
  display: block;
}
.paper-app-downloads {
  display: flex;
  align-items: center;
  gap: 1.3391cqw;
  margin-top: 1.875cqw;
  font: var(--weight-regular) clamp(1rem, 1.4cqw, 1.5rem) / 1 var(--font-brand);
  color: var(--muted);
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.paper-app-store-links {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.6696cqw, 1rem);
}
.paper-app-store {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-hit-size);
  border-radius: var(--radius-xs);
}
.paper-app-store:hover {
  opacity: 0.8;
}
.paper-app-store:focus-visible {
  outline: var(--focus-width) solid var(--color-focus);
  outline-offset: 5px;
}
.paper-app-store-apple {
  display: block;
  position: relative;
  width: clamp(7.5rem, 10.4cqw, 10rem);
  aspect-ratio: 166.159 / 55.5419;
}
.paper-app-store-apple img {
  display: block;
  position: absolute;
  height: auto;
}
.paper-app-store-background {
  inset: 0;
  width: 100%;
}
.paper-app-store-icon {
  left: 8.33%;
  top: 21.8%;
  width: 14.81%;
}
.paper-app-store-title {
  left: 28.77%;
  top: 44.68%;
  width: 62.73%;
}
.paper-app-store-caption {
  left: 29.81%;
  top: 21.1%;
  width: 57.78%;
}
.paper-app-store-google {
  display: block;
  width: clamp(8.35rem, 11.59cqw, 11.14rem);
  height: auto;
}
.paper-app-promo-art {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  aspect-ratio: 1280 / 576;
  pointer-events: none;
  container-type: inline-size;
}
.paper-app-promo-graph {
  position: absolute;
  z-index: 1;
  left: -1.875cqw;
  top: 4.26875cqw;
  width: 90.4153cqw;
  aspect-ratio: 1157.32 / 546.319;
  mask-image: linear-gradient(90deg, transparent 48%, #000 61%);
  /* Keep the graph behind the phone while the native layers stay transparent. */
  clip-path: polygon(
    evenodd,
    0 0,
    100% 0,
    100% 100%,
    0 100%,
    0 0,
    67.4% 0,
    61.8% 100%,
    93.6% 100%,
    99% 0,
    67.4% 0,
    0 0
  );
}
.paper-app-promo-graph img {
  position: absolute;
  display: block;
  height: auto;
}
.paper-app-promo-graph-dem {
  left: 24.867%;
  top: 26.7095%;
  width: 74.528%;
}
.paper-app-promo-graph-rep {
  left: 24.862%;
  top: 48.864%;
  width: 74.528%;
  transform: scaleY(-1);
}
.paper-app-promo-graph-dots {
  inset: 0;
  width: 100%;
  clip-path: inset(0 0 0 98%);
}
.paper-app-promo-quotes {
  /* Figma 654:15901 uses filled party buttons, not the theme-adjusted
     text-label palette. Its Republican button is the approved deeper red. */
  --paper-promo-dem-fill: var(--color-market-dem-strong);
  --paper-promo-rep-fill: #ce1126;
  --paper-promo-button-depth: clamp(3px, 0.27586cqw, 6.625px);
  position: absolute;
  z-index: 2;
  left: 90.8859cqw;
  top: 20.3883cqw;
  display: grid;
  justify-items: center;
  gap: max(var(--space-2), 0.6394cqw);
  width: max(4.25rem, 7.168cqw);
  color: var(--palette-white);
  font: var(--weight-medium) clamp(0.75rem, 0.9654cqw, 1.25rem) / 1 var(--font-body);
  font-variation-settings: var(--font-body-axes);
  pointer-events: auto;
}
.paper-app-promo-quote {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  min-width: var(--control-hit-size);
  min-height: max(var(--control-hit-size), 2.7583cqw);
  padding: var(--space-2) var(--space-1) calc(var(--space-2) + var(--paper-promo-button-depth));
  border: 1px solid transparent;
  border-radius: clamp(var(--radius-sm), 0.8275cqw, var(--radius-xl));
  background: var(--paper-promo-dem-fill);
  color: var(--palette-white);
  font-weight: 480;
  font-variation-settings:
    'wdth' 100,
    'wght' 480;
  text-decoration: none;
  box-shadow: inset 0 calc(-1 * var(--paper-promo-button-depth)) rgb(0 0 0 / 15%);
}
.paper-app-promo-quote[data-promo-party='R'] {
  background: var(--paper-promo-rep-fill);
}
.paper-app-promo-quote:hover {
  filter: brightness(1.1);
}
.paper-app-promo-quote:focus-visible {
  outline: var(--focus-width) solid var(--ink);
  outline-offset: var(--focus-offset);
}
.paper-app-promo-quote b {
  color: var(--palette-white);
  font-weight: 580;
  font-variation-settings:
    'wdth' 100,
    'wght' 580;
}
.paper-app-promo-quote [data-promo-label] {
  opacity: 0.6;
}
.paper-app-promo-phone {
  position: absolute;
  left: 52.578125cqw;
  top: 1.534375cqw;
  width: 38.1733cqw;
  aspect-ratio: 489 / 556;
  overflow: hidden;
  /* The Figma fade rounds inward at the frame edges; the live map remains
     readable in the center, then dissolves before the card's bottom edge. */
  mask-image: radial-gradient(ellipse 85% 100% at 50% 0%, #000 67%, transparent 96%);
}
.paper-app-promo-phone-canvas {
  position: absolute;
  top: 0;
  left: 1.56%;
  width: 96.875%;
  aspect-ratio: 473.719 / 555.254;
  transform: rotate(1.56deg);
}
.paper-app-promo-phone-frame,
.paper-app-promo-phone-screen {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  container-type: size;
}
.paper-app-promo-phone-frame {
  inset: -2.19% 8.34% -53.78% 1.58%;
}
.paper-app-promo-phone-screen {
  inset: -2.16% 16.48% -50.54% 3.43%;
}
.paper-app-promo-phone-frame img {
  display: block;
  flex: none;
  max-width: none;
  transform: rotate(3.61deg);
}
.paper-app-promo-phone-frame img {
  width: hypot(87.5404cqw, 2.72232cqh);
  height: hypot(12.4596cqw, 97.2777cqh);
}
@media (max-width: 900px) {
  .paper-app-promo-card {
    --paper-promo-mobile-padding: clamp(1rem, 4.5cqw, 2rem);
    flex-direction: column;
    align-items: stretch;
    padding: var(--paper-promo-mobile-padding);
    padding-bottom: 0;
  }
  .paper-app-promo-copy {
    width: 100%;
    gap: 1.25rem;
  }
  .paper-app-promo-eyebrow {
    gap: 0.25rem;
    font-size: clamp(0.875rem, 2.8cqw, 1.25rem);
    white-space: normal;
  }
  .paper-app-promo-laurel {
    width: clamp(0.875rem, 2.8cqw, 1.25rem);
  }
  .paper-app-promo-copy h2 {
    font-size: clamp(2rem, 8.5cqw, 3.5rem);
    overflow-wrap: anywhere;
  }
  .paper-app-downloads {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
  }
  .paper-app-store-links {
    width: min(100%, 18rem);
    gap: 0.5rem;
  }
  .paper-app-store {
    flex: 1 1 0;
    min-width: 0;
  }
  .paper-app-store:last-child {
    flex-grow: 1.114;
  }
  .paper-app-store-apple,
  .paper-app-store-google {
    width: 100%;
  }
  .paper-app-promo-art {
    /* Let the phone use the card's width on a small screen, instead of
       shrinking a desktop composition into the text column. */
    position: relative;
    align-self: center;
    width: calc(100% + 2 * var(--paper-promo-mobile-padding));
    max-width: 36rem;
    aspect-ratio: 1 / 0.96;
    margin: 1.5rem calc(-1 * var(--paper-promo-mobile-padding)) 0;
  }
  .paper-app-promo-phone {
    z-index: 1;
    left: 4cqw;
    top: 12cqw;
    width: 74cqw;
    /* Figma 730:20386: mask the assembled phone once so the live screen and
       silver frame dissolve together, including the lower right edge. The
       original SVG keeps Hugo's asymmetric, curved fade. */
    mask-image: var(--paper-phone-mobile-mask);
    mask-size: 150% 190%;
    mask-position: 30% 100%;
    mask-repeat: no-repeat;
  }
  .paper-app-promo-graph {
    z-index: 0;
    left: 4cqw;
    top: 38cqw;
    width: calc(92cqw - clamp(4.5rem, 21cqw, 7rem));
    height: 6.625rem;
    aspect-ratio: auto;
    mask-image: none;
    /* Keep both curve segments in the foreground composition, but cut out
       the phone silhouette so they never show through its fading screen. */
    clip-path: polygon(
      evenodd,
      0 -50%,
      100% -50%,
      100% 150%,
      0 150%,
      0 -50%,
      8cqw -50%,
      8cqw 150%,
      66cqw 150%,
      66cqw -50%,
      8cqw -50%,
      0 -50%
    );
  }
  .paper-app-promo-graph :is(.paper-app-promo-graph-dem, .paper-app-promo-graph-rep) {
    left: 0;
    width: 100%;
    height: 2.5rem;
  }
  .paper-app-promo-graph-dem {
    top: calc(1.5rem - 2.5rem * 0.9337);
  }
  .paper-app-promo-graph-rep {
    top: calc(5.125rem - 2.5rem * 0.0661);
  }
  .paper-app-promo-graph .paper-app-promo-graph-dots {
    display: none;
  }
  .paper-app-promo-quotes {
    left: auto;
    right: 4cqw;
    top: 38cqw;
    width: clamp(4.5rem, 21cqw, 7rem);
    gap: 0.625rem;
    font-size: 0.875rem;
  }
  .paper-app-promo-quote {
    min-height: 3rem;
  }
  /* Respect enlarged text: once the illustration is narrower than twelve
     text ems, the two live controls get their own row below the phone. */
  @container (max-width: 12rem) {
    .paper-app-promo-quotes {
      position: relative;
      top: auto;
      left: 1rem;
      right: auto;
      width: calc(100% - 2rem);
      margin-block: 98cqw 1rem;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .paper-app-promo-quote {
      flex-wrap: wrap;
      min-width: 0;
      min-height: 6rem;
      padding-inline: 0.25rem;
    }
  }
}
@media (min-width: 700px) and (max-width: 900px) {
  .paper-app-promo-card {
    flex-direction: row;
    align-items: center;
    padding-bottom: var(--paper-promo-mobile-padding);
  }
  .paper-app-promo-copy {
    flex: 0 0 46%;
    width: 46%;
  }
  .paper-app-promo-eyebrow {
    font-size: clamp(0.875rem, 1.65cqw, 1rem);
  }
  .paper-app-promo-copy h2 {
    font-size: clamp(2rem, 4.8cqw, 2.75rem);
  }
  .paper-app-promo-art {
    flex: 0 0 58%;
    width: 58%;
    max-width: none;
    margin: 0 0 0 -4%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .paper-app-store,
  .paper-app-promo-quote {
    transition: none;
  }
}
