/* Hilltop Bible Church — warm, simple, readable */
:root {
  --brown: #5b3a29;
  --brand: #734935;
  --wood: #8a5129;
  --wood-dark: #3f281c;
  --cream: #f6efe3;
  --paper: #fffdf9;
  --ink: #2b211b;
  --muted: #64544a;
  --line: #e6dac8;
  --gold: #c8964e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(63, 40, 28, .06), 0 6px 20px rgba(63, 40, 28, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--wood-dark); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--brown); line-height: 1.2; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); padding: 10px 16px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }

/* ---------- header ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.head-row { display: flex; align-items: center; gap: 16px; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.brand { text-decoration: none; display: flex; flex-direction: column; margin-right: auto; }
.brand-name { font-family: var(--serif); font-size: clamp(1.45rem, 4.6vw, 2rem); color: var(--brown); font-weight: 600; line-height: 1.1; }
.brand-tag { font-size: .875rem; color: var(--muted); margin-top: 3px; }
.head-call { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600; color: var(--brand);
  padding: 10px 12px; border-radius: 999px; border: 1px solid var(--line); min-height: 44px; }
.head-call:hover { background: var(--cream); }
.head-call span { display: none; }
.menu-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--brand); background: var(--brand); color: #fff; font: 600 1rem var(--sans); cursor: pointer; }
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.menu-bars::before, .menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; } .menu-bars::after { top: 6px; }

.site-nav { background: var(--wood-dark); }
.site-nav .nav-list { list-style: none; margin: 0; padding-top: 6px; padding-bottom: 14px; }
.site-nav a { color: #f8efe1; text-decoration: none; display: block; padding: 11px 4px; font-weight: 600; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 6px; }
.nav-list > li { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.nav-list .sub { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; border-left: 2px solid rgba(200, 150, 78, .5); }
.nav-list .sub a { font-weight: 500; padding: 8px 4px; color: #eadcc6; }
.has-sub { position: relative; }
.sub-toggle { position: absolute; right: 0; top: 4px; width: 40px; height: 40px; border: 0; background: transparent; color: #f8efe1; cursor: pointer; border-radius: 8px; }
.sub-toggle::before { content: ""; display: block; width: 9px; height: 9px; margin: 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg); }
.js .has-sub > .sub { display: none; }
.js .has-sub.open > .sub { display: block; }
.nav-give { border-bottom: 0 !important; padding-top: 12px; }
.nav-give a.btn { display: inline-block; color: var(--wood-dark); background: var(--gold); border-color: var(--gold); text-decoration: none; }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }

@media (min-width: 640px) {
  .head-call span { display: inline; }
}
@media (min-width: 1000px) {
  .menu-btn { display: none; }
  .js .site-nav, .site-nav { display: block; }
  .site-nav .nav-list { display: flex; align-items: center; gap: 4px; padding-top: 0; padding-bottom: 0; flex-wrap: wrap; }
  .nav-list > li { border: 0; }
  .site-nav a { padding: 14px 12px; }
  .nav-list > li.is-section > a { color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
  .sub-toggle { display: none; }
  .nav-list .sub, .js .has-sub > .sub { display: block; position: absolute; left: 0; top: 100%; min-width: 280px; background: var(--paper);
    border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow); padding: 8px 0; margin: 0;
    visibility: hidden; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s, visibility .15s; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { visibility: visible; opacity: 1; transform: none; }
  .nav-list .sub a { color: var(--ink); padding: 9px 18px; }
  .nav-list .sub a:hover, .nav-list .sub a[aria-current="page"] { background: var(--cream); color: var(--brand); text-decoration: none; }
  .nav-give { margin-left: auto; padding: 0 !important; }
  .nav-give a.btn { padding: 8px 18px; }
}

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 2px solid var(--brand); padding: 12px 22px; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center; min-height: 44px; }
.btn:hover { background: var(--brown); border-color: var(--brown); color: #fff; }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand); color: #fff; }
.btn-small { padding: 8px 16px; min-height: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--wood-dark); }
.hero-img img { width: 100%; height: 230px; object-fit: cover; object-position: 60% 50%; }
.hero-inner { position: relative; margin-top: -40px; padding-bottom: 32px; }
.hero-card { background: var(--paper); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); border-top: 4px solid var(--gold); }
.hero-card h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); margin-bottom: .4em; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8125rem; font-weight: 700; color: var(--wood); margin-bottom: .5em; }
.hero-verse { margin: 0; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.08rem; }
.hero-verse p { margin-bottom: .4em; }
.hero-verse footer { font-style: normal; font-family: var(--sans); font-size: .9rem; font-weight: 600; color: var(--brand); }
.hero-verse footer::before { content: "— "; }
@media (min-width: 800px) {
  .hero { min-height: 500px; display: flex; align-items: center; overflow: hidden; }
  .hero-img { position: absolute; inset: 0; }
  .hero-img img { height: 100%; }
  .hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(43, 26, 18, .55) 0%, rgba(43, 26, 18, .15) 60%, transparent 100%); }
  .hero-inner { margin-top: 0; padding: 60px 20px; z-index: 1; }
  .hero-card { max-width: 560px; padding: 36px 38px; }
}

/* ---------- page head ---------- */
.page-head { background: var(--paper); border-bottom: 1px solid var(--line); padding: 34px 0 30px; margin-bottom: 36px;
  background-image: linear-gradient(180deg, var(--paper), #f9f3e9); }
.page-head h1 { margin: 0; }
.page-head .lead { margin: .5em 0 0; color: var(--muted); font-size: 1.125rem; }
.crumbs ol { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; font-size: .9rem; }
.crumbs li + li::before { content: "›"; margin: 0 8px; color: var(--muted); }
.crumbs a { color: var(--muted); display: inline-block; padding: 4px 0; }
main { padding-bottom: 56px; }
main.home { padding-bottom: 0; }

/* ---------- sections ---------- */
.band { padding: 56px 0; }
.band-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.split { display: grid; gap: 28px; align-items: center; margin-bottom: 36px; }
.two-col { display: grid; gap: 40px; }
@media (min-width: 860px) {
  .split { grid-template-columns: 1.4fr 1fr; gap: 48px; }
  .two-col { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.photo-frame { margin: 0; background: var(--paper); padding: 10px; border-radius: var(--radius); box-shadow: var(--shadow); max-width: 420px; justify-self: center; }
.photo-frame img { border-radius: 6px; width: 100%; }
.center-fig { margin: 28px auto 0; }
.pull { margin: 32px 0; padding: 24px 26px; background: var(--paper); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 1.12rem; color: var(--brown); box-shadow: var(--shadow); }
.pull p { margin-bottom: .6em; }
.pull footer { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--wood); }
.pull footer::before { content: "— "; }
.more { margin-top: 14px; font-weight: 600; }
.center-lead { text-align: center; max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 1.125rem; }
.back { margin-top: 28px; font-weight: 600; }

/* ---------- cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards-2, .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.cards a { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; text-decoration: none; box-shadow: 0 1px 2px rgba(63, 40, 28, .05); transition: transform .15s, box-shadow .15s, border-color .15s; }
.cards a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); }
.card-title { font-family: var(--serif); font-size: 1.25rem; color: var(--brown); font-weight: 600; }
.card-note { color: var(--muted); font-size: .95rem; margin-top: 4px; }

/* ---------- lists of posts / sermons ---------- */
.post-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: flex; flex-direction: column; padding: 13px 4px; text-decoration: none; }
.post-list a:hover .post-title { text-decoration: underline; }
.post-title { font-weight: 600; color: var(--brown); }
.post-sub { color: var(--muted); font-size: .92rem; }
.sermon-rows a.play { display: grid; grid-template-columns: 40px 1fr; column-gap: 12px; align-items: center; }
.sermon-rows .play-ic { grid-row: span 2; }
.play-ic { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); position: relative; display: inline-block; flex: none; }
.play-ic::after { content: ""; position: absolute; left: 15px; top: 11px; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.is-playing .play-ic { background: var(--gold); }

.sermon-list p { margin: 0; }
.sermon-list p:not(:has(a)) { font-family: var(--serif); font-weight: 600; color: var(--brown); font-size: 1.2rem; margin: 22px 0 6px; }
.sermon-list a { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; color: var(--brown); }
.sermon-list a[href$=".mp3"]::before { content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 7v10l8-5z'/%3E%3C/svg%3E") center / 20px no-repeat; }
.sermon-list a:hover { background: var(--paper); }
.sermon-list a.is-playing::before { background-color: var(--gold); }
.hint { color: var(--muted); font-size: .95rem; }

/* ---------- prose ---------- */
.prose { font-size: 1.0625rem; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.3em; }
.prose > :first-child { margin-top: 0; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold); color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose a { word-break: break-word; }
.post-meta { color: var(--muted); font-size: .95rem; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 24px; }
.doc-link { margin: 0 0 24px; }
.note { margin-top: 36px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.note p { margin: 0; }
.intro-block { margin-bottom: 40px; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 14px 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.link-list li:first-child { border-top: 1px solid var(--line); }

.pager { display: grid; gap: 12px; margin-top: 36px; }
@media (min-width: 640px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: block; padding: 14px 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 600; color: var(--brown); }
.pager a span { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pager-next { text-align: right; }

.scans { display: grid; gap: 18px; }
.scan { margin: 0; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }

.directions { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 12px; }
@media (min-width: 520px) { .directions { grid-template-columns: 1fr 1fr; } }
.directions li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--muted); }
.directions strong { display: block; color: var(--brown); font-family: var(--serif); font-size: 1.1rem; }

/* ---------- forms ---------- */
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.form-card h2 { margin-top: 0; }
.give-card { margin-top: 36px; }
.form { display: grid; gap: 14px; }
.form .row { display: grid; gap: 14px; }
@media (min-width: 560px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: 5px; color: var(--brown); font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; padding: 12px 14px; border: 1px solid #cdbba3; border-radius: 8px; background: #fff;
  font: inherit; color: var(--ink); min-height: 46px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 3px solid rgba(200, 150, 78, .45); border-color: var(--wood); }
.form .btn { justify-self: start; }
@media (min-width: 700px) {
  .form-inline { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .give-card .form-inline { grid-template-columns: 1fr auto; }
}
.subscribe { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 24px 22px; margin-bottom: 40px; box-shadow: var(--shadow); }
.subscribe h2 { margin-top: 0; font-size: 1.5rem; }

/* ---------- footer ---------- */
.site-foot { background: var(--wood-dark); color: #eadcc6; padding: 48px 0 28px; font-size: 1rem; }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--gold); }
.foot-grid { display: grid; gap: 32px; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: 1.2fr 1.2fr 1.1fr .9fr; } }
.foot-h { font-size: 1.2rem; color: #fff; margin-bottom: .7em; }
.foot-tag { font-style: italic; font-family: var(--serif); }
.site-foot address { font-style: normal; line-height: 1.8; }
.site-foot p { margin: 0 0 .5em; }
.foot-big { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.times { margin: 0; }
.times div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.times dt { margin: 0; } .times dd { margin: 0; font-weight: 700; color: #fff; white-space: nowrap; }
.foot-links { list-style: none; margin: 0; padding: 0; }
.foot-links a { display: inline-block; padding: 4px 0; }
.foot-base { margin-top: 36px; padding-top: 18px; padding-bottom: 12px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .9rem; color: #cdbba3; }

/* ---------- audio player ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--paper); border-top: 3px solid var(--gold); box-shadow: 0 -6px 20px rgba(0, 0, 0, .12); }
.player-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 10px; padding-bottom: 10px; }
.player-title { margin: 0; font-weight: 700; color: var(--brown); flex: 1 1 200px; min-width: 0; }
.player audio { flex: 1 1 320px; width: 100%; height: 44px; }
.player-close { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--brown); }
body.has-player { padding-bottom: 130px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
