/* Harbour Community Church
   ------------------------------------------------------------------
   One stylesheet for every page. Edit here, not in the HTML.

   Colours are the church's brand palette (Brand Identity guide, p.04):
     #172833 navy   #829CB0 steel   #D6EDFA sky   #F2F0ED sand   #7B7B7C gray
   "Layered blues for calm and trust, a soft sand tone for warmth."

   Two brand colours are too light for small text on white: steel is 2.9:1
   and gray is 4.2:1, against the 4.5:1 that body text needs. So steel and
   gray carry accents, borders and backgrounds, and small text uses a
   darker cut of each (--steel-ink, --muted). Those two are the only
   values here that are not straight from the guide.

   The wordmark is a geometric sans with wide tracking, so labels, nav,
   buttons and headings use Montserrat to echo it. Body copy stays on the
   system sans for speed and readability.
   ------------------------------------------------------------------ */

:root {
  --navy:       #172833;   /* brand */
  --steel:      #829CB0;   /* brand */
  --sky:        #D6EDFA;   /* brand */
  --sand:       #F2F0ED;   /* brand */
  --gray:       #7B7B7C;   /* brand */

  --navy-deep:  #0F1B23;   /* hover on navy buttons */
  --steel-ink:  #576F82;   /* steel, darkened to 5.3:1 for small text on white */
  --muted:      #5E5E5F;   /* gray, darkened to pass for body text on white */
  --ink:        #172833;
  --ground:     #FFFFFF;
  --hair:       #E4E2DE;   /* a sand-tinted hairline */
  --field:      #FCFBFA;

  /* Layout: everything lines up on two widths. --measure is the reading width for prose and forms;
     card grids, the header and the footer use the full .wrap. One --gap for every grid, so card
     columns and footer columns share the same edges. */
  --measure:    44rem;
  --gap:        1.5rem;

  --display: "Montserrat", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --ok-bg: #E9F1EA; --ok-br: #BAD5BF; --ok-tx: #1E4A2B;
  --er-bg: #FBECE8; --er-br: #EEC5B8; --er-tx: #7C3520;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* The wide container is for the header, footer and card grids. Running text is held to a reading
   measure by the max-width on p and headings below, so wide pages still read comfortably. */
.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ----------
   Generated by tools/build-site.py into every page, so it cannot drift between pages. */
.site-header { padding: 1.6rem 0 0; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem 1rem; flex-wrap: wrap;
}
.brand { display: block; line-height: 0; }
.brand img { height: 45px; width: auto; }

nav {
  display: flex; align-items: center; gap: 1.1rem;
  font-family: var(--display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
}
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--navy); }
nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--steel); }
.cc-btn { border: 1px solid var(--navy); color: var(--navy) !important; padding: 0.5rem 0.85rem; border-radius: 4px; box-shadow: none !important; }
.cc-btn:hover { background: var(--sky); }

.menu-btn {
  display: none; background: transparent; color: var(--navy); border: 1px solid var(--hair);
  padding: 0.5rem 0.95rem; font-family: var(--display); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; margin: 0;
}
.menu-btn:hover { background: var(--sky); color: var(--navy); }

@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 0.4rem 0 0.2rem; }
  .site-header.open nav { display: flex; }
  nav a { padding: 0.85rem 0; border-top: 1px solid var(--hair); font-size: 0.82rem; }
  nav a[aria-current="page"] { box-shadow: none; }
  .cc-btn { margin-top: 0.8rem; text-align: center; padding: 0.8rem; }
}
@media (max-width: 460px) { .brand img { height: 36px; } }

/* ---------- Type ---------- */
main { flex: 1 0 auto; padding: 3.5rem 0 4.5rem; }

.eyebrow {
  font-family: var(--display); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.18em;
  font-weight: 600; color: var(--steel-ink); margin-bottom: 1.4rem;
}

h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.1rem, 5.6vw, 3.25rem);
  line-height: 1.15; letter-spacing: -0.015em;
  color: var(--navy); margin-bottom: 1.4rem; max-width: var(--measure);
  text-wrap: balance;
}
h2 {
  font-family: var(--display); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.005em;
  color: var(--navy); margin: 2.8rem 0 0.7rem; max-width: var(--measure);
}
h3 { font-family: var(--display); font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--navy); }
.rule + h2 { margin-top: 0; }

p { color: var(--muted); max-width: var(--measure); }
p + p { margin-top: 1.1rem; }
.lede { font-size: 1.12rem; }
.lede + .lede { margin-top: 1.1rem; }
p a { color: var(--navy); }

.rule { border: 0; border-top: 1px solid var(--hair); margin: 3.25rem 0; }

ul { margin: 1.1rem 0 0; padding-left: 1.1rem; color: var(--muted); max-width: var(--measure); }
li { margin-bottom: 0.6rem; }
li strong { color: var(--ink); font-weight: 600; }

