/**
 * index.css — Specific styles for the homepage (index.html)
 */

:root {
  --glass: rgba(255, 255, 255, 0.6);
  --card-bg: rgba(255, 255, 255, 0.7);
}

h1,
h2,
h3 {
  font-weight: 600;
}

p {
  margin: 0;
}

/* Override common.css main constraints for homepage */
main {
  max-width: 100%;
  padding: 0;
}

/* Scroll Scene */
.scroll-scene {
  position: relative;
  width: 100%;
}

.sticky-container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
  perspective: 1200px;
  position: relative;
}

.scene-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FAF8F5;
  z-index: 0;
  transition: background 0.3s ease;
}

.split-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1300px;
  padding: 0 5%;
  gap: 5%;
  padding-top: 60px;
  position: relative;
  z-index: 1;
}

/* Text blocks container */
.text-column {
  flex: 1;
  position: relative;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.step-text {
  position: absolute;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px);
  left: 0;
}

.step-text.hero-step {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.step-text h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #1d1d1f 0%, #434345 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.step-text h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}

.step-text p {
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 500px;
}

.hero-step .store-buttons {
  justify-content: flex-start;
}

/* Removed Store Buttons (now in common.css) */

/* Phone Mockup */
.phone-column {
  flex: 0 0 auto;
  transform-style: preserve-3d;
  z-index: 10;
  position: relative;
  display: flex;
  justify-content: center;
}

.iphone-frame {
  width: 380px;
  height: auto;
  aspect-ratio: 1290 / 2796;
  background: transparent;
  border-radius: 0;
  padding: 0;
  position: relative;
  transform: rotateY(-10deg) rotateX(2deg) scale(0.95);
}

.iphone-screen {
  width: 100%;
  height: 100%;
  position: relative;
}

.iphone-screen picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.iphone-screen picture img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 36px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.screen-img {
  opacity: 0;
  will-change: opacity;
}

.screen-img.s0 {
  opacity: 1;
}

/* Scroll Animations */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.fade-in.show {
  opacity: 1;
  transform: translateY(0);
}

/* Outro & Footer */
.outro {
  text-align: center;
  padding: 10rem 5%;
  background: linear-gradient(180deg, var(--bg-color) 0%, #FFFFFF 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.outro::before {
  content: '';
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255, 183, 3, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

.outro-card {
  background: transparent;
  padding: 6rem 3rem;
  border-radius: 0;
  max-width: 900px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.outro h2 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 1rem;
  color: #111;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.outro p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.outro .store-buttons {
  justify-content: center;
}

/* Scroll Down Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.5;
  animation: bounce 2s infinite;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.scroll-indicator svg {
  width: 24px;
  height: 24px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-10px) translateX(-50%);
  }
  60% {
    transform: translateY(-5px) translateX(-50%);
  }
}

/* Responsive Design */
@media (max-width: 900px) {
  .split-layout {
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 0;
    padding-top: 0;
  }

  .phone-column {
    flex: 0 0 auto;
    transform: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1rem;
  }

  .iphone-frame {
    width: 85vw;
    max-width: 400px;
    border-radius: 24px;
    transform: none !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  }

  .screen-img {
    border-radius: 24px;
  }

  .text-column {
    width: 100%;
    height: auto;
    align-items: center;
    z-index: 20;
    margin-top: -180px;
    /* Overlap the bottom of the phone image */
    position: relative;
    padding-bottom: 2rem;
  }

  .step-text {
    text-align: center;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 2rem;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 1);
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    top: auto;
    transform: translateY(40px);
  }

  .step-text.hero-step {
    position: relative !important;
    transform: translateY(0) !important;
    margin-top: 0rem;
    z-index: 30;
  }

  .step-text.active {
    position: absolute !important;
    bottom: 2rem;
    top: auto;
    transform: translateY(0);
  }

  .step-text p {
    margin: 0 auto;
  }

  .store-buttons {
    justify-content: center;
  }

  .outro-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 48px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.06), inset 0 2px 4px rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 1);
  }

  .scroll-indicator {
    display: none;
  }
}

@media (max-height: 800px) {
  .phone-column {
    transform: scale(0.8);
  }
}

@media (max-height: 700px) {
  .phone-column {
    transform: scale(0.65);
  }
}
