/* ==========================================================
   Grace Community Church — Chanute, KS
   ========================================================== */

:root {
    --ink: #1f2a2e;
    --ink-soft: #4a5a60;
    --cream: #f8f4ec;
    --paper: #ffffff;
    --forest: #2f4f46;
    --forest-dark: #213a33;
    --gold: #c08a3e;
    --line: #e4ddd0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(31, 42, 46, .08);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--cream);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--forest); }
a:hover { color: var(--gold); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 92%); margin-inline: auto; }
.narrow { width: min(760px, 92%); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 10px; left: 10px; background: var(--paper); padding: .5em 1em; z-index: 100; }

.eyebrow {
    font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--gold); margin-bottom: .75em;
}
.eyebrow.light { color: #e9c58f; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block; padding: .85em 1.6em; border-radius: 999px;
    font-weight: 600; font-size: .95rem; text-decoration: none;
    background: var(--forest); color: #fff; border: 2px solid var(--forest);
    transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--forest-dark); border-color: var(--forest-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-outline:hover { background: #fff; color: var(--forest); border-color: #fff; }
.btn-light { background: #fff; color: var(--forest); border-color: #fff; }
.btn-light:hover { background: var(--gold); border-color: var(--gold); color: #fff; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(248, 244, 236, .94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.1; }
.brand small { display: block; font-family: var(--sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.brand-mark { width: 34px; height: 34px; fill: var(--forest); background: #e9e1d2; border-radius: 9px; padding: 5px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav a {
    display: block; padding: .5em .85em; border-radius: 999px;
    text-decoration: none; color: var(--ink); font-size: .94rem; font-weight: 500;
}
.site-nav a:hover { background: #ece5d8; color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--forest); color: #fff; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
    position: relative; color: #fff; overflow: hidden;
    background:
        linear-gradient(115deg, rgba(20, 38, 33, .92) 0%, rgba(33, 58, 51, .72) 55%, rgba(33, 58, 51, .35) 100%),
        url("../images/hero.jpg") center / cover no-repeat,
        radial-gradient(circle at 80% 30%, #6f8f6a 0%, #2f4f46 60%);
}
.hero-inner { padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem); max-width: 680px; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,.88); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-meta {
    display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; margin-top: 3rem; padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.2); font-size: .95rem;
}
.hero-meta strong { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }

.page-hero { background: var(--forest); color: #fff; padding: 4.5rem 0 3.5rem; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.15rem; max-width: 620px; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--paper); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.center { text-align: center; margin-inline: auto; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.section-alt .card { background: var(--cream); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px; background: #e6eee9; display: grid; place-items: center; margin-bottom: 1.2rem;
}
.card-icon svg { width: 24px; height: 24px; stroke: var(--forest); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card p { color: var(--ink-soft); flex: 1; }
.card .link { font-weight: 600; text-decoration: none; }
.card .link::after { content: " →"; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split-visual {
    aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(145deg, #d9cdb6, #a8b8a4);
    display: grid; place-items: center;
}
.split-visual svg { width: 38%; fill: rgba(255,255,255,.75); }
.split-visual img { width: 100%; height: 100%; object-fit: cover; }

.checklist { list-style: none; padding: 0; margin: 1.5rem 0; }
.checklist li { padding-left: 2rem; position: relative; margin-bottom: .8rem; }
.checklist li::before {
    content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
    background: var(--forest) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

blockquote.verse {
    margin: 0; padding: 2.5rem; border-radius: var(--radius); background: var(--forest); color: #fff;
    font-family: var(--serif); font-size: 1.45rem; line-height: 1.45;
}
blockquote.verse cite { display: block; margin-top: 1rem; font-family: var(--sans); font-size: .9rem; font-style: normal; color: #e9c58f; letter-spacing: .05em; }

/* ---------- Info grid (visit page) ---------- */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.info { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.info h3 { font-size: 1.1rem; margin-bottom: .4em; }
.info p { margin: 0; color: var(--ink-soft); font-size: .97rem; }

.map { border: 0; width: 100%; height: 380px; border-radius: var(--radius); }

/* ---------- Prose ---------- */
.prose h2 { margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #33424a; }
.prose ol, .prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }

.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 3rem; }
.toc a { padding: .45em 1em; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; text-decoration: none; font-size: .9rem; font-weight: 500; color: var(--ink); }
.toc a:hover { border-color: var(--forest); color: var(--forest); }

.leader { display: flex; gap: 1.2rem; align-items: center; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; background: #dbe4de; display: grid; place-items: center; font-family: var(--serif); font-size: 1.5rem; color: var(--forest); }

/* ---------- Sermons ---------- */
.sermon { display: grid; grid-template-columns: auto 1fr auto; gap: 1.25rem; align-items: center; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.sermon-date { text-align: center; width: 64px; font-family: var(--serif); line-height: 1.1; }
.sermon-date span { display: block; font-size: 1.6rem; }
.sermon-date small { font-family: var(--sans); text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--ink-soft); }
.sermon h3 { margin: 0 0 .2em; font-size: 1.15rem; }
.sermon p { margin: 0; color: var(--ink-soft); font-size: .93rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.form input, .form textarea, .form select {
    width: 100%; font: inherit; padding: .8em 1em; border-radius: 10px;
    border: 1px solid #d3cabb; background: #fff; color: var(--ink);
}
.form input:focus, .form textarea:focus, .form select:focus { outline: 3px solid rgba(47,79,70,.2); border-color: var(--forest); }
.form textarea { min-height: 160px; resize: vertical; }
.form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; }
.alert-ok { background: #e3efe7; color: #1d4a33; border: 1px solid #b9d6c3; }
.alert-err { background: #fbe9e6; color: #7a2a1d; border: 1px solid #efc4bb; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }

/* ---------- Visit band & footer ---------- */
.visit-band { background: var(--gold); color: #fff; }
.visit-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 3rem 0; flex-wrap: wrap; }
.visit-band h2 { color: #fff; margin: 0 0 .2em; }
.visit-band p { margin: 0; }
.visit-band .eyebrow.light { color: rgba(255,255,255,.85); }

.site-footer { background: var(--forest-dark); color: rgba(255,255,255,.78); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 2.5rem; padding: 4rem 0 3rem; }
.footer-brand { font-family: var(--serif); font-size: 1.35rem; color: #fff; }
.site-footer h3 { font-family: var(--sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #e9c58f; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .muted { color: rgba(255,255,255,.55); }
.social { display: flex; gap: .6rem; margin-top: 1rem; }
.social a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.social a:hover { background: var(--gold); }
.social svg { width: 18px; height: 18px; fill: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.3rem 0; font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .site-nav {
        position: absolute; top: 76px; left: 0; right: 0; background: var(--cream);
        border-bottom: 1px solid var(--line); display: none;
    }
    .site-nav.open { display: block; }
    .site-nav ul { flex-direction: column; padding: 1rem 4%; }
    .site-nav a { border-radius: 10px; padding: .8em 1em; }
    .split { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .sermon { grid-template-columns: auto 1fr; }
    .sermon .btn { grid-column: 1 / -1; justify-self: start; }
}
