/* ==============================================================================
   TaleCycle — Landing Page Styles
   ============================================================================== */

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

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

:root {
  --cream: #FFF8F0;
  --warm-orange: #E8985A;
  --warm-orange-dark: #D4844A;
  --charcoal: #2D2D2D;
  --sage-green: #A8C5A0;
  --sage-green-dark: #8FB387;
  --story-card: #FFF3E6;
  --soft-shadow: rgba(0,0,0,0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,248,240,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45,45,45,0.06);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px var(--soft-shadow);
}

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

.logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--charcoal);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--warm-orange);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 15px;
  font-weight: 700;
  color: var(--charcoal);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-cta {
  background: var(--warm-orange);
  color: #fff !important;
  opacity: 1 !important;
  padding: 8px 20px;
  border-radius: 12px;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--warm-orange-dark);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  margin: 6px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---- 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::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,152,90,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168,197,160,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: var(--story-card);
  color: var(--warm-orange);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--charcoal);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  color: var(--warm-orange);
}

.hero p {
  font-size: 19px;
  color: var(--charcoal);
  opacity: 0.6;
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--warm-orange);
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(232,152,90,0.3);
}

.btn-primary:hover {
  background: var(--warm-orange-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232,152,90,0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--charcoal);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 14px;
  border: 2px solid rgba(45,45,45,0.12);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
  border-color: var(--warm-orange);
  transform: translateY(-2px);
}

/* ---- Features ---- */
.features {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--warm-orange);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 900;
  color: var(--charcoal);
  margin-bottom: 48px;
  letter-spacing: -0.5px;
}

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

.feature-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-icon.orange { background: rgba(232,152,90,0.12); }
.feature-icon.green { background: rgba(168,197,160,0.15); }
.feature-icon.purple { background: rgba(187,142,208,0.15); }

.feature-card h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  opacity: 0.55;
  line-height: 1.6;
}

/* ---- How It Works ---- */
.how-it-works {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.666% + 16px);
  right: calc(16.666% + 16px);
  height: 2px;
  background: linear-gradient(90deg, var(--warm-orange), var(--sage-green));
  opacity: 0.3;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--warm-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--warm-orange);
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  opacity: 0.55;
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ---- Stages Section ---- */
.stages {
  padding: 80px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.stage-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stage-item {
  background: #fff;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transition: transform 0.2s;
}

.stage-item:hover {
  transform: translateX(4px);
}

.stage-badge {
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  background: var(--warm-orange);
}

.stage-badge.green { background: var(--sage-green); }

.stage-info h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 4px;
}

.stage-info p {
  font-size: 13px;
  opacity: 0.5;
  line-height: 1.5;
}

.stage-time {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--warm-orange);
  background: var(--story-card);
  padding: 4px 12px;
  border-radius: 8px;
  white-space: nowrap;
  align-self: center;
}

/* ---- CTA Section ---- */
.cta-section {
  padding: 80px 24px;
  text-align: center;
}

.cta-box {
  max-width: 700px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--warm-orange), var(--warm-orange-dark));
  border-radius: 28px;
  padding: 60px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}

.cta-box h2 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 12px;
  position: relative;
}

.cta-box p {
  font-size: 16px;
  opacity: 0.85;
  margin-bottom: 32px;
  position: relative;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--warm-orange);
  font-family: 'Nunito', sans-serif;
  font-size: 16px;
  font-weight: 800;
  padding: 14px 32px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Footer ---- */
.footer {
  padding: 40px 24px;
  border-top: 1px solid rgba(45,45,45,0.06);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 16px;
  font-weight: 800;
}

.footer-brand span {
  color: var(--warm-orange);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  font-weight: 600;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--warm-orange);
}

.footer-copy {
  font-size: 13px;
  opacity: 0.3;
}

/* ---- Legal Page ---- */
.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 100px 24px 60px;
}

.legal-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--warm-orange);
  margin-bottom: 24px;
  transition: opacity 0.2s;
}

.legal-page .back-link:hover {
  opacity: 0.7;
}

.legal-page h1 {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 13px;
  opacity: 0.4;
  margin-bottom: 32px;
}

.legal-content {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 28px 0 12px;
  color: var(--charcoal);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 8px;
}

.legal-content p {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.7;
  margin-bottom: 12px;
}

.legal-content ul, .legal-content ol {
  padding-left: 24px;
  margin-bottom: 12px;
}

.legal-content li {
  font-size: 15px;
  line-height: 1.8;
  opacity: 0.7;
  margin-bottom: 4px;
}

.legal-content strong {
  font-weight: 700;
  opacity: 1;
}

.legal-loading {
  text-align: center;
  padding: 60px 0;
  font-size: 15px;
  opacity: 0.4;
}

.legal-error {
  text-align: center;
  padding: 60px 0;
  color: #e74c3c;
  font-weight: 700;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(45,45,45,0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 34px;
  }

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

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

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

  .steps::before {
    display: none;
  }

  .stage-item {
    flex-wrap: wrap;
  }

  .stage-time {
    margin-left: 0;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

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

  .legal-content {
    padding: 24px;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .cta-box h2 {
    font-size: 26px;
  }
}
