/* BlueDose website. Plain CSS, phone first. Brand tokens match design/bluedose-mockups.html. */

:root {
  --bg: #EEF4FA;          /* chalk tile */
  --surface: #FFFFFF;
  --surface-2: #F4F8FC;
  --fg: #0B1F3A;          /* night water */
  --muted: #5B6B82;
  --line: #D6E0EC;
  --blue: #0B5FFF;        /* pool blue */
  --blue-deep: #083B9E;   /* deep end */
  --aqua: #19B8C9;        /* shallow end */
  --blue-bg: #E3ECFF;
  --aqua-bg: #DDF5F8;
  --link: #0B5FFF;
  --btn: #0B5FFF;
  --btn-fg: #FFFFFF;
  --hero-a: rgba(25, 184, 201, 0.20);
  --hero-b: rgba(11, 95, 255, 0.18);
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.05), 0 8px 24px rgba(11, 31, 58, 0.06);
  --shadow-lg: 0 24px 60px rgba(8, 59, 158, 0.22);
  --footer-bg: #0B1F3A;
  --footer-fg: #C4D2E6;
  --display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --radius: 18px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1628;
    --surface: #122240;
    --surface-2: #182C4F;
    --fg: #EAF1FB;
    --muted: #A3B3C9;
    --line: #253B61;
    --blue: #4D8DFF;
    --blue-deep: #A9C4FF;
    --aqua: #37D2E2;
    --blue-bg: #1B3366;
    --aqua-bg: #0F3A44;
    --link: #7FAEFF;
    --hero-a: rgba(55, 210, 226, 0.14);
    --hero-b: rgba(77, 141, 255, 0.20);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
    --footer-bg: #060F1E;
    --footer-fg: #A3B3C9;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg, picture { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 6vw, 36px); font-weight: 700; }
h3 { font-size: 18px; font-weight: 600; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 700; }
code { font-size: 0.92em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}
@media (min-width: 640px) {
  :root { --gutter-l: max(24px, env(safe-area-inset-left, 0px)); --gutter-r: max(24px, env(safe-area-inset-right, 0px)); }
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--btn); color: var(--btn-fg); padding: 10px 14px; border-radius: 10px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; }
.site-nav a { display: block; padding: 8px 10px; border-radius: 10px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover { background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--link); }
@media (max-width: 400px) {
  .site-nav .opt { display: none; }
  .site-nav a { padding: 8px 8px; font-size: 14px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 56px; }
@media (min-width: 900px) { .section { padding-block: 80px; } }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; max-width: 720px; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--link); }
.section-lede { color: var(--muted); font-size: 17px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse 70% 60% at 90% 0%, var(--hero-a), transparent 70%),
    radial-gradient(ellipse 60% 70% at 100% 45%, var(--hero-b), transparent 70%),
    var(--bg);
  padding-block: 40px 56px;
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 880px) {
  .hero { padding-block: 72px 88px; }
  .hero-grid { grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
}
.hero-copy { display: grid; gap: 18px; justify-items: start; }
.app-icon { width: 76px; height: 76px; border-radius: 20px; box-shadow: 0 10px 30px rgba(11, 95, 255, 0.30); }
.hero h1 { display: grid; gap: 6px; }
.hero h1 .name { font-size: clamp(42px, 11vw, 64px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.02; }
.hero h1 .what { font-size: clamp(19px, 4.4vw, 24px); font-weight: 600; color: var(--muted); letter-spacing: -0.005em; }
.tagline { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 5vw, 28px); color: var(--blue-deep); letter-spacing: -0.01em; }
.lede { font-size: 18px; color: var(--fg); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 4px; }
.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.facts li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
}
.facts li::before {
  content: ""; width: 9px; height: 5px; margin-top: -3px;
  border-left: 2.5px solid var(--aqua); border-bottom: 2.5px solid var(--aqua);
  transform: rotate(-45deg);
}
.hero-shot { justify-self: center; width: min(270px, 74vw); }
.hero-shot img { width: 100%; border-radius: 28px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
@media (min-width: 880px) { .hero-shot { width: 320px; } }

/* Google Play button (swap in the official badge artwork if preferred; see README) */
.play-badge {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 18px 8px 14px;
  background: #000; color: #fff; border: 1px solid #A6A6A6; border-radius: 12px;
  text-decoration: none; line-height: 1.1;
}
.play-badge:hover { background: #1a1a1a; }
.play-badge svg { width: 26px; height: 28px; flex: none; }
.play-badge span { display: grid; }
.play-badge small { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.play-badge b { font-family: var(--display); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

/* ---------- How it works ---------- */
.steps { list-style: none; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  counter-increment: step;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid; gap: 8px; align-content: start; box-shadow: var(--shadow);
}
.step::before {
  content: counter(step);
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: var(--btn); color: var(--btn-fg); font-family: var(--display); font-weight: 700; font-size: 18px;
  margin-bottom: 6px;
}
.step p { color: var(--muted); }

/* ---------- Features ---------- */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.feature {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 8px; align-content: start;
}
.ficon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-bg); color: var(--blue); margin-bottom: 4px; }
.ficon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--muted); font-size: 15.5px; }
.also { margin-top: 24px; padding: 16px 18px; border-radius: 14px; background: var(--aqua-bg); font-size: 15.5px; }

