/* ============================================
   LivRight Landing Page — styles.css
   Design System: Vitality 2.0
   ============================================ */

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

/* --- CSS Custom Properties --- */
:root {
  /* Brand Colors */
  --teal: #00897B;
  --teal-dark: #00695C;
  --teal-light: rgba(0, 137, 123, 0.08);
  --green: #8BC34A;
  --green-dark: #558B2F;
  --orange: #FF7043;
  --red: #D32F2F;
  --excellent: #388E3C;
  --moderate: #F9A825;
  --golden: #FFD54F;

  /* Neutral */
  --bg: #ffffff;
  --bg-alt: #F5F7FA;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border: rgba(0, 0, 0, 0.06);
  --divider: rgba(0, 0, 0, 0.04);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);

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

  /* Spacing */
  --container: 1120px;
  --section-pad: 96px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* --- Dark Mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #111111;
    --surface: #1C1C1E;
    --text: #f5f5f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: rgba(255, 255, 255, 0.08);
    --divider: rgba(255, 255, 255, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --teal-light: rgba(0, 137, 123, 0.15);
  }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

/* --- Container --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography --- */
.heading-xl {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.heading-lg {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

.heading-md {
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.heading-sm {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.text-lg {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
}

.text-md {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.text-sm {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--teal);
  color: #fff;
}
.btn-primary:hover {
  background: var(--teal-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 137, 123, 0.3);
}

.btn-secondary {
  background: var(--teal-light);
  color: var(--teal);
  border: 1px solid rgba(0, 137, 123, 0.15);
}
.btn-secondary:hover {
  background: rgba(0, 137, 123, 0.12);
  color: var(--teal-dark);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav-brand img {
  width: 36px;
  height: 36px;
}

.nav-brand span {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 16px 24px;
  z-index: 99;
}

.nav-mobile.open { display: block; }

.nav-mobile a {
  display: block;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider);
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { color: var(--text); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 400px;
  background: linear-gradient(180deg, rgba(0, 137, 123, 0.04) 0%, transparent 100%);
  pointer-events: none;
}

@media (prefers-color-scheme: dark) {
  .hero::before {
    background: linear-gradient(180deg, rgba(0, 137, 123, 0.08) 0%, transparent 100%);
  }
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-content .heading-xl {
  margin-bottom: 20px;
}

.hero-content .text-lg {
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-illustration {
  margin-top: 64px;
  display: flex;
  justify-content: center;
}

.hero-screenshots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
}

.hero-phone {
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
}

.hero-phone-main {
  width: 260px;
  z-index: 2;
}

.hero-phone-side {
  width: 220px;
  opacity: 0.85;
  transform: scale(0.92);
}

@media (max-width: 600px) {
  .hero-screenshots {
    gap: 12px;
  }
  .hero-phone-main {
    width: 180px;
  }
  .hero-phone-side {
    width: 150px;
  }
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
  padding: 40px 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.stats-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
}

@media (max-width: 640px) {
  .stats-grid { gap: 24px; }
  .stat-divider { display: none; }
}

/* ============================================
   FEATURE SHOWCASE (Interactive Carousel)
   ============================================ */
.features {
  padding: var(--section-pad) 0;
}

.features .heading-lg {
  margin-bottom: 12px;
}

.features .text-lg {
  margin-bottom: 56px;
}

.feature-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  transition: background 0.25s ease;
}

.feature-card:hover {
  border-color: rgba(0, 137, 123, 0.2);
}

.feature-card.active {
  border-color: rgba(0, 137, 123, 0.3);
  background: var(--teal-light);
  transform: scale(1.02);
}

.feature-card.active::before {
  background: var(--teal);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 20px;
}

.feature-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.feature-card-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.feature-visual svg,
.feature-screenshot {
  width: 100%;
  max-width: 280px;
  height: auto;
  transition: opacity 0.3s ease;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.feature-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  padding: 0;
}

.feature-dot.active {
  background: var(--teal);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .feature-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-visual {
    order: -1;
    min-height: 280px;
  }
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.how-it-works {
  padding: var(--section-pad) 0;
  background: var(--bg-alt);
}

.how-it-works .heading-lg {
  margin-bottom: 56px;
}

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

/* Connecting line */
.steps-grid::before {
  content: '';
  position: absolute;
  top: 36px;
  left: calc(16.67% + 36px);
  right: calc(16.67% + 36px);
  height: 2px;
  background: var(--border);
}

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

.step-number {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  background: var(--teal-light);
  position: relative;
  z-index: 1;
}

.step-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 240px;
  margin: 0 auto;
}

/* Rating pills */
.rating-scale {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.rating-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.rating-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.rating-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .steps-grid::before { display: none; }
}

/* ============================================
   KEY BENEFITS
   ============================================ */
.benefits {
  padding: var(--section-pad) 0;
}

.benefits .heading-lg {
  margin-bottom: 48px;
}

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

.benefit-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 0.25s ease;
}

.benefit-card:hover {
  border-color: rgba(0, 137, 123, 0.2);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.benefit-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.benefit-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================
   PRIVACY SECTION
   ============================================ */
.privacy-section {
  padding: var(--section-pad) 0;
  background: linear-gradient(135deg, rgba(0, 137, 123, 0.04) 0%, rgba(139, 195, 74, 0.04) 100%);
}

@media (prefers-color-scheme: dark) {
  .privacy-section {
    background: linear-gradient(135deg, rgba(0, 137, 123, 0.08) 0%, rgba(139, 195, 74, 0.06) 100%);
  }
}

.privacy-content {
  max-width: 640px;
  margin: 0 auto;
}

.privacy-content .heading-lg {
  margin-bottom: 32px;
}

.privacy-list {
  list-style: none;
  margin-bottom: 32px;
}

.privacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.privacy-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.privacy-check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
}

/* ============================================
   DISCLAIMER
   ============================================ */
.disclaimer {
  padding: 48px 0;
}

.disclaimer-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.disclaimer-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ============================================
   BOTTOM CTA
   ============================================ */
.bottom-cta {
  padding: var(--section-pad) 0;
  text-align: center;
}

.bottom-cta .heading-lg {
  margin-bottom: 20px;
}

.bottom-cta .text-md {
  margin-bottom: 32px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.footer-brand img {
  width: 24px;
  height: 24px;
}

.footer-brand span {
  font-size: 14px;
  color: var(--text-muted);
}

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

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   LEGAL PAGES (Privacy Policy, Terms)
   ============================================ */
.legal-page {
  padding: 120px 0 80px;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-content .legal-updated {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.legal-content .legal-glance {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--teal-light);
  border: 1px solid rgba(0, 137, 123, 0.1);
  margin-bottom: 40px;
}

.legal-content .legal-glance ul {
  list-style: none;
  padding: 0;
}

.legal-content .legal-glance li {
  padding: 6px 0;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.legal-content .legal-glance li::before {
  content: '- ';
  color: var(--teal);
  font-weight: 700;
}

.legal-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--divider);
}

.legal-content h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.legal-content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

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

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.legal-content th {
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
}

.legal-content td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-secondary);
  vertical-align: top;
}

.legal-content tr:last-child td {
  border-bottom: none;
}

.legal-content .legal-toc {
  margin-bottom: 40px;
  padding: 20px 24px;
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.legal-content .legal-toc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.legal-content .legal-toc ol {
  padding-left: 20px;
}

.legal-content .legal-toc a {
  font-size: 14px;
  color: var(--teal);
}
.legal-content .legal-toc a:hover {
  color: var(--teal-dark);
}

.legal-content a {
  color: var(--teal);
}
.legal-content a:hover {
  color: var(--teal-dark);
}

/* ============================================
   404 PAGE
   ============================================ */
.page-404 {
  padding: 200px 0 120px;
  text-align: center;
}

.page-404 .heading-xl {
  margin-bottom: 16px;
}

.page-404 .text-lg {
  margin-bottom: 32px;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .fade-in-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
