:root {
  --bg: #120f23;
  --surface: #1d1b2e;
  --border: #2a273a;
  --primary: #5b3efe;
  --primary-dim: rgba(91, 62, 254, 0.12);
  --primary-border: rgba(91, 62, 254, 0.3);
  --text: #ffffff;
  --muted: #94a3b8;
  
  --phone-width: 360px;
  --phone-height: 740px;

  /* App UI Variables */
  --app-bg: #120F23;
  --app-surface: #1D1B2E;
  --app-surface-variant: #2A273A;
  --app-border: rgba(91, 62, 254, 0.3);
  --app-card-active: rgba(91, 62, 254, 0.2);
  --app-text: #FFFFFF;
  --app-muted: #94A3B8;
  --app-accent: #5B3EFE;
  --app-red: #F87171;
  --app-nav-bg: #1D1B2E;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Background effects */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(91,62,254,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91,62,254,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: -1;
}

.glow {
  position: fixed;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(91, 62, 254, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Layout Utilities */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* =========================================
   SCROLL ENGINE (GSAP Track)
   ========================================= */
.scroll-container {
  width: 100%;
}

.sticky-viewport {
  position: relative;
  height: 100dvh;
  width: 100vw;
  max-width: 100%;
  overflow: hidden;
}

.inner-bounds {
  width: 100%;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
  display: flex;
  align-items: center;
}

.visual-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  pointer-events: none;
  clip-path: inset(0); /* Strict WebKit Z-buffer isolation */
}

.visual-wrapper .inner-bounds {
  justify-content: flex-end; /* Phone on the right */
}

.track {
  position: relative;
  display: flex;
  height: 100dvh;
  width: 600%;
  will-change: transform;
  z-index: 5;
  pointer-events: none;
}

/* 3D Phone Container */
.phone-container {
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.phone {
  width: var(--phone-width);
  height: var(--phone-height);
  pointer-events: auto;
  background: #000;
  border-radius: 44px;
  border: 12px solid #1a1a1a;
  box-shadow: 
    inset 0 0 0 2px #333,
    1px 1px 0 #181818,
    2px 2px 0 #181818,
    3px 3px 0 #181818,
    4px 4px 0 #181818,
    5px 5px 0 #181818,
    6px 6px 0 #181818,
    7px 7px 0 #181818,
    8px 8px 0 #181818,
    9px 9px 0 #181818,
    10px 10px 0 #181818,
    11px 11px 0 #151515,
    12px 12px 0 #151515,
    13px 13px 0 #151515,
    14px 14px 0 #151515,
    15px 15px 0 #151515,
    16px 16px 0 #151515,
    17px 17px 0 #121212,
    18px 18px 0 #121212,
    19px 19px 0 #121212,
    20px 20px 0 #121212,
    30px 40px 60px rgba(0,0,0,0.8), 
    0 0 80px rgba(91,62,254,0.2);
  position: relative;
  /* Smoother, less aggressive 3D default angle */
  transform: rotateY(-20deg) rotateX(8deg) translateZ(-50px);
  /* GPU Acceleration */
  will-change: transform, box-shadow;
  backface-visibility: hidden;
  /* Premium spring-like easing for fluid movement */
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: visible;
}

.phone-inner-clip {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

/* When scrolling starts, phone goes perfectly flat */
.phone.flat {
  transform: rotateY(0deg) rotateX(0deg) translateZ(0px) !important;
  box-shadow: 
    inset 0 0 0 2px #333,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #181818,
    0px 0px 0 #151515,
    0px 0px 0 #151515,
    0px 0px 0 #151515,
    0px 0px 0 #151515,
    0px 0px 0 #151515,
    0px 0px 0 #151515,
    0px 0px 0 #121212,
    0px 0px 0 #121212,
    0px 0px 0 #121212,
    0px 0px 0 #121212,
    0px 20px 40px rgba(0,0,0,0.6), 
    0 0 80px rgba(91,62,254,0.15) !important;
}

/* Dynamic island */
.phone::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: #000;
  border-radius: 20px;
  z-index: 20;
}

/* =========================================
   MOCK APP UI (Matching Android Extract)
   ========================================= */
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--app-bg);
  color: var(--app-text);
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
}

/* Status Bar */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 24px 0px;
  font-size: 13px;
  font-weight: 500;
  z-index: 100;
  position: relative;
  letter-spacing: 0.5px;
}
.status-bar .icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* App Screens Container */
.app-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-bottom: 100px;
}
.app-screen::-webkit-scrollbar { display: none; }
.app-screen { -ms-overflow-style: none; scrollbar-width: none; }

.app-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

/* UI Components */
.info-card {
  background: var(--app-surface-variant);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
  margin-top: 12px;
}

.info-card p {
  font-size: 12px;
  color: var(--app-text);
  line-height: 1.5;
}

.app-card {
  background: var(--app-surface-variant);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}