/* ---------- Click-to-open list (/about "As a church we are") ----------
   Plain <details>: works with no script, keyboard and screen readers get it for free. */
.marks { max-width: var(--measure); margin-top: 1.1rem; border-top: 1px solid var(--hair); }
.marks details { border-bottom: 1px solid var(--hair); }
.marks summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 0.95rem 0; font-family: var(--display); font-weight: 600; font-size: 1.02rem; color: var(--navy);
}
.marks summary::-webkit-details-marker { display: none; }
.marks summary::after { content: "+"; font-weight: 400; font-size: 1.35rem; line-height: 1; color: var(--steel-ink); }
.marks details[open] summary::after { content: "\2212"; }
.marks summary:hover { color: var(--navy-deep); }
.marks summary:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.marks details p { padding: 0 0 1.1rem; margin: 0; }

/* Logistics get their own plain block (VOICE.md): navy, so it reads as the answer. */
.when { color: var(--navy); font-size: 1.1rem; line-height: 1.6; }
.when strong { font-weight: 600; }

.callout { background: var(--sky); border-left: 3px solid var(--steel); border-radius: 4px; padding: 1rem 1.2rem; color: var(--ink); margin-top: 1.2rem; }
.callout a { color: var(--navy); font-weight: 600; }

/* ---------- Scripture ----------
   The page's closing note: a hairline, air above it, the verse in light navy on a short measure. */
.verse { margin-top: 3.25rem; padding-top: 2.25rem; border-top: 1px solid var(--hair); }
.verse p {
  font-size: 1.32rem; font-weight: 300; line-height: 1.45; letter-spacing: -0.01em;
  color: var(--navy); max-width: 24em; margin: 0; text-wrap: balance;
}
/* The same verse set up top, under the intro (/groups): hairlines both sides so it sits between the
   intro and the tool instead of closing the page. */
.verse.up { margin: 2.25rem 0; padding: 1.75rem 0; border-bottom: 1px solid var(--hair); max-width: var(--measure); }
.verse cite {
  display: block; margin-top: 1.1rem; font-style: normal; font-family: var(--display);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--steel-ink);
}

/* ---------- Social (footer) ----------
   TOUCH TARGETS: each link carries 0.8rem of padding around an 18px glyph for a 44px hit area;
   the negative block margin keeps that from inflating the row. Tune the padding, not the icon. */
.social { display: inline-flex; align-items: center; gap: 0; }
.social a { display: inline-flex; align-items: center; justify-content: center; padding: 0.8rem; margin-block: -0.8rem; color: var(--muted); text-decoration: none; }
.social a:hover { color: var(--navy); }
.social svg { width: 1.15rem; height: 1.15rem; display: block; fill: currentColor; }

/* An associated account that is NOT the church's own (@hhiyouth on Kids). A named inline link in
   the body copy, never an icon in the footer. The icon sits outside the <a> on purpose. */
.handle { white-space: nowrap; color: var(--navy); }
.handle svg { width: 1rem; height: 1rem; fill: currentColor; display: inline-block; vertical-align: -0.16em; margin-right: 0.28em; }

/* ---------- Buttons and forms ---------- */
.capture { margin-top: 2.5rem; max-width: var(--measure); }
.two { display: flex; gap: 0.6rem; }
.two input { flex: 1 1 0; min-width: 0; }
.capture .two, .form .two { margin-bottom: 0.6rem; }

input[type="email"], input[type="text"], textarea {
  width: 100%; min-width: 0; background: var(--field); border: 1px solid var(--hair); border-radius: 4px;
  padding: 0.85rem 0.95rem; font: inherit; color: var(--ink);
}
textarea { min-height: 6rem; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--gray); }
input:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 1px; border-color: var(--navy); }

button, .cta {
  display: inline-block; background: var(--navy); color: #fff; border: none; border-radius: 4px;
  padding: 0.85rem 1.8rem; font-family: var(--display); font-size: 0.92rem; font-weight: 600;
  letter-spacing: 0.04em; cursor: pointer; text-decoration: none;
  -webkit-appearance: none; appearance: none; transition: background 0.15s ease;
}
button:hover, .cta:hover { background: var(--navy-deep); color: #fff; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.cta { margin-top: 2rem; }
.cta.alt { background: transparent; color: var(--navy); border: 1px solid var(--navy); padding: calc(0.85rem - 1px) calc(1.8rem - 1px); }
.cta.alt:hover { background: var(--sky); color: var(--navy-deep); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.1rem; }
.cta-row .cta { margin-top: 0; }

.fine, .note { font-size: 0.86rem; line-height: 1.7; color: var(--muted); margin-top: 0.9rem; }
.note + .note { margin-top: 0.45rem; }
.note a, .fine a { color: var(--navy); }

.status { display: none; font-size: 0.95rem; border-radius: 4px; padding: 0.85rem 1rem; margin-top: 1rem; }
.status.ok  { display: block; background: var(--ok-bg); border: 1px solid var(--ok-br); color: var(--ok-tx); }
.status.err { display: block; background: var(--er-bg); border: 1px solid var(--er-br); color: var(--er-tx); }

.checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 0.9rem 0 1.1rem; }
.check { display: inline-flex; gap: 0.45rem; align-items: center; font-size: 0.95rem; color: var(--ink); }
.form { max-width: var(--measure); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--gap); margin-top: 1.25rem; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid.three, .grid.four { grid-template-columns: 1fr; } }

