/* getbibleverse.com. One stylesheet for the home page and the policy pages.
   Colours and type are the app's own: plum, paper, ink, Fraunces. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #2B1E2E;
  --plum: #5A3350;
  --rose: #8A4D66;
  --dawn: #E7B56B;
  --cream: #F4EFE4;

  --page: #F7F2E8;
  --tint: #EDE5D6;
  --text: #211C15;
  --muted: #655C50;
  --rule: #DDD3C1;
  --link: #7A2E4E;
  --time: #5A3350;

  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --wide: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #171216;
    --tint: #231B22;
    --text: #F4EFE4;
    --muted: #B9AEA6;
    --rule: #3A2F38;
    --link: #E3AFC2;
    --time: #D9A3B8;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  overflow-wrap: break-word;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--dawn); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; font-optical-sizing: auto; margin: 0; }
p { margin: 0; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }

/* Header. Sits on plum on the home page, on paper on the policy pages. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; text-decoration: none; color: inherit;
         font: 600 1.2rem/1 var(--serif); }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; align-items: center; gap: clamp(0.9rem, 3vw, 1.75rem); font-size: 0.95rem; }
.top nav a { color: inherit; text-decoration: none; }
.top nav a:hover { text-decoration: underline; }
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }

.btn {
  display: inline-block; padding: 0.95rem 1.5rem; border-radius: 999px;
  font: 600 1.0625rem/1 var(--sans); text-decoration: none;
  background: var(--cream); color: #211C15;
  transition: transform 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }

/* Hero: the hour before dawn, with a Lock Screen waiting. */
.hero {
  color: var(--cream);
  background:
    radial-gradient(70% 55% at 78% 108%, rgba(231, 181, 107, 0.42), transparent 70%),
    linear-gradient(165deg, var(--night) 0%, var(--plum) 58%, var(--rose) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: end; gap: clamp(1.5rem, 5vw, 4rem);
  padding-top: clamp(2rem, 6vw, 4.5rem);
}
.hero-copy { align-self: center; padding-bottom: clamp(2.5rem, 7vw, 5rem); }
.hero h1 {
  font-size: clamp(2.7rem, 7.2vw, 5.1rem); line-height: 1.02; letter-spacing: -0.02em;
  max-width: 11ch; text-wrap: balance;
}
.hero .lede { margin-top: 1.4rem; max-width: 34ch; font-size: clamp(1.1rem, 2vw, 1.3rem); line-height: 1.5; color: #E9DDE0; }
.hero .cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.25rem; }
.hero .cta small { font-size: 0.95rem; color: #DCCBD1; }

.phone {
  width: min(300px, 72vw); aspect-ratio: 1206 / 2622;
  padding: 9px; border-radius: 46px; background: #120D13;
  box-shadow: 0 30px 60px -20px rgba(20, 10, 20, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 37px; }
.hero .phone { justify-self: center; margin-bottom: -22%; animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: none; } }

/* The day: three real moments, each marked with its hour the way a Lock Screen shows time. */
.day { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(2rem, 6vw, 4rem); }
.day > .wrap > h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.1; letter-spacing: -0.015em; text-wrap: balance; }
.day > .wrap > .lede { margin-top: 1rem; max-width: 44ch; color: var(--muted); font-size: 1.15rem; }

.moment {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(2rem, 7vw, 6rem);
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  border-top: 1px solid var(--rule);
}
.moment:first-of-type { margin-top: clamp(2.5rem, 6vw, 4rem); }
.moment .phone { justify-self: center; }
.moment:nth-of-type(even) .phone { order: -1; }
.moment time {
  display: block; font: 600 clamp(3.6rem, 9vw, 6.25rem)/0.95 var(--serif);
  letter-spacing: -0.03em; color: var(--time); font-variant-numeric: lining-nums;
}
.moment time span { font-size: 0.3em; letter-spacing: 0; margin-left: 0.35em; font-weight: 500; }
.moment h3 { margin-top: 1.25rem; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; text-wrap: balance; }
.moment p { margin-top: 0.85rem; max-width: 40ch; color: var(--muted); font-size: 1.1rem; }

/* Everything else in the app, as a plain list. */
.more { background: var(--tint); padding: clamp(3.5rem, 9vw, 6rem) 0; }
.more h2, .asked h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15; letter-spacing: -0.01em; }
.more dl { margin: 2.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 2rem clamp(2rem, 5vw, 4rem); }
.more dt { font: 600 1.25rem/1.25 var(--serif); }
.more dd { margin: 0.35rem 0 0; color: var(--muted); }
.more .source { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); max-width: 62ch; }
.more .source strong { font: 600 1.25rem/1.25 var(--serif); display: block; margin-bottom: 0.35rem; }
.more .source span { color: var(--muted); }

