/* MIRA — shared styles. Brand tokens match the app + brand board. */
:root {
  --porcelain: #FFFFFF;
  --paper:     #FFFFFF;
  --beige:     #E8DDC9;
  --beige-2:   #DED1B9;
  --ink:       #2B2620;
  --clay:      #6FA8CE;
  --cocoa:     #5A4632;
  --line:      rgba(43,38,32,0.14);
  --line-2:    rgba(43,38,32,0.08);
  --muted:     rgba(43,38,32,0.58);
  --body-text: rgba(43,38,32,0.82);
  --input-border: rgba(43,38,32,0.28);
  --placeholder:  rgba(43,38,32,0.42);
  --card-bg:     #F5F8FB;
  --card-border: rgba(111,168,206,0.28);
  --card-shadow: 0 26px 54px -20px rgba(43,71,91,0.44), 0 8px 18px -6px rgba(43,71,91,0.22);
  --grain-opacity: 0.5;
  --grain-blend:   multiply;
  --serif:  'Bodoni Moda', Georgia, serif;
  --script: 'Cormorant Garamond', Georgia, serif;
  --sans:   'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

/* ── dark theme ── warm near-black, cream ink, brighter sky accent ── */
[data-theme="dark"] {
  --porcelain: #1D1811;
  --paper:     #17130D;
  --ink:       #F4EFE4;
  --cocoa:     #CBB99F;
  --clay:      #86B8D8;
  --line:      rgba(244,239,228,0.15);
  --line-2:    rgba(244,239,228,0.08);
  --muted:     rgba(244,239,228,0.58);
  --body-text: rgba(244,239,228,0.82);
  --input-border: rgba(244,239,228,0.24);
  --placeholder:  rgba(244,239,228,0.40);
  --card-bg:     #211B13;
  --card-border: rgba(134,184,216,0.34);
  --card-shadow: 0 30px 64px -22px rgba(0,0,0,0.66), 0 0 0 1px rgba(134,184,216,0.07);
  --grain-opacity: 0.4;
  --grain-blend:   soft-light;
}
html { background: var(--paper); }
body, .footer, .nav .navcta, .btn, .theme-toggle,
.waitlist .card, form.signup input[type=email] { transition: background-color .35s ease, color .35s ease, border-color .35s ease; }
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}
img { display: block; max-width: 100%; }
a { color: inherit; }

/* faint paper grain for warmth (no gradients) */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: var(--grain-opacity); mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHdpZHRoPScxNDAnIGhlaWdodD0nMTQwJz48ZmlsdGVyIGlkPSduJz48ZmVUdXJidWxlbmNlIHR5cGU9J2ZyYWN0YWxOb2lzZScgYmFzZUZyZXF1ZW5jeT0nMC44NScgbnVtT2N0YXZlcz0nMicvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPScxMDAlJyBoZWlnaHQ9JzEwMCUnIGZpbHRlcj0ndXJsKCNuKScgb3BhY2l0eT0nMC4wMzUnLz48L3N2Zz4=");
}
.wrap { position: relative; z-index: 1; width: 100%; max-width: 680px; margin: 0 auto; padding: 0 26px; }

/* ── shared type ── */
.kicker {
  font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: 0.34em; text-transform: uppercase; color: var(--clay);
}
.wordmark {
  font-family: var(--serif); font-weight: 500; font-optical-sizing: auto;
  letter-spacing: 0.28em; text-indent: 0.28em; color: var(--ink); line-height: 1;
}
.eyebrow-rule { width: 34px; height: 1px; background: var(--clay); margin: 0 auto; }

/* ── top nav ── */
.nav {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px; max-width: 1100px; margin: 0 auto;
}
.nav .brand { font-family: var(--serif); font-weight: 500; font-size: 21px; letter-spacing: 0.22em; text-indent: 0.22em; }
.nav .navcta {
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--ink);
  padding: 9px 16px; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .2s, color .2s;
}
.nav .navcta:hover { background: var(--ink); color: var(--paper); }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  padding: 15px 26px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -12px rgba(43,38,32,0.5); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--beige); }

