/* ============================================================
   DoseWise — marketing + privacy site
   Zero external requests. No fonts fetched, no trackers, no cookies.
   Brand: teal/emerald #2AB49C · dark teal #1E8C7A · mint #E8F7F3
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-soft: #E8F7F3;
  --bg-mint: #E8F7F3;
  --surface: #ffffff;
  --surface-2: #F3FBF8;
  --text: #1C2B2A;
  --muted: #52635F;
  --brand: #2AB49C;
  --brand-ink: #147C6B;      /* AA-safe brand text on white */
  --brand-600: #1E8C7A;
  --border: #DCEDE8;
  --ring: rgba(42, 180, 156, .45);

  --btn-bg: #147C6B;
  --btn-bg-hover: #106356;
  --btn-fg: #ffffff;

  --shadow-sm: 0 1px 2px rgba(28, 43, 42, .06);
  --shadow: 0 10px 30px rgba(28, 43, 42, .08);
  --shadow-lg: 0 24px 60px rgba(28, 43, 42, .14);

  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --maxw: 1120px;
  --gap: clamp(1rem, 2.5vw, 2rem);

  --font: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN",
          "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
          Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1817;
    --bg-soft: #101F1D;
    --bg-mint: #101F1D;
    --surface: #142523;
    --surface-2: #17302B;
    --text: #E8F3F0;
    --muted: #A0B5B0;
    --brand: #34C6AD;
    --brand-ink: #5FD8C1;
    --brand-600: #2AB49C;
    --border: #23423C;
    --ring: rgba(52, 198, 173, .5);

    --btn-bg: #2AB49C;
    --btn-bg-hover: #34C6AD;
    --btn-fg: #06231E;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
  }
}

:root[data-theme="dark"] {
  --bg: #0D1817;
  --bg-soft: #101F1D;
  --bg-mint: #101F1D;
  --surface: #142523;
  --surface-2: #17302B;
  --text: #E8F3F0;
  --muted: #A0B5B0;
  --brand: #34C6AD;
  --brand-ink: #5FD8C1;
  --brand-600: #2AB49C;
  --border: #23423C;
  --ring: rgba(52, 198, 173, .5);

  --btn-bg: #2AB49C;
  --btn-bg-hover: #34C6AD;
  --btn-fg: #06231E;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 800;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding-block: clamp(3.2rem, 8vw, 6rem); }
.section--mint { background: var(--bg-mint); }
.section--tight { padding-block: clamp(2.4rem, 6vw, 4rem); }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin: 0 0 .75rem;
}

.lead {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: var(--muted);
  max-width: 62ch;
}

.section-head { max-width: 46rem; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.section-head .lead { margin-inline: auto; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--btn-bg);
  color: var(--btn-fg);
  padding: .7rem 1.1rem;
  border-radius: 0 0 var(--radius) 0;
  z-index: 200;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: inherit;
  font-weight: 700;
  padding: .8rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--btn-bg-hover); color: var(--btn-fg); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-ink); }

/* App Store badge (SVG placeholder) */
.appstore {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--text);
  color: var(--bg);
  padding: .6rem 1.15rem .6rem 1rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform .15s ease, opacity .15s ease;
  border: 1.5px solid var(--text);
}
:root[data-theme="dark"] .appstore,
:root:not([data-theme="light"]) .appstore { }
.appstore:hover { text-decoration: none; transform: translateY(-1px); opacity: .92; }

