/* Lua — brand tokens lifted from the app's theme/Color.kt night gradient. */
:root {
  --night-1: #151E5F;   /* BackgroundNight1 */
  --night-2: #B279E2;   /* BackgroundNight2 */
  --dawn:    #F9B8B6;   /* BackgroundNight3 */
  --sunset:  #F7BA70;   /* Sunset2 */
  --moon:    #84D2E6;   /* primaryDark */

  --bg: #0B1030;
  --surface: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --text: #ECEAF5;
  --text-dim: rgba(236, 234, 245, 0.68);
  --radius: 14px;
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(1100px 620px at 82% -12%, rgba(178,121,226,0.30), transparent 60%),
    radial-gradient(760px 420px at 6% 2%, rgba(21,30,95,0.95), transparent 62%);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.68 ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }

/* Header ------------------------------------------------------------------ */
header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 48, 0.72);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
header.site .wrap {
  display: flex; align-items: center; gap: 14px;
  padding-top: 14px; padding-bottom: 14px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 650; letter-spacing: .2px; }
.brand img { width: 30px; height: 30px; border-radius: 8px; display: block; }
nav.site { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
nav.site a {
  color: var(--text-dim); text-decoration: none; font-size: .9rem;
  padding: 7px 11px; border-radius: 9px;
}
nav.site a:hover { color: var(--text); background: var(--surface); }
nav.site a[aria-current="page"] { color: var(--night-1); background: var(--moon); font-weight: 600; }

/* Hero -------------------------------------------------------------------- */
.hero { padding: 76px 0 54px; text-align: center; }
.hero img.mark { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 16px 48px rgba(0,0,0,.45); }
.hero h1 { font-size: clamp(2.3rem, 7vw, 3.4rem); margin: 24px 0 10px; letter-spacing: -.02em; line-height: 1.1; }
.hero p.tagline { font-size: 1.14rem; color: var(--text-dim); margin: 0 auto; max-width: 46ch; }

.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 19px; border-radius: 11px; text-decoration: none; font-weight: 600; font-size: .95rem;
  background: linear-gradient(135deg, var(--night-2), var(--dawn));
  color: #221043;
}
.badge:hover { filter: brightness(1.07); }
.badge.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }

/* Feature grid ------------------------------------------------------------ */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 56px 0 72px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature h3 { margin: 0 0 7px; font-size: 1rem; color: var(--moon); }
.feature p { margin: 0; color: var(--text-dim); font-size: .93rem; }

/* Long-form documents ----------------------------------------------------- */
main.doc { padding: 52px 0 88px; }
main.doc h1 { font-size: clamp(1.85rem, 5vw, 2.4rem); margin: 0 0 6px; letter-spacing: -.015em; }
main.doc .effective { color: var(--text-dim); font-size: .9rem; margin: 0 0 40px; }
main.doc h2 {
  font-size: 1.16rem; margin: 40px 0 12px; color: var(--moon);
  border-top: 1px solid var(--border); padding-top: 26px;
}
main.doc h2:first-of-type { border-top: 0; padding-top: 0; }
main.doc p, main.doc li { color: var(--text-dim); }
main.doc strong { color: var(--text); font-weight: 650; }
main.doc a { color: var(--moon); }
main.doc ul { padding-left: 1.15rem; }
main.doc li { margin: .3rem 0; }

.callout {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--sunset);
  border-radius: 10px; padding: 16px 19px; margin: 22px 0;
}
.callout p { margin: 0; color: var(--text); }

dl.contact { margin: 18px 0 0; }
dl.contact dt { font-weight: 650; color: var(--text); margin-top: 14px; }
dl.contact dd { margin: 3px 0 0; color: var(--text-dim); }

/* Footer ------------------------------------------------------------------ */
footer.site { border-top: 1px solid var(--border); padding: 30px 0 46px; color: var(--text-dim); font-size: .88rem; }
footer.site .wrap { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
footer.site a { color: var(--text-dim); }
footer.site .spacer { margin-left: auto; }

/* The app is a night-sky app; the page is dark by design. Light mode softens
   the background rather than inverting it, so the brand still reads. */
@media (prefers-color-scheme: light) {
  :root { --bg: #15193A; }
}

@media (max-width: 560px) {
  .hero { padding: 52px 0 36px; }
  nav.site { width: 100%; margin-left: 0; }
}
