/* Three16 website: set like a printed Bible, opened outdoors. Black ink and one red for numbers, as Bibles print
   chapter and verse numbers, between public-domain National Park Service landscapes that slowly move.
   System fonts only, so no visitor's address is sent to a font service. */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #555555;
  --quiet: #666666;
  --line: #e7e4df;
  --rubric: #b3261e;
  --frame: #111111;
  --soft: #f5f4f2;
  --glow: #ffd79a;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0b;
    --fg: #f2f2f2;
    --muted: #a8a8a8;
    --quiet: #9a9a9a;
    --line: #262626;
    --rubric: #ff7a6e;
    --frame: #1c1c1c;
    --soft: #161616;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--fg); }
a:hover { color: var(--rubric); }
img { max-width: 100%; display: block; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Header: over the photo on the home page, plain on the other pages */
.nav { border-bottom: 1px solid var(--line); position: relative; z-index: 3; }
.nav .wrap { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 600; font-size: 18px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--fg); }
.nav.over { position: absolute; top: 0; left: 0; right: 0; border-bottom-color: rgba(255, 255, 255, 0.18); }
.nav.over .brand, .nav.over .nav-links a { color: rgba(255, 255, 255, 0.92); }
.nav.over .nav-links a:hover { color: #ffffff; }

/* A landscape that drifts slowly, like a camera breathing */
.scene { position: relative; overflow: hidden; color: #ffffff; isolation: isolate; }
.scene > .photo { position: absolute; inset: -4%; background-size: cover; background-position: center; z-index: -2;
  animation: drift 38s ease-in-out infinite alternate; }
.scene > .shade { position: absolute; inset: 0; z-index: -1; }
@keyframes drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.09) translate3d(-1.5%, -1%, 0); }
}

/* Specks of light floating up through the sunrise */
.motes { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.motes span { position: absolute; bottom: -10px; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 236, 200, 0.95), rgba(255, 210, 140, 0) 70%);
  animation: rise linear infinite; opacity: 0; }
@keyframes rise {
  0% { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  12% { opacity: 0.9; }
  85% { opacity: 0.55; }
  100% { transform: translate3d(var(--sway, 30px), -105vh, 0) scale(1.15); opacity: 0; }
}

/* Top of the page */
.hero { min-height: min(100vh, 980px); display: flex; align-items: center; }
.hero > .photo { background-image: url("/img/photos/light-04.jpg"); background-position: center 60%; }
.hero > .shade { background: linear-gradient(180deg, rgba(10, 8, 6, 0.55) 0%, rgba(10, 8, 6, 0.25) 40%, rgba(10, 8, 6, 0.7) 100%); }
.hero .wrap { width: 100%; display: flex; flex-wrap: wrap; gap: 64px; align-items: center; padding-top: 132px; padding-bottom: 96px; }
.hero .text { flex: 999 1 520px; min-width: 0; }
.opening { margin: 0 0 18px; font: italic 22px var(--serif); color: var(--glow); }
h1 { margin: 0; font-size: clamp(48px, 7.4vw, 88px); line-height: 1; letter-spacing: -0.03em; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35); }
.lead { margin: 28px 0 0; font-size: clamp(18px, 2vw, 21px); line-height: 1.55; color: rgba(255, 255, 255, 0.86); max-width: 560px; }
.cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.button { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border-radius: 14px;
  background: #ffffff; color: #111111; text-decoration: none; font-weight: 600; font-size: 16px; transition: transform 0.2s; }
.button:hover { color: #111111; transform: translateY(-2px); }
.facts { font-size: 15px; color: rgba(255, 255, 255, 0.8); }

/* A plain phone around each screenshot */
.phone { width: 280px; padding: 10px; border-radius: 48px; background: var(--frame); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6); }
.phone img { width: 100%; border-radius: 39px; }
.hero .phone-slot { flex: 1 1 300px; display: flex; justify-content: center; }
.hero .phone { width: 300px; padding: 11px; border-radius: 52px; background: #111111; animation: float 7s ease-in-out infinite; }
.hero .phone img { border-radius: 42px; }
@keyframes float { 50% { transform: translateY(-14px); } }

/* John 3:16 in both languages */
.verse .wrap { padding-top: 96px; padding-bottom: 96px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 56px; }
.version { margin: 0 0 14px; font-size: 14px; color: var(--quiet); }
.verse-text { margin: 0; font: clamp(24px, 2.6vw, 31px)/1.45 var(--serif); }
sup.n { font: 700 14px var(--sans); color: var(--rubric); margin-right: 6px; }

/* Features, numbered like chapters, each phone standing in a landscape */
.chapter { display: flex; flex-wrap: wrap; gap: 72px; align-items: center; padding-top: 120px; }
.chapter.flip { flex-wrap: wrap-reverse; }
.chapter.last { padding-bottom: 128px; }
.chapter .text { flex: 999 1 420px; min-width: 0; }
.number { margin: 0; font: clamp(72px, 8vw, 96px)/1 var(--serif); color: var(--rubric); }
.chapter h2 { margin: 12px 0 16px; font-size: clamp(36px, 4.4vw, 52px); line-height: 1.05; }
.chapter p.body { margin: 0; font-size: 19px; color: var(--muted); max-width: 520px; }
.window { flex: 1 1 440px; min-height: 620px; border-radius: 32px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.window > .photo { inset: -6%; }
.window > .shade { background: rgba(0, 0, 0, 0.12); }
.window.aspen > .photo { background-image: url("/img/photos/forest-02.jpg"); }
.window.lake > .photo { background-image: url("/img/photos/water-07.jpg"); }
.window.river > .photo { background-image: url("/img/photos/light-06.jpg"); }
.window.denali > .photo { background-image: url("/img/photos/mountains-03.jpg"); }

/* Privacy, under the Milky Way */
.night > .photo { background-image: url("/img/photos/night-04.jpg"); }
.night > .shade { background: linear-gradient(180deg, rgba(4, 6, 14, 0.5), rgba(4, 6, 14, 0.78)); }
.night .wrap { padding-top: 140px; padding-bottom: 140px; }
.night h2 { margin: 0; max-width: 900px; font-size: clamp(40px, 5.4vw, 68px); line-height: 1.05; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4); }
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.stars span { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #ffffff; box-shadow: 0 0 6px 1px rgba(255, 255, 255, 0.7);
  animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.7); } 50% { opacity: 1; transform: scale(1.2); } }
