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

:root {
  --accent:    #4A9EFF;
  --accent-lo: rgba(74,158,255,0.12);
  --purple:    #8B5CF6;
  --success:   #34C759;
  --warning:   #FF9F0A;
  --danger:    #FF453A;

  --bg:        #080f1e;
  --bg2:       #0b1626;
  --bg3:       #0e1e35;
  --glass:     rgba(255,255,255,0.07);
  --glass-border: rgba(255,255,255,0.11);
  --text:      rgba(255,255,255,0.92);
  --sub:       rgba(255,255,255,0.48);
  --divider:   rgba(255,255,255,0.07);

  --radius:    20px;
  --radius-sm: 12px;
  --font:      'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ── Glass cards ──────────────────────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.glass-card-dark {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(12px);
}

/* ── Glows ────────────────────────────────────────────────────────────────── */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  opacity: 0.35;
  z-index: 0;
}
.glow-blue   { width: 600px; height: 600px; background: var(--accent); top: -200px; left: -150px; }
.glow-purple { width: 500px; height: 500px; background: var(--purple); bottom: -100px; right: -100px; }
.glow-purple-mid { width: 800px; height: 400px; background: var(--purple); top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.2; }

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
}
.glass-nav {
  background: rgba(8,15,30,0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--sub);
}
.nav-links a { color: var(--sub); transition: color .2s; }
.nav-links a:hover { color: var(--text); opacity: 1; }

@media (max-width: 600px) {
  .nav-links { gap: 16px; font-size: 13px; }
  .nav-links a:nth-child(n+3) { display: none; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  overflow: hidden;
}

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

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  border: 1px solid var(--glass-border);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; }

.hero-title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 18px;
  color: var(--sub);
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 460px;
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: transform .15s, opacity .15s;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:active { transform: scale(0.98); }

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

.hero-note {
  font-size: 13px;
  color: var(--sub);
  opacity: 0.7;
}

/* ── Screenshots ──────────────────────────────────────────────────────────── */
.screenshots {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  width: 300px;
  height: 560px;
}

.screenshot-wrap {
  position: absolute;
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.1);
}

.screenshot-wrap img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 44px;
}

.screenshot-front {
  width: 240px;
  bottom: 0;
  left: 0;
  z-index: 2;
}

.screenshot-back {
  width: 220px;
  top: 0;
  right: 0;
  z-index: 1;
  opacity: 0.75;
  transform: rotate(4deg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.07);
}

@media (max-width: 860px) {
  .hero { flex-direction: column; text-align: center; padding-top: 100px; }
  .hero-content { max-width: 100%; }
  .hero-sub { margin: 0 auto 36px; }
  .hero-cta { justify-content: center; }
  .screenshots { width: 260px; height: 480px; }
  .screenshot-front { width: 200px; }
  .screenshot-back  { width: 185px; }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  text-align: center;
}
.section-sub {
  font-size: 18px;
  color: var(--sub);
  text-align: center;
  margin-bottom: 56px;
}

/* ── Features ─────────────────────────────────────────────────────────────── */
.features { background: linear-gradient(180deg, transparent, rgba(74,158,255,0.04) 50%, transparent); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 28px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s, transform .5s;
}
.feature-card.visible { opacity: 1; transform: none; }
.feature-card:nth-child(2) { transition-delay: .08s; }
.feature-card:nth-child(3) { transition-delay: .16s; }
.feature-card:nth-child(4) { transition-delay: .24s; }
.feature-card:nth-child(5) { transition-delay: .32s; }
.feature-card:nth-child(6) { transition-delay: .40s; }

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

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}

.feature-card p {
  font-size: 15px;
  color: var(--sub);
  line-height: 1.6;
}

/* ── Screenshot gallery ───────────────────────────────────────────────────── */
.gallery { overflow: hidden; }

.gallery-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Center if fewer items than viewport */
  justify-content: center;
  flex-wrap: wrap;
}
.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s, transform .5s;
}
.gallery-item.visible { opacity: 1; transform: none; }
.gallery-item:nth-child(2) { transition-delay: .07s; }
.gallery-item:nth-child(3) { transition-delay: .14s; }
.gallery-item:nth-child(4) { transition-delay: .21s; }
.gallery-item:nth-child(5) { transition-delay: .28s; }

.gallery-item img {
  width: 180px;
  border-radius: 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  display: block;
}

.gallery-item p {
  font-size: 13px;
  color: var(--sub);
  text-align: center;
}

@media (max-width: 700px) {
  .gallery-scroll { flex-wrap: nowrap; justify-content: flex-start; padding: 0 24px 16px; }
  .gallery-item img { width: 150px; }
}

/* ── Medications ──────────────────────────────────────────────────────────── */
.meds { background: rgba(255,255,255,0.015); }

.med-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.med-pill {
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 100px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity .4s, transform .4s;
}
.med-pill.visible { opacity: 1; transform: none; }

/* ── Premium ──────────────────────────────────────────────────────────────── */
.premium {
  position: relative;
  overflow: hidden;
}

.premium-card {
  max-width: 580px;
  margin: 0 auto;
  padding: 48px;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s, transform .5s;
}
.premium-card.visible { opacity: 1; transform: none; }

.premium-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.premium-card h2 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin-bottom: 12px;
}

.premium-card > p {
  font-size: 17px;
  color: var(--sub);
  margin-bottom: 28px;
}

.premium-list {
  list-style: none;
  margin-bottom: 36px;
  text-align: left;
  display: inline-block;
}

.premium-list li {
  font-size: 16px;
  padding: 6px 0;
  color: rgba(255,255,255,0.8);
}

.premium-list li::before { color: var(--success); }

/* ── FAQ ──────────────────────────────────────────────────────────────────── */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  padding: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s, transform .4s;
}
.faq-item.visible { opacity: 1; transform: none; }
.faq-item:nth-child(2) { transition-delay: .06s; }
.faq-item:nth-child(3) { transition-delay: .12s; }
.faq-item:nth-child(4) { transition-delay: .18s; }
.faq-item:nth-child(5) { transition-delay: .24s; }

summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--sub);
  flex-shrink: 0;
  transition: transform .2s;
}
details[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 22px 18px;
  font-size: 15px;
  color: var(--sub);
  line-height: 1.6;
  border-top: 1px solid var(--divider);
  padding-top: 14px;
}

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--divider);
  padding: 48px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a { color: var(--sub); }
.footer-links a:hover { color: var(--text); opacity: 1; }
.footer-copy {
  font-size: 13px;
  color: var(--sub);
  opacity: 0.6;
}
.footer-disclaimer {
  font-size: 12px;
  color: var(--sub);
  opacity: 0.4;
  max-width: 500px;
}

/* ── Inner page (privacy/terms) ───────────────────────────────────────────── */
.page-hero {
  padding: 120px 24px 60px;
  max-width: 780px;
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 10px;
}
.page-hero .updated {
  font-size: 14px;
  color: var(--sub);
}

.page-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

.page-body h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 40px 0 12px;
  letter-spacing: -0.3px;
}

.page-body p, .page-body li {
  font-size: 16px;
  color: var(--sub);
  line-height: 1.75;
  margin-bottom: 12px;
}

.page-body ul, .page-body ol {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-body a { color: var(--accent); }

.page-body .intro {
  font-size: 18px;
  color: rgba(255,255,255,0.65);
  line-height: 1.65;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--divider);
}

/* ── Utilities ────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
