:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --paper-deep: #eee5d6;
  --ink: #17130f;
  --ink-soft: #4b4037;
  --muted: #85776b;
  --rule: rgba(40, 31, 23, 0.18);
  --gold: #a76f28;
  --gold-soft: rgba(167, 111, 40, 0.12);
  --accent: var(--gold);
  --site-gutter: clamp(48px, 9vw, 176px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.26)),
    repeating-linear-gradient(0deg, rgba(32, 24, 17, 0.018) 0 1px, transparent 1px 12px),
    var(--paper);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.wall-shell {
  width: min(1080px, calc(100vw - var(--site-gutter)));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0 72px;
}

.wall-hero {
  min-height: 54vh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: clamp(30px, 5vw, 68px);
}

.utility-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.utility-nav a,
.utility-nav span {
  color: inherit;
  text-decoration: none;
}

.utility-nav a {
  border-bottom: 1px solid transparent;
}

.utility-nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.letter-stage {
  display: grid;
  align-content: center;
}

.giant-word {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(2px, 1.1vw, 18px);
  align-items: end;
}

.intro-loading .scripture-wall {
  opacity: 0;
  pointer-events: none;
}

.intro-loading .letter-choice {
  opacity: 0;
  animation: tulipLetterIn 1700ms ease both;
  animation-delay: var(--letter-delay);
}

body:not(.evidence-loaded) .scripture-wall {
  opacity: 0;
  pointer-events: none;
}

.evidence-swapping .scripture-wall {
  transition: opacity 260ms ease;
}

.letter-choice {
  min-width: 0;
  display: grid;
  gap: clamp(10px, 1.3vw, 18px);
  align-items: end;
  justify-items: center;
}

.giant-letter {
  min-width: 0;
  position: relative;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  padding: 0.07em 0.04em;
  color: rgba(23, 19, 15, 0.22);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.5rem, 16vw, 17rem);
  font-weight: 700;
  line-height: 0.82;
  letter-spacing: 0;
  transition: color 180ms ease, transform 180ms ease;
}

.giant-letter:hover {
  color: rgba(23, 19, 15, 0.62);
  transform: translateY(-4px);
}

.giant-letter.active {
  color: var(--gold);
}

.letter-term {
  min-height: 2.4em;
  margin: 0;
  color: rgba(23, 19, 15, 0.48);
  font-size: clamp(0.6rem, 0.36vw + 0.52rem, 0.92rem);
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 420ms cubic-bezier(0.19, 1, 0.22, 1), opacity 420ms cubic-bezier(0.19, 1, 0.22, 1);
}

.letter-choice.active .letter-term {
  color: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.letter-watermark {
  display: none;
}

.scripture-wall {
  columns: 2 360px;
  column-gap: clamp(28px, 5vw, 74px);
  padding-top: clamp(8px, 2.4vw, 28px);
  opacity: 1;
  transition: opacity 2100ms cubic-bezier(0.19, 1, 0.22, 1);
}

.verse-card {
  break-inside: avoid;
  display: block;
  position: relative;
  margin: 0 0 clamp(34px, 4vw, 62px);
  padding: 0 0 clamp(34px, 4vw, 58px);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition:
    opacity 1250ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 420ms ease;
}

.verse-inline-restoring .wall-hero,
.verse-inline-restoring .verse-card {
  transition:
    opacity 2800ms cubic-bezier(0.19, 1, 0.22, 1),
    border-color 420ms ease;
}

.verse-card:hover,
.verse-card:focus-visible {
  border-bottom-color: rgba(167, 111, 40, 0.48);
  outline: 0;
}

.verse-card.feature {
  column-span: all;
  top: -5px;
  margin-bottom: clamp(42px, 6vw, 92px);
  padding: clamp(18px, 3vw, 40px) 0 clamp(42px, 6vw, 86px);
  border-bottom: 1px solid var(--rule);
}

.verse-card.wide,
.verse-card.tall {
  min-height: 0;
}

.reference {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.verse-text {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 1vw + 1.26rem, 2.75rem);
  line-height: 1.12;
}

.verse-body {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.34rem, 0.62vw + 1.06rem, 1.72rem);
  line-height: 1.48;
}

.verse-feature-text {
  max-width: 1120px;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 2.7vw + 1.05rem, 5.4rem);
  line-height: 1.12;
}

.verse-quote {
  max-width: 1120px;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 4.5vw + 1.15rem, 7.8rem);
  line-height: 0.98;
}

.verse-citation {
  margin: clamp(18px, 2vw, 30px) 0 0;
  color: var(--gold);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: clamp(0.92rem, 0.45vw + 0.8rem, 1.24rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.verse-card.feature .reference {
  margin-bottom: clamp(18px, 2vw, 28px);
}

.verse-inline-focus .wall-hero {
  opacity: 0 !important;
  transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.verse-inline-focus .verse-card:not(.focused) {
  opacity: 0 !important;
  animation: none;
  animation-delay: 0ms;
  pointer-events: none;
  transition: opacity 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.verse-inline-restoring.verse-inline-focus .wall-hero,
.verse-inline-restoring.verse-inline-focus .verse-card:not(.focused) {
  transition: opacity 2800ms cubic-bezier(0.19, 1, 0.22, 1);
}

.verse-card.focused {
  cursor: default;
  opacity: 1 !important;
  filter: none;
  border-bottom-color: rgba(167, 111, 40, 0.58);
  transform: none;
  animation: none;
  z-index: 2;
}

.verse-card.focused::before {
  content: none;
}

.verse-inline-explanation {
  position: absolute;
  top: 0;
  left: calc(100% + clamp(28px, 4vw, 58px));
  width: min(420px, 34vw);
  max-width: 560px;
  margin: 0;
  padding-left: 0;
  animation: explanationFade 820ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 220ms;
}

.verse-card.explain-left .verse-inline-explanation {
  right: calc(100% + clamp(28px, 4vw, 58px));
  left: auto;
}

.verse-card.explain-inline .verse-inline-explanation {
  position: static;
  width: min(680px, 100%);
  max-width: 680px;
  margin-top: clamp(28px, 3vw, 48px);
}

.inline-explanation-point {
  margin: 0;
  color: var(--gold);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.inline-explanation-point {
  margin-bottom: 12px;
  color: var(--muted);
}

.inline-explanation-body {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 0.45vw + 0.92rem, 1.32rem);
  line-height: 1.68;
}

@keyframes explanationFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tulipLetterIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .wall-shell {
    width: min(100vw - 24px, 560px);
    padding: 18px 0 54px;
  }

  .wall-hero {
    min-height: 46vh;
    gap: 34px;
  }

  .utility-nav {
    align-items: start;
    flex-direction: column;
    gap: 10px;
    font-size: 0.72rem;
  }

  .giant-word {
    gap: 0;
  }

  .giant-letter {
    font-size: clamp(4rem, 19vw, 5.15rem);
  }

  .letter-choice {
    gap: 8px;
  }

  .letter-term {
    font-size: 0.48rem;
    line-height: 1.15;
    letter-spacing: 0.08em;
  }

  .scripture-wall {
    columns: 1;
  }

  .verse-card.feature {
    padding-top: 24px;
  }

  .verse-quote {
    font-size: clamp(2rem, 8vw, 3.2rem);
  }

  .verse-feature-text {
    font-size: clamp(1.75rem, 6vw, 2.7rem);
  }

  .verse-inline-explanation {
    position: static;
    width: auto;
    max-width: 560px;
    margin-top: clamp(24px, 3vw, 42px);
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }
}

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