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

/* ── Design Tokens ── */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F7F7F7;
  --bg-dark: #1A1A1A;
  --text-primary: #1A1A1A;
  --text-secondary: #999999;
  --text-muted: #666666;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.6);
  --text-on-dark-subtle: rgba(255, 255, 255, 0.5);
  --accent: #1A1A1A;
  --accent-subtle: #CCCCCC;
  --surface-highlight: #F0F0F0;
  --border-light: #E0E0E0;
  --hero-gradient-warm: #FAF8F5;
  --hero-gradient-cool: #F5F7FA;

  --font-serif: 'Instrument Serif', serif;
  --font-sans: 'DM Sans', sans-serif;

  --max-width: 1100px;
  --section-padding: 140px 24px;
  --section-padding-mobile: 80px 24px;
  --radius: 16px;
  --radius-pill: 9999px;

  --shadow-phone: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-button-hover: 0 8px 24px rgba(0, 0, 0, 0.12);

  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.6s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  background: radial-gradient(ellipse at center, var(--hero-gradient-warm), var(--bg-primary));
  animation: heroGradientShift 15s ease-in-out infinite alternate;
}

@keyframes heroGradientShift {
  0% {
    background: radial-gradient(ellipse at center, var(--hero-gradient-warm), var(--bg-primary));
  }
  100% {
    background: radial-gradient(ellipse at center, var(--hero-gradient-cool), var(--bg-primary));
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-wordmark {
  font-family: var(--font-serif);
  font-size: 96px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-primary);
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  color: var(--text-primary);
}

.hero-subtext {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 440px;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-pill);
  padding: 14px 36px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}

.btn:hover {
  transform: scale(1.03);
}

.btn--primary {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.btn--primary:hover {
  box-shadow: var(--shadow-button-hover);
}

.btn--inverted {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn--inverted:hover {
  box-shadow: var(--shadow-button-hover);
}

/* ── Phone Mockup ── */
.phone-mockup {
  width: 280px;
  height: 560px;
  border-radius: 36px;
  border: 2px solid var(--border-light);
  box-shadow: var(--shadow-phone);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.phone-mockup-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--hero-gradient-warm), var(--surface-highlight));
  border-radius: 34px;
}

.phone-mockup--hero {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ── Hero Entrance Stagger ── */
.hero-stagger {
  opacity: 0;
  transform: translateY(20px);
  animation: heroEntrance 0.8s ease forwards;
}

.hero-stagger:nth-child(1) { animation-delay: 0s; }
.hero-stagger:nth-child(2) { animation-delay: 0.2s; }
.hero-stagger:nth-child(3) { animation-delay: 0.4s; }
.hero-stagger:nth-child(4) { animation-delay: 0.6s; }
.hero-stagger:nth-child(5) { animation-delay: 0.8s; }

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Social Proof ── */
.social-proof {
  padding: 60px 24px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--surface-highlight);
}

.social-proof.hidden {
  display: none;
}

.social-proof-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}

.social-proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.social-proof-number {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--text-primary);
}

.social-proof-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
}

.social-proof-divider {
  width: 1px;
  height: 48px;
  background: var(--border-light);
}

/* ── Feature Sections ── */
.feature {
  padding: var(--section-padding);
  position: relative;
  overflow: hidden;
}

.feature:nth-child(odd) {
  background: var(--bg-primary);
}

.feature:nth-child(even) {
  background: var(--bg-secondary);
  background-image: radial-gradient(circle, var(--accent-subtle) 1px, transparent 1px);
  background-size: 24px 24px;
  background-blend-mode: overlay;
}

.feature:nth-child(even)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-secondary);
  opacity: 0.97;
  pointer-events: none;
}

.feature-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.feature--text-left .feature-text {
  order: 1;
}

.feature--text-left .feature-image {
  order: 2;
}

.feature--text-right .feature-image {
  order: 1;
}

.feature--text-right .feature-text {
  order: 2;
}