/* ---------- Screenshots ---------- */
.shots {
  list-style: none; display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px 2px 16px; scrollbar-width: thin;
}
.shots li { flex: 0 0 clamp(200px, 64vw, 250px); scroll-snap-align: start; }
.shot { margin: 0; display: grid; gap: 12px; }
.shot a { display: block; border-radius: 22px; }
.shot img { width: 100%; border-radius: 22px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { display: grid; gap: 2px; font-size: 14.5px; color: var(--muted); }
.shot figcaption strong { font-family: var(--display); font-weight: 600; color: var(--fg); font-size: 16px; }
.swipe-hint { color: var(--muted); font-size: 14px; margin-top: 4px; }
@media (min-width: 760px) {
  .shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 28px; overflow: visible; padding: 0; }
  .shots li { max-width: 290px; justify-self: center; }
  .swipe-hint { display: none; }
}

/* ---------- Chemistry ---------- */
.chem-grid { display: grid; gap: 28px; }
@media (min-width: 940px) { .chem-grid { grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; } }
.chem-notes { display: grid; gap: 22px; }
.chem-notes article { display: grid; gap: 6px; }
.chem-notes p { color: var(--muted); }
.table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.ref-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.ref-table caption { text-align: left; font-family: var(--display); font-weight: 600; font-size: 17px; padding-bottom: 10px; }
.ref-table th, .ref-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ref-table thead th { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; }
.ref-table tbody th { font-weight: 600; }
.ref-table tbody th small { display: block; font-weight: 500; color: var(--muted); }
.ref-table td { white-space: nowrap; font-weight: 700; }
.ref-table td small { display: block; font-weight: 500; color: var(--muted); }
.ref-table tr:last-child th, .ref-table tr:last-child td { border-bottom: 0; }
.table-note { font-size: 14px; color: var(--muted); margin-top: 12px; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 16px; }
@media (min-width: 860px) { .faq-list { grid-template-columns: 1fr 1fr; } }
.faq {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: grid; gap: 8px; align-content: start;
}
.faq p { color: var(--muted); }

/* ---------- Languages ---------- */
.langs { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.langs li {
  padding: 6px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14.5px; font-weight: 600;
}
.langs li span { font-weight: 500; color: var(--muted); margin-left: 4px; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(150deg, #1E7BFF 0%, #0B5FFF 50%, #083B9E 100%);
  color: #fff; border-radius: 24px; padding: 32px 22px;
  display: grid; gap: 16px; justify-items: start;
}
.cta h2 { font-size: clamp(24px, 5.5vw, 32px); }
.cta p { color: #DCE7FF; max-width: 56ch; }
@media (min-width: 760px) { .cta { padding: 44px; grid-template-columns: 1fr auto; align-items: center; } .cta .play-badge { grid-row: 1 / span 2; grid-column: 2; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-fg); padding-block: 44px 36px; font-size: 15px; }
.site-footer a { color: #FFFFFF; }
.footer-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr; } }
.footer-brand { display: grid; gap: 6px; }
.footer-brand .brand { color: #FFFFFF; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; align-content: start; }
.footer-links a { font-weight: 600; }
.fineprint { display: grid; gap: 6px; margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 13.5px; }

/* ---------- Prose pages (privacy, support) ---------- */
.page-head { padding-block: 36px 8px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.page-head h1 { font-size: clamp(32px, 8vw, 46px); font-weight: 700; letter-spacing: -0.02em; }
.page-meta { color: var(--muted); margin-top: 10px; font-size: 15px; }
.prose { max-width: 72ch; padding-block: 16px 64px; }
.prose > * + * { margin-top: 14px; }
.prose h2 { font-size: clamp(22px, 5vw, 26px); margin-top: 40px; scroll-margin-top: 80px; }
.prose h3 { margin-top: 26px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose td, .prose th, .prose a, .contact-card .email, .footer-links a { overflow-wrap: anywhere; }
.prose thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 14px; padding: 18px 20px; }
.callout h2 { margin-top: 0; font-size: 20px; }
.callout ul { margin-top: 10px; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; }
.toc h2 { font-size: 16px; margin: 0 0 8px; }
.toc ol { columns: 2 180px; column-gap: 24px; font-size: 15px; }
.toc li + li { margin-top: 4px; }
.contact-card { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.contact-card h2 { margin-top: 0; }
.contact-card .email { font-family: var(--display); font-size: clamp(17px, 5vw, 24px); font-weight: 700; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 12px;
  background: var(--btn); color: var(--btn-fg); font-family: var(--display); font-weight: 600; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.back-link { display: inline-block; margin-top: 28px; font-weight: 700; }

/* ---------- Print (privacy policy and support read well on paper) ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #fff; --fg: #000; --muted: #333; --line: #bbb; --link: #000; color-scheme: light; }
  body { font-size: 11pt; line-height: 1.45; background: #fff; color: #000; }
  .site-header, .site-nav, .skip-link, .cta, .back-link, .toc, .play-badge, .site-footer .footer-links { display: none !important; }
  .site-footer { background: #fff; color: #000; padding: 12pt 0 0; margin-top: 12pt; border-top: 1px solid #bbb; }
  .site-footer a { color: #000; }
  .fineprint { border-top: 0; margin-top: 0; padding-top: 0; }
  .container { max-width: none; padding: 0; }
  .prose { max-width: none; }
  .page-head { padding-top: 0; }
  .callout, .contact-card, .table-card, .feature, .faq, .step { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  table, tr { break-inside: avoid; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.9em; word-break: break-all; }
  @page { margin: 18mm 16mm; }
}
