/* ============================================
   pausing — landing page styles
   editorial carousel, breathing background, huge italic display
   ============================================ */

:root {
  --royal-blue: #1628C9;
  --royal-blue-mid: #4A5FE8;
  --royal-blue-soft: #8FAEF5;
  --light-blue: #C6FCFF;
  --light-blue-pale: #E8FDFF;

  --warm-white: #FAF6F0;
  --cream: #F4EEE3;
  --pale-blue: #EEF2FB;

  --black: #0A0A0A;
  --ink: #1A1A1A;
  --white: #ffffff;
  --text-muted: rgba(10, 10, 10, 0.62);
  --text-subtle: rgba(10, 10, 10, 0.50);
  --text-faint: rgba(10, 10, 10, 0.38);
  --border-faint: rgba(10, 10, 10, 0.10);

  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--warm-white);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ============ AMBIENT LAYERS ============ */

.bg-gradient {
  position: fixed;
  inset: -10%;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 28%, rgba(198, 252, 255, 0.55), transparent 60%),
    radial-gradient(ellipse 65% 55% at 82% 72%, rgba(143, 174, 245, 0.32), transparent 60%),
    linear-gradient(135deg, var(--warm-white) 0%, var(--pale-blue) 100%);
  animation: bgDrift 26s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bgDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-3%, -2%) scale(1.06); }
}

.bg-grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.45;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.13 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.cursor-glow {
  position: fixed;
  left: -100px;
  top: -100px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22, 40, 201, 0.22) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
  transform: translate(-50%, -50%);
  mix-blend-mode: multiply;
  filter: blur(24px);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.cursor-glow.visible { opacity: 1; }

/* ============ CROP MARKS ============ */

.crop {
  position: fixed;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-faint);
  z-index: 6;
  pointer-events: none;
  user-select: none;
}
.crop-tl { top: 12px; left: 16px; }
.crop-tr { top: 12px; right: 16px; }
.crop-bl { bottom: 12px; left: 16px; }
.crop-br { bottom: 12px; right: 16px; }

/* ============ PAGE LAYOUT ============ */

.page {
  position: relative;
  z-index: 5;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 28px 44px 20px;
  gap: 12px;
}

/* ============ HEADER ============ */

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-orb {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.mini-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(65, 105, 225, 0.95) 0%,
    rgba(142, 197, 252, 0.80) 45%,
    rgba(255, 255, 255, 0.55) 70%,
    transparent 85%
  );
  animation: breathe 4s ease-in-out infinite;
}

.mini-orb::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(142, 197, 252, 0.95) 0%,
    rgba(78, 159, 229, 0.70) 45%,
    rgba(255, 255, 255, 0.55) 70%,
    transparent 85%
  );
  opacity: 0;
  animation: orbColorCycle 4s ease-in-out infinite;
}

.logo-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: breathe 4s ease-in-out infinite;
  transform-origin: center;
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 2px;
  fill: var(--ink);
}

.brand-tag {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
  max-width: 220px;
  line-height: 1.4;
}

.brand-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 1.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ============ NAV ============ */

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 12.5px;
  padding-top: 6px;
}

.nav-link {
  color: var(--text-muted);
  transition: color 0.2s var(--ease);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--royal-blue);
  color: var(--warm-white);
  border-radius: 999px;
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  transition: transform 0.2s var(--ease), background 0.25s var(--ease);
}

.download-btn:hover {
  transform: translateY(-1px);
  background: var(--ink);
}

/* ============ PAGE NUMBER (giant editorial accent) ============ */

.page-number {
  position: absolute;
  top: 86px;
  right: 44px;
  text-align: right;
  pointer-events: none;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  line-height: 1;
  transition: opacity 0.3s var(--ease);
}

.page-num-current {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(120px, 13vw, 180px);
  letter-spacing: -8px;
  color: var(--ink);
  line-height: 0.88;
  display: inline-block;
  transition: opacity 0.25s var(--ease), transform 0.4s var(--ease-out);
}

.page-num-meta {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-subtle);
  text-transform: uppercase;
  margin-top: 24px;   /* push well clear of the giant italic descender */
  font-weight: 700;
}

/* ============ STAGE ============ */

.stage {
  position: relative;
  /* overflow: visible — lets the home-slide cover tiles extend above the stage area without being clipped.
     Inactive slides are at opacity:0 so their content (which doesn't overflow anyway) stays invisible. */
  overflow: visible;
  min-height: 0;
}

.slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 10px 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s var(--ease);
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide.reverse .slide-text   { order: 2; padding-left: 40px; padding-right: 0; justify-self: start; }
.slide.reverse .slide-visual { order: 1; }

.slide-text {
  padding-right: 40px;
  max-width: 720px;
  justify-self: end;
  position: relative;
  z-index: 2;
}

