/* ==========================================================
   MyPreachingPen - shared stylesheet
   Every page links to this one file, so a change here
   changes the whole site. Colors and fonts are set in the
   :root block below; edit those first.
   ========================================================== */

:root {
  --ink: #16213a;        /* header background, main text */
  --paper: #f6f7f9;      /* page background */
  --card: #e6e6e6;       /* button background */
  --line: #d5dae3;       /* borders */
  --accent: #1d4f91;     /* links, hover border */
  --accent-tint: #eef3fa;/* button hover background */
  --nib: #7851A9;        /* purple left edge on buttons */
  --muted: #4a5468;      /* secondary text */

  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

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

/* Keeps content a readable width and centered */
.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  text-align: center;
  color: #fff;
  padding: 2rem 0 1.75rem;
  border-bottom: 4px solid var(--nib);
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.tagline {
  margin: 0.75rem auto 0;
  text-align: center;
  max-width: 40rem;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: #dfe5f1;
}

/* ---------- Main content ---------- */
main { padding: 1.5rem 0 2rem; }

h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.25;
}

.callout {
  background: var(--card);
  text-align: center;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.callout img { width: 5rem; flex-shrink: 0; }
.callout p { margin: 0; }

.updates { margin: 0; padding-left: 1rem; }
.updates li { margin: 0.3rem 0; }

.note {
  color: var(--muted);
  font-size: 1rem;
}
.center { text-align: center; }

.answer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
}
.answer img { width: 9rem; flex-shrink: 0; }
.answer-text {
  flex: 1 1 18rem;
  background: #990000;
  color: #fff;
  padding: 1rem 1.5rem;
}
/* ---------- Panels (the boxes with a purple title bar) ---------- */
.panel {
  border: 1px solid #9a456b;
  margin: 1.5rem 0;
  background: var(--card);
}
.panel-title {
  margin: 0;
  background: #9a456b;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 1.2rem;
}
.panel-body { padding: 1rem 1.25rem; }
.panel-body > :first-child { margin-top: 0; }
.panel-body > :last-child { margin-bottom: 0; }
.indent { margin-left: 2.5rem; }
.indent-list { margin-left: 2.5rem; padding-left: 0; list-style: none; }

.panel-subtitle {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: normal;
}
.panel-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0 2rem;
}
.panel-columns > div > :first-child { margin-top: 0; }
.panel-body h3 {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #9a456b;
}
.panel-body h4 {
  margin: 1rem 0 0.4rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: 0.5rem 0; }


.page-title {
  text-align: center;
  margin: 1.5rem 0 0.5rem;
  font-size: 1.9rem;
  line-height: 1.2;
}
.desc {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}
.reveal { position: relative; display: inline-block; cursor: pointer; }
.reveal img { display: block; }
.reveal img.on {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.reveal:hover img.on,
.reveal:focus img.on { opacity: 1; }

.panel-body a { overflow-wrap: anywhere; }

video { max-width: 100%; height: auto; }

/* ---------- Section buttons ----------
   One column on phones, two on tablets, three on wide
   screens. The grid decides this automatically. */
.buttons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.9rem;
}

.btn {
  display: block;
  height: 100%;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--nib);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s,
              transform 0.15s, box-shadow 0.15s;
}

.btn-title {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--accent);
}

.btn-desc {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Mouse-over (and keyboard focus) effect.
   Touch screens have no hover, so they show the normal state. */
.btn:hover,
.btn:focus-visible {
  background: var(--accent-tint);
  border-color: var(--accent);
  border-left-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(22, 33, 58, 0.15);
}

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

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.25rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
}

.site-footer p { margin: 0; }

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover, .btn:focus-visible { transform: none; }
}

/* ---------- Printing ---------- */
@media print {
  .site-header { background: none; color: #000; border-bottom: 2px solid #000; }
  .tagline { color: #000; }
  .btn { border: 1px solid #000; box-shadow: none; }
}
