:root {
  --paper: #faf8f2;
  --paper-raised: #ffffff;
  --ink: #1c231f;
  --muted: #5c655e;
  --hairline: #ded6c2;
  --brand-green: #2f4e46;
  --brand-green-soft: #e7ede9;
  --brand-gold: #ab8a44;
  --brand-gold-bright: #cfae5f;
  --link: #2f4e46;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #171d1a;
    --paper-raised: #1f2622;
    --ink: #eef1ee;
    --muted: #a3aca4;
    --hairline: #3a453e;
    --brand-green: #cfae5f;
    --brand-green-soft: #262f29;
    --brand-gold: #d9bd76;
    --brand-gold-bright: #e6cd8f;
    --link: #d9bd76;
  }
}

:root[data-theme="dark"] {
  --paper: #171d1a;
  --paper-raised: #1f2622;
  --ink: #eef1ee;
  --muted: #a3aca4;
  --hairline: #3a453e;
  --brand-green: #cfae5f;
  --brand-green-soft: #262f29;
  --brand-gold: #d9bd76;
  --brand-gold-bright: #e6cd8f;
  --link: #d9bd76;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 1.5px 1.5px, var(--hairline) 1px, transparent 0) 0 0/28px 28px,
    var(--paper);
  background-attachment: fixed;
  color: var(--ink);
  font-family: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration-color: var(--hairline); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--brand-gold-bright); outline-offset: 2px; border-radius: 2px; }

img, svg { max-width: 100%; }

/* ---- shared header ---- */

.site-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.mark-img {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--hairline), 0 6px 16px -6px rgba(28, 35, 31, 0.35);
}

.mark-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.92rem;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---- legal page layout (privacy / data-deletion) ---- */

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 3rem 1.5rem 6rem;
}

.page .mark { margin-bottom: 2.5rem; }

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  text-wrap: balance;
  color: var(--ink);
}

.updated {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.75rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--ink);
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hairline);
}

h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 2.75rem 0 0.9rem;
  color: var(--ink);
  text-wrap: balance;
}

h2::before {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  border-radius: 2px;
  background: var(--brand-gold-bright);
  margin-bottom: 0.9rem;
}

h3 {
  font-family: "Karla", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin: 1.75rem 0 0.6rem;
  color: var(--ink);
}

p { margin: 0 0 1rem; color: var(--ink); }
.section p:last-child { margin-bottom: 0; }

ul { padding-left: 1.3rem; margin: 0 0 1rem; }
li { margin: 0.4rem 0; }

.callout {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1rem;
}
.callout p:last-child { margin-bottom: 0; }

.note {
  background: var(--brand-green-soft);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  margin: 0 0 1rem;
}
.note p:last-child { margin-bottom: 0; }

footer {
  margin-top: 3.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  a { transition: text-decoration-color 0.15s ease; }
}

/* ---- home page ---- */

.home main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 5rem;
  isolation: isolate;
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding: 2.5rem 0 3rem; gap: 2.5rem; }
}

.hero-glow {
  position: absolute;
  inset: -6rem -4rem auto -4rem;
  height: 32rem;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38rem 22rem at 12% 18%, color-mix(in srgb, var(--brand-gold-bright) 22%, transparent), transparent 60%),
    radial-gradient(30rem 24rem at 85% 8%, color-mix(in srgb, var(--brand-green) 16%, transparent), transparent 65%);
  filter: blur(2px);
}

.hero-badge {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--hairline), 0 18px 30px -14px rgba(28, 35, 31, 0.4);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  margin-bottom: 1.75rem;
}

.status-pill .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand-gold-bright);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.4rem);
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 46ch;
  margin: 1.25rem 0 2rem;
}

.hero-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.75rem 1.3rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--brand-green);
  color: var(--paper);
}
.btn-primary:hover { opacity: 0.92; }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline);
}
.btn-secondary:hover { border-color: var(--muted); }

.hero-links-note {
  margin-top: 1.1rem;
  font-size: 0.92rem;
}

.store-badge {
  display: inline-flex;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 22px -12px rgba(28, 35, 31, 0.45);
  transition: transform 0.15s ease;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge img { display: block; height: 54px; width: auto; }

.store-badge-disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}
.store-badge-disabled:hover { transform: none; }

/* dose-card mockup, mirrors the in-app card */

.dose-card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.5rem 1.5rem 1.65rem;
  box-shadow: 0 24px 48px -28px rgba(28, 35, 31, 0.28);
}

.dose-card .compound {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
}

.dose-card .category {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 1.1rem;
}

.dose-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem 1rem;
  font-size: 0.94rem;
}

.dose-card dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding-top: 0.1rem;
}

.dose-card dd {
  margin: 0;
  font-weight: 600;
}

.dose-card hr {
  border: none;
  border-top: 1px solid var(--hairline);
  margin: 1rem 0;
}

/* feature grid */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  padding: 1rem 0 4rem;
}

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

.feature {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 1.6rem 1.6rem 1.75rem;
  box-shadow: 0 14px 30px -22px rgba(28, 35, 31, 0.35);
}

.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--brand-green-soft);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.feature-icon svg { width: 1.3rem; height: 1.3rem; }

.feature h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.feature p { color: var(--muted); margin: 0; }

/* demo section */

.demo {
  padding: 1rem 0 4.5rem;
}

.demo-heading {
  max-width: 46ch;
  margin: 0 auto 1.75rem;
  text-align: center;
}

.demo-heading h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 1.8rem;
  margin: 0 0 0.5rem;
}

.demo-heading p { color: var(--muted); margin: 0; }

.demo-frame {
  max-width: 420px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--hairline);
  box-shadow: 0 30px 60px -30px rgba(28, 35, 31, 0.4);
  background: var(--ink);
}

.demo-frame video {
  display: block;
  width: 100%;
  height: auto;
}

.disclaimer-band {
  background: var(--brand-green-soft);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 2.75rem 0;
  margin-bottom: 4rem;
}

.disclaimer-band .inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.disclaimer-band h2 {
  margin: 0 0 0.5rem;
}

.disclaimer-band p {
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer .footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.site-footer .footer-links a { color: var(--muted); }
.site-footer .copyright { border-top: 1px solid var(--hairline); padding-top: 1.5rem; }
