/* Base — reset, typography, layout, buttons, header/footer/nav, utilities. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--azure); color: var(--midnight); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.1; }
p { margin: 0 0 1em; }

/* ---- focus + skip link ---- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 3px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--azure); color: var(--btn-ink);
  padding: 10px 18px; border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---- layout ---- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 28px; padding-right: 28px; }
.wrap--narrow { max-width: var(--wrap-narrow); }
.section { padding: clamp(4rem, 9vw, 9rem) 0; }
main { display: block; }

/* ---- eyebrow / labels ---- */
.eyebrow {
  font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 14px;
}
.eyebrow--muted { color: var(--text-mute); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-mono); font-size: .875rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 15px 28px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { text-decoration: none; }
@media (prefers-reduced-motion: no-preference) { .btn:hover { transform: translateY(-2px); } }
.btn--primary { background: var(--azure); color: var(--btn-ink); }
.btn--primary:hover { background: var(--cyan); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--card-edge); }
.btn--outline:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { background: transparent; color: var(--accent); padding: 15px 14px; }

/* ---- utilities ---- */
.visually-hidden, .hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.prose p { margin: 0 0 1.1em; color: var(--text-soft); font-size: 1.1875rem; line-height: 1.8; }
.card {
  background: var(--card); border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg); padding: clamp(2rem, 4vw, 3.25rem);
  box-shadow: var(--shadow-card);
}

/* ================= HEADER ================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  border-bottom: 1px solid var(--edge);
  transition: background .3s var(--ease);
}
.site-header.is-transparent { background: transparent; border-bottom-color: transparent; }
/* Home: pull the hero up under the transparent header so it overlays the DARK
   hero (not the page body) — otherwise white header text vanishes in light theme. */
body.page-home main { margin-top: calc(-1 * var(--header-h)); }
body.page-home .hero { padding-top: var(--header-h); }
.site-header.is-scrolled {
  background: var(--header-blur);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--edge);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 58px; height: 58px; object-fit: contain; }
.brand__lockup { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
  font-family: var(--font-display); font-weight: 300; font-size: 1.35rem;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text);
}
.site-header.is-transparent .brand__name { color: #fff; }
.brand__descriptor {
  align-self: flex-end; font-family: var(--font-mono); font-size: .58rem;
  letter-spacing: .34em; text-transform: uppercase; color: var(--accent); margin-top: 3px;
}
.site-nav { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.hf-navlink {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .13em; text-transform: uppercase;
  padding: 9px 10px; border-radius: 7px; color: var(--text-soft);
}
.site-header.is-transparent .hf-navlink { color: rgba(214,226,248,.82); }
.site-header.is-transparent .hf-navlink:hover, .site-header.is-transparent .hf-navlink.is-active { color: #fff; }
.site-header.is-transparent .theme-toggle { color: #cfeefb; border-color: rgba(207,238,251,.45); background: rgba(255,255,255,.08); }
.hf-navlink:hover, .hf-navlink.is-active { color: var(--accent); text-decoration: none; }
.site-header__actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  background: rgba(79,195,232,.12); border: 1px solid rgba(79,195,232,.32);
  color: var(--accent); cursor: pointer;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase;
  padding: 9px 13px; border-radius: 20px; white-space: nowrap;
}
.nav-toggle { display: none; }

/* mobile menu */
.mobile-menu { display: none; }

/* ================= FOOTER ================= */
.site-footer { position: relative; background: var(--ground-deep); border-top: 1px solid var(--edge); }
:root[data-theme="light"] .site-footer { background: var(--midnight); }
.site-footer__wave { position: absolute; top: -1px; left: 0; width: 100%; height: 40px; transform: translateY(-99%); }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 76px 28px 40px; }
:root[data-theme="light"] .site-footer :is(p, a, span) { color-scheme: dark; }
.footer-scriptures {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; text-align: center;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-scripture { font-family: var(--font-body); font-style: italic; font-size: 1.125rem; color: rgba(214,226,248,.62); margin: 0; }
.footer-scripture span { color: rgba(146,166,200,.6); }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; padding: 44px 0 36px; }
.footer-brand { max-width: 300px; }
.footer-brand img { width: 50px; height: 50px; object-fit: contain; margin-bottom: 14px; }
.footer-brand__name { font-family: var(--font-display); font-weight: 300; font-size: 1.6rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 8px; }
.footer-brand__descriptor { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .24em; text-transform: uppercase; color: var(--cyan-bright); margin: 0 0 14px; }
.footer-brand__tagline { font-family: var(--font-body); font-size: 1rem; line-height: 1.6; color: rgba(197,210,236,.6); margin: 0; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav__col { display: flex; flex-direction: column; gap: 12px; }
.footer-nav__col a { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(197,210,236,.66); }
.footer-nav__col a:hover { color: var(--cyan-bright); }
.footer-legal { font-family: var(--font-mono); font-size: .625rem; letter-spacing: .06em; line-height: 1.7; color: rgba(146,166,200,.5); margin: 0; max-width: 820px; }

/* ================= responsive ================= */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; background: transparent; border: 1px solid var(--card-edge);
    border-radius: 10px; cursor: pointer; margin-left: auto;
  }
  .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 0 auto; transition: transform .25s var(--ease), opacity .25s var(--ease); }
  .site-header.is-transparent .nav-toggle span { background: #fff; }
  .site-header__actions { margin-left: auto; }

  .mobile-menu {
    display: flex; flex-direction: column; justify-content: center;
    position: fixed; inset: 0; z-index: 90;
    background: var(--midnight);
    padding: 90px 28px 40px;
    transform: translateY(-100%); transition: transform .38s var(--ease);
  }
  .mobile-menu.is-open { transform: translateY(0); }
  .mobile-menu[hidden] { display: flex; }
  .mobile-menu__nav { display: flex; flex-direction: column; gap: 8px; }
  .mobile-menu__nav .hf-navlink {
    font-family: var(--font-display); font-weight: 300; font-size: 2rem;
    letter-spacing: .04em; text-transform: none; color: #eaf1fb; padding: 10px 0;
  }
  .mobile-menu__nav .hf-navlink.is-active { color: var(--cyan-bright); }
  .mobile-menu__wave { position: absolute; left: 0; bottom: 0; width: 100%; height: 70px; }
  body.nav-open { overflow: hidden; }

  .footer-cols { flex-direction: column; gap: 32px; }
}
