/* Homepage hero graphic: a phone that flicks through real pages, with fan activity around it.
   Desktop: notifications orbit the phone. Phones (< 810px): notifications scroll in rows behind it.
   Built by marketing-hero-live.js. */

html.dims-page-ready .dims-hero-live {
  opacity: 1 !important;
  transform: none !important;
}

.dims-hero-live {
  --s: 1.1;
  --ptop: 0px;
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: clamp(1.25rem, 3.5vh, 2.5rem);
  height: calc(var(--ptop) + 576px * var(--s) + 72px);
  overflow: clip;
  contain: layout paint;
}

/* ---------- phone ---------- */
.dims-hero-live__phone {
  position: absolute;
  left: 50%;
  top: var(--ptop);
  width: calc(280px * var(--s));
  height: calc(576px * var(--s));
  transform: translateX(-50%);
  z-index: 4;
}

.dims-hero-live__device {
  position: absolute;
  inset: 0;
  border-radius: calc(44px * var(--s));
}

.dims-hero-live__screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #111;
  border-radius: calc(40px * var(--s));
  z-index: 1;
  /* Keeps the rounded clip working while pages slide (Safari). */
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.dims-hero-live__page {
  position: absolute;
  inset: 0;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.2, 1), filter 0.6s;
}

.dims-hero-live__page img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dims-hero-live__page:not(.is-on):not(.is-prev) {
  transition: none;
}

.dims-hero-live__page.is-on {
  transform: none;
  z-index: 2;
}

.dims-hero-live__page.is-prev {
  transform: translateX(-28%);
  filter: brightness(0.5);
  z-index: 1;
}

.dims-hero-live__touch {
  position: absolute;
  left: 74%;
  top: 60%;
  width: 40px;
  height: 40px;
  margin: -20px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.5);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.7), 0 6px 18px rgb(0 0 0 / 0.3);
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}

.dims-hero-live__touch.is-go {
  animation: dims-hero-live-swipe 0.75s cubic-bezier(0.5, 0, 0.3, 1);
}

@keyframes dims-hero-live-swipe {
  0% { opacity: 0; transform: scale(0.7); }
  18% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: translateX(-140px); }
  100% { opacity: 0; transform: translateX(-165px) scale(0.9); }
}

/* No frame: just the page, rounded, with a soft shadow. */
.dims-hero-live[data-frame="none"] .dims-hero-live__screen {
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.06), 0 34px 70px -30px rgb(0 0 0 / 0.5);
}

/* iPhone: the real device frame (images/iphone-frame.png, 937x1920) drawn over the page.
   Screen hole in that image: 42px / 44px sides, 37px top, 39px bottom. */
.dims-hero-live[data-frame="iphone"] .dims-hero-live__phone {
  height: calc(280px * var(--s) * 1920 / 937);
}

.dims-hero-live[data-frame="iphone"] .dims-hero-live__device {
  filter: drop-shadow(0 34px 40px rgb(0 0 0 / 0.28));
}

.dims-hero-live[data-frame="iphone"] .dims-hero-live__screen {
  inset: 1.93% 4.7% 2.03% 4.48%;
  border-radius: calc(280px * var(--s) * 0.118);
}

.dims-hero-live__frame {
  display: none;
}

.dims-hero-live[data-frame="iphone"] .dims-hero-live__frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* Air: slim titanium rim and thin bezel (images/iphone-air-frame.svg, 762x1564).
   Body spans x 6..756; the screen hole is 20 units in from the body, corner radius 98. */
.dims-hero-live[data-frame="air"] .dims-hero-live__phone {
  height: calc(280px * var(--s) * 1564 / 762);
}

.dims-hero-live[data-frame="air"] .dims-hero-live__device {
  filter: drop-shadow(0 24px 30px rgb(0 0 0 / 0.16));
}

.dims-hero-live[data-frame="air"] .dims-hero-live__screen {
  inset: 1.279% 3.412%;
  border-radius: calc(280px * var(--s) * 98 / 762);
}

