/* One Family theme: shared foundation (ported from the Front Door mockup).
   Brand fonts are self-hosted from the church's branding kit.
   Each design sets the custom properties below; this file only uses them. */

@font-face { font-family: 'Lequire'; src: url('../fonts/lequire.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Lequire Outline'; src: url('../fonts/lequire-outline.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-semibold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Montserrat'; src: url('../fonts/montserrat-extrabold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
/* Arial resized to Montserrat's proportions (measured from the font files), so text
   doesn't re-wrap or jump when the real font swaps in. Bold Arial stands in for 600-800. */
@font-face { font-family: 'Montserrat Fallback'; src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('Arimo'); font-weight: 100 500; size-adjust: 108.4%; ascent-override: 89.3%; descent-override: 23.2%; line-gap-override: 0%; }
@font-face { font-family: 'Montserrat Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'), local('Arimo Bold'); font-weight: 600 900; size-adjust: 104.8%; ascent-override: 92.4%; descent-override: 23.9%; line-gap-override: 0%; }

:root {
  /* Brand palette (One Family Church, RGB for web) */
  --ink: #090A0D;
  --charcoal: #20242A;
  --charcoal-2: #2B3139;
  --charcoal-3: #39424C;
  --slate: #5E6C7A;
  --orange: #FF953E;
  --peach: #FFB76B;
  --white: #FFFFFF;
  /* The brand's blues belong to One Family Kids, so the main site never uses them.
     Light surfaces are neutral tints of the brand charcoal instead. */
  --tint: #F2F3F4;
  --tint-2: #E6E8EA;

  /* Design-level tokens, overridden per design */
  --bg: var(--white);
  --fg: var(--charcoal);
  --muted: #4B5663;
  --line: #D5DEE5;
  --link: var(--charcoal);
  --btn-bg: var(--orange);
  --btn-fg: var(--charcoal);
  --btn2-line: var(--charcoal);
  --focus: var(--charcoal);
  --head-bg: var(--white);
  --sub-bg: var(--white);
  --ov-bg: var(--white);
  --radius: 4px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --head-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 1.0625rem/1.65 'Montserrat', 'Montserrat Fallback', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img, svg, iframe { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1240px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--charcoal); color: var(--white); font-weight: 700; }
.skip:focus { top: 1rem; }
main:focus { outline: none; }

/* ---------- type ---------- */
.lq { font-family: 'Lequire', 'Montserrat', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: .98; }
.h2 { font-family: 'Lequire', 'Montserrat', sans-serif; font-weight: 400; text-transform: uppercase; font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 1; letter-spacing: .01em; }
.h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.5; max-width: 38ch; }
.intro { color: var(--muted); max-width: 62ch; }
.refs { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
p + p { margin-top: 1em; }

/* ---------- controls ---------- */
.ctas { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.75rem; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .8rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent;
  font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; letter-spacing: .01em;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn--primary:hover { background: var(--peach); }
.btn--secondary { border-color: var(--btn2-line); color: var(--fg); }
.btn--secondary:hover { background: var(--btn2-line); color: var(--bg); }
.btn--text { padding: 0; min-height: 0; border: 0; color: var(--link); text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }
.btn--text:hover { text-decoration-color: var(--orange); }
.link { font-weight: 700; color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .3em; }
.link:hover { text-decoration-color: var(--orange); }

/* ---------- header + nav ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: var(--head-bg); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--head-h); }
.brand img { height: 42px; width: auto; }
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__item { position: relative; }
.nav__top { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .75rem; font-weight: 600; font-size: .95rem; text-decoration: none; border-radius: var(--radius); }
.nav__top:hover { color: var(--link); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; text-decoration-color: var(--orange); }
.has-sub > .nav__top::after { content: ''; width: .45em; height: .45em; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-.15em) rotate(45deg); transition: transform .15s; }
.has-sub > .nav__top[aria-expanded="true"]::after { transform: translateY(.1em) rotate(-135deg); }
.nav__sub {
  position: absolute; left: 0; top: calc(100% + .25rem); min-width: 250px; padding: .5rem;
  background: var(--sub-bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(9, 10, 13, .16); display: none; z-index: 5;
}
/* Invisible bridge over the gap above the menu, so the pointer keeps :hover on the way down */
.nav__sub::before { content: ''; position: absolute; left: 0; right: 0; bottom: 100%; height: .75rem; }
.nav__top[aria-expanded="true"] + .nav__sub { display: block; }
@media (hover: hover) { .has-sub:hover > .nav__sub { display: block; } }
.nav__sub a { display: block; padding: .55rem .75rem; text-decoration: none; font-size: .95rem; border-radius: 3px; }
.nav__sub a:hover { background: var(--tint); color: var(--charcoal); }
.nav__cta { margin-left: .75rem; }
.nav__cta .btn { min-height: 44px; padding: .6rem 1.1rem; }

.menu-btn { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .5rem .25rem .5rem .5rem; font-weight: 700; font-size: .95rem; }
.menu-btn__bars, .menu-btn__bars::before { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
.menu-btn__bars::before { content: ''; position: absolute; top: 7px; }
.menu-btn__bars { transform: translateY(-3.5px); }
.menu-btn[aria-expanded="true"] .menu-btn__bars { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(-7px) rotate(-90deg); }
.menu-btn { margin-left: auto; }
.head-cta { min-height: 44px; padding: .55rem 1.1rem; margin-left: -.75rem; }
@media (max-width: 439px) {
  .brand img { height: 34px; }
  .menu-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (min-width: 1080px) {
  .nav { display: block; }
  .site-head .nav ~ .menu-btn, .head-cta { display: none; }
}

.overlay { position: fixed; inset: 0; z-index: 40; background: var(--ov-bg); overflow-y: auto; padding: calc(var(--head-h) + 2rem) 0 8rem; }
.overlay__inner { display: grid; gap: 2.5rem 3rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.overlay__group h2 { font-size: .95rem; font-weight: 700; color: var(--muted); margin-bottom: .75rem; }
.overlay__group a { display: block; padding: .35rem 0; font-size: 1.2rem; font-weight: 600; text-decoration: none; }
.overlay__group a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .3em; }

/* ---------- video facade ---------- */
.video { position: relative; aspect-ratio: 16 / 9; background: var(--charcoal); border-radius: var(--radius); overflow: hidden; }
.video__play { position: absolute; inset: 0; width: 100%; padding: 0; }
.video__play img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video__play:hover img { transform: scale(1.02); }
.video__icon { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: var(--orange); box-shadow: 0 8px 30px rgba(9, 10, 13, .35); }
.video__icon::after { content: ''; position: absolute; left: 31px; top: 24px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent var(--charcoal); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- inner pages: shared block layout ---------- */
.ofc-page { display: grid; gap: clamp(3.5rem, 7vw, 6rem); padding-block: clamp(3rem, 6vw, 5.5rem); }
.phead-logo { display: block; max-height: clamp(84px, 9vw, 120px); max-width: 100%; width: auto; margin: 0 0 .25rem; }

.b-text { display: grid; gap: 2.5rem; }
.b-text__copy p { max-width: 66ch; }
.b-text__copy .h2 { margin-bottom: 1.25rem; }
.b-text__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
@media (min-width: 900px) { .b-text.has-img { grid-template-columns: 1.15fr .85fr; gap: clamp(3rem, 6vw, 6rem); align-items: center; } }
/* Photo on the left, so two text+photo blocks in a row alternate sides. */
@media (min-width: 900px) { .b-text.has-img.is-flipped { grid-template-columns: .85fr 1.15fr; } .b-text.is-flipped .b-text__media { order: -1; } }

.b-pair { display: grid; gap: 2.5rem; }
.b-pair__item { border-top: 2px solid var(--line); padding-top: 1.5rem; }
.b-pair__item .h2 { margin-bottom: 1rem; font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
@media (min-width: 760px) { .b-pair { grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); } }

.b-cards > .h2 { margin-bottom: 1rem; }
.b-cards > .intro { margin-bottom: 2rem; }
.b-cards__grid { display: grid; gap: 2.5rem 3rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); margin-top: 2rem; }
.card { border-top: 2px solid var(--line); padding-top: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.card .btn--text { margin-top: auto; padding-top: .5rem; align-self: flex-start; }
.card__ref { font-size: .9rem; font-weight: 600; color: var(--muted); }

.b-acc { display: grid; gap: 2rem; }
.b-acc__head .h2 { margin-bottom: 1rem; }
@media (min-width: 960px) { .b-acc { grid-template-columns: .8fr 1.4fr; gap: 4rem; } .b-acc__head { position: sticky; top: calc(var(--head-h) + 2rem); align-self: start; } }
.acc { border-bottom: 1px solid var(--line); }
.acc:first-child { border-top: 1px solid var(--line); }
.acc summary { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.15rem 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 1.1rem; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary i { position: relative; flex: none; width: 16px; height: 16px; }
.acc summary i::before, .acc summary i::after { content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 2px; background: currentColor; transition: transform .2s; }
.acc summary i::after { transform: rotate(90deg); }
.acc[open] summary i::after { transform: rotate(0); }
.acc__body { padding: 0 0 1.5rem; max-width: 70ch; }

.b-people__head { margin-bottom: 2.5rem; display: grid; gap: 1rem; }
.b-people__head .intro { max-width: none; } /* Bre: the team sections run the full width */
.people { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
/* Every row fills the width with whole (2:3) portraits. The two lead pastors are centered
   above the elders at the elders' size (a third of the row; Melo asked for smaller photos),
   and their larger names set them apart. Phones stack everyone full width. */
.people--lead { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2.5rem 2rem; margin-bottom: 3.5rem; }
@media (min-width: 760px) {
	.people--lead { display: flex; flex-wrap: wrap; justify-content: center; }
	.people--lead .person { flex: 0 0 calc((100% - 4rem) / 3); }
}
.people--lead .person__name { font-size: 1.6rem; }
.people--lead .person__role { font-size: 1.05rem; }
.person__img { aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--tint); margin-bottom: 1rem; }
.person__img img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-size: 1.15rem; font-weight: 700; }
.person__role { color: var(--muted); font-size: .95rem; line-height: 1.45; margin-top: .2rem; }
.person__email { display: inline-block; margin-top: .6rem; font-weight: 700; font-size: .9rem; text-underline-offset: .3em; }

.b-links ul { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 1.25rem; }
.b-links a { font-weight: 700; font-size: 1.15rem; text-underline-offset: .3em; }

.b-video .h2 { margin-bottom: 1.5rem; }
.b-cta { max-width: 70ch; }
.b-cta .h2 { margin-bottom: 1rem; }

.b-covenant { max-width: 78ch; }
.b-covenant .h2 { margin-bottom: 1rem; }
.b-covenant ul { margin-top: 2rem; display: grid; gap: 1.25rem; }
.b-covenant li { padding-left: 1.5rem; border-left: 3px solid var(--orange); }
.b-covenant li .refs { margin-top: .25rem; }
.outro { margin-top: 2rem; font-weight: 600; }

.b-quote { text-align: center; max-width: 52rem; margin-inline: auto; }
.b-quote blockquote p { font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.4; font-weight: 500; }
.b-quote blockquote p::before { content: '“'; } .b-quote blockquote p::after { content: '”'; }
.b-quote figcaption { margin-top: 1rem; font-weight: 700; color: var(--muted); }

.b-res { display: grid; gap: 2rem; }
.res-jump ul { display: flex; flex-wrap: wrap; gap: .5rem; }
.res-jump a { display: inline-block; padding: .45rem .95rem; border: 2px solid var(--line); border-radius: 999px; font-size: .9rem; font-weight: 600; text-decoration: none; }
.res-jump a:hover { border-color: var(--orange); }
.res { background: var(--tint); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 3rem); }
.res__head { max-width: 62ch; margin-bottom: 2.25rem; }
.res__head .h2 { font-size: clamp(1.5rem, 2.3vw, 2rem); margin-bottom: .75rem; }
.res__head p { color: var(--muted); }
.res__label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; }
.res__books { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.res__books + .res__label { margin-top: 2.75rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.book { display: grid; gap: 1rem; align-content: start; }
.book__cover { display: block; width: 100%; max-width: 150px; }
.book__cover img { width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 1px 2px rgba(32, 36, 42, .2), 0 12px 24px -10px rgba(32, 36, 42, .45); transition: transform .2s; }
.book__cover:hover img { transform: translateY(-3px); }
.book__txt { display: flex; flex-direction: column; gap: .3rem; }
.book__t { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.book__a { font-size: .9rem; font-weight: 600; color: var(--muted); }
.book__d { font-size: .95rem; }
.book__link { margin-top: .35rem; align-self: flex-start; font-size: .9rem; font-weight: 700; text-underline-offset: .3em; text-decoration-thickness: 2px; text-decoration-color: var(--orange); }
@media (max-width: 559px) { .book { grid-template-columns: 96px 1fr; gap: 1.25rem; } }
.res__sites { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; font-size: .95rem; font-weight: 600; }
.res__sites a { text-underline-offset: .3em; }
.res__sites a:hover { text-decoration-color: var(--orange); text-decoration-thickness: 2px; }

.b-note { border-left: 4px solid var(--orange); padding: .25rem 0 .25rem 1.5rem; max-width: 70ch; font-weight: 500; }

.b-facts { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.b-facts div { border-top: 2px solid var(--line); padding-top: 1rem; }
.b-facts dt { font-size: .9rem; font-weight: 600; color: var(--muted); }
.b-facts dd { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-top: .25rem; }

.b-list { max-width: 72ch; }
.b-list .h2 { margin-bottom: 1rem; }
.b-list ul { margin-top: 1.25rem; display: grid; gap: .75rem; }
.b-list li { padding-left: 1.5rem; position: relative; }
.b-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 8px; background: var(--orange); border-radius: 1px; }

/* ---------- footer (shared structure) ---------- */
.site-foot { position: relative; overflow: hidden; padding: clamp(3.5rem, 7vw, 5.5rem) 0 2rem; }
.site-foot__in { display: grid; gap: 2.5rem 2rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); position: relative; }
.site-foot__brand { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; justify-content: space-between; padding-bottom: 2.5rem; border-bottom: 1px solid var(--foot-line, rgba(255, 255, 255, .15)); }
.site-foot__brand img { height: 92px; width: auto; }
.site-foot__brand p { font-family: 'Lequire', sans-serif; text-transform: uppercase; font-size: clamp(1.1rem, 2vw, 1.5rem); line-height: 1.2; max-width: 22ch; }
.site-foot h2 { font-size: .9rem; font-weight: 700; margin-bottom: .75rem; opacity: .75; }
.site-foot ul { display: grid; gap: .35rem; }
.site-foot a { text-decoration: none; font-size: .95rem; }
.site-foot a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: .3em; }
.site-foot__visit p { font-size: .95rem; }
.site-foot__visit a { display: inline-block; margin-top: .5rem; font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }
.site-foot__base { margin-top: 3rem; font-size: .85rem; opacity: .7; position: relative; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Footer base line */
.site-foot__base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; }
.site-foot__base p { margin: 0; line-height: 1.5; }
.site-foot__base p + p { margin-top: 0; }

/* Photos fade in on load (class set by the inline script in functions.php), over
   a quiet tint so the frame never flashes white. Reduced motion: no fade. */
.js main img:not(.is-in) { opacity: 0; }
.js main img { transition: opacity .2s ease-out; }
@media (prefers-reduced-motion: reduce) { .js main img { transition: none; } }
.fd-hero__photo, .fd-phead__img, .fd-phead__strip, .fd-family__img, .b-text__media, .video__play { background-color: var(--tint-2); }
