.atmo-field {
  position: absolute;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  container-type: inline-size;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 12% at 22% 47%, #6d9fc7 0%, #3b66b2 30%, transparent 100%),
    radial-gradient(ellipse 82% 26% at 46% 55%, #3b5da5 0%, #172f69 54%, transparent 100%),
    radial-gradient(ellipse 48% 46% at 91% 11%, #1c245c, transparent 92%),
    #050913;
}

.atmo-field--hero::before {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 46% 37% at 53% 96%, transparent 93%, #5d8fff60 99%, transparent 108%);
  mask-image: linear-gradient(transparent 53%, #000 68%, transparent 96%);
  content: "";
}

.atmo-scene {
  position: absolute;
  inset: 0;
  visibility: hidden;
}

.atmo-scene--ring {
  top: 45%;
  height: 100%;
  mix-blend-mode: screen;
}

.atmo-scene--mobile-ring {
  display: none;
  top: 25%;
  height: 844px;
}

.atmo-glow {
  display: none;
  position: absolute;
  border-radius: 50%;
  filter: blur(5.552cqw);
}

.atmo-glow--violet,
.atmo-glow--indigo {
  width: 22.96%;
  height: 43.48%;
  opacity: .5;
}

.atmo-glow--violet {
  left: 89.32%;
  top: 61.72%;
  transform: translate(-50%, -50%) rotate(-60deg);
  background: #2c0166;
}

.atmo-glow--navy {
  width: 15.51%;
  height: 43.48%;
  left: 42.82%;
  top: .54%;
  transform: translate(-50%, -50%) rotate(-60deg);
  background: #15135d;
}

.atmo-glow--indigo {
  left: 96.19%;
  top: 7.98%;
  transform: translate(-50%, -50%) rotate(-120deg);
  background: linear-gradient(339.7deg, #2a21c3 33.7%, #2a21c300 120.1%);
}

.atmo-glow--hue,
.atmo-glow--color {
  filter: blur(6.94cqw);
  background: #2558eb;
}

.atmo-glow--hue {
  width: 77.33%;
  height: 35.79%;
  left: 58%;
  top: 50.18%;
  opacity: .5;
  mix-blend-mode: hue;
}

.atmo-glow--color {
  width: 55.71%;
  height: 25.78%;
  left: 68.82%;
  top: 45.9%;
  opacity: .4;
  mix-blend-mode: color;
}

@media (prefers-reduced-motion: no-preference) {
  .atmo-scene.is-rendering {
    visibility: visible;
  }

  .atmo-field:has(.atmo-scene--wave.is-rendering) {
    background: #050913;
  }

  .atmo-field--hero:has(.atmo-scene--wave.is-rendering) {
    &::before { content: none; }
    .atmo-glow { display: block; }
  }
}

@media (max-width: 479px) {
  .atmo-scene--ring { display: none; }
  .atmo-scene--mobile-ring { display: block; }

  .atmo-scene--wave { translate: 0 -25%; }
  .atmo-field--hero .atmo-scene--wave { opacity: .5; }
}

.hero-atmo .hero-copy p {
  color: #e3e7fb;
}

.hero-atmo .atmo-word {
  display: inline-block;
  overflow: clip;
  overflow-clip-margin: .08em;
  vertical-align: top;
}

.hero-atmo .atmo-word > span {
  display: inline-block;
}

@media (width > 760px) and (height > 540px) and (prefers-reduced-motion: no-preference) {
  .product-story:has(.hero-atmo) .travelling-phone {
    top: max(38.12%, var(--atmo-phone-top, 0px));
  }

  @media (max-height: 800px) {
    .product-story:has(.hero-atmo) .travelling-phone {
      top: max(41%, var(--atmo-phone-top, 0px));
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .product-story:has(.hero-atmo) {
    --atmo-out-cubic: cubic-bezier(.215, .61, .355, 1);
    --atmo-out-quint: cubic-bezier(.23, 1, .32, 1);
  }

  .hero-atmo .site-header {
    animation: atmo-header-in .65s var(--atmo-out-cubic) backwards;
  }

  .hero-atmo .atmo-field {
    animation: atmo-fade-in .85s .5s ease-out backwards;
  }

  .hero-atmo h1 .atmo-word > span {
    animation: atmo-rise-in 1s var(--atmo-word-delay, .35s) var(--atmo-out-quint) backwards;
  }

  .hero-atmo h1 .atmo-word:nth-child(2) { --atmo-word-delay: .433s; }
  .hero-atmo h1 .atmo-word:nth-child(3) { --atmo-word-delay: .517s; }
  .hero-atmo h1 .atmo-word:nth-child(4) { --atmo-word-delay: .6s; }

  .hero-atmo p .atmo-word > span {
    animation: atmo-rise-in 1s var(--atmo-word-delay, .85s) var(--atmo-out-quint) backwards;
  }

  .hero-atmo .hero-actions {
    animation: atmo-rise-in 1s 1.5s var(--atmo-out-quint) backwards;
  }

  .hero-atmo :is(.site-header, .hero-actions):focus-within {
    animation: none;
  }

  .product-story:has(.hero-atmo) .travelling-phone .phone-demo {
    animation: atmo-phone-in 1s 1.75s var(--atmo-out-cubic) backwards;
  }

  .travelling-phone.atmo-preview-playing {
    --atmo-app-opacity: 1;
    --atmo-app-playback: running;
  }

  .product-story:has(.hero-atmo) .travelling-phone .chapter-screen:first-child {
    &::before, &::after {
      position: absolute;
      z-index: 1;
      pointer-events: none;
      filter: opacity(var(--atmo-app-opacity, 0));
      transition: filter .16s ease-out;
      content: "";
    }

    &::before {
      inset: 0;
      background: #0a0a0d url('/atmo/landing/phone/screen5-v3.webp') center / 100% 100% no-repeat;
      animation: atmo-app-screen 8s 1.75s infinite both;
    }

    &::after {
      top: 91%;
      left: 31.5%;
      width: 30px;
      height: 30px;
      margin: -15px;
      border: 1.5px solid #dceaff;
      border-radius: 50%;
      background: #8db4ff5c;
      box-shadow: 0 0 15px #8db4ff90;
      animation: atmo-app-tap 8s 1.75s infinite both;
    }
  }

  @layer components {
    /* Keep the entrance animation active when the scroll timeline pauses the hero. */
    .hero-atmo.paused :is(.site-header, .atmo-field, .atmo-word > span, .hero-actions) {
      animation-play-state: running !important;
    }

    .product-story:has(.hero-atmo) .travelling-phone .chapter-screen:first-child::before,
    .product-story:has(.hero-atmo) .travelling-phone .chapter-screen:first-child::after {
      animation-play-state: var(--atmo-app-playback, paused) !important;
    }
  }
}

@keyframes atmo-fade-in {
  from { opacity: 0; }
}

@keyframes atmo-header-in {
  from { opacity: 0; translate: 0 -150px; }
}

@keyframes atmo-rise-in {
  from { opacity: 0; translate: 0 100%; }
}

@keyframes atmo-phone-in {
  from { opacity: 0; translate: 10cqw 30px; scale: .8; }
}

@keyframes atmo-app-screen {
  0%, 19%, 76%, 100% { opacity: 0; translate: 8% 0; }
  26%, 68% { opacity: 1; translate: 0; }
}

@keyframes atmo-app-tap {
  0%, 10% { opacity: 0; scale: .55; }
  13% { opacity: .9; scale: 1; }
  18%, 59% { opacity: 0; scale: 1.34; }
  61% { opacity: 0; translate: -66px 0; scale: .55; }
  65% { opacity: .9; translate: -66px 0; scale: 1; }
  70%, 100% { opacity: 0; translate: -66px 0; scale: 1.34; }
}

.atmo-footer {
  --footer-ink: #f7f8ff;
  --footer-muted: #bbc5df;
  --footer-rule: #c2d0ff36;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: #050913;
  color: var(--footer-ink);
  padding: clamp(44px, 6vw, 106px) 5% 38px;
}

.atmo-footer .atmo-field {
  inset-block-end: 10%;
  opacity: .65;
  mask-image: linear-gradient(transparent, #000 min(15rem, 32%), #000 87%, transparent);
}

.atmo-footer .footer-shell {
  position: relative;
  width: min(100%, 1200px);
  margin-inline: auto;
}

.atmo-footer .footer-callout {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--footer-rule);
  border-radius: 28px;
  background: linear-gradient(120deg, #101626 8%, #0e1233e8 66%, #212b6bd9 100%);
  min-height: 220px;
}

.atmo-footer .footer-callout h2 {
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -.055em;
  text-transform: none;
  text-wrap: balance;
}

.atmo-footer .footer-callout p {
  color: var(--footer-muted);
  margin-top: 12px;
  font-size: 16px;
}

.atmo-footer .footer-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 26px;
  background: #fff;
  color: #101638;
  font: 600 14px var(--font-display);
  white-space: nowrap;
}

.atmo-footer .footer-cta:hover {
  background: #e6ecff;
}

.atmo-footer .footer-content {
  display: grid;
  grid-template-columns: minmax(140px, .7fr) minmax(230px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  margin-block: clamp(40px, 5vw, 68px) 36px;
}

.atmo-footer .footer-mark {
  display: inline-flex;
}

.atmo-footer .footer-mark img {
  width: 116px;
  height: auto;
}

.atmo-footer .footer-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 36px);
}

.atmo-footer .footer-nav h2 {
  color: #e3e7fb;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
  margin-bottom: 12px;
}

.atmo-footer .footer-nav ul {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.atmo-footer .footer-nav button {
  display: inline-block;
  padding-block: 3px;
  font-size: 15px;
  text-underline-offset: .25em;
}

.atmo-footer .footer-nav button:hover {
  text-decoration: underline;
}

.atmo-footer .footer-fineprint {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 30px;
  border-top: 1px solid var(--footer-rule);
  padding-top: 24px;
  color: var(--footer-muted);
  font-size: 13px;
  line-height: 1.6;
}

.atmo-footer .footer-fineprint p:last-child {
  max-width: 62ch;
}

.atmo-footer button:focus-visible {
  outline-color: #b6c8ff;
}

@media (max-width: 760px) {
  .atmo-footer {
    padding-inline: 24px;
  }

  .atmo-field--hero::before {
    background: radial-gradient(ellipse 71% 28% at 53% 91%, transparent 91%, #5d8fff60 98%, transparent 109%);
  }

  .atmo-footer .footer-callout {
    align-items: flex-start;
    min-height: 0;
  }

  .atmo-footer .footer-content {
    grid-template-columns: 1fr;
  }
}

[data-open-early-access], [data-close-early-access] {
  cursor: pointer;
}

.hero-atmo .site-header .atmo-wordmark {
  width: 96px;
  height: auto;
}

.hero-atmo .hero-actions .download-button {
  min-width: 154px;
  justify-content: center;
}

.product-story:has(.hero-atmo) {
  --story-glow-3: #152248;
}

.product-story:has(.hero-atmo) .feature-background {
  background:
    radial-gradient(ellipse 66% 53% at 50% 109%, #5778d3, #2e488e 37%, #142349 67%, transparent 100%),
    radial-gradient(ellipse 104% 43% at 50% 114%, #25376c, transparent 100%);
}

@media (width <= 760px) {
  .product-story:has(.hero-atmo) .story-horizon {
    background:
      radial-gradient(ellipse 95% 55% at 50% 98%, #4568c6, #223975 39%, #111d40 69%, transparent 100%),
      linear-gradient(transparent, var(--color-surface-base) var(--story-horizon-feather));
  }
}

.atmo-access .access-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: clamp(24px, 6vw, 42px);
  text-align: center;
}

.atmo-access .atmo-wordmark {
  width: 94px;
  height: auto;
  margin-bottom: 8px;
}

.atmo-access h2 {
  color: #f5f7ff;
  font-size: clamp(24px, 5vw, 30px);
  letter-spacing: -.04em;
  text-transform: none;
}

.atmo-access p {
  color: #c5cbdd;
  font-size: 15px;
  line-height: 1.5;
}

.atmo-access .access-form {
  display: grid;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.atmo-access :is(input, .access-submit) {
  min-height: 50px;
  border: 1px solid #9aabda54;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 16px;
}

.atmo-access input {
  width: 100%;
  color: #f5f7ff;
  background: #050912c9;
}

.atmo-access input::placeholder {
  color: #a7aec4;
}

.atmo-access .access-submit {
  background: #fff;
  color: #111a36;
  font-weight: 650;
  cursor: pointer;
}

.atmo-access .access-submit:hover {
  background: #dce5ff;
}

.atmo-access :is(button, input):focus-visible {
  outline: 2px solid #aed2ff;
  outline-offset: 3px;
}

.atmo-access .access-status:empty {
  display: none;
}
