/* DoseHalo marketing site — clay on paper, ground for the mark */

/* Self-hosted, latin subset, SIL OFL 1.1 (Bricolage Grotesque, Hanken Grotesk via Google Fonts) */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/BricolageGrotesque-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/HankenGrotesk-latin.woff2") format("woff2");
}

:root {
  /* palette (all text pairings verified ≥ 4.5:1 AA) */
  --paper: #F4EEE4;
  --surface: #FFFFFF;
  --ink: #26211C;
  --ink-muted: #6B5F54;
  --clay: #D9895C;
  --clay-text: #9A4E2C;
  --clay-deep: #B4623A;
  --clay-wash: #F6E4D8;
  --clay-line: #EBCBB6;
  --ground: #1B1816;
  --ground-2: #26211E;
  --ground-line: #332C27;
  --cream: #EFE8DF;
  --cream-muted: #B5AA9F;
  --line: #E7DED0;

  /* type */
  --font-display: "Bricolage Grotesque", "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* rhythm */
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --maxw: 1120px;
  --pad: clamp(1.1rem, 4vw, 2rem);
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
  --shadow: 0 1px 2px rgba(38, 33, 28, .04), 0 8px 24px rgba(38, 33, 28, .05);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.2vw, 4.25rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }

p { margin: 0 0 1rem; }
a { color: var(--clay-text); text-underline-offset: .15em; }
img, svg { max-width: 100%; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--clay-text);
  margin: 0 0 .75rem;
}

.lede { font-size: 1.2rem; color: var(--ink-muted); max-width: 60ch; }
.muted { color: var(--ink-muted); }

/* skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: .5rem;
  background: var(--ink);
  color: var(--cream);
  padding: .6rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus { left: .5rem; }

/* focus states */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--clay-deep);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- brand mark ---------- */
.brand-tile {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ground);
  overflow: hidden;
}
.brand-tile svg { display: block; width: 100%; height: 100%; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  text-decoration: none;
}
.wordmark .dose { color: var(--ink); }
.wordmark .halo { color: var(--clay-text); }
.on-dark .wordmark .dose, .on-dark .dose { color: var(--cream); }
.on-dark .wordmark .halo, .on-dark .halo { color: var(--clay); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: .75rem 1.35rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s var(--ease-out), background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn-clay {
  background: var(--clay);
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(180, 98, 58, .28);
}
.btn-clay:hover { background: #E29A70; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(180, 98, 58, .32); }
.btn-clay:active { transform: translateY(0); box-shadow: 0 3px 8px rgba(180, 98, 58, .25); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: #D5CBBC;
}
.btn-ghost:hover { border-color: var(--clay-deep); color: var(--clay-text); }
.btn-dark { background: var(--ground); color: var(--cream); }
.btn-dark:hover { background: var(--ground-2); transform: translateY(-1px); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 238, 228, .86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
  flex-wrap: wrap;
  padding-block: .5rem;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: .98rem;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.nav-links a:hover { color: var(--clay-text); border-color: var(--clay); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
@media (max-width: 800px) {
  .nav-inner > nav { order: 3; width: 100%; }
  .nav-links { gap: 1.1rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; }
  .nav-links a { white-space: nowrap; font-size: .92rem; }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem) var(--section-y);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 70%;
  background: radial-gradient(60% 60% at 70% 30%, rgba(217, 137, 92, .18), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin-inline: auto; }
}
.hero h1 { margin-bottom: .35em; }
.hero .lede { font-size: 1.25rem; margin-bottom: 1.75rem; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--clay-wash);
  color: var(--clay-text);
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--clay-line);
  margin-bottom: 1.5rem;
}
.badge svg { flex: none; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

/* App Store "coming soon" badge — not a link, so no href="#" trap */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  background: var(--ground);
  color: var(--cream);
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--ground-line);
  line-height: 1.1;
  text-align: left;
}
.appstore-badge .small { display: block; font-size: .7rem; color: var(--cream-muted); }
.appstore-badge .big { display: block; font-size: 1.05rem; font-weight: 600; font-family: var(--font-display); }
.appstore-badge svg { flex: none; }

.hero-note { font-size: .92rem; color: var(--ink-muted); }

/* ---------- splash art (ported from the Claude Design splash) ---------- */
.splash {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--ground);
  border-radius: clamp(28px, 6vw, 44px);
  border: 1px solid var(--ground-line);
  box-shadow: 0 30px 60px -20px rgba(38, 33, 28, .45), 0 0 0 8px rgba(255, 255, 255, .5);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
}
.splash::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 40% at 50% 38%, rgba(217, 137, 92, .14), transparent 70%);
  pointer-events: none;
}
.splash-stack {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: .25rem;
  animation: splash-shift .6s var(--ease-out) 2s both;
}
.splash-mark { width: min(56%, 220px); height: auto; overflow: visible; display: block; }
.splash-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 1;
  animation: splash-name .6s var(--ease-out) 2s both;
}
.splash-name .dose { color: var(--cream); }
.splash-name .halo { color: var(--clay); }
.splash-caption {
  position: absolute;
  left: 0; right: 0; bottom: 1.1rem;
  z-index: 1;
  text-align: center;
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cream-muted);
  margin: 0;
}