.asked { padding: clamp(3.5rem, 9vw, 6rem) 0; }
.asked .list { margin-top: 1.75rem; max-width: 46rem; border-top: 1px solid var(--rule); }
.asked details { border-bottom: 1px solid var(--rule); }
.asked summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; font-size: 1.1rem; list-style: none; position: relative; }
.asked summary::-webkit-details-marker { display: none; }
.asked summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.95rem; font: 400 1.5rem/1 var(--serif); color: var(--time); }
.asked details[open] summary::after { content: "\2212"; }
.asked details p { padding: 0 2rem 1.25rem 0; color: var(--muted); max-width: 60ch; }
.asked .after { margin-top: 1.5rem; }

/* Closing: back to night, with one verse. */
.close {
  color: var(--cream); text-align: center;
  background: linear-gradient(180deg, var(--plum) 0%, var(--night) 100%);
  padding: clamp(4.5rem, 12vw, 8rem) 0;
}
.close blockquote { margin: 0 auto; max-width: 20ch; font: 500 clamp(2rem, 5.4vw, 3.6rem)/1.15 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.close cite { display: block; margin-top: 1.25rem; font: 500 1.1rem/1 var(--serif); font-style: normal; color: #DCCBD1; }
.close .btn { margin-top: 2.5rem; }

.foot { padding: 2.5rem 0 3rem; font-size: 0.93rem; color: var(--muted); }
.foot .row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.foot p + p { margin-top: 0.5rem; }
.foot .fine { margin-top: 1.5rem; max-width: 70ch; }

/* Policy pages. */
.doc-top { border-bottom: 1px solid var(--rule); }
.doc { max-width: 44rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) var(--gutter) 4rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.12; letter-spacing: -0.015em; margin-bottom: 1rem; }
.doc h2 { font-size: 1.5rem; line-height: 1.25; margin: 2.75rem 0 0.75rem; }
.doc h3 { font-size: 1.15rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
.doc p { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin: 0.4rem 0; }
.doc strong { font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
.doc blockquote { margin: 1.5rem 0; padding: 0.75rem 1rem; border-left: 3px solid var(--link); background: var(--tint); }
.doc code { font: 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--tint); padding: 0.1em 0.35em; border-radius: 4px; }
/* A table is the one thing that can push a phone sideways, so each scrolls inside its own box. */
.tablewrap { overflow-x: auto; margin: 1.25rem 0; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.doc th { font-weight: 600; white-space: nowrap; }

.lost { text-align: center; padding: clamp(4rem, 14vw, 9rem) var(--gutter); }
.lost h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.1; }
.lost p { margin: 1rem auto 0; max-width: 40ch; color: var(--muted); }
.lost .btn { margin-top: 2rem; background: var(--plum); color: var(--cream); }

@media (max-width: 760px) {
  .top nav .opt { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 0; }
  .hero h1 { max-width: 12ch; }
  .hero .phone { margin-top: 1rem; margin-bottom: -38%; }
  .moment { grid-template-columns: 1fr; gap: 2.25rem; }
  .moment:nth-of-type(even) .phone { order: 0; }
  .moment .phone { width: min(260px, 68vw); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .phone { animation: none; }
  .btn { transition: none; }
}