/* ── BIG section title ── */
.slide-section {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: clamp(96px, 14vw, 220px);
  line-height: 0.9;
  letter-spacing: -9px;
  color: var(--ink);
  margin: 0 0 28px;
  opacity: 0;
  transform: translateY(36px);
}

/* ── Subtitle lead — italic accent line in Space Grotesk ── */
.slide-lead {
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: var(--royal-blue);
  margin: 0 0 22px;
  opacity: 0;
  transform: translateY(18px);
}

.slide-lead em { font-style: italic; }

/* ── Body ── */
.slide-body {
  font-family: var(--font-sans);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0;
  opacity: 0;
  transform: translateY(14px);
}

/* Small credit-line caption (listen slide only) */
.slide-cred {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-faint);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
}

/* Entry animations — scoped to .active so they only run forward */
.slide.active .slide-section {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease-out), transform 0.95s var(--ease-out);
}

.slide.active .slide-lead {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out) 0.18s, transform 0.85s var(--ease-out) 0.18s;
}

.slide.active .slide-body {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out) 0.36s, transform 0.7s var(--ease-out) 0.36s;
}

.slide.active .slide-cred {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out) 0.55s, transform 0.6s var(--ease-out) 0.55s;
}

/* ============ SLIDE VISUAL ============ */

.slide-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  position: relative;
  perspective: 1400px;
}

.phone-frame {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  height: min(620px, 80vh);
  aspect-ratio: 240 / 500;
  background: var(--white);
  border-radius: 42px;
  border: 2px solid var(--ink);
  overflow: hidden;
  padding: 18px 14px;
  box-shadow:
    0 32px 80px -24px rgba(22, 40, 201, 0.45),
    0 12px 36px -10px rgba(10, 10, 10, 0.20);
  transform-style: preserve-3d;
  opacity: 0;
  transform: translateY(40px) scale(0.96) rotateY(var(--ry)) rotateX(var(--rx));
}

.slide.active .phone-frame {
  opacity: 1;
  transform: translateY(0) scale(1) rotateY(var(--ry)) rotateX(var(--rx));
  transition: opacity 0.7s var(--ease-out) 0.15s,
              transform 0.9s var(--ease-out) 0.15s;
}

.slide.active .dual-phone-wrap .phone-frame:nth-child(2) {
  transition-delay: 0.28s;
}

.phone-frame.screenshot { padding: 0; }
.phone-frame.screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dual-phone-wrap {
  display: flex;
  gap: 22px;
}

.dual-phone-wrap .phone-frame {
  height: min(560px, 74vh);
}

/* ============ HOME SLIDE — arc of cover art + copy beneath ============ */

.slide.home {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  gap: 0;
}

.home-arc {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 0;
}

.home-cover {
  position: absolute;
  left: 50%;
  top: 100%;            /* anchor at arc bottom-center → side tiles hug the bottom */
  width: clamp(112px, 11.5vw, 168px);
  aspect-ratio: 3 / 4;
  border-radius: 0;
  overflow: hidden;
  background: var(--ink);
  box-shadow:
    0 22px 50px -18px rgba(0, 0, 0, 0.38),
    0 8px 20px -8px rgba(22, 40, 201, 0.18);
  /* Centered on anchor, then offset by --x/--y, then rotated by --rot. */
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--rot));
  opacity: 0;
  transition: transform 0.5s var(--ease-out), opacity 0.7s var(--ease-out), box-shadow 0.3s var(--ease);
}

.home-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Entry animation — staggered fade-in from center outward */
.slide.home.active .home-cover { opacity: 1; }
.slide.home.active .home-cover:nth-child(4) { transition-delay: 0.05s; }
.slide.home.active .home-cover:nth-child(3),
.slide.home.active .home-cover:nth-child(5) { transition-delay: 0.15s; }
.slide.home.active .home-cover:nth-child(2),
.slide.home.active .home-cover:nth-child(6) { transition-delay: 0.25s; }
.slide.home.active .home-cover:nth-child(1),
.slide.home.active .home-cover:nth-child(7) { transition-delay: 0.35s; }

/* Hover: cover scales up + lifts to front (scale reads as "lift" regardless of rotation) */
.home-cover:hover {
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--rot)) scale(1.06);
  box-shadow:
    0 32px 70px -18px rgba(22, 40, 201, 0.40),
    0 12px 28px -8px rgba(0, 0, 0, 0.28);
  z-index: 10;
}

/* Text block beneath the arc */
.home-text {
  text-align: center;
  padding: 0 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.home-text .slide-section {
  margin: 0;
  /* Slightly smaller than other slides so the title fits between the bottom semicircle tiles */
  font-size: clamp(72px, 10vw, 160px);
  letter-spacing: -7px;
}

.home-text .slide-body {
  max-width: 540px;
  margin: 0 auto;
}

/* ============ STRIP (bottom) ============ */

.strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  border-top: 0.5px solid var(--border-faint);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
}

