/* ============================================
   StretchCheck — matches iOS app design system

   App design DNA:
   - systemGroupedBackground / secondarySystemGroupedBackground
   - Orange accent (iOS system orange #FF9500) used sparingly
   - Cards: cornerRadius 16, shadow black 4% r8 y2
   - Buttons: solid orange fill, cornerRadius 14, no gradients
   - Typography: SF Pro (Inter on web), semibold hierarchy, rounded numbers
   - Spacing: 24 between sections, 12-16 within cards
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  /* iOS System Orange */
  --orange: #FF9500;
  --orange-light: #FFB340;
  --orange-muted: rgba(255, 149, 0, 0.15);

  /* Light mode — iOS systemGroupedBackground */
  --bg-page: #F2F2F7;
  --bg-card: #FFFFFF;
  --bg-card-secondary: #F9F9FB;
  --text-primary: #1C1C1E;
  --text-secondary: #8E8E93;
  --text-tertiary: #AEAEB2;
  --border: rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-orange: 0 4px 16px rgba(255, 149, 0, 0.2);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Radii — matching app */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #000000;
    --bg-card: #1C1C1E;
    --bg-card-secondary: #2C2C2E;
    --text-primary: #F2F2F7;
    --text-secondary: #8E8E93;
    --text-tertiary: #636366;
    --border: rgba(255, 255, 255, 0.08);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-orange: 0 4px 16px rgba(255, 149, 0, 0.3);
  }
}

/* ============================================
   Reset & Base
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

::selection {
  background: var(--orange);
  color: white;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  line-height: 1.65;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   Navigation
   ============================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

nav.scrolled {
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  nav.scrolled {
    background: rgba(0, 0, 0, 0.85);
  }
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.logo strong {
  font-weight: 700;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
  opacity: 1;
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 140px 0 80px;
  position: relative;
}

.hero-centered {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-centered.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--orange);
  background: var(--orange-muted);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  color: var(--orange);
}

.hero-subtitle {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
}

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s ease;
}

.app-store-badge:hover {
  transform: scale(1.03);
  opacity: 1;
}

.app-store-badge img {
  height: 48px;
}

@media (prefers-color-scheme: dark) {
  .app-store-badge img {
    filter: invert(1);
  }
}

.hero-note {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.hero-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 100px;
  box-shadow: var(--shadow-card);
}

/* ============================================
   Section Common
   ============================================ */

.section-title,
.section-subtitle {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-title.visible,
.section-subtitle.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-subtitle.visible {
  transition-delay: 0.08s;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

/* ============================================
   How It Works
   ============================================ */

.how-it-works {
  padding: var(--space-2xl) 0;
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
}

.step {
  flex: 1;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.2s ease;
}

.step.visible {
  opacity: 1;
  transform: translateY(0);
}

.step:nth-child(1).visible { transition-delay: 0s; }
.step:nth-child(3).visible { transition-delay: 0.1s; }
.step:nth-child(5).visible { transition-delay: 0.2s; }

.step:hover {
  box-shadow: var(--shadow-card-hover);
}

.step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: var(--orange);
  color: white;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon {
  width: 56px;
  height: 56px;
  margin: 8px auto 16px;
  background: var(--orange-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
}

.step h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  line-height: 1.55;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 56px;
  color: var(--text-tertiary);
}

/* ============================================
   Features
   ============================================ */

.features {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
}

@media (prefers-color-scheme: dark) {
  .features {
    background: var(--bg-card-secondary);
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 28px 24px;
  background: var(--bg-page);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
}

@media (prefers-color-scheme: dark) {
  .feature-card {
    background: var(--bg-card);
  }
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(1).visible { transition-delay: 0s; }
.feature-card:nth-child(2).visible { transition-delay: 0.05s; }
.feature-card:nth-child(3).visible { transition-delay: 0.1s; }
.feature-card:nth-child(4).visible { transition-delay: 0.15s; }
.feature-card:nth-child(5).visible { transition-delay: 0.2s; }
.feature-card:nth-child(6).visible { transition-delay: 0.25s; }

.feature-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.feature-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--orange-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 0;
}

/* ============================================
   Pricing
   ============================================ */

.pricing {
  padding: var(--space-2xl) 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-card);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.pricing-card.visible:nth-child(2) {
  transition-delay: 0.1s;
}

.pricing-card-pro {
  border: 2px solid var(--orange);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.pricing-header {
  margin-bottom: 24px;
}

.pricing-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.pricing-alt {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-primary);
  font-weight: 500;
}

.pricing-features svg {
  flex-shrink: 0;
}

/* ============================================
   Privacy Callout
   ============================================ */

.privacy-callout {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.privacy-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--orange);
  max-width: 680px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.privacy-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.privacy-icon {
  width: 48px;
  height: 48px;
  background: var(--orange-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}

.privacy-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.privacy-card p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.privacy-link {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   CTA
   ============================================ */

.cta {
  padding: var(--space-2xl) 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin-bottom: 8px;
}

.cta p {
  font-size: 1.0625rem;
  margin-bottom: 28px;
}

/* ============================================
   Footer
   ============================================ */

footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand .logo {
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.footer-col a:hover {
  color: var(--text-primary);
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

/* ============================================
   Legal Pages (Privacy & Terms)
   ============================================ */

.legal-page {
  padding: 100px 0 80px;
  min-height: 100vh;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.legal-header h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
  margin-bottom: 8px;
}

.last-updated {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  font-weight: 500;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  margin-bottom: 16px;
}

.legal-content h3 {
  font-size: 1.1875rem;
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.legal-content ul {
  margin: 16px 0;
  padding-left: 24px;
}

.legal-content li {
  margin-bottom: 10px;
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 1rem;
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.contact-info {
  background: var(--bg-card);
  padding: 24px;
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--orange);
  margin: 40px 0;
  box-shadow: var(--shadow-card);
}

.contact-info h3 {
  margin-top: 0;
  margin-bottom: 8px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
  opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 680px) {
  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.8125rem;
  }

  .hero {
    padding: 110px 0 48px;
  }

  .hero-pills {
    gap: 8px;
  }

  .hero-pill {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
  }

  .step {
    max-width: 340px;
    width: 100%;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
    padding: 4px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 360px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .privacy-card {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .nav-links a:not(:last-child) {
    display: none;
  }

  .hero h1 {
    font-size: 1.875rem;
  }
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .feature-card, .step, .section-title, .section-subtitle,
  .pricing-card, .privacy-card, .hero-centered {
    opacity: 1 !important;
    transform: none !important;
  }
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--orange);
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  z-index: 9999;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  top: 0;
}

/* ============================================
   Utilities
   ============================================ */

.mb-0 { margin-bottom: 0; }