/* Timeline: Beep 0–0.7s → Open 0.7–1.3 → Halo 1.3–2.0 → Name 2.0–2.8 → Hold */
.s-box  { animation: s-box .9s var(--ease-out) both; transform-box: fill-box; transform-origin: center; }
.s-lid  { animation: s-lid .6s cubic-bezier(.65, 0, .35, 1) .7s both; transform-box: view-box; transform-origin: 60px 72px; }
.s-dot  { animation: s-dot .35s ease-in-out 2 both; transform-box: fill-box; transform-origin: center; }
.s-ring { animation: s-ring .35s ease-out 2 both; transform-box: fill-box; transform-origin: center; }
.s-halo { animation: s-halo .7s var(--ease-out) 1.3s both; transform-box: view-box; transform-origin: 60px 84px; }
.s-glow { animation: s-glow .6s var(--ease-out) 1.8s both; transform-box: view-box; transform-origin: 60px 84px; }

@keyframes s-box  { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
@keyframes s-lid  { from { transform: scaleY(1); } to { transform: scaleY(-.42); } }
@keyframes s-dot  { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes s-ring { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(3.6); } }
@keyframes s-halo { from { opacity: 0; transform: translateY(0) scale(.4); } to { opacity: 1; transform: translateY(-48px) scale(1); } }
@keyframes s-glow { from { opacity: 0; transform: translateY(0) scale(.4); } to { opacity: .3; transform: translateY(-48px) scale(1); } }
@keyframes splash-shift { from { transform: translateY(1.25rem); } to { transform: translateY(0); } }
@keyframes splash-name { from { opacity: 0; transform: translateY(1.5rem); } to { opacity: 1; transform: translateY(0); } }

/* ---------- sections ---------- */
section { scroll-margin-top: 84px; }
.section { padding-block: var(--section-y); }
.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* what it is */
.whatis-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.whatis .statement { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.35; letter-spacing: -.01em; max-width: 24ch; }
.whatis .col-copy p { color: var(--ink-muted); max-width: 48ch; }
@media (max-width: 760px) { .whatis-grid { grid-template-columns: 1fr; } }

/* ---------- features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease-out), box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(38, 33, 28, .09); border-color: var(--clay-line); }
.card .icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--clay-wash);
  border-radius: 12px;
  margin-bottom: 1rem;
  color: var(--clay-text);
}
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--ink-muted); margin: 0; font-size: .98rem; }

/* ---------- how it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--clay);
  color: var(--ink);
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: .3rem; }
.step p { color: var(--ink-muted); margin: 0; }

/* ---------- pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 880px;
  margin-inline: auto;
}
@media (max-width: 760px) { .pricing-grid { grid-template-columns: 1fr; } }
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}
.plan.featured { border: 2px solid var(--clay); position: relative; }
.plan-tag {
  position: absolute;
  top: -.85rem; left: 2rem;
  background: var(--clay);
  color: var(--ink);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .8rem;
  border-radius: var(--radius-pill);
}
.plan h3 { font-size: 1.5rem; }
.price { font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; letter-spacing: -.02em; margin: .25rem 0; }
.price .per { font-size: 1rem; font-weight: 500; color: var(--ink-muted); font-family: var(--font-body); }
.price-sub { color: var(--ink-muted); font-size: .95rem; margin-bottom: 1.25rem; }
.plan ul { list-style: none; margin: 1.25rem 0 1.5rem; padding: 0; display: grid; gap: .7rem; }
.plan li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; font-size: .98rem; }
.plan li svg { margin-top: .3rem; color: var(--clay-text); }
.plan .btn, .plan .appstore-badge { width: 100%; justify-content: center; }

/* ---------- faq ---------- */
.faq { max-width: 780px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: .85rem;
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--clay-text);
  font-weight: 400;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.3rem 1.2rem; margin: 0; color: var(--ink-muted); }

/* ---------- dark cta ---------- */
.cta-dark {
  background: var(--ground);
  color: var(--cream);
  text-align: center;
}
.cta-dark h2 { color: var(--cream); }
.cta-dark p { color: var(--cream-muted); max-width: 46ch; margin-inline: auto; }
.cta-dark .eyebrow { color: var(--clay); }
.cta-dark .actions { margin-top: 1.5rem; display: flex; justify-content: center; }

/* ---------- footer ---------- */
.footer {
  background: var(--ground);
  color: var(--cream-muted);
  padding-block: 3rem 2.5rem;
  border-top: 1px solid var(--ground-line);
}
.cta-dark + .footer { border-top: none; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}
.footer .brand-tile { background: var(--ground-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--cream); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: var(--clay); text-decoration: underline; }
.footer .fine { font-size: .875rem; color: var(--cream-muted); max-width: 70ch; }
.footer .fine + .fine { margin-top: .5rem; }
.footer .fine a { color: var(--cream); }

/* ---------- legal / content pages ---------- */
.doc { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.doc-body { max-width: 760px; margin-inline: auto; }
.doc-body h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.doc-body h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.doc-body ul { padding-left: 1.2rem; }
.doc-body li { margin-bottom: .5rem; }
.doc-body .updated { color: var(--ink-muted); font-size: .95rem; }
.callout {
  background: var(--clay-wash);
  border: 1px solid var(--clay-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin: 1.5rem 0 2rem;
}
.contact-card h2 { margin-top: 0; }
.contact-card p:last-child { margin-bottom: 0; }

/* 404 */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound .brand-tile { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 1.25rem; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  /* land the splash on its final frame instantly */
  .s-lid { transform: scaleY(-.42); }
  .s-halo, .s-glow { transform: translateY(-48px) scale(1); }
  .s-halo { opacity: 1; }
  .s-glow { opacity: .3; }
}