.app-card.active-card {
  background: var(--app-card-active);
  border-color: var(--app-border);
}

.app-card-vertical {
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  background: var(--app-surface-variant);
}

.app-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-icon-mock {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.app-icon-mock.spotify { background: #1DB954; color: #000; font-weight: bold; font-size: 20px;}
.app-icon-mock.tiktok { background: #000; color: white; border: 1px solid #333;}
.app-icon-mock.youtube { background: #FF0000; color: white;}
.app-icon-mock.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.app-icon-mock.netflix { background: #000; color: #E50914; font-weight: bold; font-size: 22px; border: 1px solid #333;}

.app-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}
.app-text p {
  font-size: 12px;
  font-weight: 500;
  color: var(--app-accent);
}
.app-text p.disabled {
  color: var(--app-muted);
}

.app-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--app-surface);
  border: 1px solid var(--app-card-active);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Custom Toggle */
.toggle {
  width: 44px;
  height: 24px;
  background: var(--app-surface-variant);
  border-radius: 16px;
  border: 2px solid var(--app-muted);
  position: relative;
  transition: all 0.3s;
}
.toggle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: var(--app-muted);
  border-radius: 50%;
  transition: all 0.3s;
}
.toggle.on {
  background: var(--app-accent);
  border-color: var(--app-accent);
}
.toggle.on::after {
  left: calc(100% - 18px);
  width: 16px;
  height: 16px;
  background: #FFF;
}

/* Section Titles */
.section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--app-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 16px;
  margin-bottom: 4px;
  padding-left: 4px;
}

/* List Items */
.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  width: 100%;
}
.list-item:last-child { border-bottom: none; }
.list-item-text h4 { font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.list-item-text p { font-size: 11px; color: var(--app-muted); }

.radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--app-muted);
  position: relative;
  flex-shrink: 0;
}
.radio.selected {
  border-color: var(--app-accent);
}
.radio.selected::after {
  content: '';
  position: absolute;
  inset: 4px;
  background: var(--app-accent);
  border-radius: 50%;
}

/* Buttons */
.app-btn-outline {
  width: 100%;
  border: 1px solid var(--app-border);
  background: transparent;
  color: var(--app-text);
  border-radius: 100px;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}

/* Volume Pills */
.vol-pills {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 4px;
}
.vol-pills::-webkit-scrollbar { display: none; }
.vol-pill {
  flex: 0 0 auto;
  border: 1px solid var(--app-border);
  background: transparent;
  text-align: center;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--app-text);
}
.vol-pill.active {
  background: var(--app-card-active);
  border-color: var(--app-accent);
  color: var(--app-accent);
}

