/* ============================
   Steadier — getsteadier.app
   Design tokens from UI Spec v1
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Nunito:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ---- Tokens ---- */
:root {
  --teal:        #2C6E63;
  --teal-light:  #EBF4F1;
  --teal-dark:   #1E4E46;
  --linen:       #F7F4EF;
  --amber:       #C8863A;
  --amber-light: #FDF3E7;
  --sage:        #7A9E8E;
  --sage-light:  #EDF4F1;
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-muted:  #718096;
  --divider:     #E2E8F0;
  --white:       #ffffff;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --radius-pill: 999px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--linen);
}
img { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---- Layout ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: 'Lora', serif; line-height: 1.25; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); font-weight: 700; color: var(--teal); }
h3 { font-size: 1.25rem; font-weight: 600; color: var(--text-primary); }
h4 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.04em; text-transform: uppercase; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.section-title {
  font-family: 'Lora', serif;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--teal);
  text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 580px;
  margin: 0 auto 48px;
}

/* ---- Navbar ---- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--linen);
  border-bottom: 1px solid var(--divider);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.logo-text {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links li a {
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links li a:hover,
.nav-links li a.active { color: var(--teal); }
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: transform 0.3s, opacity 0.3s;
  border-radius: 2px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover { background: var(--teal-dark); color: var(--white); }
.btn-secondary {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-secondary:hover { background: var(--teal-light); }
.btn-amber {
  background: var(--amber);
  color: var(--white);
}
.btn-amber:hover { background: #b07330; color: var(--white); }
.btn-sm {
  font-size: 0.9rem;
  padding: 10px 24px;
}

/* App Store Badge placeholder */
.app-store-badge {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
}
.app-store-badge:hover { transform: translateY(-1px); opacity: 0.88; }

