/* DoseTracker web — Calm Indigo, tokens mirrored from dose-tracker-mobile/src/theme/index.ts */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-deep: #4338ca;
  --primary-soft: #e0e7ff;
  --primary-tint: #eef2ff;
  --bg: #ffffff;
  --surface-subtle: #f8fafc;
  --surface-muted: #f1f5f9;
  --ink: #0f172a;
  --ink-secondary: #475569;
  --ink-muted: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --warning: #f59e0b;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;
  --shadow-card: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-float: 0 8px 24px rgba(15, 23, 42, 0.12);
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --max: 1080px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  font-family: var(--font);
  color: var(--ink-secondary);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  font-weight: 800;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
p {
  max-width: 65ch;
}
a {
  color: var(--primary-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}
section {
  padding: 72px 0;
}
.section-alt {
  background: var(--surface-subtle);
}
.kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 10px;
}
.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}
.section-head p {
  margin-top: 12px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.05rem;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.brand:hover {
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a {
  color: var(--ink-secondary);
  font-size: 0.94rem;
  font-weight: 500;
}
.site-nav a:hover {
  color: var(--ink);
  text-decoration: none;
}
@media (max-width: 820px) {
  .site-nav .nav-link {
    display: none;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-pill);
  font-weight: 700;
  cursor: pointer;
  padding: 14px 26px;
  font-size: 1rem;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    background 0.12s ease;
  text-decoration: none !important;
}
.btn-primary {
  background: var(--primary);
  color: #fff !important;
  box-shadow: var(--shadow-card);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-float);
}
.btn-ghost {
  background: var(--primary-tint);
  color: var(--primary-deep) !important;
}
.btn-ghost:hover {
  background: var(--primary-soft);
}
.btn-sm {
  padding: 9px 18px;
  font-size: 0.9rem;
}
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff !important;
  border-radius: 12px;
  padding: 10px 20px;
  line-height: 1.15;
  text-decoration: none !important;
  transition:
    transform 0.12s ease,
    opacity 0.12s ease;
}
.appstore-badge:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}
.appstore-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.appstore-badge .small {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  opacity: 0.85;
}
.appstore-badge .big {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(48px, 7vh, 76px) 0 56px;
  overflow: hidden;
  background:
    radial-gradient(
      1000px 500px at 85% -10%,
      var(--primary-tint),
      transparent 60%
    ),
    radial-gradient(
      700px 420px at -10% 30%,
      var(--primary-tint),
      transparent 55%
    );
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 48px;
  align-items: start;
}
.hero-phone {
  justify-self: center;
  width: min(300px, 31svh, 100%);
}
@media (max-width: 880px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .hero-phone {
    margin: 0 auto;
    width: min(260px, 62vw);
  }
}
.hero h1 span {
  color: var(--primary-dark);
}
.hero-sub {
  margin: 18px 0 28px;
  font-size: 1.15rem;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero-note {
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}
.hero-trust li {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-secondary);
}
.hero-trust svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex: none;
}

/* ---------- Phone frames ---------- */
.phone {
  width: 270px;
  border-radius: 42px;
  padding: 10px;
  background: var(--ink);
  box-shadow: var(--shadow-float);
  flex: none;
  overflow: hidden;
}
.phone img {
  border-radius: 34px;
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  object-fit: cover;
}
.phone-lg {
  width: 300px;
}
@media (max-height: 760px) and (min-width: 881px) {
  .hero {
    padding-top: 40px;
  }
  .hero-phone {
    width: min(250px, 31svh, 100%);
  }
}
@media (max-width: 480px) {
  .hero {
    padding-top: 36px;
  }
  .hero-phone {
    display: none;
  }
  .hero-ctas > * {
    width: 100%;
  }
  .appstore-badge {
    justify-content: center;
  }
}

/* ---------- Medication chips ---------- */
.meds {
  padding: 34px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-subtle);
}
.meds .container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
.meds .label {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 8px;
}
.med-chip {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: #fff;
  border: 1px solid var(--border);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

/* ---------- Feature grid ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 880px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.card h3 {
  margin-bottom: 8px;
}
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r-md);
  background: var(--primary-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary-dark);
}
.card .icon svg {
  width: 24px;
  height: 24px;
}

/* ---------- Screenshots rail ---------- */
.shots-rail {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  padding: 10px 4px 26px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots-rail figure {
  scroll-snap-align: center;
  text-align: center;
  flex: none;
}
.shots-rail figcaption {
  margin-top: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

/* ---------- Steps ---------- */
.step {
  position: relative;
}
.step .num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* ---------- Guide cards ---------- */
.guide-card {
  display: flex;
  flex-direction: column;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  color: inherit;
}
.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-float);
  text-decoration: none;
}
.guide-card .tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.guide-card p {
  font-size: 0.94rem;
}
.guide-card .more {
  margin-top: auto;
  padding-top: 14px;
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 0.92rem;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 760px;
}
.faq-list details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}
.faq-list summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.02rem;
  list-style: none;
  position: relative;
  padding-right: 30px;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--primary);
}
.faq-list details[open] summary::after {
  content: "–";
}
.faq-list details p {
  margin-top: 12px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--primary-deep), var(--primary));
  border-radius: var(--r-xl);
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}
.cta-band h2 {
  color: #fff;
  margin-bottom: 12px;
}
.cta-band p {
  margin: 0 auto 28px;
  color: var(--primary-soft);
}

/* ---------- Disclaimers ---------- */
.disclaimer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--primary-tint);
  border: 1px solid var(--primary-soft);
  border-radius: var(--r-md);
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--ink-secondary);
  margin-top: 40px;
}
.disclaimer svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--primary-dark);
  margin-top: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #94a3b8;
  padding: 56px 0 36px;
  font-size: 0.9rem;
}
.site-footer a {
  color: #cbd5e1;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 36px;
}
@media (max-width: 820px) {
  .site-footer .cols {
    grid-template-columns: 1fr 1fr;
  }
}
.site-footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.site-footer ul {
  list-style: none;
}
.site-footer li {
  margin-bottom: 9px;
}
.site-footer .brand {
  color: #fff;
  margin-bottom: 14px;
}
.site-footer .legal {
  border-top: 1px solid #1e293b;
  padding-top: 26px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
}
.site-footer .legal p {
  max-width: none;
  margin-bottom: 8px;
}

/* ---------- Article / legal pages ---------- */
.article {
  padding: 56px 0 72px;
}
.article .container {
  max-width: 760px;
}
.article h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 10px;
}
.article .meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 34px;
}
.article h2 {
  font-size: 1.45rem;
  margin: 40px 0 14px;
}
.article h3 {
  margin: 28px 0 10px;
}
.article p,
.article li {
  margin-bottom: 14px;
  color: var(--ink-secondary);
}
.article ul,
.article ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.article li {
  margin-bottom: 8px;
}
.article table {
  border-collapse: collapse;
  width: 100%;
  margin: 18px 0;
  font-size: 0.94rem;
}
.article th,
.article td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.article th {
  background: var(--surface-subtle);
  color: var(--ink);
}
.article .app-tie {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--r-md);
  padding: 22px 24px;
  margin: 30px 0;
}
.article .app-tie h3 {
  margin-top: 0;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 18px;
}
.table-wrap {
  overflow-x: auto;
}
