/* =========================================================================
   Irving Park United Methodist Church
   Editorial heritage theme — white canvas, near-black serif, oxblood accent
   PT Serif throughout, full-bleed parallax heroes, square corners, dark footer
   ========================================================================= */

:root {
  --ink: #171717;
  --ink-soft: #222222;
  --paper: #ffffff;
  --paper-warm: #f6f4f0;
  --paper-warm-2: #efebe4;
  --line: #e3ddd2;
  --muted: #5c5751;
  --accent: #7b2d26;        /* deep liturgical oxblood red */
  --accent-dark: #5e211c;
  --accent-tint: #f3e7e5;
  --overlay: rgba(20, 18, 17, 0.55);
  --overlay-strong: rgba(20, 18, 17, 0.7);
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --maxw: 1180px;
  --readw: 760px;
  --shadow: 0 18px 50px rgba(23, 23, 23, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin-top: 1.6em; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); margin-top: 1.4em; }
p { margin: 0 0 1.25em; }
ul, ol { margin: 0 0 1.4em; padding-left: 1.3em; }
li { margin-bottom: .55em; }
strong { color: var(--ink); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---- Accessibility ---- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--ink); color: #fff; padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

/* =========================================================================
   HEADER — transparent over hero, turns solid on scroll
   ========================================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .35s ease, box-shadow .35s ease, border-color .35s ease;
  border-bottom: 1px solid transparent;
}
.site-header .header-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 28px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  border: 2px solid currentColor; color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 1.25rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 1.12rem; font-weight: 700; color: #fff; letter-spacing: .01em; }
.brand-sub { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: rgba(255,255,255,.82); }

.nav-toggle {
  display: none; background: none; border: 0; color: #fff;
  font-size: 1.5rem; cursor: pointer; padding: 6px;
}

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 9px 14px; color: #fff;
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a[aria-current="page"] {
  color: #fff; text-decoration: none; border-bottom-color: #fff;
}

/* scrolled / solid header (also used on interior non-hero pages via .header-solid) */
.site-header.scrolled, .site-header.header-solid {
  background: var(--paper);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(23,23,23,.06);
}
.site-header.scrolled .brand-mark,
.header-solid .brand-mark { color: var(--accent); border-color: var(--accent); }
.site-header.scrolled .brand-name,
.header-solid .brand-name { color: var(--ink); }
.site-header.scrolled .brand-sub,
.header-solid .brand-sub { color: var(--muted); }
.site-header.scrolled .main-nav a,
.header-solid .main-nav a { color: var(--ink-soft); }
.site-header.scrolled .main-nav a:hover,
.site-header.scrolled .main-nav a[aria-current="page"],
.header-solid .main-nav a:hover,
.header-solid .main-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.site-header.scrolled .nav-toggle,
.header-solid .nav-toggle { color: var(--ink); }

/* =========================================================================
   HERO — full-bleed parallax image with overlay
   ========================================================================= */
