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

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
  color: #fff;
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-user-select: none;
  user-select: none;
}

/* --- Page --- */
.page {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* --- Infinite photo mosaic --- */
.mosaic-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  z-index: 1;
}

.mosaic-viewport.grabbing {
  cursor: grabbing;
}

.mosaic-grid {
  position: absolute;
  will-change: transform;
}

.photo-card {
  position: absolute;
  overflow: hidden;
  background: #111;
  border-radius: 0;
}

.photo-card img,
.photo-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* --- Content overlay --- */
.content {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 0 calc(36px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

/* --- Header --- */
.header {
  pointer-events: all;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.logo {
  height: 56px;
  width: auto;
}

/* --- Sound toggle --- */
.sound-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.sound-btn:hover {
  opacity: 1;
}

.sound-icon {
  width: 28px;
  height: 28px;
}

/* --- Hero (headline + try button) --- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

/* --- Headline (exact Figma vector) --- */
.headline-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.headline {
  width: clamp(320px, 45vw, 576px);
  height: auto;
}

/* --- Try me button --- */
.try-btn {
  pointer-events: all;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
  color: #070707;
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 15px 42px;
  cursor: pointer;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: tryPulse 2.4s ease-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.try-btn:hover {
  transform: scale(1.05);
}

.try-btn:active {
  transform: scale(0.97);
}

@keyframes tryPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.45); }
  70%  { box-shadow: 0 0 0 22px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* --- CTA --- */
.cta {
  text-align: center;
  pointer-events: all;
  transition: opacity 1s ease, transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

.cta-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 10px;
}

.store-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.store-badge {
  display: block;
  transition: transform 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.05);
}

.store-badge img {
  height: 36px;
  width: auto;
}

.store-badge .gplay-fix {
  transform: rotate(180deg) scaleX(-1);
}

/* --- iPhone simulator --- */
.phone-sim {
  position: fixed;            /* always cover the *visible* viewport (mobile-safe) */
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 1.3s;
}

/* iPhone 13 Pro — hairline wireframe style */
.phone {
  position: relative;
  height: min(82dvh, 760px);
  aspect-ratio: 390 / 844;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 58px;
  padding: 9px;
  box-shadow: none;
  transform: translateY(118vh);
  transition: transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Outlined side buttons */
.phone-btn {
  position: absolute;
  width: 3px;
  background: #000;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
}

.btn-mute {
  left: -4.5px;
  top: 20%;
  height: 26px;
  border-radius: 3px 0 0 3px;
  border-right: none;
}

.btn-volup {
  left: -4.5px;
  top: 27%;
  height: 52px;
  border-radius: 3px 0 0 3px;
  border-right: none;
}

.btn-voldown {
  left: -4.5px;
  top: 38%;
  height: 52px;
  border-radius: 3px 0 0 3px;
  border-right: none;
}

.btn-power {
  right: -4.5px;
  top: 30%;
  height: 78px;
  border-radius: 0 3px 3px 0;
  border-left: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 48px;
  overflow: hidden;
  background: #070707;
}

/* iPhone 13 notch — outlined */
.phone-notch {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 47%;
  height: 27px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: none;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 3;
}

/* speaker slot */
.phone-notch::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-60%);
  width: 34px;
  height: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

/* front camera dot */
.phone-notch::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 20px;
  width: 6px;
  height: 6px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
}

/* Placeholder splash (replaced by app screens in phase 2) */
.app-splash {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: radial-gradient(120% 90% at 50% 30%, #1a1a1a 0%, #070707 70%);
}

.app-splash-logo {
  width: 56%;
  max-width: 200px;
  height: auto;
}

.app-splash-tag {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
}

.phone-close {
  position: absolute;
  top: max(24px, env(safe-area-inset-top, 0px));
  right: 28px;
  z-index: 21;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease 0.9s, background 0.2s ease;
}

.phone-close svg { width: 22px; height: 22px; }
.phone-close:hover { background: rgba(255, 255, 255, 0.22); }

/* --- Simulation active state --- */
/* Mosaic parts outward from center and dissolves */
.sim-active .mosaic-viewport {
  opacity: 0;
  transform: scale(1.35);
  transform-origin: center center;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.76, 0, 0.24, 1),
              transform 1.2s cubic-bezier(0.76, 0, 0.24, 1);
}

/* Header lifts up and out */
.sim-active .header {
  opacity: 0;
  transform: translateY(-32vh);
  pointer-events: none;
}

/* Headline + Try button fly up to the top edge */
.sim-active .hero {
  opacity: 0;
  transform: translateY(-46vh) scale(1.08);
  pointer-events: none;
}

/* Download CTA flies down to the bottom edge */
.sim-active .cta {
  opacity: 0;
  transform: translateY(46vh) scale(1.08);
  pointer-events: none;
}

.sim-active .phone-sim {
  visibility: visible;
  pointer-events: all;
  transition: visibility 0s linear 0s;
}

/* Phone rises from the bottom with ease-in-out */
.sim-active .phone {
  transform: translateY(0);
}

.sim-active .phone-close { opacity: 1; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .try-btn {
    font-size: 16px;
    padding: 13px 36px;
  }

  .hero { gap: 22px; }

  .phone {
    height: min(86dvh, 760px);
    border-radius: 48px;
    padding: 8px;
  }

  .phone-screen { border-radius: 41px; }
  .phone-notch { height: 23px; width: 50%; }
  .phone-close { right: 18px; }

  .logo {
    height: 40px;
  }

  .headline {
    width: clamp(260px, 80vw, 400px);
  }

  .content {
    padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px));
  }

  .cta-text {
    font-size: 16px;
  }

  .store-badge img {
    height: 30px;
  }
}
