/* Faith Minute — the public site.
 *
 * Three pages share this file: the landing page, the privacy policy and the
 * terms. The palette and the type are lifted from the app itself
 * (src/theme/colors.ts, src/theme/typography.ts) so someone arriving from the
 * App Store listing recognises where they are.
 *
 * Both themes are here for the same reason the app has both: the phone that
 * opens the "Privacy Policy" link at the foot of the sign-up screen is very
 * often in dark mode, and a page that flashes cream is jarring.
 */

:root {
  color-scheme: light dark;

  --background: #fbf8f3;
  --surface: #ffffff;
  --sand: #f3dec4;
  --border: #dcd6cc;
  --text: #221f1a;
  --text-secondary: #6e6c67;
  --text-muted: #9c948a;
  --accent: #d98c4a;
  --callout: #fdf6ee;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1a1817;
    --surface: #221f1a;
    --sand: #2f2b28;
    --border: #322d27;
    --text: #fcf9f6;
    --text-secondary: #9c948e;
    --text-muted: #8a837d;
    --accent: #7c90b8;
    --callout: #23272f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0 1.5rem 5rem;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
}

/* ---- masthead ---------------------------------------------------------- */

header.masthead {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 0 0;
}

header.masthead img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
}

header.masthead a {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* ---- type -------------------------------------------------------------- */

h1 {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 3rem 0 0.5rem;
}

h2 {
  font-family: Fraunces, Georgia, 'Times New Roman', serif;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 3rem 0 0.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.35rem;
}

p,
li {
  color: var(--text-secondary);
}

h1 + p.lede {
  color: var(--text);
  font-size: 1.15rem;
  margin-top: 0;
}

p.updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0 0 2.5rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

strong {
  color: var(--text);
  font-weight: 600;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ---- table ------------------------------------------------------------- */

.scroll {
  overflow-x: auto;
  margin: 1.25rem 0;
}

table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 1rem 0.7rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

th {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}

/* ---- callout ----------------------------------------------------------- */

.callout {
  background: var(--callout);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.callout p {
  margin: 0;
}

/* A placeholder that must not survive to production. Loud on purpose. */
.todo {
  background: #ffe08a;
  color: #221f1a;
  font-weight: 600;
  padding: 0.05em 0.35em;
  border-radius: 0.2em;
}

/* ---- footer ------------------------------------------------------------ */

footer {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-secondary);
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
}

/* ---- landing page ------------------------------------------------------ */

.hero {
  padding: 4rem 0 1rem;
  text-align: center;
}

.hero img.mark {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.25rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-top: 0;
}

.hero p {
  font-size: 1.15rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.pill {
  display: inline-block;
  background: var(--sand);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-top: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin: 3.5rem 0 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 1.5rem;
}

.card h3 {
  margin-top: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.card p {
  margin-bottom: 0;
  font-size: 0.9375rem;
}
