/* Havenly site pages (support, privacy, terms, join, the app page).
   Same look as havenly.church: Lora headings, Inter text, IBM Plex Mono
   labels, a dark top bar and the dark footer. */
:root {
  --ink: #0B120E; --inkfg: #F2EFE8; --inkmuted: rgba(242,239,232,.62); --inkline: rgba(255,255,255,.09);
  --bg: #F6F2EA; --bg2: #EFEAE0; --card: #FFFDF9; --fg: #141B16; --muted: #5B675F; --faint: #8A958D; --line: #E2DBCE;
  --accent: #4F7D63; --accent-ink: #8CC09F; --deep: #2F4A3B; --soft: #E3ECE2; --gold: #C9A55A; --rubric: #9A3B2E;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0F0C; --bg2: #0F1612; --card: #131C17; --fg: #F2EFE8; --muted: #AEB9B1; --faint: #7F8B83; --line: #243029;
    --accent: #8CC09F; --deep: #20342A; --soft: #1A2A21; --rubric: #DB8E7A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0F0C; --bg2: #0F1612; --card: #131C17; --fg: #F2EFE8; --muted: #AEB9B1; --faint: #7F8B83; --line: #243029;
  --accent: #8CC09F; --deep: #20342A; --soft: #1A2A21; --rubric: #DB8E7A; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 17px/1.6 Inter, system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: Lora, Georgia, serif; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; margin: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; }
.mono, .eyebrow { font: 500 12px/1.2 "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.muted { color: var(--muted); } .small { font-size: 14.5px; }

/* ---- top bar (same as havenly.church, always solid) */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11,18,14,.94); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--inkline); color: var(--inkfg); padding-top: env(safe-area-inset-top, 0px); }
.topbar .row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; flex: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand b { font: 600 19px Lora, Georgia, serif; letter-spacing: -.01em; }
.topbar nav { display: flex; gap: 22px; font-size: 14.5px; font-weight: 500; }
.topbar nav a { color: var(--inkmuted); text-decoration: none; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--inkfg); }
.topbar .get { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; background: #F2EFE8; color: #0B120E; text-decoration: none; font: 600 14.5px Inter, sans-serif; padding: 9px 15px; border-radius: 9px; white-space: nowrap; }
@media (max-width: 760px) { .topbar nav { display: none; } }

/* ---- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15.5px Inter, sans-serif; text-decoration: none; border-radius: 10px; padding: 13px 20px; border: 0; cursor: pointer; transition: transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn.green { background: #4F7D63; color: #fff; }
.btn.light { background: #F2EFE8; color: #0B120E; }
.btn.line { background: rgba(255,255,255,.04); color: var(--inkfg); box-shadow: inset 0 0 0 1px var(--inkline); }

/* ---- document pages (support, privacy, terms) */
.dochead { background: var(--ink); color: var(--inkfg); padding-block: 72px 64px; position: relative; overflow: hidden; isolation: isolate; }
.dochead::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 90% at 90% 100%, rgba(79,125,99,.4), transparent 70%); }
.dochead::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(60% 80% at 20% 30%, #000, transparent); mask-image: radial-gradient(60% 80% at 20% 30%, #000, transparent); }
.dochead .eyebrow { color: var(--gold); }
.dochead h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; margin-top: 16px; }
.dochead .updated, .dochead p { color: var(--inkmuted); margin: 12px 0 0; max-width: 60ch; }
.doc { padding-block: 56px 96px; }
.prose { max-width: 760px; margin-inline: auto; }
.doc .card { background: var(--card); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); padding: clamp(22px, 4vw, 44px); }
.doc h2 { font-size: 26px; line-height: 1.2; margin: 40px 0 10px; scroll-margin-top: 90px; }
.doc h2:first-child { margin-top: 0; }
.doc h3 { font: 600 16px Inter, sans-serif; margin: 20px 0 6px; }
.doc p, .doc li { font-size: 16.5px; line-height: 1.7; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 14px; padding-left: 1.2em; }
.doc li { margin-bottom: 6px; }
.doc li::marker { color: var(--accent); }
.summary { background: var(--soft); border-radius: 16px; padding: 20px 24px; margin-bottom: 20px; border-left: 3px solid var(--accent); }
.summary p { margin: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.toc li { margin: 0; }
.toc a { display: inline-block; font-size: 13.5px; font-weight: 500; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--fg); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.toc a:hover { box-shadow: inset 0 0 0 1px var(--accent); }

/* support */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 18px 22px; margin-bottom: 20px; }
.contact .addr { font: 600 19px Lora, Georgia, serif; user-select: all; word-break: break-all; }
.contact .or { color: var(--muted); font-size: 15px; }
.copy { font: 600 13.5px Inter, sans-serif; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: var(--soft); color: var(--accent); }
.faq { padding-block: 8px !important; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font: 500 18px/1.35 Lora, Georgia, serif; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 400 22px/1 Inter, sans-serif; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--muted); }
.faqgroup { font: 500 12px/1.2 "IBM Plex Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 28px 0 10px; }
.care { background: var(--card); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); border-left: 3px solid var(--rubric); padding: 18px 22px; margin-top: 20px; }
.care p { margin: 0; }

/* ---- footer (same as havenly.church) */
.sitefoot { background: var(--ink); color: var(--inkfg); padding-block: 64px 28px; }
.sitefoot .cols { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.sitefoot .about { color: var(--inkmuted); font-size: 15px; margin: 14px 0 0; max-width: 34ch; }
.sitefoot .about a { color: inherit; }
.sitefoot h4 { font: 500 12px "IBM Plex Mono", monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--inkmuted); margin: 6px 0 14px; }
.sitefoot nav { display: flex; flex-direction: column; gap: 10px; }
.sitefoot nav a { color: rgba(242,239,232,.82); text-decoration: none; font-size: 15px; }
.sitefoot nav a:hover { color: var(--inkfg); }
.sitefoot .base { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--inkline); color: var(--inkmuted); font-size: 13.5px; }
@media (max-width: 760px) { .sitefoot .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .sitefoot .cols > div:first-child { grid-column: 1 / -1; } }

/* ---- join */
.joinpage { padding-block: 56px 96px; }
.joincard { max-width: 560px; margin: 0 auto; background: var(--card); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px rgba(20,27,22,.06); padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.code { font: 600 34px "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .14em; text-align: center; padding: 18px; border-radius: 16px; border: 1.5px dashed var(--accent); color: var(--fg); background: var(--soft); word-break: break-all; }
.steps { margin: 0; padding-left: 22px; line-height: 1.65; }
.steps li { margin-bottom: 6px; }
.textbtn { font: 600 14.5px Inter, sans-serif; background: none; border: 0; color: var(--accent); cursor: pointer; text-decoration: underline; align-self: center; }

/* ---- motion */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .8s cubic-bezier(.2,.7,.2,1) both; }
  .rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