/* ── footer ── */
.footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: var(--porcelain); margin-top: 20px; }
.footer .inner { max-width: 1100px; margin: 0 auto; padding: 48px 26px 40px;
  display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer .brand { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: 0.22em; text-indent: 0.22em; }
.footer .brand + p { font-family: var(--script); font-style: italic; font-size: 16px; color: var(--muted); margin-top: 6px; }
.footer nav { display: flex; flex-direction: column; gap: 11px; }
.footer nav a { font-size: 13.5px; text-decoration: none; color: var(--ink); opacity: 0.75; letter-spacing: 0.02em; }
.footer nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.footer .col-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer .legal { max-width: 1100px; margin: 0 auto; padding: 18px 26px 34px; border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted); letter-spacing: 0.02em; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

/* ── theme toggle ── */
.nav-right { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--ink); color: var(--ink);
  cursor: pointer; padding: 0; transition: background .2s, color .2s;
}
.theme-toggle:hover { background: var(--ink); color: var(--paper); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }
.theme-toggle .i-moon { display: block; }
.theme-toggle .i-sun  { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun  { display: block; }

/* ── store badges (official artwork proportions; min-height 40px per vendor) ── */
.badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; align-items: center; padding: 6px 0; }
.badge-link { display: inline-flex; height: 54px; text-decoration: none; transition: transform .15s ease, opacity .2s ease; }
.badge-link:hover { transform: translateY(-2px); }
.badge-link:focus-visible { outline: 2px solid var(--clay); outline-offset: 4px; border-radius: 9px; }
.badge-link svg, .badge-link img { height: 100%; width: auto; display: block; }
/* Apple ships a black badge for light backgrounds and a white one for dark.
   The white variant is white ARTWORK on a transparent body, so on dark it needs
   a hairline to read as a button — and the Play badge gets the same treatment so
   the pair matches. */
.badge-link .b-dark { display: none; }
[data-theme="dark"] .badge-link .b-light { display: none; }
[data-theme="dark"] .badge-link .b-dark { display: block; }
[data-theme="dark"] .badge-link:not(.badge-play) { border: 1px solid rgba(244,239,228,0.42); border-radius: 9px; }
/* Google's official Play badge is black-bodied with its own hairline outline, so it
   works on both themes as-is and takes no extra border. Its artwork ships with ~10%
   transparent clear space baked in (the 135x40 body sits inside a 155x60 frame), so
   the box runs taller than Apple's to make the two visible bodies the same height. */
.badge-link.badge-play { height: 60px; }
@media (max-width: 400px) { .badge-link { height: 48px; } }

/* ── AI honesty note ── */
.ai-note { display: flex; align-items: flex-start; gap: 9px; max-width: 42ch; margin: 22px auto 0;
  font-size: 12.5px; line-height: 1.5; color: var(--muted); text-align: left; }
.ai-note svg { width: 15px; height: 15px; stroke: var(--clay); flex: none; margin-top: 2px; }

/* ── support page ── */
.doc .toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.doc .toc a { font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; }
.doc .toc a:hover { border-color: var(--ink); }
.doc h3 { font-family: var(--sans); font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--ink); }
.doc .qa { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.doc .callout { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 20px 22px; margin: 22px 0; }
.doc .callout p:last-child { margin-bottom: 0; }
.doc .contact-big { font-family: var(--serif); font-size: 26px; color: var(--ink);
  text-decoration: none; border-bottom: 1px solid var(--line-2); }

/* ── legal document pages ── */
.doc { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; padding: 60px 26px 90px; }
.doc .back { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--clay); display: inline-flex; align-items: center; gap: 7px; margin-bottom: 40px; }
.doc h1 { font-family: var(--serif); font-weight: 500; font-size: 42px; letter-spacing: 0.02em; line-height: 1.05; }
.doc .updated { font-size: 12.5px; color: var(--muted); letter-spacing: 0.06em; margin-top: 12px; text-transform: uppercase; }
.doc .lead { font-family: var(--script); font-style: italic; font-size: 20px; color: var(--cocoa); margin: 26px 0 8px; line-height: 1.4; }
.doc h2 { font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  margin: 42px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.doc p { font-size: 15px; color: var(--body-text); margin-bottom: 14px; }
.doc ul { margin: 0 0 14px 20px; }
.doc li { font-size: 15px; color: var(--body-text); margin-bottom: 8px; }
.doc a.inline { color: var(--cocoa); text-underline-offset: 3px; }

@media (max-width: 560px) {
  .doc h1 { font-size: 34px; }
}
