/* ==========================================================================
   ODTD base.css: shared chrome for EVERY page (colour variables, typography,
   header + nav + drop-down, footer, generic page fallback).
   Template CSS goes in its own file (home.css, <template>.css); see README-dev.md.
   Values are copied from Main.dc.html / LeadershipMenu.dc.html / MainMobile.dc.html.
   ========================================================================== */

:root {
	--odtd-blue: #3F6E9C;        /* links, wordmark, primary button */
	--odtd-blue-lt: #6E9BC9;     /* Leadership door, footer wordmark */
	--odtd-coral: #DE8177;       /* Reformed Theology door */
	--odtd-rust: #B85B50;        /* Ministry Areas door, link hover */
	--odtd-ink: #33383D;         /* headings / body text */
	--odtd-muted: #5A5F65;       /* secondary text */
	--odtd-stone: #8C8880;       /* breadcrumb chevrons, eyebrow captions */
	--odtd-paper: #FCFAF6;       /* page background */
	--odtd-tint-blue: #EDF3F9;   /* hero band, footer */
	--odtd-tint-coral: #FCF1EE;
	--odtd-rule: #E4DED4;        /* header bottom border, dd rule */
	--odtd-foot-rule: #D4E2EF;
	--odtd-serif: Newsreader, Georgia, serif;
	--odtd-sans: Karla, "Helvetica Neue", Arial, sans-serif;
	--sec: #6E9BC9;              /* section colour; templates override per section */
	--tint: #EDF3F9;
}

body { margin: 0; background: var(--odtd-paper); font-family: var(--odtd-sans); color: var(--odtd-ink); }
a { color: var(--odtd-blue); text-decoration: none; }
a:hover { color: var(--odtd-rust); }
img { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul.plain, .nav-list, .dd-list, .site-footer ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.lnk { color: var(--odtd-blue); transition: color .15s ease; cursor: pointer; }
.lnk:hover { color: var(--odtd-rust); }
.lnk-btn { background: var(--odtd-blue); color: var(--odtd-paper); transition: background .15s ease; cursor: pointer; }
.lnk-btn:hover { background: var(--odtd-rust); color: var(--odtd-paper); }
.lnk-dot { border-color: var(--odtd-blue); color: var(--odtd-blue); transition: border-color .15s ease, color .15s ease; cursor: pointer; }
.lnk-dot:hover { border-color: var(--odtd-rust); color: var(--odtd-rust); }
:focus-visible { outline: 2px solid var(--odtd-blue); outline-offset: 3px; }

/* content cap at 1440 on wide screens; backgrounds stay full-bleed (Main.dc.html round 5) */
.wrap { max-width: 1440px; margin-left: auto; margin-right: auto; padding-left: 64px; padding-right: 64px; box-sizing: border-box; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--odtd-blue); color: var(--odtd-paper); padding: 10px 16px; }
.skip-link:focus { left: 16px; top: 16px; color: var(--odtd-paper); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* ---------- wordmark ---------- */
.brand { display: inline-flex; color: inherit; }
.wordmark { display: inline-flex; align-items: center; gap: 18px; }
.wordmark .mark { display: block; flex: none; }
.wm-text { display: flex; flex-direction: column; gap: 7px; }
.wm-name { font-family: var(--odtd-serif); font-size: 30px; font-weight: 400; line-height: 0.92; letter-spacing: 0.005em; color: var(--odtd-blue); white-space: nowrap; }
.wm-tag { display: flex; justify-content: space-between; font-size: 17px; font-weight: 500; color: var(--odtd-blue); line-height: 1; }
.wm-gap { width: 0.42em; }
.wordmark--footer { gap: 14px; }
.wordmark--footer .wm-text { gap: 5px; }
.wordmark--footer .wm-name { font-size: 22px; color: var(--odtd-blue-lt); }
.wordmark--footer .wm-tag { font-size: 15px; color: var(--odtd-blue-lt); }

/* ---------- header ---------- */
.site-header { position: relative; z-index: 4; background: var(--odtd-paper); border-bottom: 1px solid var(--odtd-rule); }
.site-header-in { padding-top: 34px; padding-bottom: 34px; display: flex; align-items: center; justify-content: space-between; }
.primary-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; align-items: center; gap: 28px; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 6px; color: var(--odtd-blue); transition: color .15s ease; }
.nav-link:hover, .nav-item.has-dd:hover > .nav-link, .nav-item.has-dd:focus-within > .nav-link { color: var(--odtd-rust); }
.nav-label { font-size: 20px; font-weight: 500; white-space: nowrap; }
.nav-link .chev { transition: transform .15s ease; }
.nav-item.has-dd:hover .chev, .nav-item.has-dd:focus-within .chev { transform: rotate(180deg); }
/* active section (Leadership.dc.html .nav-active): underline in the section colour */
.nav-item.is-active .nav-label { font-weight: 600; text-decoration: underline; text-decoration-color: var(--sec); text-decoration-thickness: 3px; text-underline-offset: 10px; }
.mobile-actions { display: none; }

