/* ============================================
   Lenny's Subway Almanac — Landing Page Styles
   ============================================ */

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111;
  --text-primary: #fff;
  --text-secondary: #a0a0a0;

  --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --content-max-width: 1200px;
  --section-padding: 80px;

  /* iPhone 17 frame dimensions (proportional to 149.6 × 71.5 mm) */
  --phone-width: 280px;
  --phone-height: 586px;
  --phone-radius: 50px;
  --phone-bezel: 8px;
  --screen-radius: 42px;
  --dynamic-island-width: 80px;
  --dynamic-island-height: 24px;
}

/* ---- Reset ---- */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Background scrolling bullets ---- */

.bg-scrolling {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  opacity: 0.07;
  pointer-events: none;
}

.bg-column {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: scrollUp var(--scroll-duration, 45s) linear infinite;
}

.bg-column img {
  display: block;
  flex-shrink: 0;
}

@keyframes scrollUp {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

/* ---- Main layout ---- */

.landing {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--section-padding) 40px;
  min-height: 100vh;
}

/* ---- Left panel: info ---- */

.landing__info {
  flex: 1;
  max-width: 500px;
}

.landing__title {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.landing__tagline {
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 48px;
  line-height: 1.4;
}

/* ---- Features list ---- */

.landing__features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 48px;
}

.landing__features li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.feature-icon svg {
  width: 20px;
  height: 20px;
}

.landing__features strong {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.landing__features p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* ---- App Store CTA ---- */

.landing__cta {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.landing__cta:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.landing__cta img {
  height: 54px;
  width: auto;
}

/* ---- Right panel: phone ---- */

.landing__phone {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ---- CSS iPhone 17 frame ---- */

.iphone-frame {
  position: relative;
  width: var(--phone-width);
  height: var(--phone-height);
  background: #1a1a1a;
  border-radius: var(--phone-radius);
  padding: var(--phone-bezel);
  box-shadow:
    0 0 0 1px #2a2a2a,
    0 0 0 3px #3a3a3a,
    0 0 0 4px #2a2a2a,
    0 20px 60px rgba(0, 0, 0, 0.6),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Side/Power button (right side) */
.iphone-frame::before {
  content: '';
  position: absolute;
  right: -4px;
  top: 148px;
  width: 4px;
  height: 48px;
  background: linear-gradient(to right, #333, #3a3a3a);
  border-radius: 0 2px 2px 0;
}

/* Volume Up + Volume Down buttons (left side) */
.iphone-frame::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 148px;
  width: 4px;
  height: 28px;
  background: linear-gradient(to left, #333, #3a3a3a);
  border-radius: 2px 0 0 2px;
  box-shadow: 0 38px 0 0 #363636;
}

/* Dynamic Island (pill-shaped cutout within screen) */
.iphone-frame__dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: var(--dynamic-island-width);
  height: var(--dynamic-island-height);
  background: #000;
  border-radius: calc(var(--dynamic-island-height) / 2);
  z-index: 3;
  box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.8);
}

/* Front camera lens inside Dynamic Island */
.iphone-frame__dynamic-island::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #0a0a12;
  border-radius: 50%;
  border: 1px solid #1a1a2a;
  box-shadow: inset 0 0 2px rgba(50, 50, 80, 0.4);
}

/* Screen area */
.iphone-frame__screen {
  width: 100%;
  height: 100%;
  border-radius: var(--screen-radius);
  overflow: hidden;
  background: #000;
  position: relative;
}

/* Home indicator bar */
.iphone-frame__home-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 93px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  z-index: 3;
}

/* ---- Screenshot carousel ---- */

.carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  will-change: opacity;
}

.carousel__slide--active {
  opacity: 1;
}

/* Dot indicators */
.carousel__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.carousel__dot--active {
  background: #fff;
  transform: scale(1.2);
}

.carousel__dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ---- Footer ---- */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 20px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ---- Responsive: tablet ---- */

@media (max-width: 900px) {
  .landing {
    flex-direction: column;
    text-align: center;
    gap: 48px;
    padding: 60px 24px;
  }

  .landing__info {
    max-width: 100%;
    order: 2;
  }

  .landing__phone {
    order: 1;
  }

  .landing__title {
    font-size: 2.8rem;
  }

  .landing__features {
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .landing__cta {
    margin: 0 auto;
  }

  .bg-scrolling {
    opacity: 0.10;
  }
}

/* ---- Responsive: small phone ---- */

@media (max-width: 480px) {
  :root {
    --phone-width: 220px;
    --phone-height: 460px;
    --phone-radius: 40px;
    --screen-radius: 33px;
    --phone-bezel: 6px;
    --dynamic-island-width: 62px;
    --dynamic-island-height: 19px;
  }

  .landing__title {
    font-size: 2.2rem;
  }

  .landing__tagline {
    font-size: 1.1rem;
  }

  .bg-scrolling {
    opacity: 0.09;
  }
}

/* ---- Reduced motion ---- */

@media (prefers-reduced-motion: reduce) {
  .bg-column {
    animation-play-state: paused;
  }

  .carousel__slide {
    transition: none;
  }
}
