/* Copyright 2026 Lucernarium, LLC. All rights reserved. */

/*
 * Visual language borrowed deliberately from the Vespers marketing one-pager
 * served at the vespers.community apex. That page is the public face of the
 * product this company publishes, so a visitor arriving here from an app
 * store listing, or from the app itself, should recognise the same hand.
 *
 * The custom-property names and values below are copied VERBATIM from the
 * apex page's inline <style> block, which lives in the Vespers repo at
 * `Caddyfile.tmpl` (the apex `respond` body). It is the source of truth; this
 * file is the follower. If the palette moves there, move it here — there is
 * no shared build step between the two repos, and nothing will warn you.
 *
 * NOT copied: the apex is dark-only by design (`color-scheme:dark`, no light
 * variant), and so is this. An earlier draft of this stylesheet mirrored the
 * *application's* light/dark token set instead (`--color-accent:#2563eb`),
 * which is a different palette for a different surface — the in-app UI, not
 * the marketing face. That was the mismatch this file exists to correct.
 */

:root {
  color-scheme: dark;

  --bg: #0a0d16;
  --bg-card: #111726;
  --fg: #e9edf6;
  --muted: #9aa6be;
  --accent: #7fb2ff;
  --accent-soft: #a9c8ff;
  --rule: rgba(127, 178, 255, 0.14);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 4.5rem) 1.25rem;
  display: flex;
  justify-content: center;

  /* The apex's signature: a cool wash falling from above the fold. */
  background-image: radial-gradient(
    120% 60% at 50% -10%,
    rgba(43, 74, 140, 0.28),
    transparent 60%
  );
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/*
 * Narrower than the apex's 62rem. That width exists there to fit a
 * three-across card grid; these are long prose documents, and 62rem of
 * running text is well past a comfortable measure. Same visual language,
 * different content shape.
 */
.wrap {
  max-width: 46rem;
  width: 100%;
}

/* --- Skip link ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--bg-card);
  color: var(--fg);
  padding: 0.75rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 10px;
  z-index: 10;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* --- Masthead ----------------------------------------------------------- */

.masthead {
  margin-bottom: clamp(2.25rem, 6vw, 3.25rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  margin: 0 0 0.15rem;
}

.wordmark a {
  color: var(--fg);
  border-bottom: none;
}

.wordmark a:hover {
  color: var(--accent-soft);
}

.entity {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

/* --- Typography --------------------------------------------------------- */

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 5.2vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  color: var(--accent-soft);
  letter-spacing: 0.01em;
  margin: 2.75rem 0 0.85rem;
  text-wrap: balance;
}

h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-soft);
  margin: 0 0 0.6rem;
}

p {
  margin: 0 0 1.05rem;
  text-wrap: pretty;
}

.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.18rem);
  opacity: 0.92;
  margin-bottom: 1.6rem;
}

ul {
  margin: 0 0 1.2rem;
  padding-left: 1.15rem;
}

li {
  margin-bottom: 0.7rem;
  color: var(--muted);
}

li strong,
strong {
  color: var(--fg);
}

.updated {
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 2rem;
}

/* --- Links -------------------------------------------------------------- */

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 178, 255, 0.35);
}

a:hover {
  border-bottom-color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* --- Cards -------------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.6rem 1.5rem;
  margin: 1.75rem 0;
}

.card p:last-child {
  margin-bottom: 0;
}

/*
 * The emphasis variant carries the two highest-stakes blocks on the site: the
 * child-safety pointer on the home page, and the "a child is in immediate
 * danger" notice on the standards page. The left rule is the whole signal —
 * it is what makes those blocks findable to someone skimming for exactly
 * them, which in an emergency is the only reading mode that matters.
 */
.card--emphasis {
  border-left: 3px solid var(--accent);
}

/* --- Call to action ----------------------------------------------------- */

.cta {
  display: inline-block;
  background: var(--accent);
  /* Near-black from the page background, not pure #000 — the accent is a
     light blue, so dark-on-light is the legible direction here. */
  color: #08111f;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  border-bottom: none;
  margin: 0.5rem 0;
}

.cta:hover {
  background: var(--accent-soft);
  border-bottom: none;
}

/* --- Contact list ------------------------------------------------------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.contact-list li {
  margin-bottom: 1.1rem;
  color: var(--fg);
}

.contact-list .label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.15rem;
}

/*
 * The no-JS fallback for an obfuscated address (see email.js). Styled as
 * plain body text rather than as a link, because until the script runs there
 * is genuinely nothing to click — presenting it as a link would be a lie.
 */
noscript {
  color: var(--fg);
}

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  margin-bottom: 0.9rem;
}

.site-footer p {
  margin: 0;
}

/* --- Motion ------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .wrap {
    animation: rise 0.7s ease-out both;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
