/* MIRA Health AI — landing page
   Dark-first, with a light theme via [data-theme="light"]. Brand colors come from the app logo
   (app/src/main/res/drawable/ic_launcher_foreground.xml): #0166FA -> #8DF3FF on black. */

:root {
  --bg: #04060d;
  --bg-2: #080c18;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef3ff;
  --muted: #9aa6c2;
  --blue: #0166fa;
  --blue-2: #3d8bff;
  --cyan: #8df3ff;
  --violet: #8b7bff;
  --pink: #ff7ac6;
  --mint: #5cf2b5;
  --amber: #ffc56b;
  --grad: linear-gradient(120deg, #8df3ff 0%, #3d8bff 45%, #0166fa 70%, #8b7bff 100%);
  --glow: 0 0 60px rgba(1, 102, 250, 0.35);
  --radius: 22px;
  --max: 1180px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f9ff;
  --bg-2: #eaf1ff;
  --surface: rgba(1, 40, 120, 0.04);
  --surface-2: rgba(1, 40, 120, 0.07);
  --border: rgba(1, 40, 120, 0.12);
  --text: #0a1530;
  --muted: #4b5a7a;
  --glow: 0 0 60px rgba(1, 102, 250, 0.18);
  --grad: linear-gradient(120deg, #0aa6c9 0%, #0166fa 50%, #5b3dff 100%);
  --cyan: #0a8fb0;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Background aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.45;
  animation: drift 22s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { width: 620px; height: 620px; background: #0166fa; top: -180px; left: -120px; }
.aurora span:nth-child(2) { width: 520px; height: 520px; background: #12b5d6; top: 30%; right: -200px; animation-delay: -7s; opacity: 0.3; }
.aurora span:nth-child(3) { width: 480px; height: 480px; background: #6b4dff; bottom: -200px; left: 25%; animation-delay: -14s; opacity: 0.25; }
:root[data-theme="light"] .aurora span { opacity: 0.18; }
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.5;
}
@keyframes drift { to { transform: translate(120px, 80px) scale(1.15); } }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; filter: drop-shadow(0 0 12px rgba(1, 102, 250, 0.5)); }
.nav-links { display: flex; gap: 28px; font-size: 15px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center;
}
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px;
  border-radius: 14px; font-weight: 600; font-size: 15px; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(120deg, #0166fa, #3d8bff); color: #fff; box-shadow: 0 10px 30px rgba(1, 102, 250, 0.4); }
.btn-ghost { border: 1px solid var(--border); background: var(--surface); }

.play-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 22px 10px 16px;
  border-radius: 16px; background: #000; color: #fff; border: 1px solid rgba(255,255,255,.22);
  transition: transform .2s, box-shadow .2s;
}
.play-badge:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(1, 102, 250, 0.45); }
.play-badge svg { width: 30px; height: 30px; }
.play-badge small { display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .8; line-height: 1.2; }
.play-badge strong { display: block; font-size: 20px; font-weight: 600; line-height: 1.15; }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 70px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; color: var(--muted); margin-bottom: 26px;
}
.pill b { background: var(--grad); color: #04060d; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
h1 { font-size: clamp(42px, 6.4vw, 78px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 700; }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 560px; margin: 24px 0 34px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 32px; margin-top: 46px; }
.hero-stats div strong { display: block; font-size: 28px; font-weight: 700; }
.hero-stats div span { font-size: 14px; color: var(--muted); }

/* Phone screenshots (already framed; clip trims the black corners so they sit on any theme) */
.shot { width: 290px; height: auto; aspect-ratio: 1 / 2; clip-path: inset(0.3% 0.6% round 12% / 6%); filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); }
.phone-stage { position: relative; display: grid; place-items: center; min-height: 640px; }
.phone-stage::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(1,102,250,.55), transparent 70%); filter: blur(30px); }
.phone-stage .main { position: relative; z-index: 2; width: 300px; animation: float 7s ease-in-out infinite; }
.phone-stage .back { position: absolute; width: 240px; opacity: .5; }
.phone-stage .back.l { transform: translateX(-160px) rotate(-10deg); }
.phone-stage .back.r { transform: translateX(160px) rotate(10deg); }
@keyframes float { 50% { transform: translateY(-16px); } }

.chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg-2) 80%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--border);
  font-size: 13.5px; box-shadow: 0 12px 30px rgba(0,0,0,.35); animation: float 6s ease-in-out infinite;
}
.chip .dot { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; }
.chip .dot .icon { width: 18px; height: 18px; }
.chip.c1 { top: 32%; left: -40px; }
.chip.c2 { top: 14%; right: -30px; animation-delay: -2s; }
.chip.c3 { bottom: 16%; right: -20px; animation-delay: -4s; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--border); overflow: hidden; padding: 18px 0; background: var(--surface); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scroll 40s linear infinite; }
.marquee-track span { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 16px; white-space: nowrap; }
.marquee-track .icon { width: 20px; height: 20px; color: var(--blue-2); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--cyan); font-weight: 600; margin-bottom: 14px; }
:root[data-theme="light"] .eyebrow { color: var(--blue); }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.section-head { max-width: 720px; margin-bottom: 56px; }
.section-head p { color: var(--muted); font-size: 18px; margin-top: 16px; }
.center { text-align: center; margin-inline: auto; }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { padding: 34px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); position: relative; overflow: hidden; }
.pillar::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 260px; height: 260px; border-radius: 50%; background: var(--accent, var(--blue)); filter: blur(80px); opacity: .25; }
.pillar .big { font-size: 22px; font-weight: 600; margin: 18px 0 8px; }
.pillar p { color: var(--muted); }