.feature-image {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.feature-pill {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--surface-highlight);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.feature-headline {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.feature-body {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
}

/* ── Phone Mockup Tilts ── */
.phone-mockup--tilt-right {
  transform: rotate(2deg);
}

.phone-mockup--tilt-left {
  transform: rotate(-2deg);
}

/* ── Scroll Animations ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children within visible parents */
.animate-on-scroll .stagger-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.animate-on-scroll.visible .stagger-child:nth-child(1) { transition-delay: 0s; }
.animate-on-scroll.visible .stagger-child:nth-child(2) { transition-delay: 0.15s; }
.animate-on-scroll.visible .stagger-child:nth-child(3) { transition-delay: 0.3s; }
.animate-on-scroll.visible .stagger-child:nth-child(4) { transition-delay: 0.45s; }

.animate-on-scroll.visible .stagger-child {
  opacity: 1;
  transform: translateY(0);
}

/* Slide-in from sides for phone mockups */
.feature--text-left .animate-on-scroll .feature-image {
  transform: translateX(40px);
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  transition-delay: 0.45s;
}

.feature--text-right .animate-on-scroll .feature-image {
  transform: translateX(-40px);
  opacity: 0;
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  transition-delay: 0.45s;
}

.animate-on-scroll.visible .feature-image {
  transform: translateX(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-on-scroll .stagger-child,
  .feature--text-left .animate-on-scroll .feature-image,
  .feature--text-right .animate-on-scroll .feature-image,
  .hero,
  .hero-stagger,
  .phone-mockup--hero {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }
}

/* ── FAQ ── */
.faq {
  padding: var(--section-padding);
  background: var(--bg-primary);
}

.faq-inner {
  max-width: 700px;
  margin: 0 auto;
}

.faq-headline {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 56px;
}

.faq-list {
  border-top: 1px solid var(--surface-highlight);
}

.faq-item {
  border-bottom: 1px solid var(--surface-highlight);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  transition: color var(--transition-fast);
}

.faq-question:hover {
  color: var(--text-secondary);
}

.faq-chevron {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform var(--transition-medium);
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-medium), padding var(--transition-medium);
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  padding: 0 0 24px 0;
}

/* ── CTA Section ── */
.cta {
  padding: 80px 24px;
  background: var(--bg-dark);
  text-align: center;
}

.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-headline {
  font-family: var(--font-serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text-on-dark);
}

.cta-subtext {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-on-dark-muted);
}

/* ── Footer ── */
.footer {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: var(--bg-dark);
}

.footer-wordmark {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-on-dark);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links a {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-on-dark-subtle);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-on-dark);
}

.footer-dot {
  color: var(--text-on-dark-subtle);
  font-size: 13px;
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-on-dark-subtle);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero-wordmark {
    font-size: 64px;
  }

  .hero-headline {
    font-size: 32px;
  }

  .hero-subtext {
    font-size: 16px;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
    border-radius: 28px;
  }

  .phone-mockup-screen {
    border-radius: 26px;
  }

  .phone-mockup--tilt-right,
  .phone-mockup--tilt-left {
    transform: none;
  }

  .feature {
    padding: var(--section-padding-mobile);
  }

  .feature-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .feature--text-left .feature-text,
  .feature--text-right .feature-text {
    order: 2;
  }

  .feature--text-left .feature-image,
  .feature--text-right .feature-image {
    order: 1;
  }

  .feature-body {
    max-width: 100%;
    font-size: 16px;
  }

  .feature-headline {
    font-size: 36px;
  }

  /* Social proof stacks vertically */
  .social-proof-inner {
    flex-direction: column;
    gap: 24px;
  }

  .social-proof-divider {
    width: 48px;
    height: 1px;
  }

  /* FAQ */
  .faq {
    padding: var(--section-padding-mobile);
  }

  .faq-headline {
    font-size: 36px;
    margin-bottom: 40px;
  }

  .faq-question {
    font-size: 16px;
  }

  /* CTA */
  .cta {
    padding: 80px 24px;
  }

  .cta-headline {
    font-size: 36px;
  }

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

  /* Faster stagger on mobile */
  .animate-on-scroll.visible .stagger-child:nth-child(1) { transition-delay: 0s; }
  .animate-on-scroll.visible .stagger-child:nth-child(2) { transition-delay: 0.1s; }
  .animate-on-scroll.visible .stagger-child:nth-child(3) { transition-delay: 0.2s; }
  .animate-on-scroll.visible .stagger-child:nth-child(4) { transition-delay: 0.3s; }

  /* Slide-in becomes fade-up on mobile */
  .feature--text-left .animate-on-scroll .feature-image,
  .feature--text-right .animate-on-scroll .feature-image {
    transform: translateY(20px);
  }

  .animate-on-scroll.visible .feature-image {
    transform: translateY(0);
  }
}