.hero {
  position: relative; min-height: 78vh;
  display: flex; align-items: flex-end;
  color: #fff; overflow: hidden;
}
.hero.hero-tall { min-height: 88vh; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  background-attachment: fixed;            /* parallax */
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,17,.35) 0%, rgba(20,18,17,.25) 40%, var(--overlay-strong) 100%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 0 28px 72px;
}
.hero-eyebrow {
  display: inline-block; font-size: .76rem; letter-spacing: .26em;
  text-transform: uppercase; color: rgba(255,255,255,.9);
  border-top: 2px solid rgba(255,255,255,.7); padding-top: 12px; margin-bottom: 18px;
}
.hero h1 { color: #fff; max-width: 14ch; margin-bottom: .35em; }
.hero-lead { font-size: 1.25rem; max-width: 60ch; color: rgba(255,255,255,.94); margin-bottom: 1.4em; }

/* page (interior) hero is shorter */
.hero.hero-page { min-height: 62vh; }

/* =========================================================================
   BUTTONS — square, solid fill
   ========================================================================= */
.btn {
  display: inline-block; font-family: var(--serif); font-weight: 700;
  font-size: .82rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 16px 30px; border: 2px solid var(--accent);
  background: var(--accent); color: #fff; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-dark:hover { background: #000; border-color: #000; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* =========================================================================
   SECTIONS
   ========================================================================= */
.section { padding: 88px 0; }
.section.tight { padding: 64px 0; }
.section.warm { background: var(--paper-warm); }
.section.ink { background: var(--ink); color: #d9d4cc; }
.section.ink h1, .section.ink h2, .section.ink h3 { color: #fff; }
.section.ink a { color: #e7b3ad; }
.section.ink a:hover { color: #fff; }

.section-head { max-width: var(--readw); margin: 0 auto 48px; text-align: center; }
.section-head .kicker {
  display: inline-block; font-size: .76rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.rule {
  width: 56px; height: 3px; background: var(--accent);
  border: 0; margin: 0 0 26px;
}
.rule.center { margin-left: auto; margin-right: auto; }

/* ---- Readable prose column (interior pages) ---- */
.prose { max-width: var(--readw); margin: 0 auto; }
.prose img { margin: 2.2em auto; box-shadow: var(--shadow); }
.prose h2:first-child, .prose h1:first-child { margin-top: 0; }
.prose .figure { margin: 2.4em auto; }
.prose .figure figcaption {
  font-size: .85rem; color: var(--muted); text-align: center;
  margin-top: .7em; font-style: italic;
}
.prose .lead-figure { margin: 1.6em auto 2.4em; }
.prose .lead-figure img { width: 100%; }
.lead { font-size: 1.25rem; color: var(--ink-soft); }

/* drop-cap on first paragraph of prose */
.prose > p:first-of-type::first-letter {
  font-size: 3.4em; line-height: .82; float: left;
  padding: 6px 12px 0 0; color: var(--accent); font-weight: 700;
}

/* =========================================================================
   FEATURE GRID (homepage cards)
   ========================================================================= */
.grid { display: grid; gap: 32px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line);
  display: flex; flex-direction: column; height: 100%;
}
.card .card-media { aspect-ratio: 3 / 2; overflow: hidden; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card .card-body { padding: 28px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 .5em; }
.card p { color: var(--muted); font-size: 1rem; margin-bottom: 1.3em; }
.card .card-link {
  margin-top: auto; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 700; color: var(--accent);
}
.card .card-link i { transition: transform .2s ease; }
.card:hover .card-link i { transform: translateX(4px); }

.icon-circle {
  width: 56px; height: 56px; border: 2px solid var(--accent); color: var(--accent);
  display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 20px;
}

/* ---- two-column split (image + text) ---- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.flip .split-media { order: 2; }
.split-media img { width: 100%; box-shadow: var(--shadow); }
.split-text h2 { margin-top: 0; }

/* ---- quote / scripture band ---- */
.scripture {
  text-align: center; max-width: 840px; margin: 0 auto;
  font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.5; color: #fff;
  font-style: italic;
}
.scripture cite { display: block; font-style: normal; font-size: .95rem; letter-spacing: .2em;
  text-transform: uppercase; margin-top: 22px; color: rgba(255,255,255,.7); }

/* ---- info chips (transit / quick facts) ---- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.fact { border-left: 3px solid var(--accent); padding: 6px 0 6px 20px; }
.fact .fact-k { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.fact .fact-v { font-size: 1.05rem; color: var(--ink-soft); }

/* =========================================================================
   PAGE INTRO (interior pages without a photo hero use this)
   ========================================================================= */
.page-banner {
  background: var(--ink); color: #fff; padding: 150px 0 70px; text-align: center;
}
.page-banner h1 { color: #fff; }
.page-banner .crumb { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 18px; }
.page-banner .crumb a { color: rgba(255,255,255,.8); }

/* breadcrumb under photo hero pages */
.subnav { background: var(--paper-warm); border-bottom: 1px solid var(--line); }
.subnav .container { display: flex; gap: 10px; padding-top: 14px; padding-bottom: 14px; font-size: .82rem; color: var(--muted); }
.subnav a { color: var(--muted); }
.subnav a:hover { color: var(--accent); }

/* related links block */
.related { border-top: 1px solid var(--line); margin-top: 56px; padding-top: 40px; }
.related h3 { margin-top: 0; }
.related-links { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; padding: 0; margin: 0; }
.related-links a {
  display: inline-block; border: 1px solid var(--line); padding: 10px 18px;
  font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft);
}
.related-links a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* =========================================================================
   CTA band
   ========================================================================= */
.cta-band { background: var(--accent); color: #fff; text-align: center; padding: 76px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); font-size: 1.15rem; max-width: 60ch; margin: 0 auto 1.6em; }

/* =========================================================================
   FOOTER — dark
   ========================================================================= */
.site-footer { background: var(--ink); color: #b7b1a8; padding: 72px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer a { color: #c9c3ba; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand-name-f { font-size: 1.3rem; color: #fff; font-weight: 700; margin-bottom: 14px; }
.footer-brand p { font-size: .98rem; line-height: 1.7; max-width: 38ch; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 56px; padding: 26px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-size: .82rem; color: #8a847b;
}
.footer-note { font-size: .8rem; color: #7c766d; max-width: 60ch; margin-top: 6px; }

/* =========================================================================
   404
   ========================================================================= */
.error-wrap { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 140px 0 80px; }
.error-wrap .big { font-size: clamp(4rem, 16vw, 9rem); color: var(--accent); line-height: 1; margin-bottom: .1em; }

/* =========================================================================
   AOS-lite (in case AOS CDN is blocked, content still shows)
   ========================================================================= */
[data-aos] { opacity: 1; }   /* progressive enhancement only */

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
  body { font-size: 18px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .split-media { order: 0; }
  .facts { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 80vh; box-shadow: 0 14px 30px rgba(0,0,0,.12); }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { color: var(--ink-soft); padding: 13px 28px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; }
  .main-nav a:hover, .main-nav a[aria-current="page"] { border-bottom-color: var(--line); border-left-color: var(--accent); color: var(--accent); }
  /* on mobile the menu is always on a solid surface, so brand stays light only over hero */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-bg { background-attachment: scroll; }  /* iOS parallax fix */
}

@media (max-width: 560px) {
  .container, .hero-inner, .header-inner, .site-header .header-inner { padding-left: 20px; padding-right: 20px; }
  .section { padding: 60px 0; }
  .brand-sub { display: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { background-attachment: scroll; }
  * { transition: none !important; }
}