.ic {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, var(--blue)) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--blue)) 35%, transparent);
  color: var(--accent, var(--blue-2));
}

/* Feature bento */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: transform .3s, border-color .3s, background .3s; position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent, var(--blue)) 55%, transparent); background: var(--surface-2); }
.card h3 { font-size: 19px; font-weight: 600; margin: 18px 0 8px; letter-spacing: -0.01em; }
.card p { color: var(--muted); font-size: 15px; }
.card.wide { grid-column: span 2; }
.card.tall { grid-row: span 2; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.card .tags span { font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }

/* Chat demo */
.chat-demo { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 88%; padding: 11px 15px; border-radius: 18px; font-size: 14.5px; }
.bubble.me { align-self: flex-end; background: linear-gradient(120deg, #0166fa, #3d8bff); color: #fff; border-bottom-right-radius: 6px; }
.bubble.mira { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.bubble.mira em { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 11.5px; color: var(--mint); margin-bottom: 4px; }

/* Showcase */
.showcase { display: flex; gap: 26px; overflow-x: auto; padding: 20px 4px 40px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.showcase figure { scroll-snap-align: center; flex: 0 0 auto; text-align: center; }
.showcase .shot { width: 240px; transition: transform .3s; }
.showcase figure:hover .shot { transform: translateY(-8px); }
.showcase figcaption { margin-top: 18px; font-weight: 600; }
.showcase figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); position: relative; }
.step::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 22px; right: 24px; font-size: 40px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .5; }
.step h3 { font-size: 18px; margin: 18px 0 6px; }
.step p { color: var(--muted); font-size: 15px; }

/* Privacy */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.shield {
  aspect-ratio: 1; max-width: 440px; margin-inline: auto; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle, rgba(1,102,250,.35), transparent 65%);
}
.shield::before, .shield::after { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--cyan) 40%, transparent); animation: spin 40s linear infinite; }
.shield::after { inset: 22%; border-style: solid; border-color: color-mix(in srgb, var(--blue) 40%, transparent); animation-direction: reverse; animation-duration: 25s; }
.shield .icon { width: 120px; height: 120px; color: var(--cyan); stroke-width: 1.2; filter: drop-shadow(0 0 24px rgba(141,243,255,.6)); }
@keyframes spin { to { transform: rotate(360deg); } }
.checks { list-style: none; display: grid; gap: 16px; margin-top: 30px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.checks li .icon { color: var(--mint); margin-top: 2px; }
.checks li b { display: block; }
.checks li span { color: var(--muted); font-size: 15px; }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { padding: 34px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; }
.plan.featured { border-color: transparent; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; border: 1.5px solid transparent; box-shadow: var(--glow); }
.plan.gold { --accent: var(--amber); }
.plan h3 { font-size: 24px; margin: 14px 0 4px; }
.plan .sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.plan ul { list-style: none; display: grid; gap: 12px; }
.plan li { display: flex; gap: 10px; font-size: 15px; }
.plan li .icon { width: 20px; height: 20px; color: var(--accent, var(--cyan)); }
.badge { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: var(--grad); color: #04060d; }

/* CTA */
.cta {
  border-radius: 34px; padding: 80px 40px; text-align: center; position: relative; overflow: hidden; border: 1px solid var(--border);
  background: radial-gradient(circle at 20% 0%, rgba(1,102,250,.5), transparent 55%), radial-gradient(circle at 90% 100%, rgba(141,243,255,.3), transparent 50%), var(--bg-2);
}
.cta img.app-icon { width: 92px; height: 92px; border-radius: 24px; margin: 0 auto 26px; box-shadow: var(--glow); }
.cta p { color: var(--muted); font-size: 18px; max-width: 560px; margin: 16px auto 34px; }

/* Footer */
footer { padding: 50px 0 40px; border-top: 1px solid var(--border); margin-top: 110px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
footer img { height: 24px; width: auto; }
.disclaimer { width: 100%; font-size: 12.5px; opacity: .8; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 860px) {
  .hero .wrap, .privacy { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
  .pillars, .plans { grid-template-columns: 1fr; }
  .phone-stage { min-height: 580px; }
}
@media (max-width: 560px) {
  section { padding: 80px 0; }
  .bento, .steps { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; }
  .phone-stage .back { display: none; }
  .phone-stage .main { width: 250px; }
  .chip { font-size: 12px; padding: 8px 10px; } .chip .dot { width: 28px; height: 28px; }
  .chip.c1 { left: 0; top: 40%; } .chip.c2 { display: none; } .chip.c3 { right: 0; }
  .cta { padding: 56px 22px; }
  .nav .btn-primary span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
