/* a238.org — Acts 2:38 exploration site */

:root {
  --wood: #5c4a3a;
  --wood-dark: #3d3028;
  --sage: #5f6f52;
  --sage-light: #7d8f6e;
  --sage-pale: #e8ede3;
  --cream: #f6f2ea;
  --cream-panel: #faf8f4;
  --ink: #2a2724;
  --ink-muted: #5c5852;
  --ink-soft: #7a756d;
  --sky: #8a9bab;
  --gold: #9a7b3c;
  --gold-light: #c4a55a;
  --white: #ffffff;
  --shadow: rgba(42, 39, 36, 0.08);
  --shadow-deep: rgba(42, 39, 36, 0.16);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --max-width: 1120px;
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--sage);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover { color: var(--wood); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.6rem); }

p { margin: 0 0 1rem; }

blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--sage);
  background: var(--sage-pale);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--wood-dark);
}

blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

/* ── Layout ── */

.container {
  width: min(var(--max-width), calc(100% - 2.5rem));
  margin-inline: auto;
}

.section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

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

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

/* ── Navigation ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(92, 74, 58, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  gap: 1.5rem;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wood-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-logo span { color: var(--sage); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--wood-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--wood);
}

/* ── Hero ── */

.hero {
  position: relative;
  padding: clamp(4rem, 12vw, 7rem) 0 clamp(3rem, 8vw, 5rem);
  overflow: hidden;
  background: url('/images/a238_home.png') center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(246, 242, 234, 0.88) 0%,
    rgba(246, 242, 234, 0.82) 40%,
    rgba(232, 237, 227, 0.78) 100%
  );
  z-index: 0;
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1rem;
}

.hero-title {
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--ink-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn--primary {
  background: var(--wood);
  color: var(--white);
  border-color: var(--wood);
}

.btn--primary:hover {
  background: var(--wood-dark);
  border-color: var(--wood-dark);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--wood);
  border-color: var(--wood);
}

.btn--ghost:hover {
  background: var(--wood);
  color: var(--white);
}

/* ── Verse Explorer ── */

.verse-explorer {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 24px var(--shadow), 0 1px 3px var(--shadow);
  overflow: hidden;
  margin-top: 3rem;
}

.verse-explorer-header {
  padding: 2rem 2rem 0;
  border-bottom: 1px solid rgba(92, 74, 58, 0.08);
}

.verse-ref {
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 0.5rem 0;
}

.verse-explorer-header h2 {
  font-size: 1.5rem;
  margin: 0 0 1rem 0;  /* more space after "What shall we do?" before Acts 2:38-39 */
}

.verse-text {
  padding: 0.5rem 2rem 2rem;  /* space between Acts 2:38-39 and the verse quote matches space between Acts 2:37 and h2 */
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  line-height: 1.85;
  color: var(--wood-dark);
}

.verse-phrase {
  display: inline;
  padding: 0.1em 0.15em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  border-bottom: 2px solid transparent;
}

.verse-phrase:hover,
.verse-phrase.is-active {
  background: var(--sage-pale);
  border-bottom-color: var(--sage);
}

.verse-phrase.is-active {
  background: var(--sage-pale);
  box-shadow: 0 0 0 2px var(--sage-light);
}

.verse-detail {
  padding: 0 2rem 2rem;
  min-height: 180px;
}

.verse-detail-panel {
  display: none;
  animation: fadeUp 0.35s ease;
}

.verse-detail-panel.is-visible { display: block; }

.verse-detail-panel h3 {
  color: var(--sage);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.verse-detail-panel .scripture-refs {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(92, 74, 58, 0.1);
}

.verse-detail-panel .scripture-refs dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.35rem;
}

.verse-detail-panel .scripture-refs dd {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--wood);
  font-size: 1rem;
}

.verse-hint {
  padding: 0 2rem 1.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  text-align: center;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cards & Panels ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid rgba(92, 74, 58, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--shadow-deep);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card h3 { color: var(--wood-dark); }

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

.panel {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: 0 2px 16px var(--shadow);
  border: 1px solid rgba(92, 74, 58, 0.06);
}

.panel--invitation {
  border-left: 5px solid var(--gold);
  background: linear-gradient(135deg, var(--white) 0%, var(--cream-panel) 100%);
}

/* ── Timeline ── */

.timeline {
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sage), var(--sage-light), var(--gold-light));
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -2.5rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sage);
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 2px var(--sage-light);
}

