/* Device frames and colored stage panels that hold the product screenshots. */
.phone {
  position: relative;
  width: min(16.5rem, 60vw);
  padding: 0.5rem;
  border-radius: 2.6rem;
  background: var(--color-device);
  box-shadow: var(--shadow-device);
}

.phone img {
  width: 100%;
  aspect-ratio: 600 / 1333;
  object-fit: cover;
  border-radius: 2.15rem;
}

.phone-sm {
  width: min(13rem, 46vw);
}

.browser {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: var(--shadow-device);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 2rem;
  padding-inline: 0.875rem;
  background: var(--color-chrome-bar);
  border-bottom: 1px solid var(--color-line-soft);
}

.browser-bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-chrome-dot);
}

.browser-bar .browser-url {
  width: auto;
  height: auto;
  margin-left: var(--space-3);
  padding: 0.125rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 0.6875rem;
  color: var(--color-ink-faint);
}

.browser img {
  width: 100%;
}

.keyboard-card {
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--color-surface);
  box-shadow: var(--shadow-device);
}

.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-panel);
}

.panel-teal {
  background: var(--color-teal-strong);
}

.panel-deep {
  background: var(--color-teal-deep);
}

.panel-mist {
  background: var(--color-teal-mist);
}

.panel-terra {
  background: var(--color-terra-soft);
}

.panel-sand {
  background: var(--color-mist);
}

.grain {
  isolation: isolate;
}

.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.28 0 0 0 0 0.22 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.dashed-grid {
  background-image:
    linear-gradient(to right, var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-grid-line) 1px, transparent 1px);
  background-size: 160px 160px;
  background-position: center top;
}

/* Hero stage: a soft panel behind a brand panel, with a phone and a browser layered on top. */
.hero-stage {
  position: relative;
  min-height: 34rem;
}

.hero-stage .panel-back {
  position: absolute;
  inset: 2.5rem 30% 1.5rem 0;
}

.hero-stage .panel-front {
  position: absolute;
  inset: 0 0 3rem 22%;
}

.hero-stage .phone {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-38%);
}

.hero-stage .browser {
  position: absolute;
  top: 7.5rem;
  left: 0;
  width: min(23rem, 62%);
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: var(--space-7) var(--space-4);
}

.stage-pair {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: var(--space-4);
}

.stage-pair .phone:last-child {
  margin-bottom: var(--space-7);
}

@media (max-width: 39.99rem) {
  .hero-stage {
    min-height: 30rem;
  }

  .hero-stage .panel-front {
    left: 10%;
  }

  .hero-stage .browser {
    top: 5rem;
    width: 72%;
  }

  .stage-pair .phone:first-child {
    display: none;
  }

  .stage-pair .phone:last-child {
    margin-bottom: 0;
  }
}
