/* ==========================================================================
   Angelquake Ministries — Static site stylesheet
   Palette: warm gold + sand. Typography: Georgia / system sans.
   ========================================================================== */

/* --- CSS reset / box model -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Tokens ----------------------------------------------------------------- */
:root {
  /* Surfaces */
  --color-bg:        #fdf8ef;   /* soft sand cream — body */
  --color-bg-alt:    #f5ecd9;   /* deeper sand — alternating bands */
  --color-card:      #fffbf2;   /* slightly warmer cream — cards */

  /* Ink */
  --color-fg:        #2c2418;   /* warm dark brown */
  --color-muted:     #6b5d4a;   /* warm brown-gray */
  --color-line:      #e6dcc4;   /* soft sand hairline */

  /* Accent gold */
  --color-accent:        #c89824;  /* rich gold */
  --color-accent-dark:   #8b6913;  /* deep gold (hover/active) */
  --color-accent-light:  #e6c45c;  /* yellow gold (highlights, ornaments) */
  --color-accent-soft:   rgba(200, 152, 36, 0.18);  /* subtle gold tint */

  /* System */
  --max-width: 1100px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(60, 40, 0, .06);
  --shadow-md: 0 6px 18px rgba(140, 100, 20, .12);
  --shadow-gold: 0 8px 26px rgba(200, 152, 36, .18);
  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --- Base typography -------------------------------------------------------- */
body {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-fg);
  background: var(--color-bg);
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-fg);
}
h1 { font-size: 2.4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.125rem; }

p { margin: 0 0 1rem; }
a { color: var(--color-accent-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover, a:focus { color: var(--color-accent); }

/* --- Section divider ornament (replaces plain <hr>) ------------------------ */
hr {
  border: 0;
  height: 1.5rem;
  margin: 2.5rem 0;
  position: relative;
  background-image: linear-gradient(
    to right,
    transparent 0,
    var(--color-line) 25%,
    var(--color-line) 75%,
    transparent 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 50%;
}
hr::after {
  content: "◆";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  background: var(--color-bg);
  padding: 0 0.75rem;
  color: var(--color-accent);
  font-size: 0.8rem;
}

/* --- Skip link / a11y ------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-accent); color: #fff;
  padding: 0.5rem 1rem; z-index: 1000;
  font-family: var(--font-sans);
}
.skip-link:focus { left: 0; }

/* --- Header / hero band ---------------------------------------------------- */
.site-header { position: relative; }

.hero-band {
  position: relative;
  background:
    radial-gradient(ellipse at top, var(--color-bg-alt) 0%, var(--color-bg) 65%),
    var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  padding: 2.25rem 1rem 1.75rem;
  overflow: hidden;
}
/* Subtle paper-grain effect via two faint radial gradients (no image needed) */
.hero-band::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 30%, var(--color-accent-soft) 0, transparent 35%),
    radial-gradient(circle at 88% 70%, var(--color-accent-soft) 0, transparent 35%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-band > * { position: relative; }

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

/* Logo + title lockup: stacked on mobile, side-by-side on desktop */
.site-header__lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.site-header__logo { margin: 0; }
.site-header__logo img {
  width: 120px; height: auto;
  border-radius: 50%;
  box-shadow: var(--shadow-gold);
  border: 3px solid #fff;
}
.site-header__titles { text-align: center; }

.site-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 2.25rem;
  letter-spacing: -0.01em;
  margin: 0.25rem 0 0.1rem;
  color: var(--color-fg);
}
.site-title a { color: inherit; text-decoration: none; }
.site-title a:hover { color: var(--color-accent-dark); }

.site-tagline {
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-muted);
  margin: 0 0 0.25rem;
}

/* Verse as feature quote */
.site-verse {
  max-width: 580px;
  margin: 1.25rem auto 0.5rem;
  padding: 1.1rem 1.5rem;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px rgba(140, 100, 20, .08);
  position: relative;
  font-style: italic;
  color: var(--color-fg);
  font-size: 1rem;
  line-height: 1.55;
}
.site-verse::before,
.site-verse::after {
  content: "◆";
  display: block;
  text-align: center;
  color: var(--color-accent);
  font-size: 0.7rem;
  letter-spacing: 1.5em;
  margin-left: 1.5em;   /* offset for letter-spacing */
}
.site-verse::before {
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-line);
  padding-bottom: 0.6rem;
}
.site-verse::after {
  margin-top: 0.75rem;
  border-top: 1px solid var(--color-line);
  padding-top: 0.6rem;
}
.site-verse em {
  display: block;
  font-style: italic;
  font-family: var(--font-serif);
}