.appstore svg { width: 26px; height: 26px; flex: none; fill: var(--bg); }
.appstore-txt { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.appstore-txt small { font-size: .66rem; font-weight: 600; opacity: .85; letter-spacing: .02em; }
.appstore-txt strong { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: .7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand .logo { width: 30px; height: 30px; }
.nav-links {
  display: flex;
  gap: .35rem;
  margin-left: auto;
  align-items: center;
}
.nav-links a {
  color: var(--text);
  padding: .45rem .7rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: .96rem;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; color: var(--brand-ink); }

.nav-tools { display: flex; align-items: center; gap: .4rem; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.icon-btn:hover { border-color: var(--brand); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .sun,
:root:not([data-theme="light"]) .icon-btn .sun { display: block; }
:root[data-theme="dark"] .icon-btn .moon,
:root:not([data-theme="light"]) .icon-btn .moon { display: none; }

.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.lang-switch a {
  padding: .35rem .6rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--muted);
}
.lang-switch a:hover { text-decoration: none; background: var(--surface-2); }
.lang-switch a[aria-current="true"] { background: var(--brand); color: #06231E; }

@media (max-width: 720px) {
  .nav-links a.nav-hide-sm { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1200px 500px at 80% -10%, color-mix(in srgb, var(--brand) 18%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg-mint), var(--bg) 78%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero h1 { margin-bottom: .35em; }
.hero .lead { font-size: clamp(1.1rem, 2.3vw, 1.35rem); }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-top: 1.7rem;
  align-items: center;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .9rem;
  margin-top: 1.6rem;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}
.hero-badges li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-badges svg { width: 17px; height: 17px; color: var(--brand); flex: none; }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; }
}

/* ---------- Phone mockup (CSS/SVG, placeholder) ---------- */
.hero-visual { display: grid; place-items: center; }
.phone {
  width: min(300px, 78vw);
  aspect-ratio: 300 / 620;
  background: var(--surface);
  border: 10px solid #0c1413;
  border-radius: 44px;
  box-shadow: var(--shadow-lg);
  padding: 14px 12px;
  position: relative;
  overflow: hidden;
}
:root[data-theme="dark"] .phone,
:root:not([data-theme="light"]) .phone { border-color: #05100e; }
.phone::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 42%; height: 22px;
  background: #0c1413;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.screen {
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(180deg, var(--bg-mint), var(--surface) 40%);
  padding: 34px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}
.screen-title { font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.screen-sub { font-size: .72rem; color: var(--muted); font-weight: 600; }
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}
.mini-card .k { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-ink); }
.mini-card .big { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.mini-card .row { display: flex; align-items: center; justify-content: space-between; }
.chip {
  font-size: .62rem;
  font-weight: 700;
  color: var(--brand-ink);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  padding: .18rem .5rem;
  border-radius: 999px;
}
.ring {
  --p: 68;
  width: 58px; height: 58px; border-radius: 50%;
  background:
    radial-gradient(closest-side, var(--surface) 70%, transparent 71% 100%),
    conic-gradient(var(--brand) calc(var(--p) * 1%), color-mix(in srgb, var(--brand) 18%, transparent) 0);
  display: grid; place-items: center;
  font-size: .7rem; font-weight: 800;
  flex: none;
}
.spark { width: 100%; height: 34px; display: block; }
.spark path { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.spark .area { fill: color-mix(in srgb, var(--brand) 14%, transparent); stroke: none; }

/* ---------- Pillars ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.pillar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.pillar .ic {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--brand) 15%, transparent);
  color: var(--brand-ink);
  margin-bottom: 1rem;
}
.pillar .ic svg { width: 28px; height: 28px; }
.pillar h3 { margin-bottom: .4rem; }
.pillar p { color: var(--muted); margin: 0; }

@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Features ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.feature .shot {
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), color-mix(in srgb, var(--brand-600) 10%, transparent));
  display: grid;
  place-items: center;
  color: var(--brand-ink);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.feature .shot span {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .8;
}
.feature .shot svg { width: 44px; height: 44px; position: absolute; top: 14px; left: 14px; opacity: .55; }
.feature .body { padding: 1.2rem 1.3rem 1.4rem; }
.feature h3 { margin-bottom: .35rem; }
.feature p { color: var(--muted); margin: 0; font-size: .98rem; }

@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

/* ---------- Privacy band ---------- */
.privacy-band {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 12%, var(--bg-mint)), var(--bg-mint));
}
.privacy-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.privacy-points { display: grid; gap: 1rem; margin-top: 1.4rem; }
.privacy-points li {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
  box-shadow: var(--shadow-sm);
}
.privacy-points .ic {
  color: var(--brand-ink); flex: none;
  width: 26px; height: 26px;
}
.privacy-points strong { display: block; }
.privacy-points p { margin: .1rem 0 0; color: var(--muted); font-size: .95rem; }

@media (max-width: 820px) { .privacy-inner { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  max-width: 880px;
  margin-inline: auto;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.7rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.plan--plus { border-color: var(--brand); box-shadow: var(--shadow); position: relative; }
.plan .tag {
  align-self: flex-start;
  font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-ink);
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  padding: .25rem .7rem; border-radius: 999px;
  margin-bottom: .9rem;
}
.plan h3 { font-size: 1.4rem; }
.plan .price-note { color: var(--muted); margin: .1rem 0 1.1rem; font-size: .96rem; }
.plan ul { display: grid; gap: .6rem; margin-bottom: 1.4rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; }
.plan li svg { width: 20px; height: 20px; color: var(--brand-ink); flex: none; margin-top: 2px; }
.plan .btn, .plan .appstore { margin-top: auto; align-self: flex-start; }

@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: .8rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 1.2rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  width: 12px; height: 12px;
  border-right: 2.5px solid var(--brand-ink);
  border-bottom: 2.5px solid var(--brand-ink);
  transform: rotate(45deg);
  transition: transform .2s ease;
  flex: none;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--muted); margin: 0 0 1.1rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .btnrow { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.footer-brand .brand { margin-bottom: .8rem; }
.footer-brand p { color: var(--muted); max-width: 34ch; font-size: .95rem; }
.footer-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .9rem; }
.footer-col ul { display: grid; gap: .55rem; }
.footer-col a { color: var(--text); font-weight: 600; }
.footer-col a:hover { color: var(--brand-ink); }
.footer-bottom {
  margin-top: 2.2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .87rem;
}
.disclaimer {
  margin-top: 1rem;
  color: var(--muted);
  font-size: .82rem;
  max-width: 70ch;
  line-height: 1.55;
}

@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Legal / privacy document ---------- */
.doc {
  max-width: 780px;
  margin-inline: auto;
}
.doc-hero { padding-block: clamp(2.4rem, 5vw, 3.6rem); text-align: center; }
.doc-hero .meta { color: var(--muted); font-size: .95rem; margin-top: .4rem; }

.lang-tabs {
  display: inline-flex;
  gap: .3rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .25rem;
  margin: 1.2rem auto 0;
  background: var(--surface);
}
.lang-tabs button {
  font: inherit;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--muted);
  padding: .45rem 1.1rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.lang-tabs button[aria-selected="true"] { background: var(--brand); color: #06231E; }

.doc h2 { margin-top: 2.4rem; padding-top: .4rem; }
.doc h3 { margin-top: 1.6rem; color: var(--brand-ink); }
.doc p, .doc li { color: var(--text); }
.doc ul { list-style: disc; padding-left: 1.3rem; margin: 0 0 1rem; }
.doc ul li { margin-bottom: .4rem; }
.doc .callout {
  background: var(--bg-mint);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.doc .callout p:last-child { margin-bottom: 0; }
.doc .toc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: 2rem;
}
.doc .toc strong { display: block; margin-bottom: .5rem; }
.doc .toc ul { list-style: none; padding-left: 0; display: grid; gap: .35rem; }
.doc .toc a { font-weight: 600; }

.lang-pane[hidden] { display: none; }

/* Visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