.timeline-item h3 { color: var(--wood); }

.timeline-ref {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--sage);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

/* ── Conversion Cards ── */

.conversion-list { display: flex; flex-direction: column; gap: 1rem; }

.conversion-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(92, 74, 58, 0.08);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.conversion-card.is-open {
  box-shadow: 0 4px 20px var(--shadow-deep);
}

.conversion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.conversion-trigger:hover { background: var(--sage-pale); }

.conversion-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.conversion-meta strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--wood-dark);
}

.conversion-meta span {
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.conversion-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--sage-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, background 0.2s ease;
  font-size: 0.75rem;
  color: var(--sage);
}

.conversion-card.is-open .conversion-chevron {
  transform: rotate(180deg);
  background: var(--sage);
  color: var(--white);
}

.conversion-body {
  display: none;
  padding: 0 1.5rem 1.5rem;
  animation: fadeUp 0.3s ease;
}

.conversion-card.is-open .conversion-body {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.pattern-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.pattern-step {
  text-align: center;
  padding: 0.75rem;
  background: var(--sage-pale);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.pattern-step strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.25rem;
}

/* ── Pattern table ── */

.data-table-wrap {
  overflow-x: auto;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: var(--white);
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(92, 74, 58, 0.08);
}

.data-table th {
  background: var(--wood);
  color: var(--white);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-table tr:hover td { background: var(--sage-pale); }

.data-table td:first-child { font-weight: 600; color: var(--wood); }

/* ── Principles list ── */

.principles {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.principles li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.principle-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wood);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

/* ── Book section ── */

.book-showcase {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.book-cover {
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--shadow-deep);
}

/* ── Footer ── */

.site-footer {
  padding: 3rem 0 2rem;
  background: var(--wood-dark);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.site-footer a { color: var(--gold-light); }

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.footer-verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 40ch;
}

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

.footer-copy {
  width: 100%;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
}

/* ── Page header (inner pages) ── */

.page-header {
  padding: clamp(3rem, 8vw, 4.5rem) 0 2rem;
  text-align: center;
}

.page-header p {
  max-width: 55ch;
  margin-inline: auto;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Rich exploration images ── */

.section-image {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0 2rem;
  box-shadow: 0 8px 32px var(--shadow-deep);
  display: block;
}

.conversion-image {
  width: 30%;
  max-width: 30%;
  flex-shrink: 0;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px var(--shadow);
  display: block;
}

.conversion-details {
  flex: 1;
  min-width: 0;
}

.book-extra-image {
  float: left;
  width: 35%;
  max-width: 320px;
  margin-right: 2rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px var(--shadow-deep);
}

.book-text {
  overflow: hidden; /* creates block formatting context so text wraps around the floated image */
}

.contrast-visuals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.contrast-visuals img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px var(--shadow);
  display: block;
}

/* Hero background treatment for all pages */
.page-header {
  background: url('/images/a238_home.png') center / cover no-repeat;
  position: relative;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(246, 242, 234, 0.88) 0%,
    rgba(246, 242, 234, 0.82) 40%,
    rgba(232, 237, 227, 0.78) 100%
  );
  z-index: 0;
}

.page-header .container {
  position: relative;
  z-index: 1;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  html { font-size: 16px; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(92, 74, 58, 0.1);
    box-shadow: 0 8px 24px var(--shadow);
  }

  .nav-links.is-open { display: flex; }

  .verse-text { padding: 1.5rem; }
  .verse-detail { padding: 0 1.5rem 1.5rem; }

  .book-showcase {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-cover { max-width: 180px; margin-inline: auto; }

  .data-table { font-size: 0.75rem; }
  .data-table th, .data-table td { padding: 0.6rem 0.75rem; }

  .conversion-body {
    flex-direction: column;
  }
  .conversion-image {
    width: 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .book-extra-image {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .verse-detail-panel { animation: none; }
}