:root {
  --ink: #121212;
  --accent: #f4661b;
  --accent-soft: #ffb98c;
  --green: #12b76a;
  --blue: #dce7fe;
  --muted: rgba(255, 255, 255, .58);
  --glow-y: 90%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Poppins, system-ui, sans-serif;
  color: #fff;
  background: #090909;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #090909;
}

/* top bar */
.topbar {
  position: relative;
  /* the open download menu overhangs the hero, so the bar has to sit above
     every other layer on the page — z-index on .dl-menu itself can't do it,
     the bar's own z-index makes a stacking context its children can't leave */
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 3vw, 44px);
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 19px; }
.brand-mark { width: 34px; height: 34px; border-radius: 22%; object-fit: cover; }

.dl { position: relative; }
.dl summary { list-style: none; cursor: pointer; }
.dl summary::-webkit-details-marker { display: none; }

.btn-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px 11px 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-top:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 255, 255, .16); }
.chev { width: 16px; height: 16px; transition: transform .2s ease; }
.dl[open] .chev { transform: rotate(180deg); }

.dl-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 232px;
  padding: 6px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  animation: menu-in .16s ease;
}
.dl-menu a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border-radius: 11px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}
.dl-menu a:hover { background: rgba(0, 0, 0, .06); }
.dl-icon { width: 17px; height: 17px; flex: none; }

@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

/* hero */
.hero {
  position: relative;
  z-index: 2;
  padding: clamp(14px, 2.6vh, 34px) 24px 0;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 72px);
  font-weight: 600;
  /* only shows when the headline wraps; a single line is unaffected */
  line-height: 1.14;
  letter-spacing: -.03em;
}

.hero p {
  margin: 22px auto 0;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.badges { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 30px; }
.badge { display: block; transition: transform .15s ease; }
.badge:hover { transform: translateY(-2px); }
.badge img { display: block; }
.badge-apple { height: 48px; margin: 7px 11px; }
.badge-google { height: 70px; }

.pills {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 22px; margin: 22px 0 0; padding: 0; list-style: none;
}
.pills li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255, 255, 255, .55);
}
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-orange { background: var(--accent); }
.dot-green { background: var(--green); }
.dot-blue { background: var(--blue); }
.dot-pink { background: #f7a1c4; }

/* stage: glow arc + phone bleeding off the bottom edge */
/* the phone hangs from the top of whatever space is left and is clipped at
   the page edge — a short viewport shows less of it, never overlaps the copy */
.stage {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 150px;
  overflow: hidden;
  margin-top: clamp(20px, 4vh, 48px);
}

/* the cut-off bottom of the frame dissolves into the glow: a masked
   backdrop blur over it, and the frame itself fading out underneath */
.stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .06) 20%, rgba(0, 0, 0, .2) 38%, rgba(0, 0, 0, .45) 56%, rgba(0, 0, 0, .72) 74%, rgba(0, 0, 0, .92) 88%, #000 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .06) 20%, rgba(0, 0, 0, .2) 38%, rgba(0, 0, 0, .45) 56%, rgba(0, 0, 0, .72) 74%, rgba(0, 0, 0, .92) 88%, #000 100%);
}

/* the arc of light the phone stands in — bright core at the bottom centre,
   falling off into the app's orange */
.glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(64% 40% at 50% var(--glow-y), rgba(255, 255, 255, .95) 0%, rgba(255, 220, 198, .8) 18%, rgba(244, 102, 27, .55) 40%, rgba(244, 102, 27, .16) 62%, transparent 80%),
    radial-gradient(120% 60% at 50% 100%, rgba(244, 102, 27, .3) 0%, rgba(244, 102, 27, .06) 50%, transparent 76%);
  filter: blur(8px);
}

.device {
  zoom: 1;
  -webkit-mask-image: linear-gradient(to bottom, #000 42%, rgba(0, 0, 0, .94) 54%, rgba(0, 0, 0, .78) 65%, rgba(0, 0, 0, .52) 76%, rgba(0, 0, 0, .26) 86%, rgba(0, 0, 0, .08) 94%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 42%, rgba(0, 0, 0, .94) 54%, rgba(0, 0, 0, .78) 65%, rgba(0, 0, 0, .52) 76%, rgba(0, 0, 0, .26) 86%, rgba(0, 0, 0, .08) 94%, transparent 100%);
}
/* devices.css crops with object-fit:cover; the screenshot is 2% narrower
   than the 390x830 screen, so fill it instead of losing the tab bar */
.device-iphone-14-pro .device-screen { object-fit: fill; }

.foot {
  position: absolute;
  left: clamp(20px, 3vw, 44px);
  bottom: 18px;
  z-index: 2;
  margin: 0;
  font-size: 12px;
  color: rgba(255, 255, 255, .3);
}

@media (max-height: 820px) { .device { zoom: .86; } }

/* short laptop viewports: tighten the copy so the phone and its glow still
   get room, and drop the glow's core below the text */
@media (max-height: 740px) {
  :root { --glow-y: 104%; }
  .device { zoom: .72; }
  .topbar { padding-top: 18px; }
  .hero { padding-top: 18px; }
  .hero p { margin-top: 14px; }
  .badges { margin-top: 18px; }
  .pills { margin-top: 14px; }
  .stage { margin-top: 18px; }
}

@media (max-width: 640px) {
  /* phones get a scrolling page with real spacing and the whole frame on
     show, rather than everything squeezed into one clipped viewport */
  .page { height: auto; min-height: 100dvh; overflow: visible; }
  .topbar { padding: 20px 18px; }
  .brand { font-size: 17px; }
  .brand-mark { width: 30px; height: 30px; }
  .btn-top { gap: 6px; padding: 8px 12px 8px 16px; font-size: 12.5px; }
  .chev { width: 14px; height: 14px; }
  .dl-menu { min-width: 190px; top: calc(100% + 8px); border-radius: 14px; }
  .dl-menu a { gap: 9px; padding: 9px 11px; border-radius: 9px; font-size: 12.5px; }
  .dl-icon { width: 15px; height: 15px; }

  .hero { padding: 26px 22px 0; }
  h1 { font-size: clamp(30px, 8.6vw, 40px); line-height: 1.24; }
  .hero p { margin-top: 16px; font-size: 13px; line-height: 1.7; }
  .badges { flex-wrap: nowrap; gap: 4px; margin-top: 30px; }
  .badge-apple { height: 42px; margin: 6px 9px; }
  .badge-google { height: 61px; }
  .pills { gap: 9px 18px; margin-top: 26px; }
  .pills li { gap: 7px; font-size: 11.5px; }
  .dot { width: 6px; height: 6px; }

  .stage { margin-top: 42px; min-height: 0; overflow: visible; }
  .stage::after { display: none; }
  .device { zoom: .62; -webkit-mask-image: none; mask-image: none; }

  /* on a scrolling page the glow has to sit high enough to read on the
     first screen, not just once you reach the bottom */
  .glow {
    inset: 0;
    height: 100%;
    background:
      radial-gradient(118% 24% at 50% 47%, rgba(255, 255, 255, .8) 0%, rgba(255, 220, 198, .6) 20%, rgba(244, 102, 27, .42) 44%, rgba(244, 102, 27, .12) 66%, transparent 82%),
      radial-gradient(170% 42% at 50% 62%, rgba(244, 102, 27, .28) 0%, rgba(244, 102, 27, .06) 48%, transparent 76%);
  }

  .foot { position: static; padding: 26px 0 20px; text-align: center; }
}
