/* Moonburrow site: shared tokens, base, header, footer and document pages.
   Colours and type come straight from the app (src/ui/theme.ts): night-blue ground, lantern amber, cream ink,
   Fraunces for display and Inter for text. Fonts are self-hosted so the site makes no third-party requests. */

@font-face { font-family: "Fraunces"; src: url("Fraunces-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("Fraunces-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("Fraunces-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("Inter-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* colour */
  --night: #0B1526;      /* ground: the sky over the hedgerow */
  --deep: #070E1A;       /* the soil at depth */
  --dusk: #14243B;       /* raised surfaces */
  --line: rgba(243, 233, 210, 0.14);
  --amber: #F2A65A;      /* lantern light: primary action, burrows */
  --glow: #FFD08F;       /* highlights, eyebrows on dark */
  --cream: #F3E9D2;      /* ink on dark */
  --fog: #A9B8CC;        /* secondary ink on dark */
  --paper: #EFE4CB;      /* the field journal */
  --paper-ink: #2B1D12;
  --paper-muted: #6A5642;
  --moss: #8FAE7B;
  --ember: #2A1606;      /* ink on amber */

  /* type */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --text: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.15rem, 1.05rem + 0.45vw, 1.35rem);
  --step-2: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.4rem + 2.2vw, 3.2rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.6vw, 5.6rem);

  /* space and motion */
  --space: 1rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section: clamp(4.5rem, 3rem + 7vw, 9rem);
  --radius: 14px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: clip; background: var(--night); color: var(--cream);
  font: 400 var(--step-0)/1.6 var(--text); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01" on;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--glow); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-h) + 12px); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; left: 1rem; top: 1rem; padding: .75rem 1rem; background: var(--amber); color: var(--ember); border-radius: 10px; translate: 0 -300%; text-decoration: none; font-weight: 600; }
.skip-link:focus { translate: none; }
main:focus { outline: none; }

.container { width: min(100% - 2 * var(--gutter), 1200px); margin-inline: auto; }
.eyebrow { font: 600 var(--step--1)/1.2 var(--text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--glow); margin: 0 0 1rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem; min-height: 48px; padding: 0.8rem 1.35rem; border-radius: 999px;
  font: 600 1rem/1 var(--text); text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out), translate .25s var(--ease-out);
}
.btn--lantern { background: var(--amber); color: var(--ember); }
.btn--lantern:hover { background: var(--glow); color: var(--ember); translate: 0 -1px; }
.btn--ghost { background: transparent; color: var(--cream); border-color: rgba(243, 233, 210, 0.35); }
.btn--ghost:hover { border-color: var(--cream); color: var(--cream); }
.soon {
  display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.55rem 0.95rem; border-radius: 999px; min-height: 40px;
  background: rgba(243, 233, 210, 0.08); border: 1px solid var(--line); font: 500 var(--step--1)/1.2 var(--text); color: var(--cream);
}
.soon__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }

/* header */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h); transition: background-color .35s var(--ease-out), border-color .35s var(--ease-out); border-bottom: 1px solid transparent; }
.site-header.is-solid, .site-header--solid { background: rgba(11, 21, 38, 0.88); border-bottom-color: var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; color: var(--cream); text-decoration: none; font: 400 1.35rem/1 var(--display); letter-spacing: -0.01em; }
.wordmark:hover { color: var(--cream); }
.wordmark svg { width: 22px; height: 22px; flex: none; }
.site-nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.8rem); }
.site-nav a { color: var(--fog); text-decoration: none; font: 500 0.95rem/1 var(--text); padding: 0.75rem 0; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cream); }
@media (max-width: 760px) { .site-nav .site-nav__extra { display: none; } }
@media (max-width: 420px) { .site-nav { gap: 0.9rem; } .wordmark { font-size: 1.2rem; } }

/* footer */
.site-footer { background: var(--deep); border-top: 1px solid var(--line); padding: clamp(3rem, 6vw, 5rem) 0 2.5rem; color: var(--fog); font-size: var(--step--1); }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; align-items: start; }
.site-footer__sign { font: 400 var(--step-2)/1.2 var(--display); color: var(--cream); margin: 0 0 0.6rem; max-width: 22ch; }
.site-footer h2 { font: 600 0.75rem/1 var(--text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--glow); margin: 0 0 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.site-footer a { color: var(--fog); text-decoration: none; display: inline-block; padding: 0.4rem 0; }
.site-footer a:hover { color: var(--cream); }
.site-footer__base { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* document pages (privacy, support) */
.doc { padding: calc(var(--header-h) + clamp(3rem, 7vw, 6rem)) 0 var(--section); }
.doc__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.doc__head h1 { font-size: var(--step-4); margin-bottom: 1.25rem; }
.doc__lede { font-size: var(--step-1); color: var(--fog); max-width: 40rem; }
.doc__layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 44rem); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.doc__toc { position: sticky; top: calc(var(--header-h) + 2rem); font-size: var(--step--1); }
.doc__toc h2 { font: 600 0.75rem/1 var(--text); letter-spacing: 0.16em; text-transform: uppercase; color: var(--glow); margin: 0 0 1rem; }
.doc__toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; border-left: 1px solid var(--line); }
.doc__toc a { display: block; padding: 0.45rem 0 0.45rem 1rem; color: var(--fog); text-decoration: none; }
.doc__toc a:hover { color: var(--cream); }
.doc__body { max-width: 44rem; }
.doc__body section + section { margin-top: clamp(2.5rem, 4vw, 3.5rem); }
.doc__body h2 { font-size: var(--step-2); margin: 0 0 1rem; }
.doc__body h3 { font: 600 var(--step-0)/1.4 var(--text); margin: 1.6rem 0 0.4rem; color: var(--cream); letter-spacing: 0; }
.doc__body p, .doc__body li { color: #D9D3C4; }
.doc__body ul { padding-left: 1.2rem; margin: 0 0 1em; }
.doc__body li { margin-bottom: 0.45rem; }
.doc__body li::marker { color: var(--amber); }
.doc__body strong { color: var(--cream); font-weight: 600; }
.doc__note { border: 1px solid var(--line); background: var(--dusk); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1.25rem 0; }
.doc__note p:last-child { margin-bottom: 0; }
.doc__table { width: 100%; border-collapse: collapse; font-size: var(--step--1); margin: 0.5rem 0 1.25rem; }
.doc__table th, .doc__table td { text-align: left; vertical-align: top; padding: 0.75rem 0.75rem 0.75rem 0; border-bottom: 1px solid var(--line); }
.doc__table th { color: var(--glow); font-weight: 600; letter-spacing: 0.04em; }
.doc__table td { color: #D9D3C4; }
.doc__meta { color: var(--fog); font-size: var(--step--1); }
@media (max-width: 900px) { .doc__layout { grid-template-columns: 1fr; } .doc__toc { position: static; } }
@media (max-width: 560px) { .doc__table thead { display: none; } .doc__table tr { display: grid; padding: 0.75rem 0; border-bottom: 1px solid var(--line); } .doc__table td { border: 0; padding: 0.15rem 0; } .doc__table td:first-child { color: var(--cream); font-weight: 600; } }

/* faq (support) */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font: 400 var(--step-1)/1.3 var(--display); color: var(--cream); min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; border-right: 2px solid var(--amber); border-bottom: 2px solid var(--amber); rotate: 45deg; translate: 0 -3px; transition: rotate .3s var(--ease-out); }
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq .faq__a { padding: 0 0 1.25rem; max-width: 40rem; }
.faq .faq__a p { color: #D9D3C4; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