.card { border: 1px solid var(--hair); border-radius: 6px; padding: 1.25rem; background: #fff; display: flex; flex-direction: column;
  box-shadow: 0 1px 2px rgba(23,40,51,.06), 0 4px 14px rgba(23,40,51,.06); }

/* A card whose main link covers the whole card: the link's ::before is stretched over it, so the
   real <a> (and its text, for screen readers and track.js) stays where it is. */
.linked { position: relative; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.linked .card-link::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.linked:hover, .linked:focus-within {
  transform: translateY(-3px); border-color: var(--steel);
  box-shadow: 0 2px 4px rgba(23,40,51,.08), 0 12px 28px rgba(23,40,51,.12);
}
.linked:hover .card-link { border-bottom-color: var(--navy); }

/* Cards with a picture panel: the sky panel holds an icon now and a photo later. Shared with the
   homepage tiles (.step-art). */
.card.art { padding: 0; overflow: hidden; }
.card-art {
  display: flex; align-items: center; justify-content: center; height: 104px;
  background: var(--sky); color: var(--navy); border-bottom: 3px solid var(--navy);
}
.card-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Same as .step-art on the homepage: a photo panel goes 16:9. */
.card-art:has(img) { height: auto; aspect-ratio: 16 / 9; background: var(--sand); }
.art-ico { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
@media (max-width: 560px) { .card-art { height: 80px; } .card-art:has(img) { height: 140px; aspect-ratio: auto; } }

/* Small inline icon, e.g. the clock beside a group's schedule. */
.ico { width: 1em; height: 1em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-top: 0.3em; color: var(--steel-ink); }
.card h3 { margin-top: 0.55rem; }
.card > h3:first-child { margin-top: 0; }
.card-meta { color: var(--ink); font-size: 0.88rem; margin-top: 0.4rem; display: flex; gap: 0.45rem; align-items: flex-start; }
.card-desc { font-size: 0.88rem; margin-top: 0.55rem; flex: 1; }
.card-link {
  margin-top: 1rem; font-family: var(--display); font-size: 0.82rem; font-weight: 600; color: var(--navy);
  text-decoration: none; align-self: flex-start; border-bottom: 1px solid var(--steel);
}
.card-link::after { content: " \2192"; }
.card-link[target="_blank"]::after { content: " \2197"; }
.card-link:hover { border-bottom-color: var(--navy); }

.kicker {
  font-family: var(--display); font-size: 0.7rem !important; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600; color: var(--steel-ink) !important; margin-top: 0 !important;
}

.tags { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.tag {
  font-family: var(--display); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 600; color: var(--navy); background: var(--sky); border-radius: 3px; padding: 0.15rem 0.45rem;
}

/* Home: the four next steps
   A sky panel up top holds a line icon now and a photo later (an <img> inside .step-art fills it).
   Navy bar along the bottom of the panel, a lift and shadow on hover, and the "Go" arrow slides. */
.steps { margin-top: 2.75rem; }
a.step {
  padding: 0; overflow: hidden; text-decoration: none; border-color: var(--hair);
  box-shadow: 0 1px 2px rgba(23,40,51,.06), 0 4px 14px rgba(23,40,51,.06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
a.step:hover, a.step:focus-visible {
  transform: translateY(-3px); border-color: var(--steel);
  box-shadow: 0 2px 4px rgba(23,40,51,.08), 0 12px 28px rgba(23,40,51,.12);
}
.step-art {
  display: flex; align-items: center; justify-content: center; height: 104px;
  background: var(--sky); color: var(--navy); border-bottom: 3px solid var(--navy);
}
.step-art svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.step-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* With a photo the panel goes 16:9, so the shot reads as a photo and not a strip. */
.step-art:has(img) { height: auto; aspect-ratio: 16 / 9; background: var(--sand); }
.step-body { display: flex; flex-direction: column; flex: 1; padding: 1.15rem 1.25rem 1.25rem; }
a.step p { font-size: 0.9rem; margin-top: 0.45rem; flex: 1; }
a.step .go { margin-top: 1rem; font-family: var(--display); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--navy); }
a.step .go::after { content: "\2192"; display: inline-block; margin-left: 0.4em; transition: transform .18s ease; }
a.step:hover .go::after { transform: translateX(4px); }
@media (max-width: 560px) { .step-art { height: 80px; } .step-art:has(img) { height: 140px; aspect-ratio: auto; } }

/* Home: Latest message and Coming up side by side, filling the tiles' width. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 1rem; }
.duo h2 { margin-top: 1.5rem; }
.duo .ev-list.compact, .duo .sermon-list { grid-template-columns: 1fr; }
/* Equal heights: both columns stretch to the taller one, the card inside fills its column, and the
   "All sermons" / "All events" links line up underneath. */
.duo section { display: flex; flex-direction: column; }
.duo .sermon-list, .duo .ev-list { flex: 1; grid-auto-rows: 1fr; }
.duo .sermon-list .card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }

/* Groups filters */
.filters { margin: 2rem 0 0.25rem; display: grid; gap: 0.55rem; }
.f-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.f-label { width: 3.2rem; font-family: var(--display); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--steel-ink); }
.chip {
  background: #fff; color: var(--muted); border: 1px solid var(--hair); border-radius: 999px;
  padding: 0.35rem 0.85rem; font-family: inherit; font-size: 0.84rem; font-weight: 500; letter-spacing: 0;
}
.chip:hover { background: var(--sky); color: var(--navy); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.g-count { font-size: 0.84rem; margin-top: 1rem; }
.g-card { border-top: 4px solid var(--steel); }
.g-card[hidden] { display: none; }
.g-none { margin-top: 1.5rem; }

/* Events */
.ev-list { display: grid; gap: var(--gap); margin-top: 1.25rem; }
.ev-list.compact { grid-template-columns: 1fr 1fr; }
.ev-card { display: grid; grid-template-columns: 220px 1fr; border: 1px solid var(--hair); border-radius: 6px; overflow: hidden; background: #fff;
  box-shadow: 0 1px 2px rgba(23,40,51,.06), 0 4px 14px rgba(23,40,51,.06); }
.ev-card img, .ev-ph { width: 100%; height: 100%; min-height: 140px; object-fit: contain; background: var(--sand); padding: 0.75rem; }
.ev-body { padding: 1.2rem 1.3rem; display: flex; flex-direction: column; justify-content: center; }
.ev-body h3 { margin-top: 0.4rem; }
.ev-body p:not(.kicker) { font-size: 0.88rem; margin-top: 0.45rem; }
.compact .ev-card { grid-template-columns: 110px 1fr; }
@media (max-width: 640px) {
  .ev-card, .compact .ev-card { grid-template-columns: 1fr; }
  .ev-card img, .ev-ph { max-height: 180px; }
  .ev-list.compact { grid-template-columns: 1fr; }
}

/* Sermons */
.sermon-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-top: 1.25rem; }
@media (max-width: 760px) { .sermon-list { grid-template-columns: 1fr; } }
.sermon { flex-direction: row; gap: 1.1rem; align-items: flex-start; }
.sermon h3 { margin-top: 0.4rem; }
.badge {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.badge svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 460px) { .badge { width: 42px; height: 42px; } .badge svg { width: 20px; height: 20px; } }

/* Serve */
.already { margin-top: 3rem; background: var(--sand); border: 1px solid var(--hair); border-radius: 8px; padding: 0.4rem 1.6rem 1.6rem; max-width: var(--measure); }

/* ---------- Footer ----------
   Generated by tools/build-site.py. Navy with the white logo, approved by Justin Oct 1 2026.
   Labels are brand steel, which passes on navy (5.3:1) even though it fails on white. */
.site-footer { flex: 0 0 auto; background: var(--navy); color: rgba(255,255,255,.78); padding: 3.5rem 0 2.25rem; }
.foot-logo { height: 38px; width: auto; margin-bottom: 2.25rem; }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.site-footer p { max-width: none; font-size: 0.88rem; line-height: 1.6; margin-top: 0.4rem; color: rgba(255,255,255,.78); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.foot-label { font-family: var(--display); font-size: 0.68rem !important; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; color: var(--steel) !important; margin-top: 0 !important; }
.foot-strong { color: #fff !important; font-weight: 600; }
.foot-links a { display: block; }
.foot-social { margin-top: 0.6rem; margin-left: -0.8rem; }
.site-footer .social a { color: rgba(255,255,255,.85); }
.site-footer .social a:hover { color: var(--sky); }
.foot-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.14); }
.foot-base strong { font-family: var(--display); color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.credit { font-size: 0.74rem !important; color: rgba(255,255,255,.55) !important; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .foot-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  main { padding: 2.5rem 0 3.5rem; }
  .two { flex-direction: column; }
  .verse { margin-top: 2.5rem; padding-top: 1.75rem; }
  .verse p { font-size: 1.18rem; }
}
