/* ============================================================
   Baptism is for Salvation — styles.css
   ============================================================ */

:root {
  --ink: #2b2b2b;
  --ink-soft: #55524a;
  --navy: #1a3a5c;
  --navy-deep: #122b45;
  --accent: #2e7d9a;          /* water blue */
  --accent-soft: #eaf3f6;
  --paper: #fdfcf9;
  --paper-alt: #f5f2ea;
  --card: #ffffff;
  --line: #e3ddd0;
  --header-h: 64px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: 'Segoe UI', system-ui, -apple-system, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  font-family: var(--serif);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 1.06rem;
}

/* ---------------- Header / Nav ---------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 43, 69, 0.97);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-accent {
  color: #9cc7d8;
  font-style: italic;
  font-weight: normal;
}

.site-nav { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-menu a {
  display: block;
  font-family: var(--sans);
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  color: #d7e3ec;
  text-decoration: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-menu a.active {
  background: var(--accent);
  color: #ffffff;
}

/* Hamburger (hidden on desktop) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Sections ---------------- */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 3.5rem 0; }

.section.alt { background: var(--paper-alt); }

.hero {
  background:
    linear-gradient(180deg, rgba(18, 43, 69, 0.035) 0%, rgba(18, 43, 69, 0) 220px),
    var(--paper);
  padding-top: 4rem;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.tagline {
  font-family: var(--sans);
  color: var(--ink-soft);
  font-size: 0.98rem;
  border-left: 4px solid var(--accent);
  padding-left: 0.9rem;
  margin-bottom: 2.25rem;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--navy);
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

h2 em { color: var(--accent); }

h3 {
  font-size: 1.2rem;
  color: var(--navy);
  margin: 2rem 0 0.75rem;
}

.section p { margin-bottom: 1.15rem; }
.section p:last-child { margin-bottom: 0; }

.section > .container > ul,
.section > .container > ol {
  margin: 0 0 1.25rem 1.4rem;
}

.section li { margin-bottom: 0.5rem; }

em { color: inherit; }

strong { color: var(--navy); }

.emphasis-block {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.1rem 1.3rem;
  margin-top: 1.75rem;
}

.ref-list {
  font-size: 1.02rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  line-height: 2;
}

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

.observations {
  margin-top: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.obs-title {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.observations ul { margin-left: 1.25rem; }
.observations li { margin-bottom: 0.45rem; }
.observations li:last-child { margin-bottom: 0; }

/* ---------------- Tables ---------------- */

.table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}

thead th {
  font-family: var(--sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
  color: #ffffff;
  background: var(--navy);
  padding: 0.7rem 0.9rem;
  white-space: nowrap;
}

tbody td {
  padding: 0.65rem 0.9rem;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: #faf8f2; }

tbody td:first-child {
  white-space: nowrap;
  font-weight: bold;
  color: var(--navy);
}

/* ---------------- Scripture links ---------------- */

a.esv-crossref-link,
a.scripture-ref {
  color: var(--accent) !important;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
  cursor: pointer;
}

a.esv-crossref-link:hover,
a.scripture-ref:hover {
  color: var(--navy) !important;
  border-bottom-style: solid;
}

/* ---------------- Fallback scripture tooltip ---------------- */

.scripture-tooltip {
  position: absolute;
  z-index: 200;
  max-width: 380px;
  background: #faf8f2;
  border: 1px solid #d8d2c4;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 0.9rem 1.05rem;
  font-size: 0.92rem;
  line-height: 1.55;
  display: none;
}

.scripture-tooltip.visible { display: block; }

.scripture-tooltip .tip-ref {
  font-family: var(--sans);
  font-weight: bold;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

.scripture-tooltip .tip-text { color: var(--ink); }

.scripture-tooltip .tip-footer {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid #e8e2d4;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: #8a8578;
}

/* ---------------- Footer ---------------- */

.site-footer {
  background: var(--navy-deep);
  color: #c4d3df;
  padding: 2.75rem 0;
  font-size: 0.95rem;
}

.site-footer .container { max-width: 860px; }

.footer-love {
  font-size: 1.05rem;
  color: #e8eff5;
  margin-bottom: 1rem;
}

.footer-contact { margin-bottom: 1.5rem; }

.site-footer a {
  color: #9cc7d8;
  text-decoration: underline;
}

.site-footer a:hover { color: #ffffff; }

/* ESV crossref links in the dark footer need lighter colors */
.site-footer a.esv-crossref-link,
.site-footer a.scripture-ref {
  color: #9cc7d8 !important;
  border-bottom-color: #9cc7d8;
}

.site-footer a.esv-crossref-link:hover,
.site-footer a.scripture-ref:hover { color: #ffffff !important; }

.footer-esv {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #7f95a8;
  margin-bottom: 0.5rem;
}

.footer-copyright {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #7f95a8;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .nav-menu {
    position: absolute;
    top: var(--header-h);
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy-deep);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    display: none;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    padding: 0.8rem 0.75rem;
    font-size: 1rem;
  }

  .section { padding: 2.5rem 0; }
  .hero { padding-top: 2.75rem; }
  body { font-size: 1rem; }

  .scripture-tooltip { max-width: calc(100vw - 2rem); }
}
