:root {
  /* One dark (a muted violet that matches the Jehovah Nissi artwork),
     white, and scarlet used only as a small accent */
  --deep: #282834;
  --purple: #4A3F66;
  --scarlet: #C8102E;
  --white: #FFFFFF;
  --paper: #FBFAF8;
  --ink: #22212B;
  --muted: #6C6A76;
  --line: #E7E5E9;
  --on-dark: #B9B7C4;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
button { font: inherit; }
a { color: inherit; }
.wrap { max-width: 100rem; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.label {
  display: block;
  font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
h2, .h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1; letter-spacing: -.005em;
  margin: .75rem 0 0;
}
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }
section + section { border-top: 1px solid var(--line); }
.hero + section { border-top: 0; }
:focus-visible { outline: 2px solid var(--scarlet); outline-offset: 4px; border-radius: 2px; }

/* Header */
.bar { position: absolute; inset: 0 0 auto 0; z-index: 10; color: var(--white); }
.bar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 4.5rem; padding-top: env(safe-area-inset-top); }
.brand { text-decoration: none; display: flex; align-items: center; gap: .7rem; font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.nav { display: none; gap: 2.25rem; font-size: .88rem; }
.nav a { text-decoration: none; color: var(--on-dark); transition: color .2s; }
.nav a:hover { color: var(--white); }

/* Hero: the Jehovah Nissi artwork sits on a matching background */
.hero { background: var(--deep); color: var(--white); padding: 4.5rem 0 clamp(3rem, 6vw, 4.5rem); border: 0; }
.nissi { max-width: 92rem; margin: 0 auto; }
.nissi img { width: 100%; height: auto; }
.hero .intro { max-width: 68rem; margin: clamp(1rem, 3vw, 2rem) auto 0; text-align: center; }
#message {
  margin: 0;
  min-height: 2.6em;
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.3;
  transition: opacity .6s ease;
}
#message.out { opacity: 0; }
.hero .rule { width: 2.5rem; height: 1px; background: var(--scarlet); margin: 1.75rem auto; border: 0; }
.hero .verse-line { margin: 0; font-size: .95rem; color: var(--on-dark); }
.hero .verse-line cite { display: block; margin-top: .25rem; font-style: normal; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; }

/* Scripture reader */
.word { background: var(--white); }
.reader { max-width: 84rem; }
figure { margin: 2.5rem 0 0; }
.verse { transition: opacity .45s ease; }
.verse.out { opacity: 0; }
blockquote {
  margin: 0;
  font-family: var(--serif); font-weight: 400;
  font-size: 1.7rem; line-height: 1.4;
  white-space: pre-line;
}
blockquote.long { font-size: 1.35rem; }
blockquote.longer { font-size: 1.12rem; line-height: 1.6; }
figcaption { margin-top: 1.25rem; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.timer { height: 1px; background: var(--line); margin: 2.5rem 0 1.5rem; position: relative; overflow: hidden; }
.timer span { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.controls { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.btn {
  min-height: 44px; padding: .7rem 1.4rem;
  font-size: .9rem; font-weight: 600;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--white);
  cursor: pointer; transition: background .2s, color .2s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { min-height: 44px; padding: 0; border: 0; background: none; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line); }
.btn.ghost:hover { color: var(--ink); text-decoration-color: currentColor; }
#credit { margin: 2rem 0 0; font-size: .72rem; line-height: 1.6; color: var(--muted); max-width: 64rem; }

/* Links under the hero */
.paths { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 1rem; margin-top: 2.5rem; }
.paths a {
  min-height: 44px; display: inline-flex; align-items: center; padding: .7rem 1.4rem;
  font-size: .9rem; font-weight: 600; text-decoration: none;
  border: 1px solid rgba(255,255,255,.28); border-radius: 999px; color: var(--white);
  transition: background .2s, color .2s, border-color .2s;
}
.paths a:hover { background: var(--white); color: var(--deep); border-color: var(--white); }

/* Short dark band at the top of inner pages */
.page-top { background: var(--deep); height: 4.5rem; }
.nav a[aria-current="page"] { color: var(--white); }
.back { display: inline-block; margin-top: 3rem; font-size: .9rem; color: var(--muted); text-underline-offset: 4px; }
.back:hover { color: var(--ink); }

/* Good news */
.ransom { text-align: center; }
.ransom .wrap { max-width: 76rem; }
.ransom svg { margin: 0 auto 1.75rem; display: block; }
.ransom p { color: var(--muted); margin: 1.25rem auto 0; }
.ransom .good { color: var(--scarlet); font-weight: 700; }
.ransom .tabs { flex-wrap: wrap; }
.ransom .pair { display: grid; margin: 2.5rem auto 0; }
.ransom .pair > * { grid-area: 1 / 1; transition: opacity .8s ease; }
.ransom .pair > [aria-hidden="true"] { opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility 0s .8s; }
.ransom .tabs { display: flex; justify-content: center; gap: 1.25rem; margin-top: 1.5rem; }
.ransom .tabs button { min-height: 44px; padding: 0 .25rem; border: 0; border-bottom: 1px solid transparent; background: none; color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; cursor: pointer; }
.ransom .tabs button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--scarlet); }
.ransom .scripture { margin: 0 auto; font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.85rem); line-height: 1.5; color: var(--ink); }
.ransom .scripture cite { display: block; margin-top: .75rem; font-family: var(--sans); font-style: normal; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }

footer {
  background: var(--deep); color: var(--on-dark);
  padding: 3rem 0 max(env(safe-area-inset-bottom), 3rem);
  font-size: .85rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between; align-items: baseline; }
footer .name { margin: 0; font-family: var(--serif); font-size: 1.3rem; color: var(--white); }
footer p { margin: 0; }

@media (min-width: 640px) {
  blockquote { font-size: 2rem; }
  blockquote.long { font-size: 1.5rem; }
  blockquote.longer { font-size: 1.22rem; }
}
@media (min-width: 860px) {
  .nav { display: flex; }
  .hero { padding-top: 5rem; }
}
@media (min-width: 960px) {
  blockquote { font-size: 2.5rem; max-width: 48ch; }
  blockquote.long { font-size: 1.85rem; max-width: 62ch; }
  blockquote.longer { font-size: 1.45rem; max-width: 80ch; }
}
/* The two pages slide sideways, like turning pages */
@view-transition { navigation: auto; }
@keyframes from-right { from { transform: translateX(100%); } }
@keyframes to-left { to { transform: translateX(-100%); } }
@keyframes from-left { from { transform: translateX(-100%); } }
@keyframes to-right { to { transform: translateX(100%); } }
::view-transition-group(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
.p2::view-transition-old(root) { animation-name: to-left; }
.p2::view-transition-new(root) { animation-name: from-right; }
.p1::view-transition-old(root) { animation-name: to-right; }
.p1::view-transition-new(root) { animation-name: from-left; }

/* Page dots */
.pager {
  position: fixed; left: 50%; bottom: max(env(safe-area-inset-bottom), .75rem); z-index: 20;
  transform: translateX(-50%);
  display: flex; padding: 0 .5rem; border-radius: 999px;
  background: rgba(251,250,248,.86); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pager a { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.pager a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line); transition: background .2s; }
.pager a:hover::before { background: var(--muted); }
.pager a[aria-current="page"]::before { background: var(--scarlet); }
.pager .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
footer { padding-bottom: max(calc(env(safe-area-inset-bottom) + 3.5rem), 4.5rem); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-group(root), ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  #message, .verse, .ransom .pair > * { transition: none; }
}
