/* A shared prayer, /p/ID. The page itself is written by the API
   (api/app/routers/pages.py), so it cannot reach site.css under its built
   name: the tokens it needs are copied here from site.css (Palette.dark). */

@font-face { font-family: Fraunces; src: url(/fonts/Fraunces-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/fonts/DMSans-Regular.ttf) format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/fonts/DMSans-Medium.ttf) format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url(/fonts/DMSans-SemiBold.ttf) format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #121110;
  --surface: #1D1B19;
  --line: #312E2A;
  --text: #F2EFEA;
  --text-2: #BEB9B3;
  --action: #F2EFEA;
  --on-action: #121212;
  --gold: #C18D17;
  --on-gold: #121212;
  --gutter: 20px;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 24px; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
p { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(193, 141, 23, 0.4); }

.wrap { width: 100%; max-width: 640px; margin: 0 auto; padding: 0 var(--gutter); }
.top { display: flex; align-items: center; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; text-decoration: none; }
.wordmark img { width: 30px; height: 30px; border-radius: 8px; display: block; }

/* The warm light behind the title, as on the landing page's hero */
main { position: relative; isolation: isolate; padding: 24px 0 56px; }
main::before {
  content: ""; position: absolute; z-index: -1; top: -120px; left: 50%; transform: translateX(-50%);
  width: 640px; max-width: 160vw; height: 520px;
  background: radial-gradient(closest-side, rgba(193, 141, 23, 0.26), rgba(180, 112, 45, 0.1) 55%, transparent 75%);
  pointer-events: none;
}

h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 40px; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
.by { color: var(--text-2); font-size: 15px; line-height: 20px; margin-top: 8px; }

/* The voice: one round gold button, the time, a track to seek on */
.voice { display: flex; align-items: center; gap: 16px; margin: 28px 0 8px; }
.play {
  flex: none; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gold); color: var(--on-gold); display: grid; place-items: center;
  transition: transform 120ms ease-out;
}
.play:active { transform: scale(0.94); }
.play svg { width: 24px; height: 24px; }
.play .pause, .play[aria-pressed="true"] .start { display: none; }
.play[aria-pressed="true"] .pause { display: block; }
.track { flex: 1; display: grid; gap: 6px; }
.bar { position: relative; height: 24px; cursor: pointer; touch-action: none; }
.bar::before, .bar span { content: ""; position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; }
.bar::before { right: 0; background: var(--line); }
.bar span { width: 0; background: var(--text); }
.time { display: flex; justify-content: space-between; font-size: 13px; line-height: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* The words. While the voice plays, the line it is on is full ink and the
   rest secondary, as in the app's player. */
.words { margin-top: 32px; display: grid; gap: 22px; }
.words p { font-family: var(--serif); font-size: 21px; line-height: 32px; color: var(--text); transition: color 300ms ease; }
.playing .words p { color: var(--text-2); }
.playing .words p.now { color: var(--text); }

/* The way to the app */
.get { margin-top: 48px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 16px; justify-items: start; }
.get h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 30px; margin: 0; }
.get p { color: var(--text-2); }
.store {
  display: inline-flex; align-items: center; gap: 12px; background: var(--action); color: var(--on-action);
  border-radius: 14px; padding: 10px 22px 10px 18px; min-height: 56px; text-decoration: none;
  font-weight: 600; font-size: 19px; line-height: 22px; white-space: nowrap;
}
.store small { display: block; font-size: 12px; line-height: 14px; font-weight: 500; opacity: 0.75; }
.store svg { width: 26px; height: 26px; flex: none; }
.soon { color: var(--text-2); font-size: 15px; }

.gone { text-align: center; padding-top: 48px; display: grid; gap: 16px; justify-items: center; }
.gone p { color: var(--text-2); }

footer { margin-top: auto; border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 15px; line-height: 20px; color: var(--text-2); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer nav { display: flex; gap: 24px; }
footer a { color: var(--text-2); text-decoration: none; padding: 10px 0; display: inline-block; }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) { .play, .words p { transition: none; } }

/* /prayers: every shared prayer, a card each */
.list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 12px; }
.card { display: grid; gap: 6px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; transition: border-color 150ms ease; }
.card:hover { border-color: #4A4640; }
.card h2 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 28px; margin: 0; }
.card .by { margin: 0; }
.opening { color: #DAD6D0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.more { margin-top: 24px; text-align: center; }
.more a { display: inline-block; padding: 12px 22px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 15px; }
