/* Whittemore Baptist Church — site styles
   Palette drawn from the church's lighthouse logo. */
:root {
  --navy: #0f2a44;
  --navy-2: #163a5c;
  --blue: #1b5a9a;
  --amber: #e7a33e;
  --amber-soft: #f6dcae;
  --shore: #8c949b;
  --mist: #eef3f7;
  --white: #ffffff;
  --ink: #1a232e;
  --muted: #4a5663;
  --plum: #4f3f66;      /* Bridge to Recovery accent */
  --plum-2: #3b2f4f;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;

  --measure: 68ch;
  --wrap: 1120px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;      /* 18px base: easy reading for every age */
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: var(--measure); }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid #dfe5ea;
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { height: 66px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--navy); text-decoration: none; font-size: 1rem;
  padding: 8px 10px; border-radius: var(--radius);
}
.nav a:hover { background: var(--mist); }
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--amber); border-radius: 0; }
.nav .give { background: var(--amber); color: var(--navy); font-weight: 700; margin-left: 8px; padding-inline: 16px; }
.nav .give:hover { background: #f0b45a; }

.menu { display: none; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; font-weight: 700; color: var(--navy);
  border: 2px solid var(--navy); border-radius: var(--radius); padding: 6px 14px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .nav {
  position: absolute; right: 0; top: calc(100% + 10px);
  flex-direction: column; align-items: stretch; background: var(--white);
  border: 1px solid #dfe5ea; border-radius: var(--radius); padding: 8px; width: 240px;
  box-shadow: 0 12px 30px rgba(15, 42, 68, .18);
}
.menu[open] .nav .give { margin: 6px 0 0; text-align: center; }
.desktop-nav { display: flex; }
@media (max-width: 1020px) {
  .desktop-nav { display: none; }
  .menu { display: block; }
  .brand img { height: 48px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1.05rem;
  padding: 13px 22px; border-radius: var(--radius); border: 2px solid transparent;
  line-height: 1.2;
}
.btn-amber { background: var(--amber); color: var(--navy); }
.btn-amber:hover { background: #f0b45a; color: var(--navy); }
.btn-line { border-color: currentColor; color: var(--white); }
.btn-line:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: var(--navy) url("images/church.jpg") center 40% / cover no-repeat;
  min-height: min(78vh, 680px);
  display: flex; align-items: flex-end;
}
.hero::before {           /* night falls over the photo from the left */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(15,42,68,.94) 0%, rgba(15,42,68,.82) 38%, rgba(15,42,68,.25) 75%, rgba(15,42,68,.1) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: 120px 0 64px; }
.hero h1 { color: var(--white); max-width: 15ch; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hero p { font-size: 1.25rem; max-width: 40ch; color: #e6edf4; }

/* ---------- Service times band ---------- */
.times { background: var(--navy); color: var(--white); padding: 36px 0 40px; border-top: 4px solid var(--amber); }
.times h2 { color: var(--white); font-size: 1.5rem; margin-bottom: 18px; }
.times-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.1fr; gap: 28px; }
.times-day h3 { color: var(--amber); font-family: var(--sans); font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.times-day dl { margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 4px; }
.times-day dt { font-variant-numeric: tabular-nums; white-space: nowrap; color: #c9d6e3; }
.times-day dd { margin: 0; }
.times-where { border-left: 1px solid rgba(255,255,255,.2); padding-left: 24px; }
.times-where a { color: var(--amber); }
@media (max-width: 860px) {
  .times-grid { grid-template-columns: 1fr 1fr; }
  .times-where { border-left: 0; padding-left: 0; grid-column: 1 / -1; }
}
@media (max-width: 520px) { .times-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.tint { background: var(--mist); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.split.media-left { grid-template-columns: .9fr 1.1fr; }
@media (max-width: 860px) { .split, .split.media-left { grid-template-columns: 1fr; gap: 32px; } }

.link-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid #cfd8e0; }
.link-list li { border-bottom: 1px solid #cfd8e0; }
.link-list a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 4px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 1.15rem;
}
.link-list a span { font-weight: 400; color: var(--muted); font-size: 1rem; }
.link-list a:hover { background: rgba(255,255,255,.6); }

.photo { border-radius: var(--radius); }
blockquote {
  margin: 1.5em 0; padding: 0 0 0 20px; border-left: 4px solid var(--amber);
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; color: var(--navy);
}
blockquote cite { display: block; margin-top: 8px; font-family: var(--sans); font-style: normal; font-size: 1rem; color: var(--muted); }

/* ---------- Page header (inner pages) ---------- */
.page-head { background: var(--navy); padding: 56px 0 48px; border-bottom: 4px solid var(--amber); }
.page-head h1 { color: var(--white); }
.page-head p { font-size: 1.2rem; color: #c9d6e3; }
.page-head.plum { background: var(--plum); }
.page-head.light { background: var(--mist); border-bottom: 1px solid #dfe5ea; }
.page-head.light h1 { color: var(--navy); }
.page-head.light p { color: var(--muted); }
.page-head.plum h1 { color: var(--white); }
.page-head.plum p { color: #e4dcee; }

.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { max-width: var(--measure); padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* Rows for ministries / schedule lists */
.rows { margin: 0 0 8px; padding: 0; list-style: none; }
.rows li { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid #dfe5ea; }
.rows li:last-child { border-bottom: 1px solid #dfe5ea; }
.rows h3 { margin: 0; font-size: 1.25rem; }
.rows .when { display: block; color: var(--muted); font-size: 1rem; margin-top: 4px; }
.rows p { margin: 0 0 .5em; }
@media (max-width: 700px) { .rows li { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Spotlight bands ---------- */
.band { padding: 64px 0; color: var(--white); }
.band h2 { color: var(--white); }
.band p { color: #e9e3f1; font-size: 1.15rem; }
.band.plum { background: var(--plum); }
.band.navy { background: var(--navy); }
.band.navy p { color: #dbe4ee; }
.band .wrap { display: grid; grid-template-columns: 1.4fr .6fr; gap: 40px; align-items: center; }
.band .btn-row { justify-content: flex-end; }
@media (max-width: 760px) { .band .wrap { grid-template-columns: 1fr; } .band .btn-row { justify-content: flex-start; } }

/* ---------- Recovery page ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 18px; max-width: 760px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.steps li::before {
  content: counter(step); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--plum); color: var(--white); font-weight: 700;
}
.steps h3 { margin: 6px 0 4px; font-size: 1.2rem; }
.steps p { margin: 0; }
.facts { background: var(--mist); border-radius: var(--radius); padding: 24px 28px; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; }
.fb-embed { margin-top: 20px; max-width: 500px; }
.fb-embed iframe { width: 100%; border: 0; border-radius: var(--radius); background: var(--mist); }

/* ---------- Embeds ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--navy); border-radius: var(--radius); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #d3dde8; padding: 56px 0 28px; font-size: 1rem; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--amber); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.site-footer h2 { color: var(--white); font-size: 1.3rem; }
.site-footer h3 { color: var(--amber); font-family: var(--sans); font-size: 1rem; margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer p { margin-bottom: .6em; }
.foot-base { border-top: 1px solid rgba(255,255,255,.15); margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: #9fb0c2; font-size: .95rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) {
  .link-list a { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* Draft placeholders: text still to be supplied before launch */
.todo { background: #fff6e3; border: 2px dashed var(--amber); border-radius: var(--radius); padding: 12px 16px; color: #6b4a12; }
.page-head .todo { color: #6b4a12; }

/* ---------- Building project ---------- */
.build-hero {
  position: relative; color: var(--white);
  background: var(--navy) url("images/building/front-entry.jpg") center 55% / cover no-repeat;
}
.build-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(15,42,68,.95) 0%, rgba(15,42,68,.8) 45%, rgba(15,42,68,.35) 100%); }
.build-hero .wrap { position: relative; padding: 96px 0 72px; }
.build-hero h1 { color: var(--white); }
.build-hero p { color: #e6edf4; font-size: 1.25rem; max-width: 42ch; }
.figure { margin: 0; }
.figure figcaption, .gallery figcaption { font-size: .95rem; color: var(--muted); margin-top: 8px; }
.feature-list { list-style: none; padding: 0; margin: 20px 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; max-width: 900px; }
.feature-list li { padding-left: 22px; position: relative; font-weight: 700; color: var(--navy); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--amber); border-radius: 2px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .feature-list { grid-template-columns: 1fr; } }
.walkthrough { width: 100%; max-width: 960px; border-radius: var(--radius); background: var(--navy); display: block; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 3px solid var(--amber); }
.timeline li { padding: 0 0 16px 20px; position: relative; display: grid; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--white); border: 3px solid var(--amber); }
.timeline strong { color: var(--navy); }
.sponsor { border-collapse: collapse; width: 100%; max-width: 520px; margin: 4px 0 20px; }
.sponsor th, .sponsor td { padding: 10px 0; border-bottom: 1px solid #cfd8e0; text-align: left; font-weight: 400; }
.sponsor td { text-align: right; font-weight: 700; color: var(--navy); white-space: nowrap; padding-left: 16px; font-variant-numeric: tabular-nums; }

/* Home: building project feature */
.band.build .wrap { grid-template-columns: 1fr 1fr; }
.band.build img { border-radius: var(--radius); }
.band.build .btn-row { justify-content: flex-start; margin-top: 18px; }
@media (max-width: 760px) { .band.build .wrap { grid-template-columns: 1fr; } }