/* --- Primary navigation ----------------------------------------------------- */
.nav-toggle {
  display: none;
  background: var(--color-accent);
  color: #fff;
  border: 0;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font: inherit;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  margin: 1rem auto;
}
.nav-toggle:hover { background: var(--color-accent-dark); }

.primary-nav {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
}
.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1rem;
}
.primary-nav__list > li { position: relative; }
.primary-nav a {
  display: block;
  text-decoration: none;
  color: var(--color-fg);
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a[aria-current="page"] {
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  border-color: var(--color-accent-soft);
}

.has-submenu > a::after {
  content: "▾";
  margin-left: 0.35rem;
  font-size: 0.75rem;
  color: var(--color-muted);
}
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--color-line);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 240px;
  padding: 0.25rem 0;
  z-index: 10;
}
.submenu li a { padding: 0.55rem 1rem; border-radius: 0; }
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.is-open > .submenu { display: block; }

/* --- Main / layout ---------------------------------------------------------- */
.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
}
.page-title { margin-top: 0; }

/* Generic content prose */
.prose img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin: 1.25rem auto;
}
.prose figure { margin: 1.5rem 0; text-align: center; }
.prose figcaption {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-style: italic;
}
.prose ul:not(.plain) {
  list-style: disc;
  padding-left: 1.4rem;
  margin: 0 0 1rem;
}
.prose ol {
  list-style: decimal;
  padding-left: 1.6rem;
  margin: 0 0 1rem;
}
.prose ul li, .prose ol li { margin-bottom: 0.4rem; }

/* --- Hero / featured image -------------------------------------------------- */
.hero {
  text-align: center;
  margin: 1rem auto 2rem;
}
.hero img {
  max-height: 520px;
  width: auto;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-gold);
}

/* --- Homepage two-column hero --------------------------------------------- */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
  margin: 0 0 1.5rem;
}
.home-hero__text > h1 { margin-top: 0; }
.home-hero__text > p:last-child { margin-bottom: 0; }
.home-hero__image { margin: 0; }
.home-hero__image img {
  max-height: 520px;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-gold);
  margin: 0;
}
@media (max-width: 768px) {
  .home-hero { grid-template-columns: 1fr; gap: 1.5rem; }
  .home-hero__image img { max-height: 420px; }
}

/* --- Card grid (presentations + books) ------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.card {
  background: var(--color-card);
  border: 1px solid var(--color-accent-soft);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
/* Gold ribbon across the top of every card */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, var(--color-accent-light), var(--color-accent), var(--color-accent-dark));
  opacity: 0.6;
  transition: opacity .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-gold);
  border-color: var(--color-accent);
}
.card:hover::before { opacity: 1; }