.points { margin-top: 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.points > div { border-top: 1px solid rgba(255, 255, 255, 0.28); padding-top: 20px; }
.points h3 { margin: 0 0 8px; font-size: 18px; }
.points p { margin: 0; color: rgba(255, 255, 255, 0.78); }
.night a { color: #ffffff; }

/* Included Bibles, set like a table of contents */
.section-title { margin: 0 0 40px; font-size: clamp(34px, 3.7vw, 44px); }
.bibles { padding-top: 120px; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 64px; }
.toc-head { margin: 0 0 6px; font-size: 14px; color: var(--quiet); }
.toc { display: flex; gap: 12px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.toc .title { font: 21px var(--serif); }
.toc .code { margin-left: auto; font-size: 14px; color: var(--quiet); }
.footnote { margin: 20px 0 0; font-size: 15px; color: var(--quiet); }

/* Questions */
.questions { padding-top: 120px; padding-bottom: 120px; }
.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 64px; }
.qa h3 { margin: 0 0 6px; font-size: 18px; }
.qa p { margin: 0; color: var(--muted); }

/* Closing, at dusk */
.closing > .photo { background-image: url("/img/photos/mountains-05.jpg"); }
.closing > .shade { background: linear-gradient(180deg, rgba(10, 8, 12, 0.25), rgba(10, 8, 12, 0.7)); }
.closing .wrap { padding-top: 160px; padding-bottom: 120px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.closing .app-icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }
.closing h2 { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.05; text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4); }
.closing p { margin: 0; color: rgba(255, 255, 255, 0.85); }
.closing a { color: #ffffff; }

/* Footer */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-top: 28px; padding-bottom: 48px; display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: space-between; font-size: 14px; color: var(--quiet); }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--quiet); text-decoration: none; }
footer a:hover { color: var(--fg); }
footer .credit { flex-basis: 100%; font-size: 13px; }

/* Things rise gently into place as they scroll into view (only when scripts run) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease, transform 0.9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .scene > .photo, .motes, .stars, .hero .phone { animation: none !important; }
  .motes, .stars { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Privacy, terms and support */
.doc { padding: 56px 0 96px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(42px, 6vw, 60px); margin: 0 0 8px; text-shadow: none; }
.doc .updated { color: var(--muted); margin-bottom: 36px; }
.doc h2 { font-size: 28px; margin: 48px 0 10px; }
.doc h3 { font-size: 18px; margin: 26px 0 4px; }
.doc ul { padding-left: 22px; }
.doc li { margin: 6px 0; }
.summary-box { background: var(--soft); border-radius: 14px; padding: 22px 24px; }
.summary-box ul { margin: 8px 0 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 12px 0; }
.doc th, .doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }

/* Not-found page */
.notfound { min-height: 70vh; display: flex; align-items: center; text-align: center; }
.notfound .wrap { width: 100%; }
.notfound img { width: 88px; height: 88px; border-radius: 20px; margin: 0 auto 24px; }
.notfound h1 { font-size: clamp(36px, 5vw, 48px); text-shadow: none; }
.notfound p { color: var(--muted); }

@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .nav-links .wide { display: none; }
  .hero .wrap { padding-top: 112px; padding-bottom: 64px; gap: 48px; }
  .chapter { padding-top: 88px; gap: 36px; }
  .chapter.last { padding-bottom: 96px; }
  .window { min-height: 540px; flex-basis: 100%; border-radius: 24px; }
  .night .wrap { padding-top: 96px; padding-bottom: 96px; }
  .bibles { padding-top: 88px; }
  .questions { padding-top: 88px; padding-bottom: 88px; }
  .verse .wrap { padding-top: 64px; padding-bottom: 64px; gap: 40px; }
  .columns > div + div { margin-top: 32px; }
  .phone { width: 240px; }
  .hero .phone { width: 260px; }
  .closing .wrap { padding-top: 112px; padding-bottom: 88px; }
}