/* drop-down panel (LeadershipMenu.dc.html): one panel for all four sections, top rule + label in the section colour.
   Round 2 (Nathan Loom 855ae9c0): panel sits directly under its parent label (top: 100%, no gap, so no hover bridge
   is needed); top row is the plain parent name, no arrow; rows 16px; hover = background highlight, no left accent bar. */
.dd { display: none; position: absolute; left: -20px; top: 100%; min-width: 318px; box-sizing: border-box; background: #FFFFFF; border-top: 3px solid var(--sec); box-shadow: 0 10px 24px rgba(51, 56, 61, 0.12); padding: 8px 0 10px; z-index: 5; }
/* 6px of the nav item itself below the label, so the panel's rule clears descenders while the hover area stays continuous */
@media (min-width: 1140px) { .nav-item.has-dd { padding-bottom: 6px; margin-bottom: -6px; } }
.nav-item.has-dd:hover > .dd, .nav-item.has-dd:focus-within > .dd { display: block; }
.dd-all { display: flex; align-items: center; min-height: 40px; padding: 0 20px; margin-bottom: 6px; border-bottom: 1px solid var(--odtd-rule); font-size: 16px; font-weight: 600; color: var(--sec); cursor: pointer; transition: background .15s ease, color .15s ease; }
.dd-all:hover, .dd-all:focus-visible { background: var(--odtd-tint-blue); color: var(--odtd-blue); }
.dd-row { height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; font-size: 16px; font-weight: 400; color: var(--odtd-muted); white-space: nowrap; cursor: pointer; transition: background .15s ease, color .15s ease; }
.dd-row .ar { opacity: 0; transition: opacity .15s ease, transform .15s ease; }
.dd-row:hover, .dd-row:focus-visible, .dd-row.is-current { background: var(--odtd-tint-blue); color: var(--odtd-blue); }
.dd-row:hover .ar, .dd-row:focus-visible .ar { opacity: 1; transform: translateX(2px); }

/* ---------- footer ---------- */
.site-footer { background: var(--odtd-tint-blue); }
.site-footer-in { padding-top: 56px; padding-bottom: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr 1fr; gap: 48px; align-items: start; }
.foot-about { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.foot-blurb { font-size: 15px; line-height: 1.7; color: var(--odtd-muted); max-width: 36ch; text-wrap: pretty; }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600; color: var(--odtd-ink); }
.foot-explore li { font-size: 16px; line-height: 1.85; }
.foot-partners { gap: 14px; }
.foot-partners ul { display: flex; flex-direction: column; gap: 10px; }
/* Round 2 (Nathan): partner links use the same regular style as the Explore links on EVERY page, home included. */
.foot-partners li { font-size: 16px; font-weight: 400; line-height: 1.4; }
.foot-contact { gap: 18px; align-items: flex-start; }
.foot-contact .lnk-btn { padding: 15px 30px; font-size: 14px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; display: inline-block; }
.foot-rule { height: 1px; background: var(--odtd-foot-rule); margin: 40px 0 22px; }
.foot-base { display: flex; justify-content: space-between; font-size: 14px; color: var(--odtd-muted); }
.foot-legal { display: inline-flex; gap: 8px; }

/* ---------- generic page / index fallback ---------- */
.page-generic { padding-top: 64px; padding-bottom: 90px; }
.page-generic .page-title { font-family: var(--odtd-serif); font-size: 56px; font-weight: 400; line-height: 1.08; color: var(--odtd-blue); margin-bottom: 32px; }
.entry-content { font-size: 18px; line-height: 1.65; color: var(--odtd-ink); max-width: 72ch; }
.entry-content > * + * { margin-top: 1em; }
.entry-content h2, .entry-content h3 { font-family: var(--odtd-serif); font-weight: 400; line-height: 1.2; color: var(--odtd-ink); margin-top: 1.4em; }
.entry-content h2 { font-size: 34px; }
.entry-content h3 { font-size: 26px; }
.post-list { display: flex; flex-direction: column; gap: 36px; }
.post-list h2 { font-family: var(--odtd-serif); font-size: 30px; font-weight: 400; }

/* ---------- responsive ---------- */
/* 1140-1349: nav would not fit at 20px; tighten the header only */
@media (max-width: 1349px) {
	.wrap { padding-left: 40px; padding-right: 40px; }
	.primary-nav, .nav-list { gap: 20px; }
	.nav-label { font-size: 17px; }
}

/* <=1139: compact header + hamburger (MainMobile.dc.html) */
@media (max-width: 1139px) {
	.site-header-in { padding: 14px 16px 14px 20px; max-width: none; }
	.wordmark--header { gap: 12px; }
	.wordmark--header .mark { width: 36px; height: 46px; }
	.wordmark--header .wm-text { gap: 5px; }
	.wordmark--header .wm-name { font-size: 22px; }
	.wordmark--header .wm-tag { font-size: 12.5px; }
	.mobile-actions { display: flex; align-items: center; gap: 4px; }
	.tap-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
	.primary-nav { display: none; }
	.nav-open .primary-nav { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--odtd-paper); border-bottom: 1px solid var(--odtd-rule); box-shadow: 0 10px 24px rgba(51, 56, 61, 0.12); padding: 4px 24px 16px; max-height: calc(100vh - 80px); overflow-y: auto; }
	.nav-open .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav-open .nav-item { border-bottom: 1px solid var(--odtd-rule); }
	.nav-open .nav-link { min-height: 52px; }
	.nav-open .nav-label { font-size: 19px; }
	.nav-open .nav-link .chev { display: none; }
	.nav-open .dd { display: block; position: static; min-width: 0; box-shadow: none; border-top: 0; background: transparent; padding: 0 0 10px; }
	.nav-open .dd::before { display: none; }
	.nav-open .dd-all { padding: 4px 0 8px 14px; margin: 0; border: 0; }
	.nav-open .dd-row { height: auto; min-height: 44px; padding: 0 0 0 14px; white-space: normal; font-size: 16px; }
	.foot-grid { grid-template-columns: 1fr 1fr; gap: 40px 48px; }
}

