/* ===========================
   Kin — Design System & Styles
   =========================== */

:root {
  --cream: #f4f3ee;
  --cream-dark: #eae8e1;
  --terracotta: #da7756;
  --terracotta-light: rgba(218, 119, 86, 0.1);
  --sage: #8b9d83;
  --warm-grey: #b1ada1;
  --charcoal: #1f1f1d;
  --charcoal-light: #5a5a5a;
  --charcoal-muted: #8a8a8a;
  --white: #ffffff;
  --border: rgba(31, 31, 29, 0.08);

  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.25, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--charcoal);
  background-color: var(--cream);
  line-height: 1.7;
  font-size: var(--text-base);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Container */
.container {
  max-width: 1120px;
  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: 100;
  padding: 20px 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(244, 243, 238, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--terracotta);
}

.nav-wordmark {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-cta {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--terracotta);
  padding: 8px 20px;
  border: 1px solid rgba(218, 119, 86, 0.3);
  border-radius: 100px;
  transition: all 0.3s var(--ease);
}

.nav-cta:hover {
  background: var(--terracotta);
  color: var(--white);
  border-color: var(--terracotta);
}

/* ===========================
   Buttons
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  border-radius: 100px;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--cream);
  padding: 14px 36px;
}

.btn-primary:hover {
  background: #333330;
  transform: translateY(-1px);
}

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

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: fadeIn 2s var(--ease-out) 0.5s forwards;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 80px;
  height: 80px;
  color: var(--terracotta);
  margin: 0 auto 48px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.2s forwards;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.4s forwards;
}

.hero-sub {
  font-size: var(--text-lg);
  color: var(--charcoal-light);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.6s forwards;
}

.app-store-btn {
  display: inline-block;
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.8s forwards;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.app-store-btn:hover {
  transform: translateY(-2px);
}

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

/* ===========================
   Sections (shared)
   =========================== */

.section {
  padding: 120px 0;
}

.section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--terracotta);
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.section-body {
  font-size: var(--text-lg);
  color: var(--charcoal-light);
  line-height: 1.8;
  margin-bottom: 20px;
}

.section-body:last-child {
  margin-bottom: 0;
}

/* Fade-in on scroll */
.section-label,
.section-heading,
.section-body,
.feature-card,
.step,
.pricing-card,
.pricing-cta {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

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

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

.section-features {
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.feature-card {
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease);
}

.feature-card:hover {
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--terracotta-light);
  color: var(--terracotta);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--charcoal-light);
  line-height: 1.7;
}

/* ===========================
   How it works
   =========================== */

.section-how {
  border-top: 1px solid var(--border);
  background: var(--white);
}

.steps {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  gap: 28px;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 400;
  margin-bottom: 6px;
}

.step-desc {
  font-size: var(--text-sm);
  color: var(--charcoal-light);
  line-height: 1.7;
}

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

.section-pricing {
  border-top: 1px solid var(--border);
  text-align: center;
}

.pricing-intro {
  text-align: center;
  margin-bottom: 48px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 480px;
  margin: 0 auto 40px;
}

.pricing-card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px 24px;
  border: 1px solid var(--border);
  position: relative;
  text-align: center;
}

.pricing-card-featured {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 1px var(--terracotta);
}

.pricing-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terracotta);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: 2px 14px;
  border-radius: 100px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pricing-period {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--charcoal-muted);
  margin-bottom: 8px;
}

.pricing-amount {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 8px;
}

.pricing-per {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--charcoal-muted);
  font-weight: 400;
}

.pricing-note {
  font-size: var(--text-xs);
  color: var(--charcoal-muted);
}

.pricing-cta {
  margin-top: 0;
}

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

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-icon {
  width: 24px;
  height: 24px;
  color: var(--terracotta);
}

.footer-wordmark {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--charcoal-muted);
  transition: color 0.2s var(--ease);
}

.footer-links a:hover {
  color: var(--charcoal);
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--charcoal-muted);
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@media (max-width: 768px) {
  :root {
    --text-3xl: 1.75rem;
    --text-4xl: 2.25rem;
  }

  .section {
    padding: 80px 0;
  }

  .hero {
    min-height: 90vh;
    padding: 100px 24px 60px;
  }

  .hero-headline {
    font-size: var(--text-3xl);
  }

  .hero-sub {
    font-size: var(--text-base);
  }

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

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

  .footer-links {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow {
    padding: 0 20px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    min-height: 85vh;
  }

  .hero-headline {
    font-size: 1.75rem;
  }

  .nav-cta {
    font-size: var(--text-xs);
    padding: 6px 16px;
  }

  .feature-card {
    padding: 28px;
  }

  .step {
    gap: 20px;
    padding: 28px 0;
  }
}
