:root {
  --bg-deep: #0d0b08;
  --bg-field: #191409;
  --bg-card: #261e0e;
  --bg-bar: #2d2512;
  --bg-pill: #1a1408;
  --text-primary: #ffffff;
  --text-parchment: #fff6e0;
  --text-secondary: rgba(244, 236, 217, 0.88);
  --text-muted: rgba(244, 236, 217, 0.56);
  --gold-light: #f0d385;
  --gold: #d9b25f;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  min-height: 100%;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-block-size: 100dvh;
  padding-block: calc(1.5rem + env(safe-area-inset-top)) calc(3.25rem + env(safe-area-inset-bottom));
  padding-inline: 1.25rem;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 52rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 246, 224, 0.08);
  margin-bottom: clamp(2rem, 1.5rem + 2.5dvw, 3.5rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-parchment);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.brand img {
  width: 1.875rem;
  height: 1.875rem;
  aspect-ratio: 1 / 1;
  border-radius: 0.45rem;
  display: block;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-parchment);
}

.nav-links a[aria-current="page"] {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
  font-weight: 600;
}

.hero-head {
  max-width: 40rem;
}

.big-num {
  display: block;
  font-size: clamp(4.25rem, 2.5rem + 9dvw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 0.86;
  color: var(--gold-light);
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 1.35rem + 3dvw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  text-wrap: balance;
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.0625rem, 0.98rem + 0.45dvw, 1.25rem);
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 56ch;
  text-wrap: pretty;
  margin-bottom: 1.75rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.25rem;
  margin-bottom: clamp(2.5rem, 2rem + 2.5dvw, 3.75rem);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1rem 1.5rem;
  border-radius: 1.125rem;
  background: var(--gold);
  color: #1a1204;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 0.25s var(--ease-expo);
}

.cta:active {
  transform: scale(0.97);
}

.cta svg {
  width: 1.0625rem;
  height: 1.375rem;
  flex-shrink: 0;
  margin-top: -1px;
}

.cta-note {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.band {
  background: var(--bg-field);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 1.25rem + 1.5dvw, 2.25rem);
  margin-bottom: 1.5rem;
}

.band h2 {
  font-size: clamp(1.375rem, 1.15rem + 1dvw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  text-wrap: balance;
  margin-bottom: 0.625rem;
}

.band > p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 60ch;
  text-wrap: pretty;
}

/* Flat warm app cards (1:1 with index.html .qcard / .bible-card) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.app-card {
  background: var(--bg-card);
  border-radius: 1.25rem;
  padding: 1.375rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.app-card h3 {
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text-parchment);
}

.app-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Ranked category bars (1:1 with index.html .cats) */
.cats {
  list-style: none;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.cat {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  background: rgba(38, 30, 14, 0.58);
  font-size: 1rem;
  font-weight: 580;
  color: var(--text-parchment);
  overflow: hidden;
  isolation: isolate;
}

.cat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w, 100%);
  background: linear-gradient(90deg, rgba(217, 178, 95, 0.18), rgba(217, 178, 95, 0.09));
  z-index: -1;
}

.cat b {
  font-weight: 750;
  color: var(--text-parchment);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

/* Scripture / Quote cards (1:1 with index.html .bible-card / .qcard) */
.reader-card {
  background: var(--bg-card);
  border-radius: 1.375rem;
  padding: 1.5rem 1.375rem 1.25rem;
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reader-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 246, 224, 0.09);
}

.reader-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.reader-sub {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.serif-passage {
  font-family: ui-serif, "New York", Georgia, serif;
  font-size: clamp(1.1875rem, 1.08rem + 0.5dvw, 1.4375rem);
  line-height: 1.38;
  letter-spacing: -0.01em;
  color: var(--text-parchment);
  text-wrap: pretty;
}

.vnum {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  margin-right: 0.35rem;
  vertical-align: super;
  line-height: 0;
}

.bhl {
  background: rgba(217, 178, 95, 0.22);
  color: #fff9eb;
  padding: 0.04rem 0.28rem;
  margin: 0 -0.08rem;
  border-radius: 0.3rem;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 246, 224, 0.86);
  background: var(--bg-pill);
}

.quote-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.qcard {
  background: var(--bg-card);
  border-radius: 1.375rem;
  padding: 1.5rem 1.375rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.125rem;
}

.qtext {
  font-family: ui-serif, "New York", Georgia, serif;
  font-size: clamp(1.25rem, 1.12rem + 0.55dvw, 1.5rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--text-parchment);
  text-wrap: pretty;
}

.qauthor {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 246, 224, 0.68);
}

.footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 246, 224, 0.08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer a:hover {
  color: var(--gold-light);
}

@media (prefers-reduced-motion: reduce) {
  .cta, .nav-links a {
    transition: none;
  }
}