/* Bottom Nav (Exact Spec) */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 12px 8px 24px;
  background: var(--app-nav-bg);
  z-index: 10;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 500;
  transition: color 0.3s;
  width: 72px;
}
.nav-item.active {
  color: var(--app-accent);
}
.nav-icon-wrapper {
  width: 64px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.nav-item.active .nav-icon-wrapper {
  background: var(--app-card-active);
}
.nav-item svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Bottom Sheet */
.bottom-sheet {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: var(--app-surface);
  border-radius: 28px 28px 0 0;
  padding: 24px 20px;
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}
.bottom-sheet.open {
  bottom: 0;
}
.sheet-handle {
  width: 32px;
  height: 4px;
  background: #555;
  border-radius: 2px;
  margin: 0 auto 24px;
}

/* =========================================
   TEXT BLOCKS (Left Column)
   ========================================= */
.feature-block {
  width: calc(100% / 6);
  height: 100dvh;
  flex-shrink: 0;
  pointer-events: none;
}

.feature-block .inner-bounds {
  justify-content: flex-start; /* Cards on the left */
}

.feature-card {
  width: 40vw;
  max-width: 480px;
  background: linear-gradient(135deg, rgba(29, 27, 46, 0.4) 0%, rgba(18, 15, 35, 0.2) 100%);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  border-radius: 32px;
  padding: 40px;
  pointer-events: auto;
}
.feature-block h2 {
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -1px;
}
.feature-block h2 span {
  color: var(--primary);
  display: block;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
  font-weight: 600;
}
.feature-block p {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 500px;
}

/* Hero Block (First step) */
.hero-block {
  /* No special min-heights needed for horizontal track */
}

.hero-block .headline {
  font-size: clamp(52px, 6vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -3px;
  color: var(--text);
  margin-bottom: 24px;
}

.hero-block .headline span {
  background: linear-gradient(135deg, #a78bfa, #5b3efe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-block .subline {
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 48px;
}

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

.play-btn {
  display: block;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s;
  margin-bottom: 12px;
}
.play-btn:hover {
  transform: translateY(-4px) scale(1.02);
  filter: drop-shadow(0 10px 30px rgba(91,62,254,0.3));
}
.play-btn img {
  height: 60px;
  width: auto;
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-bottom: 32px;
  margin-top: 32px;
}

.footer-links {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.footer-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--text);
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--muted);
  margin-top: auto;
}

/* =========================================
}

/* =========================================
   SCROLL INDICATOR
   ========================================= */
.scroll-indicator {
  position: absolute;
  bottom: 8dvh;
  left: max(40px, calc((100vw - 1200px) / 2 + 40px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  opacity: 0.6;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  animation: pulse-fade 2s infinite ease-in-out;
  transition: opacity 0.3s ease;
  z-index: 100;
  pointer-events: none;
}
.scroll-indicator svg {
  animation: bounce-down 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pulse-fade {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
@keyframes bounce-down {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =========================================
   MOBILE RESPONSIVENESS (Layering & Glassmorphism)
   ========================================= */
@media (max-width: 1024px) {
  /* Mobile Layout - Absolute boundaries */
  
  .visual-wrapper .inner-bounds {
    justify-content: center;
    align-items: flex-start;
    padding-top: 2dvh;
  }
  
  .phone {
    transform: scale(0.55) rotateY(-10deg) rotateX(4deg);
    transform-origin: center top;
  }
  
  .phone.flat {
    transform: scale(0.55) rotateY(0deg) rotateX(0deg) translateZ(0px) !important;
  }

  .track {
    width: 600%;
  }

  .feature-block {
    width: calc(100% / 6);
  }

  .feature-block .inner-bounds {
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .feature-card {
    width: 100%;
    max-width: 100%;
    min-height: 40dvh;
    height: auto;
    border-radius: 32px 32px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 32px 24px;
    background: linear-gradient(135deg, rgba(29, 27, 46, 0.95) 0%, rgba(18, 15, 35, 0.95) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }

  body {
    padding-bottom: 45dvh;
  }

  /* Refine specific margins inside the glass boxes */
  .feature-block p {
    margin-top: 12px;
  }
  .hero-block .headline {
    font-size: clamp(40px, 10vw, 56px);
  }

  .scroll-indicator {
    display: none;
  }
}

/* =========================================
}

/* =========================================
   PREMIUM EDITORIAL LAYOUT (Legal Pages)
   ========================================= */
.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  max-width: 1000px;
  margin: 120px auto;
  padding: 0 24px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.legal-sidebar h1 {
  font-size: clamp(32px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  color: var(--text);
}
.legal-sidebar a.back-link {
  font-size: 14px;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: color 0.2s;
}
.legal-sidebar a.back-link:hover {
  color: #fff;
}

.legal-content {
  font-family: 'Inter', sans-serif;
  max-width: 65ch;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1.8;
}
.legal-content h2 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
}
.legal-content h2:first-of-type {
  margin-top: 0;
}
.legal-content h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}
.legal-content p {
  margin-bottom: 24px;
}
.legal-content ul, .legal-content ol {
  margin-bottom: 24px;
  padding-left: 24px;
}
.legal-content li {
  margin-bottom: 12px;
}
.legal-content a {
  color: var(--primary);
  text-decoration: none;
}
.legal-content a:hover {
  text-decoration: underline;
}

@media (max-width: 850px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 32px;
    margin: 60px auto;
  }
  .legal-sidebar {
    position: relative;
    top: 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
  }
}

/* Ensure the 3D phone fits uniformly on short laptop screens without distorting aspect ratio */
@media (min-width: 1025px) and (max-height: 850px) {
  .phone {
    transform: scale(0.85) rotateY(-20deg) rotateX(8deg) translateZ(-50px);
    transform-origin: center center;
  }
  .phone.flat {
    transform: scale(0.85) rotateY(0deg) rotateX(0deg) translateZ(0px) !important;
  }
}

/* Ensure the 3D phone shrinks proportionally on short mobile screens to prevent overlapping the text cards */
@media (max-width: 1024px) and (max-height: 850px) {
  .visual-wrapper .inner-bounds { padding-top: 0; }
  .phone { transform: scale(0.40) rotateY(-10deg) rotateX(4deg); }
  .phone.flat { transform: scale(0.40) rotateY(0deg) rotateX(0deg) translateZ(0px) !important; }
}

@media (max-width: 1024px) and (max-height: 750px) {
  .phone { transform: scale(0.36) rotateY(-10deg) rotateX(4deg); }
  .phone.flat { transform: scale(0.36) rotateY(0deg) rotateX(0deg) translateZ(0px) !important; }
  .feature-block h2 { font-size: 24px; }
  .headline { font-size: 32px; }
  .subline, .feature-card p { font-size: 14px; }
  .feature-card { padding: 24px 20px; }
}

@media (max-width: 1024px) and (max-height: 650px) {
  .phone { transform: scale(0.30) rotateY(-10deg) rotateX(4deg); }
  .phone.flat { transform: scale(0.30) rotateY(0deg) rotateX(0deg) translateZ(0px) !important; }
  .headline { font-size: 28px; }
  .feature-card { padding: 20px 16px; }
}