/* <=640: phone (MainMobile.dc.html, 390 board) */
@media (max-width: 640px) {
	.wrap { padding-left: 24px; padding-right: 24px; }
	.site-header-in { padding: 14px 16px 14px 20px; }
	.site-footer-in { padding-top: 44px; padding-bottom: 32px; }
	.foot-grid { display: flex; flex-direction: column; align-items: stretch; gap: 36px; }
	.foot-about { gap: 16px; }
	.foot-blurb { font-size: 16px; line-height: 1.65; max-width: none; }
	.foot-col, .foot-partners { gap: 4px; }
	.eyebrow { font-size: 13px; }
	.foot-explore li { font-size: 17px; line-height: normal; }
	.foot-explore a, .foot-legal a { display: flex; align-items: center; min-height: 44px; }
	.foot-partners ul { gap: 0; }
	.foot-partners li { font-size: 17px; }
	.foot-partners a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; box-sizing: border-box; }
	.foot-contact { gap: 14px; align-items: stretch; }
	.foot-contact .lnk-btn { display: block; text-align: center; padding: 16px 30px; font-size: 15px; }
	.foot-rule { margin: 36px 0 16px; }
	.foot-base { flex-direction: column; gap: 6px; font-size: 16px; }
	.foot-base > span:first-child { line-height: 1.5; }
	.foot-legal { align-items: center; }
	.page-generic { padding-top: 40px; padding-bottom: 64px; }
	.page-generic .page-title { font-size: 40px; }
}
