/* Doses — marketing site. Plain CSS, system fonts, light + dark. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --rule: #d2d2d7;
  --link: #0066cc;
  --blue: #0a7aff;
  --orange: #f08a00;
  --green: #28a745;
  --cta-bg: #1d1d1f;
  --cta-text: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --blob-a: #ffd9b3;
  --blob-b: #cfe3ff;
  --blob-c: #d9f2df;
  --wide: 1080px;
  --prose: 680px;
  --radius: 22px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #101012;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --rule: #38383a;
    --link: #2997ff;
    --blue: #2997ff;
    --orange: #ff9f0a;
    --green: #30d158;
    --cta-bg: #f5f5f7;
    --cta-text: #1d1d1f;
    --nav-bg: rgba(0, 0, 0, 0.7);
    --blob-a: #4a2c10;
    --blob-b: #10284a;
    --blob-c: #103a1f;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cta-bg); color: var(--cta-text); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 13px; }
.nav ul a { color: var(--text); opacity: 0.8; }
.nav ul a:hover { opacity: 1; text-decoration: none; }
.nav .pill { font-size: 13px; padding: 5px 13px; }
@media (max-width: 640px) {
  .nav ul { display: none; }
  .nav .pill { margin-left: auto; }
}

/* ---------- Buttons ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--cta-bg); color: var(--cta-text);
  border-radius: 999px; font-weight: 500; white-space: nowrap;
  transition: transform .15s ease, opacity .15s ease;
}
.pill:hover { text-decoration: none; opacity: .88; }
.pill:active { transform: scale(.97); }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  background: #000; color: #fff;
  border: 1px solid #a6a6a6; border-radius: 12px;
  padding: 9px 20px 9px 15px; line-height: 1.1; text-align: left;
  transition: transform .15s ease;
}
@media (prefers-color-scheme: dark) { .store { border-color: #6e6e73; } }
.store:hover { text-decoration: none; }
.store:active { transform: scale(.97); }
.store svg { width: 26px; height: 26px; flex: none; }
.store small { display: block; font-size: 11px; letter-spacing: .02em; }
.store span { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.price-note { color: var(--muted); font-size: 14px; margin: 14px 0 0; }

/* ---------- Type ---------- */
h1, h2, h3 { letter-spacing: -0.022em; margin: 0; }
.display { font-size: clamp(44px, 8vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
.headline { font-size: clamp(34px, 5.2vw, 56px); line-height: 1.06; font-weight: 700; letter-spacing: -0.03em; }
.lede { font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; color: var(--muted); font-weight: 500; letter-spacing: -0.012em; }
.eyebrow { font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.eyebrow.orange { color: var(--orange); }
.eyebrow.blue { color: var(--blue); }
.eyebrow.green { color: var(--green); }

/* ---------- Hero ---------- */
.hero { position: relative; text-align: center; padding: 72px 0 0; overflow: hidden; }
.hero .display { margin: 0 auto; max-width: 11ch; }
.hero .lede { max-width: 30ch; margin: 22px auto 30px; }
.hero-stage { position: relative; margin: 64px auto -150px; width: min(370px, 82vw); }
@media (max-width: 640px) { .hero-stage { margin-bottom: -110px; } }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .9; z-index: -1; pointer-events: none; }
.blob.a { width: 520px; height: 520px; background: var(--blob-a); left: -60%; top: 8%; }
.blob.b { width: 560px; height: 560px; background: var(--blob-b); right: -65%; top: 30%; }
.blob.c { width: 380px; height: 380px; background: var(--blob-c); left: 10%; bottom: -12%; }
.hero-watch { position: absolute; width: 200px; right: -215px; top: 34%; }
@media (max-width: 1060px) { .hero-watch { width: 170px; right: -150px; } }
@media (max-width: 900px) { .hero-watch { display: none; } }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 220px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }

/* ---------- Devices ---------- */
.phone {
  position: relative;
  padding: 0;
  border-radius: 17.5% / 8.1%;
  background: #050505;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 0 0 2px #1d1d1f,
    0 0 0 3.5px #9a9aa0,
    0 0 0 4.5px #3a3a3c,
    0 30px 60px -30px rgba(40, 60, 90, .35);
}
.phone, .watch { display: flow-root; } /* keeps the children's margins inside the frame */
.phone > .screen, .phone > picture { display: block; margin: 3%; }
.phone .screen, .phone picture, .phone img {
  border-radius: 14.4% / 6.6%;
  overflow: hidden;
  aspect-ratio: 660 / 1434;
}
.phone img { width: 100%; }
.phone img { object-fit: cover; }
/* Apple Watch (Series, jet black aluminium). Markup: .watch > .crown + .side + .glass > picture */
.watch {
  position: relative;
  border-radius: 31% / 26%;
  background: linear-gradient(145deg, #3a3a3c, #151516 45%, #2a2a2c);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 22px 44px -22px rgba(30, 40, 60, .45);
}
.watch .glass {
  display: flow-root; margin: 3.2%;
  border-radius: 28.5% / 24%;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.watch picture { display: block; margin: 7.5% 6.5%; border-radius: 19% / 16%; overflow: hidden; aspect-ratio: 416 / 496; background: #000; }
.watch img { width: 100%; }
.watch.fade img { -webkit-mask-image: linear-gradient(#000 85%, transparent 91%); mask-image: linear-gradient(#000 85%, transparent 91%); }
.watch .crown {
  position: absolute; right: -4.8%; top: 21%; width: 5.6%; height: 16%;
  border-radius: 0 40% 40% 0 / 0 26% 26% 0;
  background: repeating-linear-gradient(0deg, #4a4a4c 0 1.5px, #1f1f21 1.5px 3px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .18);
}
.watch .side {
  position: absolute; right: -1.4%; top: 46%; width: 1.8%; height: 25%;
  border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #1a1a1c, #3a3a3c);
}

/* ---------- Live hero screen (HTML replica of the medicine page) ---------- */
.screen.live {
  --pt: calc(100cqw / 402);
  container-type: inline-size;
  position: relative;
  background: #f2f2f7;
  color: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
  text-align: left;
  user-select: none;
}
.live .in { position: absolute; inset: 0; }
.live .sb { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--pt)*21) calc(var(--pt)*30) 0 calc(var(--pt)*40); font-weight: 600; font-size: calc(var(--pt)*17); height: calc(var(--pt)*54); }
.live .sb svg { height: calc(var(--pt)*13); width: auto; margin-left: calc(var(--pt)*6); }
.live .island {
  position: absolute; top: calc(var(--pt)*11); left: 50%; transform: translateX(-50%);
  height: calc(var(--pt)*37); width: calc(var(--pt)*176);
  background: #000; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 calc(var(--pt)*14) 0 calc(var(--pt)*10);
  color: #ff9f0a; font-weight: 600; font-size: calc(var(--pt)*15.5); font-variant-numeric: tabular-nums;
  animation: island 1.1s cubic-bezier(.3, 1.4, .5, 1) .6s both;
}
.live .island i { display: grid; place-items: center; width: calc(var(--pt)*22); height: calc(var(--pt)*22); border-radius: calc(var(--pt)*6); background: #0a84ff; }
.live .island i svg { width: 60%; height: 60%; }
@keyframes island { from { width: calc(var(--pt)*124); color: transparent; } }
.live .island i { animation: fadein .4s ease 1.2s both; }
@keyframes fadein { from { opacity: 0; } }
.live .bar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--pt)*8) calc(var(--pt)*16); }
.live .circle { width: calc(var(--pt)*44); height: calc(var(--pt)*44); border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.live .circle svg { width: 40%; }
.live .ttl { text-align: center; line-height: 1.15; }
.live .ttl b { display: block; font-size: calc(var(--pt)*15); font-weight: 600; }
.live .ttl span { font-size: calc(var(--pt)*11.5); color: #8e8e93; }
.live .edit { height: calc(var(--pt)*44); padding: 0 calc(var(--pt)*16); border-radius: 999px; background: #fff; display: grid; place-items: center; font-size: calc(var(--pt)*15.5); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.live .ring { position: relative; width: calc(var(--pt)*212); margin: calc(var(--pt)*18) auto calc(var(--pt)*20); aspect-ratio: 1; }
.live .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.live .ring .track { stroke: #fbe2cc; }
.live .ring .prog { stroke: #ff9500; transition: stroke-dashoffset 1.6s cubic-bezier(.2, .8, .2, 1); }
.live .ring .c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.live .ring .k { color: #c96a00; font-weight: 600; font-size: calc(var(--pt)*14); display: flex; align-items: center; gap: calc(var(--pt)*4); }
.live .ring .k svg { width: calc(var(--pt)*11); height: auto; transform: none; }
.live .ring .v { font-size: calc(var(--pt)*30); font-weight: 700; letter-spacing: -0.02em; margin: calc(var(--pt)*2) 0; font-variant-numeric: tabular-nums; }
.live .ring .at { font-size: calc(var(--pt)*14); color: #8e8e93; }
.live .stats { margin: 0 calc(var(--pt)*16); background: #fff; border-radius: calc(var(--pt)*16); display: grid; grid-template-columns: repeat(3, 1fr); padding: calc(var(--pt)*10) 0; }
.live .stats div { text-align: center; line-height: 1.3; }
.live .stats div + div { border-left: 0.5px solid #d1d1d6; }
.live .stats span { display: block; font-size: calc(var(--pt)*11.5); color: #8e8e93; }
.live .stats b { font-size: calc(var(--pt)*16); font-weight: 600; font-variant-numeric: tabular-nums; }
.live .log { margin: calc(var(--pt)*14) calc(var(--pt)*16) 0; height: calc(var(--pt)*50); border-radius: 999px; background: #e3e3e8; color: #0a7aff; font-weight: 600; font-size: calc(var(--pt)*17); display: flex; align-items: center; justify-content: center; gap: calc(var(--pt)*8); }
.live .log svg { width: calc(var(--pt)*16); }
.live .earlier { text-align: center; color: #0a7aff; font-size: calc(var(--pt)*14.5); margin: calc(var(--pt)*12) 0 calc(var(--pt)*18); }
.live .sec { display: flex; justify-content: space-between; color: #6c6c70; font-size: calc(var(--pt)*15); margin: 0 calc(var(--pt)*32) calc(var(--pt)*8); }
.live .list { margin: 0 calc(var(--pt)*16); background: #fff; border-radius: calc(var(--pt)*16); padding: 0 calc(var(--pt)*16); }
.live .row { display: flex; justify-content: space-between; align-items: center; height: calc(var(--pt)*46); font-size: calc(var(--pt)*16); font-variant-numeric: tabular-nums; }
.live .row + .row { border-top: 0.5px solid #d1d1d6; }
.live .row span { color: #8e8e93; font-size: calc(var(--pt)*14.5); }
.live .home { position: absolute; bottom: calc(var(--pt)*8); left: 50%; transform: translateX(-50%); width: calc(var(--pt)*140); height: calc(var(--pt)*5); border-radius: 9px; background: #000; }

/* ---------- Sections ---------- */
section { padding: 110px 0; }
.alt { background: var(--bg-alt); }
.center { text-align: center; }
.center .lede { max-width: 34ch; margin: 18px auto 0; }

.moment { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.moment + .moment { margin-top: 140px; }
.moment .shot { width: min(320px, 78vw); justify-self: center; }
.moment.flip .copy { order: 2; }
.moment .copy p:not(.eyebrow) { font-size: 21px; line-height: 1.45; color: var(--muted); margin: 18px 0 0; max-width: 30ch; }
.moment .copy p strong { color: var(--text); font-weight: 600; }
@media (max-width: 800px) {
  section { padding: 80px 0; }
  .moment { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .moment .copy p:not(.eyebrow) { margin-left: auto; margin-right: auto; font-size: 19px; }
  .moment.flip .copy { order: 0; }
  .moment + .moment { margin-top: 96px; }
}

/* Bento: "Right where you need it" — always dark, like Apple's device showcases */
.dark { background: #000; color: #f5f5f7; --muted: #a1a1a6; --card: #1c1c1e; }
.dark .lede { color: #a1a1a6; }
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 64px; }
.tile { background: var(--card); border-radius: 28px; overflow: hidden; position: relative; padding: 32px 32px 0; display: flex; flex-direction: column; }
.tile h3 { font-size: 24px; line-height: 1.15; font-weight: 700; }
.tile p { color: var(--muted); margin: 8px 0 0; font-size: 17px; max-width: 32ch; }
.tile .media { margin-top: auto; padding-top: 28px; display: flex; justify-content: center; }
.t-lock { grid-column: span 4; grid-row: span 2; }
.t-watch { grid-column: span 2; grid-row: span 2; }
.t-widgets { grid-column: span 3; }
.t-course { grid-column: span 3; }
.t-small { grid-column: span 2; padding-bottom: 30px; }
.t-small .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; }
.t-small .ico svg { width: 24px; height: 24px; }
.crop { width: min(330px, 100%); aspect-ratio: 660 / 760; overflow: hidden; border-radius: 40px 40px 0 0; border: 6px solid #3a3a3c; border-bottom: 0; }
.crop.top img, .crop.bottom img { width: 100%; }
.crop.bottom { display: flex; align-items: flex-end; aspect-ratio: 660 / 660; }
.crop.bottom img { margin-top: auto; }
.t-lock .crop { width: min(400px, 100%); aspect-ratio: 660 / 860; }
.t-watch .media { padding-bottom: 36px; align-items: center; flex: 1; }
.t-watch .watch { width: min(250px, 80%); }
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr 1fr; }
  .t-lock, .t-watch, .t-widgets, .t-course { grid-column: span 2; grid-row: auto; }
  .t-small { grid-column: span 1; }
}
@media (max-width: 560px) {
  .t-small { grid-column: span 2; }
  .tile { padding: 26px 22px 0; }
  .t-small { padding-bottom: 26px; }
}

/* Manifesto */
.manifesto { padding: 150px 0; }
.manifesto h2 { font-size: clamp(40px, 7vw, 80px); line-height: 1.04; font-weight: 700; letter-spacing: -0.035em; }
.manifesto h2 span { display: block; }
.manifesto h2 .muted { color: var(--muted); }
.manifesto h2 .accent { color: var(--blue); }
.promises { list-style: none; padding: 0; margin: 72px auto 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; max-width: 900px; text-align: left; }
.promises li { border-top: 1px solid var(--rule); padding-top: 18px; }
.promises b { display: block; font-size: 19px; letter-spacing: -0.01em; }
.promises span { color: var(--muted); font-size: 15px; }
@media (max-width: 800px) { .promises { grid-template-columns: 1fr 1fr; } .manifesto { padding: 110px 0; } }

/* FAQ */
.faq { max-width: var(--prose); margin: 56px auto 0; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { margin: -6px 0 22px; color: var(--muted); max-width: 60ch; }

/* Final CTA */
.final { text-align: center; padding: 130px 0 140px; }
.final .app-icon { width: 112px; height: 112px; border-radius: 25px; margin: 0 auto 30px; box-shadow: 0 12px 30px -12px rgba(10, 100, 255, .45); }
.final .headline { margin-bottom: 32px; }

/* Footer */
footer.site { border-top: 0.5px solid var(--rule); background: var(--bg-alt); color: var(--muted); font-size: 13px; padding: 28px 0 40px; }
footer.site p { margin: 0 0 10px; max-width: 80ch; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 12px; }
footer.site nav a { color: var(--text); opacity: .8; }
footer.site .langs { margin-left: auto; display: flex; gap: 16px; }
footer.site .langs a[aria-current] { opacity: 1; font-weight: 600; }
@media (max-width: 640px) { footer.site .langs { margin-left: 0; width: 100%; } }
.nw { white-space: nowrap; }

/* Legal / support pages */
.doc { max-width: var(--prose); margin: 0 auto; padding: 56px 20px 88px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.1; font-weight: 700; letter-spacing: -0.03em; margin: 0 0 6px; }
.doc h2 { font-size: 24px; margin: 44px 0 10px; }
.doc h3 { font-size: 19px; margin: 28px 0 6px; }
.doc p, .doc li { margin: 0 0 12px; }
.doc ul { padding-left: 22px; }
.doc .muted { color: var(--muted); }
.doc .summary, .doc .contact { background: var(--bg-alt); border-radius: 18px; padding: 18px 22px; margin: 28px 0; }
.doc .summary p:last-child, .doc .contact p:last-child { margin-bottom: 0; }

/* Scroll reveal (only when JS is on and motion is OK) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live .island, .live .island i { animation: none; }
  .live .ring .prog { transition: none; }
}
