/* Calvary Baptist Church — Preston, CT */
:root {
  --green: #1d4a2c;
  --green-dark: #12321d;
  --green-soft: #e8efe6;
  --gold: #c9a23a;
  --gold-dark: #8a6a12;
  --cream: #fbf8f1;
  --ink: #1f2420;
  --muted: #555d57;
  --line: #e2ddd0;
  --radius: 10px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font: 17px/1.65 var(--sans); color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--gold-dark); }
h1, h2, h3 { font-family: var(--serif); color: var(--green-dark); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }

/* Header */
.site-header { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand img { width: 64px; height: auto; background: #fff; border-radius: 6px; padding: 3px; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.15; display: block; }
.brand-tag { font-size: .8rem; color: #e9dcae; display: block; }
.brand:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 2px solid rgba(255,255,255,.5); color: #fff; border-radius: 8px; padding: .45rem .8rem; font: inherit; font-size: .95rem; cursor: pointer; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .2rem; flex-wrap: wrap; }
.site-nav a { color: #fff; text-decoration: none; padding: .55rem .7rem; border-radius: 6px; font-size: .95rem; display: block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255,255,255,.12); color: #f3e3a8; }
@media (max-width: 960px) {
  .js .nav-toggle { display: block; }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--green-dark); padding: .5rem 1.25rem 1rem; }
  .js .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: .75rem .5rem; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-header .wrap { flex-wrap: wrap; }
  .brand-tag { display: none; }
}
@media (max-width: 960px) { html:not(.js) .site-nav { width: 100%; padding-bottom: .5rem; } html:not(.js) .site-nav ul { flex-direction: row; } }

/* Hero */
.hero { position: relative; color: #fff; background: var(--green-dark); overflow: hidden; }
.hero img.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,50,29,.55) 0%, rgba(18,50,29,.82) 100%); }
.hero .wrap { position: relative; z-index: 1; padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 9vw, 6rem); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 34ch; color: #f4efe0; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--gold-dark); margin-bottom: .6rem; display: block; }
.hero .eyebrow { color: #f0d27a; }
.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn { display: inline-block; padding: .8rem 1.4rem; border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--gold); color: #1b1607; border: 2px solid var(--gold); font-size: 1rem; }
.btn:hover { background: #ddb84c; color: #1b1607; }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-dark); color: #fff; }

/* Page header (inner pages) */
.page-head { background: var(--green) url("img/church-autumn.webp") center 35% / cover; position: relative; color: #fff; }
.page-head::before { content: ""; position: absolute; inset: 0; background: rgba(18,50,29,.84); }
.page-head .wrap { position: relative; padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #efe7cf; margin: .6rem 0 0; max-width: 60ch; }
.crumbs { font-size: .9rem; margin-bottom: .5rem; }
.crumbs a { color: #f0d27a; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.alt { background: var(--cream); }
.section.green { background: var(--green); color: #fff; }
.section.green h2 { color: #fff; }
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split.wide-text { grid-template-columns: 1.4fr 1fr; } }
.photo { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12); width: 100%; object-fit: cover; }
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--muted); margin-top: .5rem; }

.verse { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.5rem); line-height: 1.5; color: var(--green-dark); border-left: 4px solid var(--gold); padding: .2rem 0 .2rem 1.25rem; margin: 0 0 1rem; font-style: italic; }
.verse cite { display: block; font-style: normal; font-family: var(--sans); font-size: 1rem; color: var(--gold-dark); margin-top: .6rem; font-weight: 700; }
.section.green .verse { color: #fff; }
.section.green .verse cite { color: #f0d27a; }
.signature { font-family: var(--serif); font-style: italic; color: var(--green); font-size: 1.1rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.1); color: var(--ink); }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card .body { padding: 1.1rem 1.25rem 1.3rem; }
.card h3 { margin-bottom: .35rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .more { color: var(--green); font-weight: 700; display: inline-block; margin-top: .6rem; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } a.card:hover { transform: none; } }

/* Schedule */
.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.schedule li { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.2rem; }
.schedule .time { font-weight: 700; color: var(--green); font-size: .95rem; letter-spacing: .02em; }
.schedule h3 { margin: .1rem 0 .25rem; font-size: 1.2rem; }
.schedule p { margin: 0; color: var(--muted); }
.day-label { font-family: var(--serif); color: var(--gold-dark); font-size: 1.1rem; margin: 1.6rem 0 .6rem; }

/* Long-form text */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.8rem; color: var(--green); }
.prose .refs { color: var(--muted); font-size: .95rem; }
.prose ol, .prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.toc { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.4rem; margin: 0 0 2rem; }
.toc h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.toc ul { margin: 0; padding-left: 1.1rem; columns: 2 220px; }
.toc a { display: inline-block; padding: .2rem 0; }
.beliefs { display: grid; gap: 1rem; }
.belief { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.belief h2 { font-size: 1.2rem; margin: 0 0 .4rem; color: var(--green); }
.belief p:last-child { margin-bottom: 0; }

/* Ministries */
.ministry { scroll-margin-top: 90px; }
.ministry + .ministry { border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chips a { background: var(--green-soft); color: var(--green-dark); padding: .5rem .95rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; }
.chips a:hover { background: var(--gold); color: #1b1607; }

/* Events */
.events { display: grid; gap: 1.5rem; }
.month h2 { font-size: 1.4rem; border-bottom: 2px solid var(--gold); padding-bottom: .3rem; }
.event { display: flex; gap: 1rem; align-items: baseline; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.event .date { flex: 0 0 4.8rem; font-weight: 700; color: var(--green); }

/* Gallery */
.gallery { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery img { border-radius: 8px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Map */
.map { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.1); background: var(--green-soft); }
@media (min-width: 820px) { .map { aspect-ratio: auto; height: 100%; min-height: 360px; } }

/* Forms */
.form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2rem); }
.form .row { display: grid; gap: 1rem; }
@media (min-width: 600px) { .form .row { grid-template-columns: 1fr 1fr; } }
.form label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; }
.form input, .form textarea { width: 100%; font: inherit; padding: .75rem .85rem; border: 1px solid #b9b3a3; border-radius: 8px; background: #fffdf8; color: var(--ink); }
.form input:focus, .form textarea:focus { outline: 3px solid rgba(201,162,58,.45); border-color: var(--green); }
.form textarea { min-height: 150px; resize: vertical; }
.form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; }
.req { color: #9b2c1c; }

/* Callout band */
.band { text-align: center; }
.band p { max-width: 60ch; margin-inline: auto; color: #eee6cd; }
.band .btns { justify-content: center; }

/* Footer */
.site-footer { background: var(--green-dark); color: #e2e8e0; padding: 3.5rem 0 2.5rem; font-size: .97rem; }
.site-footer a { color: #f0d27a; }
.site-footer a:hover { color: #fff; }
.foot-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1.15rem; margin-bottom: .7rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer li a { display: inline-block; padding: .15rem 0; }
.site-footer address { font-style: normal; }
.foot-logo { width: 110px; background: #fff; border-radius: 8px; padding: 4px; margin-bottom: .8rem; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .9rem; color: #b9c4bb; padding-bottom: 1rem; }