.dims-hero-live[data-frame="air"] .dims-hero-live__frame {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
  user-select: none;
}

/* ---------- notification card (shared) ---------- */
.dims-hero-live__note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px 11px 11px;
  border-radius: 22px;
  background: rgb(255 255 255 / 0.95);
  border: 1px solid rgb(0 0 0 / 0.06);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 20px 40px -22px rgb(0 0 0 / 0.42);
  white-space: nowrap;
  text-align: left;
  font-size: 15px;
  line-height: 1.3;
  color: var(--dims-ink, #0a0a0a);
}

.dims-hero-live__note img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  flex: 0 0 auto;
}

.dims-hero-live__note b {
  display: block;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dims-hero-live__note small {
  display: block;
  color: var(--dims-muted, #6b6b70);
  font-size: 13px;
}

/* ---------- desktop: orbit ---------- */
.dims-hero-live__orb {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  will-change: transform;
}

.dims-hero-live__orb > .dims-hero-live__note {
  transition: opacity 0.3s;
  animation: dims-hero-live-bob 6s ease-in-out infinite alternate;
}

.dims-hero-live__orb.is-swapping > .dims-hero-live__note {
  opacity: 0;
}

@keyframes dims-hero-live-bob {
  from { transform: translate(calc(var(--bx, 3px) * -1), calc(var(--ba, 7px) * -1)) rotate(calc(var(--br, 0deg) * -1)); }
  to { transform: translate(var(--bx, 3px), var(--ba, 7px)) rotate(var(--br, 0deg)); }
}

/* ---------- phones: ticker ---------- */
.dims-hero-live__row {
  position: absolute;
  left: 0;
  display: flex;
  gap: 14px;
  width: max-content;
  z-index: 1;
  animation: dims-hero-live-marquee 120s linear infinite;
}

.dims-hero-live__row--rev {
  animation-direction: reverse;
  animation-duration: 140s;
}

@keyframes dims-hero-live-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.dims-hero-live__row .dims-hero-live__note {
  padding: 5px 12px 5px 5px;
  gap: 8px;
  border-radius: 14px;
  font-size: 12px;
  background: #fff;
  border-color: rgb(0 0 0 / 0.07);
  box-shadow: 0 10px 26px -18px rgb(0 0 0 / 0.35);
  opacity: 0.38;
  filter: saturate(0.4);
  transition: opacity 0.6s, filter 0.6s, box-shadow 0.6s;
}

.dims-hero-live__row .dims-hero-live__note img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.dims-hero-live__row .dims-hero-live__note small {
  font-size: 11px;
}

.dims-hero-live__row .dims-hero-live__note.is-hot {
  opacity: 1;
  filter: none;
  box-shadow: 0 16px 34px -16px rgb(0 0 0 / 0.4);
}

/* Bigger phone and notifications on wider screens (the script scales the orbit from --s). */
@media (min-width: 1280px) {
  .dims-hero-live { --s: 1.22; }
}

@media (min-width: 1440px) {
  .dims-hero-live { --s: 1.32; }
}

@media (min-width: 1600px) {
  .dims-hero-live { --s: 1.42; }
}

@media (min-width: 1800px) {
  .dims-hero-live { --s: 1.52; }
}

@media (min-width: 2000px) {
  .dims-hero-live { --s: 1.62; }
}

@media (min-width: 2300px) {
  .dims-hero-live { --s: 1.76; }
}

@media (max-width: 809.98px) {
  .dims-hero-live {
    --s: 0.9;
    --ptop: 60px;
    margin-top: clamp(0.75rem, 2vh, 1.25rem);
    height: calc(var(--ptop) + 576px * var(--s) + 40px);
  }

  /* No shadow under the phone on small screens. */
  .dims-hero-live .dims-hero-live__device {
    filter: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dims-hero-live__row,
  .dims-hero-live__orb > .dims-hero-live__note,
  .dims-hero-live__touch.is-go {
    animation: none !important;
  }

  .dims-hero-live__page {
    transition: none !important;
  }
}
