:root {
  --bg: #fbfbfd;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --frame: #2a2c30;
  --frame-light: #9a9ea6;
  --device-w: min(940px, 94vw);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #409cff;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 16px 24px;
}

.eyebrow { font-size: 17px; font-weight: 600; margin-bottom: 14px; }

.headline {
  font-size: clamp(48px, 9vw, 88px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.sub { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* ---------- Device ---------- */
.stage {
  margin-top: 44px;
  perspective: 2200px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.device {
  position: relative;
  width: var(--device-w);
  display: flex;
  transform: rotateX(4deg);
  filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.28));
  animation: float 7s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: rotateX(4deg) translateY(0); }
  50% { transform: rotateX(4deg) translateY(-8px); }
}

.half {
  position: relative;
  width: 50%;
  aspect-ratio: 0.72;
  padding: 1.3% ;
  background: linear-gradient(145deg, #5b5e65, var(--frame) 40%, #17181b);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.half-left {
  transform-origin: right center;
  transform: rotateY(4deg);
  border-radius: 7% 0 0 7% / 5.5% 0 0 5.5%;
  padding-right: 0;
}

.half-right {
  transform-origin: left center;
  transform: rotateY(-4deg);
  border-radius: 0 7% 7% 0 / 0 5.5% 5.5% 0;
  padding-left: 0;
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  border-radius: 5.5% 0 0 5.5% / 4.2% 0 0 4.2%;
  container-type: inline-size;
}

.half-right .screen { border-radius: 0 5.5% 5.5% 0 / 0 4.2% 4.2% 0; }

.wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 20% 0%, #bcd3e6 0%, transparent 60%),
    radial-gradient(100% 70% at 90% 100%, #d8b99a 0%, transparent 65%),
    linear-gradient(180deg, #9db8d0 0%, #c6c2b8 55%, #cfae8d 100%);
}

.half-left .wallpaper { background-size: 200% 100%; background-position: 0 0; }
.half-right .wallpaper { background-size: 200% 100%; background-position: 100% 0; }

.hinge {
  position: absolute;
  left: 50%;
  top: 1.2%;
  bottom: 1.2%;
  width: 1px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  pointer-events: none;
  z-index: 6;
}

.statusbar {
  position: absolute;
  top: 3.5cqw;
  left: 7cqw;
  right: 7cqw;
  color: #fff;
  font-size: 3.2cqw;
  font-weight: 600;
  z-index: 3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.statusbar.right { text-align: right; }
.statusbar .dot {
  display: inline-block;
  width: 7cqw; height: 7cqw;
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
  backdrop-filter: blur(10px);
}

/* ---------- Home screens ---------- */
.home-left, .home-right {
  position: absolute;
  inset: 0;
  padding: 14cqw 7cqw 8cqw;
  z-index: 2;
  transition: opacity .45s ease, transform .45s ease;
}

.widget {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 6cqw;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2cqw;
  padding: 5cqw;
  text-shadow: 0 1px 6px rgba(0,0,0,0.25);
}

.widget-label { font-size: 2.8cqw; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.widget strong { font-size: 6cqw; line-height: 1.15; letter-spacing: -0.02em; }
.widget-sub { font-size: 3cqw; opacity: .9; }

.widget-hero {
  height: 100%;
  justify-content: flex-end;
  background:
    linear-gradient(200deg, rgba(255,255,255,0.1), rgba(20,30,60,0.55)),
    radial-gradient(80% 60% at 30% 20%, rgba(255,200,160,.7), transparent 70%),
    rgba(255,255,255,0.2);
}
.widget-hero strong { font-size: 9cqw; }

.widget-mini { margin-bottom: 7cqw; }
.widget-mini strong { font-size: 7cqw; }

.icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5cqw 3cqw;
}

.app-icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8cqw;
  font: inherit;
  font-size: 3cqw;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0,0,0,0.45);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1);
  -webkit-tap-highlight-color: transparent;
}

.app-icon-btn img {
  width: 100%;
  max-width: 17cqw;
  aspect-ratio: 1;
  border-radius: 22.5%;
  object-fit: cover;
  box-shadow: 0 2cqw 4cqw rgba(0,0,0,0.3);
  transition: box-shadow .25s ease;
}

.app-icon-btn:hover { transform: scale(1.12) translateY(-1cqw); }
.app-icon-btn:active { transform: scale(0.94); }
.app-icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }
.app-icon-btn:hover img { box-shadow: 0 3cqw 6cqw rgba(0,0,0,0.4); }
.app-icon-btn span { white-space: nowrap; }

/* ---------- App preview layer ---------- */
.app-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  background-repeat: no-repeat;
  background-size: 200% 100%;
  opacity: 0;
  transform: scale(0.88);
  pointer-events: none;
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.9,.3,1);
}

#layerLeft { background-position: 0 0; transform-origin: right center; }
#layerRight { background-position: 100% 0; transform-origin: left center; }

.device.app-open .app-layer { opacity: 1; transform: scale(1); }
.device.app-open .home-left,
.device.app-open .home-right { opacity: 0; transform: scale(1.08); pointer-events: none; }

.fallback {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3cqw;
  color: #fff;
  background: transparent;
  font-size: 3.4cqw;
}
.fallback img { width: 26cqw; border-radius: 22%; box-shadow: 0 4cqw 8cqw rgba(0,0,0,0.5); }
.fallback strong { font-size: 6cqw; }
.fallback span { opacity: .6; }
.device.app-open .fallback:not([hidden]) { display: flex; }