.tagline {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.tagline .dot {
  color: var(--royal-blue);
  font-size: 7px;
  line-height: 1;
}

.tagline-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tagline-link:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.strip-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-faint);
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.arrow:hover {
  background: var(--ink);
  color: var(--warm-white);
  border-color: var(--ink);
  transform: translateY(-1px);
}

.arrow:active { transform: translateY(0); }

.strip-hint {
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text-faint);
  font-size: 10px;
}

/* ============ HAND-BUILT LISTEN PHONE BITS (kept for completeness) ============ */

.phone-time {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 20px;
}
.phone-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.phone-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
}
.phone-orb-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 20px auto;
}
.orb-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 55%,
    var(--royal-blue) 0%,
    var(--royal-blue-mid) 25%,
    var(--royal-blue-soft) 50%,
    var(--light-blue) 70%,
    rgba(198, 252, 255, 0) 85%
  );
  animation: breathe 4s ease-in-out infinite;
}
.phone-timer {
  font-family: var(--font-mono);
  text-align: center;
  font-size: 22px;
  font-weight: 400;
  margin-top: 30px;
  letter-spacing: -0.5px;
}
.phone-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.control-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
}
.control-btn.primary {
  width: 44px;
  height: 44px;
  background: var(--royal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-icon {
  width: 0;
  height: 0;
  border-left: 10px solid var(--white);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-left: 3px;
}

/* ============ ANIMATIONS ============ */

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.08); opacity: 0.92; }
}

@keyframes orbColorCycle {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .mini-orb, .mini-orb::after, .logo-svg, .orb-pulse, .bg-gradient {
    animation: none !important;
  }
  .slide, .slide *, .phone-frame, .home-cover {
    transition: none !important;
  }
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  html, body { overflow: auto; }

  .page {
    height: auto;
    min-height: 100vh;
    padding: 20px 18px;
    grid-template-rows: auto auto auto auto;
    gap: 12px;
  }

  .crop { display: none; }
  .cursor-glow { display: none; }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  .logo-orb { width: 52px; height: 52px; }
  .brand-tag { font-size: 12px; max-width: 200px; }
  .nav { width: 100%; flex-wrap: wrap; gap: 14px 18px; padding-top: 0; }
  .download-btn { padding: 10px 18px; font-size: 13px; }

  /* Page number → inline editorial flourish */
  .page-number {
    position: static;
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    margin: 16px 0 0;
    align-self: start;
  }
  .page-num-current { font-size: 80px; letter-spacing: -3px; line-height: 0.85; }
  .page-num-meta { margin-top: 0; font-size: 12px; }

  /* Stage → vertical scroll */
  .stage {
    overflow: visible;
    display: block;
  }
  .slide {
    position: static;
    display: block;
    opacity: 1;
    pointer-events: auto;
    padding: 32px 0;
    border-top: 0.5px solid var(--border-faint);
  }
  .slide:first-child { border-top: none; padding-top: 8px; }
  .slide.reverse .slide-text { padding-left: 0; }
  .slide-text { padding-right: 0; max-width: 100%; justify-self: stretch; }
  .slide.reverse .slide-text { justify-self: stretch; }

  /* Reset entry animations on mobile */
  .slide-section,
  .slide-lead,
  .slide-body,
  .phone-frame,
  .home-cover {
    opacity: 1 !important;
    transform: none !important;
  }

  .slide-section { font-size: 80px; letter-spacing: -4px; margin-bottom: 16px; }
  .slide-lead { font-size: 22px; margin-bottom: 14px; }
  .slide-body { font-size: 16px; }

  .slide-visual { margin-top: 28px; height: auto; perspective: none; }
  .phone-frame {
    width: 240px;
    height: 500px;
    aspect-ratio: auto;
    margin: 0 auto;
  }
  .dual-phone-wrap {
    flex-direction: column;
    gap: 18px;
    align-items: center;
  }
  .dual-phone-wrap .phone-frame { height: 500px; }

  /* Home arc → flat horizontal scroll on mobile (arc math doesn't fit narrow screens) */
  .slide.home { display: block; }
  .home-arc {
    position: relative;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 16px 16px 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    height: auto;
  }
  .home-arc::-webkit-scrollbar { display: none; }
  .home-cover {
    position: static;
    width: 120px;
    flex: 0 0 120px;
    transform-origin: center;
    transform: none !important;
    margin-left: 0;
  }
  .home-cover:hover { transform: none !important; }
  .home-text { padding: 0 4px 12px; text-align: left; align-items: flex-start; }
  .home-text .slide-body { text-align: left; }

  /* Strip simplifies */
  .strip {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-bottom: 24px;
  }
  .strip-controls { display: none; }
}
