:root {
  --primary: #0f4c81;
  --primary-dark: #0a2540;
  --primary-light: #e8f1f9;
  --accent-teal: #00bfa5;
  --accent-teal-dark: #00897b;
  --accent-amber: #f57c00;
  --accent-violet: #6200ea;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --border-focus: #0f4c81;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --container-max: 1160px;
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color: var(--text-main);
  background-color: var(--bg);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-dark);
}

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Header & Nav */
header.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

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

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent-teal);
  color: #ffffff;
}

.btn-accent:hover {
  background: var(--accent-teal-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.btn-playstore {
  background: #000000;
  color: #ffffff;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.btn-playstore:hover {
  background: #1e293b;
  color: #ffffff;
  transform: translateY(-1px);
}

/* Hero Section */
section.hero {
  padding: 64px 0 48px;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(15, 76, 129, 0.15);
}

.hero-title {
  font-size: 2.75rem;
  line-height: 1.15;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.025em;
  margin-bottom: 18px;
}

.hero-title span {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 32px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.proof-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.app-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.progress-banner {
  background: linear-gradient(135deg, #0f4c81 0%, #0a2540 100%);
  border-radius: var(--radius-md);
  padding: 20px;
  color: #ffffff;
  margin-bottom: 16px;
}

.progress-banner h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
  margin-bottom: 4px;
}

.progress-banner .count {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.stat-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.pill-phy { background: rgba(98, 0, 234, 0.25); color: #d8b4fe; border: 1px solid rgba(98, 0, 234, 0.4); }
.pill-che { background: rgba(245, 124, 0, 0.25); color: #fed7aa; border: 1px solid rgba(245, 124, 0, 0.4); }
.pill-bio { background: rgba(0, 191, 165, 0.25); color: #99f6e4; border: 1px solid rgba(0, 191, 165, 0.4); }

.chapter-demo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chapter-demo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}

.chapter-demo-item .title {
  font-weight: 600;
}

.chapter-demo-item .tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #fef3c7;
  color: #92400e;
}

/* Feature Grid */
section.features {
  padding: 72px 0;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-head h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.section-head p {
  font-size: 1.05rem;
  color: var(--text-muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.icon-bubble {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 1.4rem;
}

.ib-blue { background: #e0f2fe; color: #0284c7; }
.ib-teal { background: #ccfbf1; color: #0f766e; }
.ib-amber { background: #fef3c7; color: #b45309; }
.ib-violet { background: #ede9fe; color: #6d28d9; }
.ib-emerald { background: #d1fae5; color: #047857; }
.ib-rose { background: #ffe4e6; color: #be123c; }

.feature-box h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.feature-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Pricing Section */
section.pricing {
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  align-items: stretch;
}

.price-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease;
}

.price-card.featured {
  background: #ffffff;
  border: 2px solid var(--accent-teal);
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

.featured-tag {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-teal);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

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

.price-tag {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 16px 0;
}

.price-tag span {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
}

.price-features {
  list-style: none;
  margin-bottom: 24px;
  flex-grow: 1;
}

.price-features li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* FAQ Accordion */
section.faq {
  padding: 72px 0;
}

.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: all 0.15s ease;
}

details.faq-item[open] {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

summary.faq-q {
  font-weight: 700;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--primary-dark);
}

summary.faq-q::-webkit-details-marker {
  display: none;
}

summary.faq-q::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 400;
}

details.faq-item[open] summary.faq-q::after {
  content: "−";
}

.faq-a {
  padding-top: 14px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Legal Documents Layout (Privacy, Terms, Refund, Delete) */
.legal-page {
  padding: 56px 0 80px;
  background: #ffffff;
  flex-grow: 1;
}

.legal-box {
  max-width: 820px;
  margin: 0 auto;
}

.legal-box h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 10px;
}

.legal-box .meta-update {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-top: 28px;
  margin-bottom: 12px;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 18px;
  margin-bottom: 8px;
}

.legal-content p, .legal-content li {
  font-size: 0.98rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

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

.callout {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.callout p {
  color: var(--primary-dark);
  margin-bottom: 0;
}

/* Footer */
footer.site-footer {
  background: var(--primary-dark);
  color: #cbd5e1;
  padding: 56px 0 28px;
  margin-top: auto;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 580px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .nav-links {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .price-card.featured {
    transform: none;
  }
}