.card__img-wrap {
  text-align: center;
  margin-bottom: 1rem;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__img-wrap img {
  max-height: 220px;
  width: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.card h3 { margin-top: 0.25rem; font-size: 1.25rem; }
.card h3 a { text-decoration: none; color: var(--color-fg); }
.card h3 a:hover { color: var(--color-accent-dark); }
.card p { color: var(--color-fg); }
.card .btn { margin-top: auto; align-self: flex-start; }

/* --- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 2px 0 var(--color-accent-dark);
}
.btn:hover, .btn:focus {
  background: var(--color-accent-dark);
  color: #fff;
  box-shadow: 0 1px 0 var(--color-accent-dark);
  transform: translateY(1px);
}
.btn--ghost {
  background: transparent;
  color: var(--color-accent-dark);
  border: 1px solid var(--color-accent);
  box-shadow: none;
}
.btn--ghost:hover, .btn--ghost:focus {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 0 var(--color-accent-dark);
}

/* --- Two-column row (image + text), used on book pages --------------------- */
.split {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 2rem;
  align-items: start;
  margin: 1.5rem 0 2rem;
}
.split img { width: 100%; box-shadow: var(--shadow-md); }
@media (max-width: 640px) {
  .split { grid-template-columns: 1fr; }
  .split img { max-width: 240px; margin: 0 auto; }
}

/* --- Section bands (alternating sand backgrounds for long pages) ----------- */
/* Apply .band to break out of the prose container with a colored backdrop. */
.band {
  background: var(--color-bg-alt);
  margin-left: calc(-1 * (50vw - 50%));
  margin-right: calc(-1 * (50vw - 50%));
  padding-left: calc(50vw - 50%);
  padding-right: calc(50vw - 50%);
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  margin-top: 2rem;
  margin-bottom: 2rem;
}
.band > h2:first-child { margin-top: 0; }

/* --- Blockquote / testimonial ---------------------------------------------- */
blockquote {
  position: relative;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.5rem 1.25rem 3.25rem;
  margin: 1.75rem 0;
  font-style: italic;
  box-shadow: var(--shadow-sm);
}
/* Decorative open-quote glyph in light gold */
blockquote::before {
  content: "\201C";          /* left double quotation mark */
  position: absolute;
  top: -0.25rem;
  left: 0.6rem;
  font-family: Georgia, serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-accent-light);
  opacity: 0.65;
  font-style: normal;
  pointer-events: none;
}
blockquote p { margin: 0 0 0.75rem; }
blockquote p:last-of-type { margin-bottom: 0.5rem; }
blockquote cite,
blockquote .source {
  display: block;
  margin-top: 0.85rem;
  padding-top: 0.6rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-family: var(--font-sans);
  border-top: 1px solid var(--color-accent-soft);
}

/* On testimonials page, alternate the blockquote backgrounds for rhythm */
.prose blockquote:nth-of-type(even) {
  background: var(--color-bg-alt);
}

/* --- Video embeds (responsive 16:9) ---------------------------------------- */
.video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  margin: 1.25rem 0 0.5rem;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-gold);
}
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Click-to-play YouTube facade (loads iframe only on user click) */
.yt-lite__btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.yt-lite__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0 !important;        /* override .prose img margin */
  border-radius: 0 !important; /* override .prose img radius */
  box-shadow: none !important;
  transition: transform .25s ease, opacity .2s ease;
}
.yt-lite__btn:hover .yt-lite__thumb,
.yt-lite__btn:focus .yt-lite__thumb {
  transform: scale(1.04);
  opacity: 0.92;
}
.yt-lite__play {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  height: 60px;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 14px;
  pointer-events: none;
  transition: background-color .2s ease;
}
.yt-lite__play::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-40%, -50%);
  border: 12px solid transparent;
  border-left-color: #fff;
  border-right: 0;
}
.yt-lite__btn:hover .yt-lite__play,
.yt-lite__btn:focus .yt-lite__play {
  background: var(--color-accent);
}

/* --- Footer ---------------------------------------------------------------- */
.site-footer {
  background: var(--color-bg-alt);
  border-top: 3px solid var(--color-accent);
  padding: 2.5rem 1rem 2rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-muted);
  margin-top: 3rem;
}
.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-footer__logo { margin: 0 0 0.5rem; }
.site-footer__logo img {
  width: 64px; height: auto;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  border: 2px solid #fff;
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin: 1rem 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.site-footer__nav a { text-decoration: none; color: var(--color-accent-dark); }
.site-footer__nav a:hover { text-decoration: underline; color: var(--color-accent); }
.site-footer small { display: block; margin-top: 0.5rem; color: var(--color-muted); }

/* --- Responsive: mobile nav ------------------------------------------------- */
@media (min-width: 769px) {
  /* Desktop logo + title lockup goes horizontal */
  .site-header__lockup {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    text-align: left;
  }
  .site-header__titles { text-align: left; }
  .site-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.45rem; }
  .site-title { font-size: 1.65rem; }
  .site-header__logo img { width: 90px; }

  .nav-toggle { display: inline-block; }
  .primary-nav__list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .primary-nav__list.is-open { display: flex; }
  .primary-nav__list > li { width: 100%; border-top: 1px solid var(--color-line); }
  .primary-nav a { padding: 0.85rem 1rem; }

  .submenu {
    position: static;
    box-shadow: none;
    border: 0;
    border-top: 1px dashed var(--color-line);
    background: var(--color-bg-alt);
    padding-left: 1rem;
    min-width: 0;
    border-radius: 0;
  }
  .has-submenu.is-open > .submenu { display: block; }

  blockquote { padding: 1.25rem 1.25rem 1rem 2.5rem; }
  blockquote::before { font-size: 3.5rem; left: 0.4rem; top: -0.1rem; }
}

@media print {
  .primary-nav, .nav-toggle, .site-footer__nav, .hero-band::before { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
  .card { break-inside: avoid; box-shadow: none; }
}
