/* Knob Prairie United Church of Christ | Flint & Flux */
:root {
  --maroon: #8e2a33;
  --maroon-dark: #6e1f27;
  --gold: #a8722a;
  --gold-soft: #e9d6b4;
  --cream: #f8f2e8;
  --paper: #fffdf9;
  --ink: #2d211d;
  --muted: #6b5b54;
  --line: #e6dccd;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(45, 33, 29, .08);
  --wrap: 1120px;
  --serif: "Cinzel", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-underline-offset: 3px; }
a:hover { color: var(--maroon-dark); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--maroon); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 249, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--maroon); line-height: 1.1; }
.brand-name { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; letter-spacing: .02em; }
.brand-sub { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 14px; border-radius: 6px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--maroon); background: var(--cream); }
.nav .nav-cta { background: var(--maroon); color: #fff; margin-left: 6px; }
.nav .nav-cta:hover { background: var(--maroon-dark); color: #fff; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 46px; height: 46px; font-size: 1.25rem; color: var(--maroon); cursor: pointer; }

@media (max-width: 860px) {
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: 8px 16px 16px; }
  .nav a { padding: 14px 12px; font-size: 1.05rem; }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
  .brand-name { font-size: 1.05rem; }
}

/* Hero */
.hero { position: relative; color: #fff; background: var(--ink); overflow: hidden; }
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(45,33,29,.15), rgba(45,33,29,.75)); }
.hero .wrap { position: relative; z-index: 1; padding: clamp(80px, 14vw, 150px) 0 clamp(56px, 8vw, 90px); }
.hero h1 { color: #fff; max-width: 18ch; }
.hero p.lead { font-size: 1.2rem; max-width: 52ch; color: #f4ebe0; }
.hero-sm .wrap { padding: clamp(64px, 10vw, 110px) 0 clamp(40px, 6vw, 64px); }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: var(--gold-soft); margin-bottom: 14px; }
.section .eyebrow { color: var(--gold); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 13px 22px; border-radius: 8px; font-weight: 700; text-decoration: none; border: 2px solid transparent; cursor: pointer; font-size: 1rem; font-family: var(--sans); }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-dark); color: #fff; }
.btn-light { background: #fff; color: var(--maroon); }
.btn-light:hover { background: var(--cream); color: var(--maroon-dark); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Service strip */
.times { background: var(--maroon); color: #fff; }
.times .wrap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.times .t { padding: 24px 20px; border-right: 1px solid rgba(255,255,255,.18); display: flex; gap: 14px; align-items: flex-start; }
.times .t:last-child { border-right: 0; }
.times i { font-size: 1.4rem; color: var(--gold-soft); margin-top: 4px; }
.times strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.times span { color: #f2e2df; font-size: .97rem; }
@media (max-width: 760px) {
  .times .wrap { grid-template-columns: 1fr; }
  .times .t { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); padding: 18px 4px; }
  .times .t:last-child { border-bottom: 0; }
}

/* Sections */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--cream); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-inline: auto; }
.rule { width: 56px; height: 3px; background: var(--gold); border: 0; margin: 0 0 22px; }
.center .rule { margin-inline: auto; }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.split.even { grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 860px) { .split, .split.even { grid-template-columns: 1fr; } .sticky { position: static; } }

.letter p { font-size: 1.08rem; }
.letter .sig { font-family: var(--serif); color: var(--maroon); font-size: 1.15rem; margin-top: 1.4em; }
.portrait { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.portrait figcaption { background: var(--cream); padding: 14px 18px; font-size: .95rem; color: var(--muted); }
.sticky { position: sticky; top: 104px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; }
.section-alt .card { background: #fff; }
.card i.ic { font-size: 1.6rem; color: var(--maroon); margin-bottom: 14px; display: block; }
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card .when { color: var(--maroon); font-weight: 700; }

.schedule { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.schedule li { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.schedule .what { font-weight: 700; }
.schedule .note { display: block; font-weight: 400; color: var(--muted); font-size: .94rem; }
.schedule .when { color: var(--maroon); font-weight: 700; white-space: nowrap; text-align: right; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.person { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 8px; padding: 16px 18px; }
.person strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.person span { color: var(--muted); font-size: .95rem; }

.banner-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.banner-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.callout { background: var(--maroon); color: #fff; border-radius: var(--radius); padding: clamp(30px, 5vw, 48px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; }
.callout h2 { color: #fff; margin: 0 0 .25em; }
.callout p { margin: 0; color: #f2e2df; }

.calendar-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.calendar-frame iframe { display: block; width: 100%; height: 520px; border: 0; }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-frame iframe { display: block; width: 100%; height: 380px; border: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; grid-column: span 2; }
.gallery a:nth-child(1), .gallery a:nth-child(2) { grid-column: span 3; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.04); }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery a, .gallery a:nth-child(1), .gallery a:nth-child(2) { grid-column: span 1; } .gallery a:nth-child(1) { grid-column: span 2; } }
.lightbox { position: fixed; inset: 0; background: rgba(20, 14, 12, .92); display: none; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-height: 88vh; border-radius: 6px; }
.lightbox button { position: absolute; top: 16px; right: 16px; background: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; }

/* Affiliations */
.affil { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.affil a { display: flex; align-items: center; gap: 16px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.affil a:hover { border-color: var(--gold); }
.affil img { height: 52px; width: auto; flex: none; }
.affil strong { display: block; font-size: .98rem; line-height: 1.35; }
.affil span { color: var(--maroon); font-size: .9rem; }
@media (max-width: 860px) { .affil { grid-template-columns: 1fr; } }

/* Form */
.form { display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .97rem; }
.form label .opt { font-weight: 400; color: var(--muted); }
.form input, .form select, .form textarea { width: 100%; padding: 13px 14px; border: 1px solid #d5c8b6; border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
.form textarea { min-height: 160px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(142, 42, 51, .15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 14px 16px; border-radius: 8px; display: none; }
.form-status.ok { display: block; background: #e8f3ea; color: #1f5a2b; }
.form-status.err { display: block; background: #fbe9e9; color: #7a1d1d; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; }
.contact-list i { color: var(--maroon); font-size: 1.15rem; margin-top: 5px; width: 22px; text-align: center; }

/* Footer */
.site-footer { background: var(--ink); color: #d9cec6; padding: 64px 0 0; font-size: .97rem; }
.site-footer a { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1.05rem; margin-bottom: 1em; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.foot-grid p { margin-bottom: .5em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .45em; }
.foot-brand { font-family: var(--serif); color: #fff; font-size: 1.2rem; margin-bottom: .6em; }
.foot-bottom { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: .9rem; color: #b7aaa1; }
.foot-bottom a { color: #e9d6b4; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }

/* 404 */
.notfound { text-align: center; padding: clamp(80px, 14vw, 160px) 0; }
.notfound .big { font-family: var(--serif); font-size: clamp(4rem, 12vw, 7rem); color: var(--gold-soft); line-height: 1; margin-bottom: 10px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gallery img { transition: none; } }
