/* Bible in Your Day: one stylesheet, no JavaScript. Palette from branding/bible-in-your-day/GUIDE.md. */

@font-face {
  font-family: "DM Serif Display";
  src: url("DMSerifDisplay-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #F9F5ED;
  --text: #243D32;
  --muted: #55675D;
  --rule: rgba(36, 61, 50, 0.16);
  --accent: #B99A60;
  --link-line: #8A6E30;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --column: 42.5rem;
  --gutter: max(1.25rem, env(safe-area-inset-left));
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14261E;
    --text: #F9F5ED;
    --muted: #B7C2B9;
    --rule: rgba(249, 245, 237, 0.18);
    --link-line: #B99A60;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.7 var(--sans);
  overflow-wrap: break-word;
}

main, .site-header, .site-footer {
  width: min(var(--column), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

main { flex: 1; padding-block: 2.5rem 4rem; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.25rem;
  border-bottom: 1px solid var(--rule);
}
/* The logo file has clear space around the artwork; pull it back so the mark lines up with the text column. */
.brand { --logo-width: 9.5rem; display: block; flex: none; margin-left: calc(var(--logo-width) * -0.085); line-height: 0; text-decoration: none; }
.brand img { display: block; width: var(--logo-width); height: auto; }
.site-header nav { display: flex; gap: 1.25rem; font-size: 0.9375rem; }
.site-header nav a { text-decoration: none; padding-block: 0.25rem; border-bottom: 2px solid transparent; }
.site-header nav a:hover { border-bottom-color: var(--accent); }
.site-header nav a[aria-current="page"] { border-bottom-color: var(--accent); }

/* Text */
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.2; letter-spacing: 0.005em; }
h1 { margin: 0 0 1.25rem; font-size: clamp(2.125rem, 6vw + 0.5rem, 2.875rem); }
h2 { margin: 2.75rem 0 0.75rem; font-size: 1.625rem; }
p, ul { margin: 0 0 1.1em; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.5em; padding-left: 0.25rem; }
li::marker { color: var(--accent); }
strong { font-weight: 600; }
.meta { margin-top: -0.5rem; font-size: 0.9375rem; color: var(--muted); }

/* Data table: three columns on wide screens, stacked cards on narrow ones (no horizontal scroll). */
.data { width: 100%; margin: 1.5rem 0; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.55; }
.data th, .data td { padding: 0.9rem 1rem 0.9rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.data thead th { padding-top: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.data tbody th { width: 22%; font-weight: 600; }
.data td:last-child { padding-right: 0; }

/* Home */
.page-index main { padding-top: 3.5rem; }
.hero { text-align: center; }
.hero .app-icon {
  display: block;
  width: 7rem;
  height: 7rem;
  margin: 0 auto 1.75rem;
  border-radius: 22.37%;
  box-shadow: 0 0 0 1px var(--rule), 0 12px 32px -12px rgba(20, 38, 30, 0.45);
}
.hero h1 { margin-bottom: 0.25rem; }
.hero .tagline { margin-bottom: 1.5rem; font: 1.375rem/1.4 var(--serif); color: var(--muted); }
.hero .lede { margin-inline: auto; max-width: 34rem; text-align: left; }
.hero .store { margin-top: 2rem; }
.coming-soon {
  display: inline-block;
  margin: 0;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
}
.store-badge { display: inline-block; line-height: 0; text-decoration: none; }
.store-badge img { display: block; width: 8.25rem; height: auto; }

.features { margin: 3rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.features li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.features li::marker { content: none; }
.features h2 { margin: 0; font-size: 1.375rem; }
.features p { margin: 0; }
.fine { margin-top: 2rem; font-size: 0.9375rem; color: var(--muted); }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-block: 1.5rem 2.5rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }

@media (max-width: 44rem) {
  .data, .data tbody, .data tr, .data th, .data td { display: block; width: auto; }
  .data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .data tr { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
  .data tr:first-child { padding-top: 0; }
  .data th, .data td { padding: 0; border: 0; }
  .data tbody th { width: auto; margin-bottom: 0.25rem; font-size: 1.0625rem; }
  .data td::before { content: attr(data-label); display: block; margin-top: 0.6rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
}

@media (max-width: 30rem) {
  main { padding-block: 2rem 3rem; }
  .brand { --logo-width: 7.5rem; }
  .site-header nav { gap: 1rem; font-size: 0.875rem; }
  .features li { grid-template-columns: 1fr; }
}
