/*
  docs/style.css — serene landing-page styling (D-04/D-05). Echoes the extension's new-tab
  aesthetic: a calm light/dark gradient, system serif type, AA-contrast text, responsive single
  column. NO third-party fonts (system serif stack only — offline + privacy + zero-cost).
*/

:root {
  /* Light baseline (morning-like): airy, restful, AA-safe text on the lightest stop. */
  --bg: linear-gradient(160deg, #fbf7ef 0%, #f1e9da 100%);
  --text: #2b2620;
  --text-muted: #5b5347;
  --accent: #6b5347;
  --accent-text: #fbf7ef;
  --rule: rgba(91, 83, 71, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark baseline (night-like): deep calm, AA-safe text on the lightest stop. */
    --bg: linear-gradient(160deg, #14161f 0%, #1d2030 100%);
    --text: #ece9e2;
    --text-muted: #b3aea3;
    --accent: #d7c4b3;
    --accent-text: #1d2030;
    --rule: rgba(236, 233, 226, 0.16);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, Cambria,
    'Times New Roman', serif;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.card {
  width: 100%;
  max-width: 38rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.framing {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.prayer {
  margin: 0;
  padding: 0;
  border: 0;
}

.prayer-text {
  margin: 0 0 0.75rem;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.35;
}

.prayer.milestone .prayer-text {
  font-size: clamp(1.9rem, 5.5vw, 2.8rem);
}

.prayer-ref {
  display: block;
  font-style: normal;
  font-size: 1rem;
  color: var(--text-muted);
}

/* "Today's prayer" showcase extras (guided prayer + reflection). Only shown in the today state. */
.today-extra {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 32rem;
  margin: 0 auto;
}

.prayer-body {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text);
}

.reflection {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.note {
  margin: 0 auto;
  max-width: 30rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-style: italic;
  color: var(--text-muted);
  /* Pre-wrap preserves the friend's line breaks; word-break guards a pasted long token.
     Rendering is textContent-only, so no markup can ever be interpreted (D-03). */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cta {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.install {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  text-decoration: none;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.install:hover,
.install:focus-visible {
  transform: translateY(-1px);
  opacity: 0.92;
}

.install:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.cta-sub {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.what-it-is {
  margin: 0.35rem auto 0;
  max-width: 30rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.brand {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.privacy-link {
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
}

.privacy-link:hover,
.privacy-link:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.privacy-link:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

.wordmark {
  text-transform: none;
  letter-spacing: 0.04em;
}

@media (prefers-reduced-motion: reduce) {
  .install {
    transition: none;
  }
}

/* Screen-reader-only utility (mirrors the extension's .visually-hidden pattern). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
