/* Community Bible Church, Wellsford */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/lora.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url(/assets/fonts/lora-700.woff2) format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/lora-italic.woff2) format("woff2"); }

:root {
  --navy: #0d3372;
  --navy-dark: #0a2552;
  --ink: #262626;
  --charcoal: #34373b;
  --muted: #5d6066;
  --paper: #f7f5f1;
  --line: #e4e0d8;
  --wood: #3b2f27;
  --white: #fff;
  --radius: 10px;
  --wrap: 1120px;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "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; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; color: var(--ink); background: var(--white); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--navy-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid #e0a526; outline-offset: 2px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 92px; height: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--navy); }
.brand-tag { font-size: .75rem; color: var(--muted); }
@media (max-width: 420px) { .brand img { width: 64px; } .brand-name { font-size: .98rem; } .brand { gap: .55rem; } .nav-toggle { padding: .55rem .7rem; } }
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; background: var(--navy); color: #fff; border: 0; border-radius: 6px; padding: .6rem .9rem; font: 600 .95rem var(--sans); cursor: pointer; min-height: 44px; }
.nav-toggle .bars { width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
.nav-toggle .bars::before { top: -6px; } .nav-toggle .bars::after { top: 6px; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08); max-height: calc(100vh - 74px); overflow-y: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul { padding: .5rem 1.25rem 1.25rem; }
.site-nav a, .sub-toggle { display: block; padding: .7rem .2rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1rem; }
.site-nav a[aria-current="page"] { color: var(--navy); }
.site-nav li { border-bottom: 1px solid var(--line); }
.site-nav li li { border: 0; }
.has-sub { position: relative; }
.sub-toggle { background: none; border: 0; width: 100%; text-align: left; font-family: var(--sans); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.sub-toggle::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -4px 4px 0 10px; }
.sub-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 4px; }
.sub { display: none; padding: 0 0 .6rem .8rem; }
.sub.open { display: block; }
.sub a { font-weight: 400; padding: .45rem .2rem; }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; box-shadow: none; border: 0; max-height: none; overflow: visible; }
  .site-nav > ul { display: flex; gap: .2rem; padding: 0; }
  .site-nav li { border: 0; }
  .site-nav > ul > li > a, .sub-toggle { padding: .55rem .7rem; font-size: .95rem; border-radius: 6px; }
  .site-nav > ul > li > a:hover, .sub-toggle:hover { background: var(--paper); }
  .sub { position: absolute; top: 100%; left: 0; min-width: 250px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 30px rgba(0,0,0,.12); padding: .5rem; }
  .has-sub:hover .sub, .has-sub:focus-within .sub, .sub.open { display: block; }
  .sub a { padding: .45rem .7rem; border-radius: 6px; }
  .sub a:hover { background: var(--paper); }
  .brand img { width: 104px; }
  .brand-name { font-size: 1.15rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .7rem 1.3rem; border-radius: 999px; background: var(--navy); color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem; border: 2px solid var(--navy); cursor: pointer; font-family: var(--sans); }
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.light:hover { background: var(--paper); color: var(--navy-dark); }
.btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.8); }
.btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.outline { background: transparent; color: var(--navy); }
.btn.outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Hero */
.hero { position: relative; color: #fff; background: var(--charcoal); isolation: isolate; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(20,22,26,.35) 0%, rgba(20,22,26,.72) 100%); }
.hero .wrap { min-height: clamp(420px, 70vh, 620px); display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; padding-block: 3rem; }
.hero h1 { color: #fff; margin-bottom: .2em; text-shadow: 0 2px 16px rgba(0,0,0,.35); }
.hero .place { font-family: var(--serif); font-size: clamp(1.2rem, 2.6vw, 1.7rem); margin: 0 0 1rem; }
.hero .motto { font-family: var(--serif); font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.4; margin: 0 0 1.6rem; }
.hero .motto span { display: block; }
.hero .btn-row { justify-content: flex-end; }

/* Page title band (echoes their dark wood banners) */
.page-head { background: var(--wood); background-image: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18)), repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 9px), linear-gradient(90deg, #3a2f28, #2c2622 60%, #3a2f28); color: #fff; padding: 3.2rem 0 2.8rem; text-align: center; position: relative; isolation: isolate; }
.page-head.photo { background: var(--charcoal); padding: 5rem 0 4.4rem; }
.page-head.photo picture, .page-head.photo picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.page-head.photo::after { content: ""; position: absolute; inset: 0; background: rgba(20,22,26,.6); z-index: -1; }
.page-head h1 { color: #fff; margin: 0; letter-spacing: .01em; }
.page-head .kicker { text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: #d9cfc3; margin: 0 0 .6rem; }
.page-head .lede { font-family: var(--serif); font-size: 1.15rem; max-width: 680px; margin: .8rem auto 0; color: #eee7df; }
.crumbs { font-size: .85rem; margin: 0 0 .5rem; }
.crumbs a { color: #e9dfd3; }

/* Sections */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section.alt { background: var(--paper); }
.section.navy { background: var(--navy); color: #fff; }
.section.navy h2, .section.navy h3 { color: #fff; }
.section.navy a:not(.btn) { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--navy); margin: 0 0 .5rem; }
.section.navy .eyebrow { color: #c9d6ee; }
.lead { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; }
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.center { text-align: center; }
.center .prose, .prose.center { margin-inline: auto; }
.split { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } .split.rev > :first-child { order: 2; } }
.split img { border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12); }

/* Cards */
.grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .grid.two, .grid.three, .grid.four { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.card h3 { margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: .98rem; }
.card .more { margin-top: auto; padding-top: .6rem; font-weight: 700; }
a.card { text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0,0,0,.1); }
a.card:hover h3 { color: var(--navy); }
.card .art { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--wood); }
.card .art.contain { object-fit: contain; background: #1e1f1c; }
.art-text { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; color: #f3ede6; font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .04em; background-image: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.25)), repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 11px), linear-gradient(90deg, #3a2f28, #2a2420 60%, #3a2f28); }
.art-text small { display: block; font-size: .8rem; font-weight: 400; letter-spacing: .2em; text-transform: uppercase; color: #d3c6b8; margin-bottom: .3rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); background: #e8eef9; border-radius: 999px; padding: .15rem .6rem; align-self: flex-start; }

/* Quotes (Community / Bible / Church) */
.pillars { display: grid; gap: 1.25rem; }
@media (min-width: 860px) { .pillars { grid-template-columns: repeat(3, 1fr); } }
.pillar { background: #fff; border-radius: var(--radius); padding: 1.6rem; border-top: 4px solid var(--navy); box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.pillar h3 { font-size: 1.5rem; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); }
.pillar p { font-family: var(--serif); font-style: italic; margin: 0; }
.mission { display: grid; gap: 1rem; counter-reset: m; }
@media (min-width: 760px) { .mission { grid-template-columns: repeat(3, 1fr); } }
.mission li { list-style: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 1.3rem; }
.mission h3 { margin-bottom: .3rem; }
.mission q { font-family: var(--serif); font-style: italic; display: block; }
.mission cite { display: block; font-style: normal; font-size: .9rem; opacity: .85; margin-top: .3rem; }

/* People */
.people { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .people { grid-template-columns: repeat(3, 1fr); } }
.person { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.person img, .person .initials { width: 107px; height: 107px; border-radius: 50%; margin: 0 auto 1rem; object-fit: cover; }
.person .initials { display: flex; align-items: center; justify-content: center; background: var(--navy); color: #fff; font-family: var(--serif); font-size: 2rem; font-weight: 700; }
.person h3 { margin-bottom: .1rem; }
.person .role { color: var(--navy); font-weight: 700; margin: 0 0 .4rem; }
.person .cred { font-size: .92rem; color: var(--muted); }
.person a[href^="tel"] { display: inline-block; padding: .3rem 0; font-weight: 700; }

/* Doctrine list */
.doctrine { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.doctrine li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem 1rem 3.6rem; position: relative; }
.doctrine li b { position: absolute; left: 1rem; top: 1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: #fff; font-size: .85rem; display: flex; align-items: center; justify-content: center; }
.values h3 { margin-top: 1.6rem; color: var(--navy); }
.values ul { padding-left: 1.2rem; }
.values li { margin-bottom: .5rem; }

/* Video */
.video { position: relative; aspect-ratio: 16 / 9; background: #111; border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt { position: relative; display: block; aspect-ratio: 16 / 9; background: #1b1b1b; overflow: hidden; border: 0; padding: 0; width: 100%; cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; }
.yt .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 44px; transform: translate(-50%, -50%); background: rgba(13,51,114,.92); border-radius: 12px; transition: background .15s; }
.yt .play::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.yt:hover .play, .yt:focus-visible .play { background: #c4302b; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Featured sermon */
.featured { display: grid; gap: 1.6rem; align-items: center; }
@media (min-width: 900px) { .featured { grid-template-columns: 1.4fr 1fr; gap: 2.5rem; } }
.meta { color: var(--muted); font-size: .95rem; margin: 0; }
.meta span + span::before { content: "·"; margin: 0 .45rem; }

/* Sermon list */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.toolbar label { font-weight: 700; font-size: .95rem; }
.search { display: flex; gap: .5rem; align-items: center; flex: 1 1 280px; max-width: 420px; }
.search input { flex: 1; min-height: 46px; padding: .6rem .9rem; border: 1px solid #c9c3b8; border-radius: 8px; font-size: 1rem; font-family: var(--sans); }
.count { color: var(--muted); font-size: .95rem; margin: 0; }
.sermons { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .sermons { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .sermons { grid-template-columns: repeat(3, 1fr); } .sermons.four { grid-template-columns: repeat(4, 1fr); } }
.sermon h4 { font-family: var(--serif); font-size: 1.05rem; line-height: 1.25; margin: 0 0 .3rem; }
.sermon { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.sermon .body { padding: 1rem 1.1rem 1.2rem; }
.sermon h3 { font-size: 1.08rem; margin: 0 0 .3rem; }
.sermon .meta { font-size: .9rem; }
.sermon .who { font-size: .9rem; margin: .2rem 0 0; }
.sermon .note { font-size: .85rem; color: var(--muted); font-style: italic; margin: .3rem 0 0; }
.sermon .noaudio { aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; padding: 1rem; background: var(--paper); color: var(--muted); font-size: .92rem; }
.sermon .noaudio strong { color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }
.sermon[hidden] { display: none; }
.empty { display: none; text-align: center; color: var(--muted); padding: 2rem 0; }
.series-intro { display: grid; gap: 1.5rem; align-items: center; margin-bottom: 2.5rem; }
@media (min-width: 860px) { .series-intro { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.series-intro img { border-radius: var(--radius); }

/* Gospel */
.truths { counter-reset: t; display: grid; gap: 1.25rem; }
.truth { background: #fff; border-left: 4px solid var(--navy); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.3rem 1.4rem; box-shadow: 0 4px 16px rgba(0,0,0,.04); }
.truth h3 { color: var(--navy); }
.truth p { margin: 0; }
.source { font-size: .9rem; color: var(--muted); }

/* Giving */
.bank { background: #fff; border: 2px solid var(--navy); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.bank dl { margin: 0; display: grid; gap: .3rem 1rem; grid-template-columns: auto 1fr; }
.bank dt { font-weight: 700; }
.bank dd { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.05rem; word-break: break-word; }

/* Forms */
.form { display: grid; gap: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2rem); }
@media (min-width: 640px) { .form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; } }
.form .row > div + div { margin-top: 1rem; }
@media (min-width: 640px) { .form .row > div + div { margin-top: 0; } }
.form label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .3rem; }
.form label span { font-weight: 400; color: var(--muted); }
.form input, .form textarea { width: 100%; min-height: 46px; padding: .65rem .85rem; border: 1px solid #c9c3b8; border-radius: 8px; font: 1rem var(--sans); color: var(--ink); background: #fff; }
.form textarea { min-height: 150px; resize: vertical; }
.form input:focus, .form textarea:focus { border-color: var(--navy); outline: 2px solid rgba(13,51,114,.25); }
.map { border: 0; width: 100%; height: 320px; border-radius: var(--radius); display: block; }

/* CTA band */
.cta { display: grid; gap: 1.2rem; align-items: center; }
@media (min-width: 860px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2 { margin-bottom: .3rem; }
.cta p { margin: 0; }

/* Footer */
.site-footer { background: #232427; color: #d7d7d7; padding: 3.5rem 0 2.5rem; font-size: .98rem; }
.site-footer a { color: #fff; }
.site-footer h2 { color: #fff; font-size: 1.05rem; font-family: var(--sans); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 .8rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.foot-brand img { width: 120px; background: #fff; border-radius: 8px; padding: 6px; margin-bottom: .9rem; }
.foot-brand .motto { font-family: var(--serif); font-size: 1.15rem; color: #fff; margin: 0 0 .4rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .2rem; }
.site-footer li a { display: inline-block; padding: .25rem 0; }
.site-footer address { font-style: normal; }
.foot-base { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.5rem; font-size: .88rem; color: #b5b5b5; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.site-footer .hp-badge, .site-footer [class*="hp-badge"] { margin-top: 1.5rem; }