/* ---- Hero ---- */
.hero {
  background: var(--linen);
  padding: 80px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--teal-light);
  color: var(--teal);
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.hero-title {
  font-family: 'Lora', serif;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero-title em {
  font-style: italic;
  color: var(--teal);
}
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card-stack {
  position: relative;
  width: 320px;
}
.today-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(44,110,99,0.08);
}
.today-card-header {
  margin-bottom: 16px;
}
.today-greeting {
  font-family: 'Nunito', sans-serif;
  font-size: 0.85rem;
  color: var(--sage);
  margin-bottom: 2px;
}
.today-date {
  font-family: 'Lora', serif;
  font-size: 1.3rem;
  color: var(--text-secondary);
}
.today-affirmation {
  background: var(--sage-light);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--sage);
  margin-bottom: 16px;
  line-height: 1.5;
}
.exercise-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}
.exercise-item:last-child { border-bottom: none; }
.exercise-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--divider);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exercise-check.done {
  background: var(--sage);
  border-color: var(--sage);
}
.exercise-check.done svg { display: block; }
.exercise-check svg { display: none; }
.exercise-info { flex: 1; }
.exercise-trigger {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.exercise-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.floating-milestone {
  position: absolute;
  top: -20px;
  right: -20px;
  background: var(--amber-light);
  border: 1.5px solid var(--amber);
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 0.85rem;
  color: var(--amber);
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(200,134,58,0.15);
}

/* ---- Sections ---- */
section { padding: 80px 0; }
.section-teal {
  background: var(--teal);
  color: var(--white);
}
.section-teal h2 { color: var(--white); }
.section-teal .section-subtitle { color: rgba(255,255,255,0.8); }
.section-linen { background: var(--linen); }
.section-white { background: var(--white); }
.section-amber { background: var(--amber-light); }

/* ---- Feature Cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44,110,99,0.1);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--teal-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--teal);
}
.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--teal);
  fill: none;
}
.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Habit Stacking ---- */
.habit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.habit-text h2 { margin-bottom: 16px; }
.habit-text p { color: var(--text-secondary); margin-bottom: 24px; }
.habit-pairs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.habit-pair {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}
.habit-arrow {
  color: var(--teal);
  font-size: 1.2rem;
  flex-shrink: 0;
}
.habit-trigger {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}
.habit-movement {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  flex: 1;
  text-align: right;
}

/* ---- Phases / Programme ---- */
.phases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.phase-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  position: relative;
}
.phase-card.phase-free {
  border-color: var(--teal);
  border-width: 1.5px;
}
.phase-number {
  font-family: 'Lora', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--teal-light);
  line-height: 1;
  margin-bottom: 8px;
}
.phase-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.phase-name {
  font-family: 'Lora', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.phase-duration {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.phase-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.phase-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--teal);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.phase-card.phase-steady {
  background: var(--sage-light);
  border-color: var(--sage);
}
.phase-card.phase-steady .phase-number { color: rgba(122,158,142,0.25); }
.phase-card.phase-steady .phase-label { color: var(--sage); }

/* ---- Pricing ---- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.pricing-card.pricing-full {
  border-color: var(--teal);
  border-width: 2px;
  position: relative;
}
.pricing-card-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 8px;
}
.pricing-name {
  font-family: 'Lora', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.pricing-price {
  font-family: 'Lora', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 4px;
  line-height: 1;
}
.pricing-price sup {
  font-size: 1rem;
  vertical-align: super;
}
.pricing-price-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.pricing-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.pricing-feature {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  color: var(--text-secondary);
}
.pricing-feature svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--teal);
}
.pricing-feature.dimmed { color: var(--text-muted); }
.pricing-feature.dimmed svg { stroke: var(--text-muted); }
.pricing-recommended {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ---- Affirmation banner ---- */
.affirmation-section {
  background: var(--teal);
  padding: 64px 0;
  text-align: center;
}
.affirmation-quote {
  font-family: 'Lora', serif;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-style: italic;
  color: var(--white);
  max-width: 680px;
  margin: 0 auto 16px;
  line-height: 1.5;
  opacity: 0.95;
}
.affirmation-attr {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---- CTA Section ---- */
.cta-section {
  background: var(--amber-light);
  padding: 80px 0;
  text-align: center;
}
.cta-section h2 {
  margin-bottom: 16px;
  color: var(--text-primary);
}
.cta-section p {
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}
.cta-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* ---- Footer ---- */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .logo-text { color: var(--white); }
.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.footer-section h4 {
  color: var(--white);
  font-family: 'Nunito', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-section ul { display: flex; flex-direction: column; gap: 10px; }
.footer-section ul li a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-section ul li a:hover { color: var(--white); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* ---- Content pages (About, FAQ, Privacy, Terms) ---- */
.content-hero {
  background: var(--teal);
  padding: 64px 0 56px;
}
.content-hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}
.content-hero p {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0;
}
.content-body {
  padding: 64px 0 80px;
}
.content-body .container {
  max-width: 760px;
}
.content-body h2 {
  color: var(--teal);
  font-size: 1.4rem;
  margin: 40px 0 12px;
  padding-top: 8px;
}
.content-body h2:first-child { margin-top: 0; }
.content-body h3 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 28px 0 8px;
}
.content-body p { color: var(--text-secondary); }
.content-body ul, .content-body ol {
  list-style: disc;
  padding-left: 24px;
  margin-bottom: 1em;
}
.content-body ol { list-style: decimal; }
.content-body li {
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.content-body strong { color: var(--text-primary); }
.last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ---- About page specifics ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 48px 0;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
}
.stat-number {
  font-family: 'Lora', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.value-card {
  background: var(--white);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 24px;
}
.value-card h3 { color: var(--teal); margin-bottom: 8px; }
.value-card p { font-size: 0.93rem; color: var(--text-secondary); }

/* ---- FAQ ---- */
.faq-list { display: flex; flex-direction: column; gap: 0; }
.faq-item {
  border-bottom: 1px solid var(--divider);
  padding: 0;
}
.faq-item:first-child { border-top: 1px solid var(--divider); }
.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 0;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-question:hover { color: var(--teal); }
.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: transform 0.3s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 0 20px;
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }
.faq-group-title {
  font-family: 'Lora', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--teal);
  margin: 48px 0 8px;
}
.faq-group-title:first-child { margin-top: 0; }

/* ---- Scroll animations ---- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr 1fr; }
  .phases-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .footer-content { grid-template-columns: 1fr 1fr; gap: 32px; }
  .habit-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 56px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .phases-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: var(--linen);
    border-bottom: 1px solid var(--divider);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }
  .nav-links.active { display: flex; }
  .nav-links li a {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
  }
  .mobile-menu-toggle { display: flex; }
  .footer-content { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .stat-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
}