.home-indicator {
  position: absolute;
  bottom: 2.2cqw;
  left: 50%;
  transform: translateX(-50%);
  width: 28cqw;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 0 4cqw transparent, 0 0 6px rgba(0,0,0,0.4);
  cursor: pointer;
  z-index: 7;
}
.home-indicator::after { content: ""; position: absolute; inset: -10px -8px; }

/* ---------- Info bar ---------- */
.info-bar {
  margin-top: 40px;
  width: min(700px, 94vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 10px 28px;
  border-radius: 999px;
  background: rgba(142, 142, 147, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: left;
}

.info-text { display: flex; flex-direction: column; min-width: 0; }
.info-title { font-size: 15px; font-weight: 600; }
.info-desc { font-size: 13px; color: var(--muted); }

.pill-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  transition: background .2s, transform .2s;
}
.pill-btn:hover { background: var(--accent-hover); transform: scale(1.03); }

.policy-links {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  font-size: 13px;
}
.policy-links a, .site-footer a { color: var(--accent); text-decoration: none; }
.policy-links a:hover, .site-footer a:hover { text-decoration: underline; }

.site-footer { text-align: center; padding: 24px 16px 40px; font-size: 12px; color: var(--muted); }

@media (max-width: 600px) {
  .info-bar { border-radius: 24px; padding: 14px 14px 14px 20px; }
  .pill-btn { padding: 10px 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .device { animation: none; }
  * { transition-duration: .01ms !important; }
}


.hinge { display: none; }

.back-btn {
  position: absolute;
  top: 19cqw;
  right: 7cqw;
  width: 9cqw;
  height: 9cqw;
  padding: 2.2cqw;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(142, 142, 147, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  z-index: 8;
  transition: transform .2s ease, background .2s ease;
}
.back-btn[hidden] { display: none; }
.back-btn:hover { background: rgba(160, 160, 166, 0.9); transform: scale(1.08); }
.back-btn:active { transform: scale(0.92); }

.half-left { border-right: 0; }
.half-right { border-left: 0; }

.half { background: linear-gradient(160deg, #5b5e65, #2a2c30 45%, #17181b); background-size: 200% 100%; }
.half-left { background-position: 0 0; }
.half-right { background-position: 100% 0; }
.fallback { z-index: 5; }

/* ---------- App info panes ---------- */
.statusbar { z-index: 5; }
.app-layer { background: none; }

.pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14cqw 9cqw 12cqw;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.25);
}
.pane-left { align-items: center; text-align: center; gap: 4cqw; }
.pane-right { gap: 3.5cqw; text-align: left; }

.pane-icon {
  width: 34cqw;
  aspect-ratio: 1;
  border-radius: 22.5%;
  object-fit: cover;
  box-shadow: 0 5cqw 10cqw rgba(0,0,0,0.35);
}
.pane-name { font-size: 8cqw; font-weight: 700; letter-spacing: -0.03em; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 2.4cqw;
  margin-top: 2cqw;
  padding: 3cqw 6cqw 3cqw 5cqw;
  border-radius: 3.2cqw;
  background: #000;
  color: #fff;
  text-decoration: none;
  text-shadow: none;
  border: 1px solid rgba(255,255,255,0.35);
  transition: transform .2s ease, box-shadow .2s ease;
}
.store-badge svg { width: 7cqw; height: 7cqw; }
.store-badge span { display: flex; flex-direction: column; text-align: left; line-height: 1.05; }
.store-badge small { font-size: 2.8cqw; font-weight: 500; }
.store-badge strong { font-size: 6.2cqw; font-weight: 600; letter-spacing: -0.01em; }
.store-badge:hover { transform: scale(1.05); box-shadow: 0 3cqw 8cqw rgba(0,0,0,0.35); }
.store-badge.is-soon { cursor: default; }

.pane-eyebrow { font-size: 3cqw; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.pane-tagline { font-size: 8.4cqw; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.pane-blurb { font-size: 4cqw; line-height: 1.45; opacity: .95; }

/* ---------- Screenshot gallery ---------- */
.gallery {
  width: min(1040px, 94vw);
  margin-top: 72px;
  text-align: center;
}
.gallery[hidden] { display: none; }
.gallery-title { font-size: clamp(26px, 4vw, 40px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 28px; }

.gallery-grid {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
}

.shot-card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.shot-card { flex: none; }

.shot-frame {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(142,142,147,0.14);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.5);
  border: 1px solid rgba(142,142,147,0.25);
  transition: transform .35s cubic-bezier(.2,.9,.3,1);
}
.shot-frame:hover { transform: translateY(-6px); }
.shot-frame img { display: block; height: clamp(180px, 23vw, 270px); width: auto; }
.shot-card .shot-frame.soon { height: clamp(180px, 23vw, 270px); }
.shot-card.wide .shot-frame.soon { aspect-ratio: 1.42; }
.shot-card.tall .shot-frame.soon { aspect-ratio: 0.69; }
.shot-frame.soon { display: grid; place-items: center; color: var(--muted); font-size: 14px; }

.shot-card figcaption { font-size: 14px; font-weight: 600; color: var(--muted); }

@media (max-width: 700px) {
  .gallery-grid { flex-direction: column; align-items: center; }
  .shot-frame img { height: auto; width: 100%; max-width: 92vw; }
  .shot-card.tall .shot-frame img { width: 62vw; }
}
