/* AllSermon — "Warm & Sacred". Palette mirrors src/theme/tokens.ts in the app. */

:root {
  --paper: #f0e8da;
  --card: #fbf6ec;
  --ink: #2a2118;
  --ink-soft: #3a2f22;
  --ink-muted: #7a6a4e;
  --gold: #d9a94e;
  --gold-deep: #b5893a;
  --teal: #2f6b6b;
  --on-ink: #fdf6ea;
  --on-ink-muted: #e9d4a6;
  --hairline: rgba(42, 33, 24, 0.1);
  --ink06: rgba(42, 33, 24, 0.06);

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ───────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

main {
  padding: 8px 0 72px;
}

/* ── Header ───────────────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.2px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
}

nav.site {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

nav.site a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 15px;
}

nav.site a:hover,
nav.site a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  padding: 72px 0 8px;
  text-align: center;
}

.hero img.mark {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  margin-bottom: 26px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 7vw, 56px);
  line-height: 1.1;
  letter-spacing: -1px;
  color: var(--ink);
  margin: 0 0 18px;
}

.hero p.lede {
  font-family: var(--serif);
  font-size: clamp(19px, 2.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 34em;
  margin: 0 auto;
}

.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 18px;
}

/* ── Typography ───────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  font-family: var(--serif);
  color: var(--ink);
  letter-spacing: -0.3px;
}

.page-title {
  font-size: clamp(32px, 5.5vw, 42px);
  line-height: 1.15;
  margin: 56px 0 10px;
}

h2 {
  font-size: 25px;
  line-height: 1.3;
  margin: 46px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

h3 {
  font-size: 19px;
  margin: 30px 0 8px;
}

p,
li {
  max-width: var(--measure);
}

a {
  color: var(--teal);
  text-underline-offset: 2px;
}

a:hover {
  color: var(--gold-deep);
}

ul {
  padding-left: 22px;
}

li {
  margin: 9px 0;
}

li::marker {
  color: var(--gold);
}

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

.updated {
  font-size: 14px;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

/* ── Components ───────────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin: 28px 0;
}

.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.callout {
  border-left: 3px solid var(--gold);
  background: var(--card);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin: 28px 0;
}

.callout > :last-child {
  margin-bottom: 0;
}

.callout > :first-child {
  margin-top: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin: 34px 0;
}

.grid .card {
  margin: 0;
}

.grid p {
  margin-bottom: 0;
  font-size: 16px;
}

.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--gold-deep);
  color: var(--on-ink);
}

.btn-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 38px 0 12px;
}

/* Data-practice table */

.table-scroll {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15.5px;
  background: var(--card);
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}

th {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--ink06);
}

tr:last-child td {
  border-bottom: none;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--hairline);
  padding: 34px 0 56px;
  font-size: 15px;
  color: var(--ink-muted);
}

footer.site .wrap {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

footer.site nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site a {
  color: var(--ink-muted);
  text-decoration: none;
}

footer.site a:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* ── A11y ─────────────────────────────────────────────────────────────── */

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 24px;
  top: 12px;
  position: fixed;
  z-index: 10;
  background: var(--ink);
  color: var(--on-ink);
  padding: 10px 18px;
  border-radius: 8px;
}

@media (max-width: 560px) {
  body {
    font-size: 16.5px;
  }
  .hero {
    padding-top: 52px;
  }
  header.site .wrap {
    justify-content: center;
  }
}
