/* ============================================================================
   AI Doctor — landing page (aidoctor.pk)
   Editorial healthcare identity. Fast on low-data mobile: no webfonts, system
   stack, all graphics inline SVG/CSS. Light + dark, RTL-aware Urdu accents.
   ========================================================================== */

:root {
  --teal: #0d9488;
  --teal-600: #0f766e;
  --teal-700: #115e59;
  --teal-300: #5eead4;
  --mint: #ccfbf1;
  --ink: #0b1620;
  --ink-2: #33475b;
  --ink-3: #6b8199;
  --paper: #ffffff;
  --paper-2: #f4f8f8;
  --paper-3: #e9f1f1;
  --line: #dbe7e7;
  --coral: #f76d5e;      /* warm human accent */
  --amber: #e8a13a;
  --danger: #e5484d;
  --ok: #2fa36b;
  --grad: linear-gradient(135deg, #0d9488 0%, #0f766e 55%, #115e59 100%);
  --grad-soft: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  --shadow-s: 0 1px 2px rgba(11,22,32,.06), 0 2px 6px rgba(11,22,32,.05);
  --shadow-m: 0 6px 20px rgba(11,22,32,.09), 0 2px 6px rgba(11,22,32,.05);
  --shadow-l: 0 24px 60px rgba(11,22,32,.16), 0 8px 20px rgba(11,22,32,.08);
  --shadow-teal: 0 12px 30px rgba(13,148,136,.28);
  --r-s: 10px; --r-m: 16px; --r-l: 26px; --r-pill: 999px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --urdu: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Urdu Typesetting", "Segoe UI", serif;
  --maxw: 1140px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eaf4f3; --ink-2: #b3c6c8; --ink-3: #7b9799;
    --paper: #0a1214; --paper-2: #0e1a1c; --paper-3: #12242600;
    --paper-3: #10201f; --line: #1c2f30; --mint: #0b3b38;
    --shadow-s: 0 1px 2px rgba(0,0,0,.4);
    --shadow-m: 0 8px 24px rgba(0,0,0,.5);
    --shadow-l: 0 28px 64px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --ink: #eaf4f3; --ink-2: #b3c6c8; --ink-3: #7b9799;
  --paper: #0a1214; --paper-2: #0e1a1c; --paper-3: #10201f; --line: #1c2f30; --mint: #0b3b38;
  --shadow-s: 0 1px 2px rgba(0,0,0,.4);
  --shadow-m: 0 8px 24px rgba(0,0,0,.5);
  --shadow-l: 0 28px 64px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
.urdu { font-family: var(--urdu); direction: rtl; unicode-bidi: isolate; line-height: 2.1; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--teal); }
:root[data-theme="dark"] .eyebrow, .dark .eyebrow { color: var(--teal-300); }
section { padding: 92px 0; position: relative; }
h1,h2,h3 { line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h2.title { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; margin: 14px 0 12px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 620px; }
.center { text-align: center; } .center .lead { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 16px; padding: 15px 26px; border-radius: var(--r-pill);
  border: 1.5px solid transparent; cursor: pointer; transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s, background .16s; font-family: inherit; }
.btn svg { width: 20px; height: 20px; }
.btn-wa { background: var(--grad); color: #fff; box-shadow: var(--shadow-teal); }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(13,148,136,.4); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); border-color: var(--teal); }
.btn-lg { padding: 18px 34px; font-size: 17px; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 2px; }

/* ---- Nav ---- */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.5) blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, transparent); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); position: relative; flex: none; box-shadow: var(--shadow-teal); }
.logo-mark::before, .logo-mark::after { content: ""; position: absolute; background: #fff; border-radius: 2px; }
.logo-mark::before { width: 18px; height: 3.6px; top: 16.2px; left: 9px; }
.logo-mark::after { width: 3.6px; height: 18px; top: 9px; left: 16.2px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.nav-links a.navlink { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.nav-links a.navlink:hover { color: var(--teal); }
.nav-cta { padding: 10px 18px; font-size: 15px; }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.theme-toggle:hover { color: var(--teal); border-color: var(--teal); }
.theme-toggle svg { width: 19px; height: 19px; }
@media (max-width: 820px) { .nav-links a.navlink { display: none; } }

/* ---- Hero ---- */
.hero { padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(36px, 6vw, 62px); font-weight: 850; letter-spacing: -.03em; }
.hero h1 .accent { background: var(--grad-soft); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-urdu { font-size: clamp(22px, 3.4vw, 30px); color: var(--teal-700); margin: 6px 0 4px; font-weight: 600; }
:root[data-theme="dark"] .hero-urdu { color: var(--teal-300); }
.hero .lead { margin-top: 18px; font-size: clamp(17px, 2.2vw, 20px); }
.hero-cta { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 18px; margin-top: 22px; flex-wrap: wrap; color: var(--ink-3); font-size: 14.5px; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { width: 17px; height: 17px; color: var(--teal); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 34px; } .hero-visual { order: -1; } }

/* ---- Phone mockup ---- */
.phone { width: 300px; max-width: 82vw; margin: 0 auto; aspect-ratio: 300/600; background: #0b1620;
  border-radius: 40px; padding: 12px; box-shadow: var(--shadow-l); position: relative; border: 2px solid #1d2b33; }
.phone-screen { background: linear-gradient(180deg, #075e54 0%, #075e54 64px, #e5ddd5 64px); border-radius: 30px; height: 100%; overflow: hidden; position: relative; }
:root[data-theme="dark"] .phone-screen { background: linear-gradient(180deg, #075e54 0%, #075e54 64px, #0b141a 64px); }
.wa-top { height: 64px; display: flex; align-items: center; gap: 10px; padding: 0 14px; color: #fff; }
.wa-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); position: relative; flex: none; }
.wa-avatar::before, .wa-avatar::after { content:""; position:absolute; background:#fff; border-radius:1.5px; }
.wa-avatar::before { width: 15px; height: 3px; top: 16.5px; left: 10.5px; }
.wa-avatar::after { width: 3px; height: 15px; top: 10.5px; left: 16.5px; }
.wa-name { font-weight: 700; font-size: 14px; } .wa-status { font-size: 11px; opacity: .8; }
.wa-body { padding: 14px 12px; display: flex; flex-direction: column; gap: 9px; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.08); opacity: 0; transform: translateY(8px); animation: bubbleIn .5s forwards; }
.bubble.me { align-self: flex-end; background: #dcf8c6; color: #0b1620; border-bottom-right-radius: 3px; }
.bubble.them { align-self: flex-start; background: #fff; color: #0b1620; border-bottom-left-radius: 3px; }
.bubble.voice { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.voice-wave { flex: 1; height: 20px; display: flex; align-items: center; gap: 2px; }
.voice-wave i { flex: 1; background: var(--teal); border-radius: 2px; height: 40%; animation: wave 1s ease-in-out infinite; }
.voice-play { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; flex: none; }
.voice-play svg { width: 11px; height: 11px; color: #fff; }
.bubble .u { font-family: var(--urdu); direction: rtl; font-size: 15px; line-height: 1.9; }
.bubble:nth-child(1) { animation-delay: .3s; } .bubble:nth-child(2) { animation-delay: 1.0s; }
.bubble:nth-child(3) { animation-delay: 1.7s; } .bubble:nth-child(4) { animation-delay: 2.5s; }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0); } }
@keyframes wave { 0%,100% { height: 30%; } 50% { height: 90%; } }
.voice-wave i:nth-child(2n){ animation-delay:.15s } .voice-wave i:nth-child(3n){ animation-delay:.3s } .voice-wave i:nth-child(4n){ animation-delay:.45s }

/* ---- Section backgrounds ---- */
.band { background: var(--paper-2); }
.band-teal { background: var(--grad); color: #fff; }
.band-teal .eyebrow { color: var(--teal-300); }
.band-teal .lead { color: rgba(255,255,255,.9); }

/* ---- Stats / data ---- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 44px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 24px; box-shadow: var(--shadow-s); position: relative; overflow: hidden; }
.stat-num { font-size: clamp(34px, 5vw, 46px); font-weight: 850; letter-spacing: -.03em; color: var(--teal); font-variant-numeric: tabular-nums; line-height: 1; }
.stat-num .unit { font-size: .5em; font-weight: 800; color: var(--ink-2); margin-left: 2px; }
.stat-label { font-size: 14.5px; color: var(--ink-2); margin-top: 10px; font-weight: 600; line-height: 1.45; }
.stat-src { font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.stat.accent-coral .stat-num { color: var(--coral); }
.stat.accent-amber .stat-num { color: var(--amber); }

.data-viz { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 26px; }
@media (max-width: 820px) { .data-viz { grid-template-columns: 1fr; } }
.viz-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 26px; box-shadow: var(--shadow-s); }
.viz-card h3 { font-size: 18px; font-weight: 750; margin-bottom: 4px; }
.viz-card p.sub { font-size: 13.5px; color: var(--ink-3); margin-bottom: 18px; }

/* horizontal compare bars */
.cmp { display: flex; flex-direction: column; gap: 16px; }
.cmp-row .cmp-top { display: flex; justify-content: space-between; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.cmp-track { height: 30px; background: var(--paper-3); border-radius: 8px; overflow: hidden; }
.cmp-fill { height: 100%; border-radius: 8px; width: 0; transition: width 1.2s cubic-bezier(.2,.8,.2,1); display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; color: #fff; font-weight: 700; font-size: 13px; }
.cmp-fill.a { background: var(--grad); } .cmp-fill.b { background: var(--coral); }
.cmp-fill.c { background: linear-gradient(90deg, var(--ink-3), var(--ink-2)); }

/* ---- How it works ---- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 46px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 30px 26px; text-align: center; box-shadow: var(--shadow-s); position: relative; }
.step-n { position: absolute; top: 18px; right: 22px; font-size: 46px; font-weight: 850; color: var(--paper-3); line-height: 1; }
.step-ic { width: 64px; height: 64px; border-radius: 18px; background: var(--mint); display: grid; place-items: center; margin: 0 auto 18px; color: var(--teal); }
:root[data-theme="dark"] .step-ic { color: var(--teal-300); }
.step-ic svg { width: 30px; height: 30px; }
.step h3 { font-size: 19px; font-weight: 750; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-2); }

/* ---- Features ---- */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
@media (max-width: 900px) { .feat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feat-grid { grid-template-columns: 1fr; } }
.feat { padding: 26px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-s); transition: transform .18s, box-shadow .18s; }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.feat-ic { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; }
.feat-ic svg { width: 24px; height: 24px; }
.feat-ic.teal { background: var(--mint); color: var(--teal); }
.feat-ic.coral { background: color-mix(in srgb, var(--coral) 16%, transparent); color: var(--coral); }
.feat-ic.amber { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.feat h3 { font-size: 18px; font-weight: 720; margin-bottom: 7px; }
.feat p { font-size: 14.5px; color: var(--ink-2); }

/* safety callout */
.safety { margin-top: 26px; border-radius: var(--r-l); padding: 34px; background: color-mix(in srgb, var(--danger) 8%, var(--paper)); border: 1.5px solid color-mix(in srgb, var(--danger) 30%, var(--line)); display: flex; gap: 20px; align-items: flex-start; }
.safety-ic { width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); display: grid; place-items: center; flex: none; }
.safety-ic svg { width: 26px; height: 26px; }
.safety h3 { font-size: 19px; font-weight: 760; margin-bottom: 8px; }
.safety p { font-size: 15px; color: var(--ink-2); }
.safety .emerg { margin-top: 10px; font-weight: 700; color: var(--danger); }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }
.about-card { background: var(--grad); color: #fff; border-radius: var(--r-l); padding: 38px; box-shadow: var(--shadow-teal); }
.about-card .big-quote { font-size: 22px; font-weight: 700; line-height: 1.4; }
.about-card .urdu { font-size: 20px; margin-top: 16px; opacity: .95; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(28px, 4.4vw, 42px); font-weight: 820; color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin: 12px auto 28px; max-width: 560px; font-size: 18px; }
.cta-band .btn-wa { background: #fff; color: var(--teal-700); box-shadow: var(--shadow-l); }
.cta-band .urdu { color: #fff; font-size: 22px; margin-bottom: 6px; }

/* ---- Forms (contact / feedback) ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 40px; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); padding: 30px; box-shadow: var(--shadow-s); }
.form-card h3 { font-size: 20px; font-weight: 760; margin-bottom: 6px; }
.form-card p.sub { color: var(--ink-3); font-size: 14.5px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--r-s);
  background: var(--paper-2); color: var(--ink); font-family: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 18%, transparent); background: var(--paper); }
.field textarea { resize: vertical; min-height: 108px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.form-msg { font-size: 14px; margin-top: 12px; min-height: 20px; font-weight: 600; }
.form-msg.ok { color: var(--ok); } .form-msg.err { color: var(--danger); }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.contact-list li { display: flex; gap: 14px; align-items: center; }
.contact-ic { width: 46px; height: 46px; border-radius: 12px; background: var(--mint); color: var(--teal); display: grid; place-items: center; flex: none; }
.contact-ic svg { width: 22px; height: 22px; }
.contact-list b { display: block; font-size: 15px; } .contact-list span { font-size: 14px; color: var(--ink-3); }

/* ---- FAQ ---- */
.faq { max-width: 780px; margin: 40px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 22px 0; font-size: 17px; font-weight: 680; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: inherit; }
.faq-q .chev { width: 22px; height: 22px; flex: none; transition: transform .2s; color: var(--teal); }
.faq-item.open .chev { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-a p { padding: 0 0 22px; color: var(--ink-2); font-size: 15.5px; }

/* ---- Footer ---- */
.footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 54px 0 34px; }
.footer-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer .logo { margin-bottom: 12px; }
.footer p.tag { color: var(--ink-3); font-size: 14px; max-width: 320px; }
.footer-links { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .8px; color: var(--ink-3); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 10px; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 13.5px; }
.disclaimer { background: color-mix(in srgb, var(--amber) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--amber) 30%, var(--line)); border-radius: var(--r-s); padding: 16px 18px; font-size: 13.5px; color: var(--ink-2); margin-top: 26px; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---- Privacy page ---- */
.doc { max-width: 780px; margin: 0 auto; padding: 60px 0; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); font-weight: 820; margin-bottom: 8px; }
.doc .updated { color: var(--ink-3); font-size: 14px; margin-bottom: 32px; }
.doc h2 { font-size: 22px; font-weight: 750; margin: 34px 0 12px; }
.doc p, .doc li { color: var(--ink-2); font-size: 16px; margin-bottom: 12px; }
.doc ul { padding-left: 22px; } .doc li { margin-bottom: 8px; }
.doc a { color: var(--teal); font-weight: 600; }
.doc .back { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-weight: 650; margin-bottom: 30px; }
