/*
Theme Name: Oakridge Church of Christ
Theme URI: https://oakridgefaith.org
Description: Custom theme for the Oakridge Church of Christ, Vancouver BC. "Open Door" brand: navy, brick and sky, photo-led home page, weekly bulletin, contact and Bible study inbox.
Version: 1.1.2
Requires PHP: 8.1
Text Domain: oakridge
*/

/* ========================================================= tokens */
:root {
  --forest: #1F2A44;
  --forest-2: #2A3858;
  --forest-3: #3A4A6E;
  --oak: #B4583A;
  --oak-dark: #A04C30;
  --oak-tint: #F6E6DF;
  --leaf: #9CC3E0;
  --cream: #F3EFE8;
  --paper: #FAF7F2;
  --text: #1C2333;
  --muted: #4B5263;
  --line: #E7E1D6;
  --white: #fff;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgba(31,42,68,.05), 0 14px 34px -14px rgba(31,42,68,.22);
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; }
img, svg, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--forest-2); text-decoration-color: color-mix(in srgb, var(--oak) 60%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--oak-dark); text-decoration-color: var(--oak); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; color: var(--forest); letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
h4 { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
p { margin: 0 0 1.1em; }
.icon { width: 22px; height: 22px; flex: none; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 10px; left: 10px; width: auto; height: auto; clip: auto; z-index: 1000; background: var(--white); padding: 10px 16px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--oak); outline-offset: 3px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section.alt { background: var(--cream); }
.grid-2 { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1fr 1fr; }
.align-center { align-items: center; }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--oak-dark); margin-bottom: 14px; }
.eyebrow-light { color: #F2B9A3; }
.lead { font-size: 1.2rem; }
.dim { opacity: .7; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ========================================================= buttons */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 13px 24px; border-radius: 999px; font: 600 .97rem/1.2 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 19px; height: 19px; }
.btn-oak { background: var(--oak); color: var(--white); }
.btn-oak:hover { background: var(--oak-dark); color: var(--white); }
.btn-forest { background: var(--forest); color: var(--white); }
.btn-forest:hover { background: var(--forest-3); color: var(--white); }
.btn-ghost { color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--white); border-color: var(--white); }
.btn-line { color: var(--forest); border-color: var(--forest); }
.btn-line:hover { background: var(--forest); color: var(--white); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--oak-dark); }
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ========================================================= header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,247,242,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); transition: background .25s, border-color .25s; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--forest); }
.brand img { width: 40px; height: 40px; }
.brand > span { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font: 400 1.4rem/1 var(--serif); }
.brand-sub { font: 500 .72rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; opacity: .75; }
.brand-light { color: var(--white); }
.nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 9px 13px; border-radius: 999px; font-weight: 500; font-size: .96rem; text-decoration: none; color: var(--forest); }
.nav a:hover, .nav .current-menu-item > a { background: var(--oak-tint); color: var(--forest); }
.nav .menu-cta a { background: var(--forest); color: var(--white); padding-inline: 18px; margin-left: 6px; }
.nav .menu-cta a:hover { background: var(--oak); color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer; }
.nav-toggle .icon { width: 28px; height: 28px; }

/* Over the photo hero: transparent until scrolled */
.over-hero { position: fixed; left: 0; right: 0; background: transparent; border-color: transparent; backdrop-filter: none; }
.over-hero .brand, .over-hero .nav-toggle { color: var(--white); }
.over-hero .nav > ul > li:not(.menu-cta) > a { color: var(--white); }
.over-hero .nav > ul > li:not(.menu-cta) > a:hover { background: rgba(255,255,255,.14); }
.over-hero .nav .menu-cta a { background: var(--oak); }
.over-hero.scrolled, .over-hero.menu-open { background: rgba(250,247,242,.96); backdrop-filter: blur(10px); border-color: var(--line); }
.over-hero.scrolled .brand, .over-hero.scrolled .nav-toggle, .over-hero.menu-open .brand, .over-hero.menu-open .nav-toggle { color: var(--forest); }
.over-hero.scrolled .nav > ul > li:not(.menu-cta) > a { color: var(--forest); }
.over-hero.scrolled .nav > ul > li:not(.menu-cta) > a:hover { background: var(--oak-tint); }
.over-hero.scrolled .nav .menu-cta a { background: var(--forest); }

/* ========================================================= hero */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: flex-end; color: var(--white); background: var(--forest) var(--hero, none) center 35% / cover no-repeat; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(16,22,38,.55) 0%, rgba(16,22,38,.25) 35%, rgba(16,22,38,.88) 100%); }
.hero-inner { padding: calc(var(--header-h) + 60px) 0 clamp(56px, 8vw, 96px); max-width: 760px; margin-left: max(20px, (100% - var(--wrap)) / 2); }
.hero h1 { color: var(--white); margin-bottom: .35em; }
.hero .lead { color: rgba(255,255,255,.9); max-width: 580px; }

.times-bar { background: var(--forest); color: var(--white); }
.times-bar .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.time { display: flex; align-items: center; gap: 14px; padding: 24px 22px; text-decoration: none; color: var(--white); border-left: 1px solid rgba(255,255,255,.12); }
.time:first-child { border-left: 0; padding-left: 0; }
.time .icon { width: 28px; height: 28px; color: #9CC3E0; }
.time span { display: block; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.time strong { font: 700 1.25rem/1.3 var(--serif); }
a.time:hover { color: var(--white); background: rgba(255,255,255,.05); }

/* ========================================================= home sections */
.welcome .entry-content { font-size: 1.08rem; color: var(--muted); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: clamp(40px, 6vw, 64px); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow); }
.card .icon { width: 32px; height: 32px; color: var(--oak); margin-bottom: 16px; }
.card h3 { margin-bottom: .4em; }
.card p { font-family: var(--serif); font-style: italic; color: var(--muted); margin-bottom: .5em; }
.card cite { font-style: normal; font-size: .85rem; font-weight: 600; color: var(--oak-dark); letter-spacing: .04em; }

.photo { margin: 0; position: relative; }
.photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 30% 30%; border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.photo::after { content: ""; position: absolute; inset: auto -14px -14px auto; width: 55%; height: 55%; border: 2px solid var(--oak); border-radius: var(--radius-lg); z-index: -1; }
.minister .photo { isolation: isolate; }

.verse { margin: 0 0 8px; padding: 0 0 0 22px; border-left: 3px solid var(--oak); font: italic 500 1.2rem/1.6 var(--serif); color: var(--forest-2); }
.bulletin-preview { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .3s var(--ease); background: var(--white); }
.bulletin-preview:hover { transform: translateY(-3px); }

.cta-band { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: center; background: var(--forest) radial-gradient(circle at 100% 0, rgba(180,88,58,.35), transparent 55%); color: rgba(255,255,255,.88); border-radius: var(--radius-lg); padding: clamp(36px, 6vw, 64px); }
.cta-band h2 { color: var(--white); }
.cta-band p { margin: 0; }
.cta-band .actions { margin: 0; justify-content: flex-end; }
.study { padding-top: 0; }
.bulletin-feature + .study { padding-top: 0; }

.times { list-style: none; margin: 8px 0 26px; padding: 0; border-top: 1px solid var(--line); }
.times li { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.times strong { font: 700 1.15rem/1.4 var(--serif); color: var(--forest); white-space: nowrap; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.facts li { display: flex; gap: 12px; align-items: flex-start; color: var(--muted); }
.facts .icon { color: var(--oak); margin-top: 3px; }
.map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 380px; background: var(--cream); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 380px; border: 0; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-strip img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }

/* ========================================================= inner pages */
.page-hero { background: var(--forest) radial-gradient(circle at 85% 0, rgba(180,88,58,.32), transparent 50%); color: rgba(255,255,255,.85); padding: clamp(56px, 8vw, 96px) 0 clamp(48px, 6vw, 72px); }
.page-hero h1 { color: var(--white); font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-bottom: .25em; }
.page-hero p { font-size: 1.15rem; max-width: 640px; margin: 0; }
.page-hero .eyebrow { color: #F2B9A3; }
.entry { padding: clamp(48px, 7vw, 88px) 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.6em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .45em; }
.entry-content blockquote, .wp-block-quote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--oak); font: italic 500 1.12rem/1.65 var(--serif); color: var(--forest-2); }
.entry-content blockquote cite, .wp-block-quote cite { display: block; margin-top: 8px; font: 600 .85rem/1.4 var(--sans); font-style: normal; color: var(--oak-dark); }
.entry-content img { border-radius: var(--radius); }
.entry-content .wp-block-file { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 18px 20px; background: var(--cream); border-radius: var(--radius); }
.entry-content .wp-block-file__button { background: var(--oak); color: var(--white); border-radius: 999px; padding: 9px 20px; font-weight: 600; text-decoration: none; }
.entry-content .wp-block-file__button:hover { background: var(--oak-dark); }
.wp-block-gallery { gap: 12px !important; }
.wp-block-gallery img { border-radius: 12px; }
.note { font-size: .9rem; color: var(--muted); }
.back { margin-top: 40px; }
.steps { counter-reset: step; list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; padding: 22px 24px 22px 76px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin: 0 !important; }
.steps > li::before { content: counter(step); position: absolute; left: 22px; top: 20px; width: 38px; height: 38px; border-radius: 50%; background: var(--forest); color: var(--white); display: grid; place-items: center; font: 700 1.05rem/1 var(--serif); }
.steps strong { display: block; font: 700 1.15rem/1.3 var(--serif); color: var(--forest); margin-bottom: 4px; }
.steps em { color: var(--muted); }

/* Sections template */
.sections .section:first-child { padding-top: clamp(48px, 7vw, 88px); }
.split-photo img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; object-position: 30% 30%; }

/* Bulletins */
.bulletins { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 26px; }
.bulletin-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.bulletin-thumb { display: block; aspect-ratio: 3/2; background: var(--cream); overflow: hidden; }
.bulletin-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s var(--ease); }
.bulletin-card:hover .bulletin-thumb img { transform: scale(1.03); }
.thumb-fallback { display: grid; place-items: center; height: 100%; color: var(--oak); }
.thumb-fallback .icon { width: 48px; height: 48px; }
.bulletin-body { padding: 22px 24px 26px; }
.bulletin-body h3 a { text-decoration: none; color: var(--forest); }
.bulletin-body p { color: var(--muted); font-family: var(--serif); font-style: italic; }
.bulletin-figure { margin: 0 0 32px; }
.bulletin-figure img { border: 1px solid var(--line); box-shadow: var(--shadow); }
.pager { margin-top: 40px; }
.pager .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pager .page-numbers { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; }
.pager .current { background: var(--forest); color: var(--white); border-color: var(--forest); }

/* Resources */
.link-list { list-style: none; padding: 0 !important; display: grid; gap: 12px; }
.link-list li { margin: 0 !important; }
.link-list a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); text-decoration: none; font-weight: 600; color: var(--forest); transition: border-color .2s, transform .2s var(--ease); }
.link-list a::after { content: "\2197"; color: var(--oak); }
.link-list a:hover { border-color: var(--oak); transform: translateX(3px); }
.link-list span { display: block; font-weight: 400; font-size: .92rem; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 5vw, 64px); }
.contact-card { background: var(--cream); border-radius: var(--radius-lg); padding: 32px; }
.contact-card h3 { margin-top: 0; }
.form { display: grid; gap: 16px; }
.form label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--forest); }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea { width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; background: var(--white); color: var(--text); }
.form textarea { min-height: 170px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--oak); outline: none; box-shadow: 0 0 0 3px var(--oak-tint); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.alert-ok { background: #E6F0E1; color: #2D4A22; }
.alert-err { background: #F8E3DC; color: #7A2E17; }

/* ========================================================= footer */
.site-footer { background: #161E33; color: rgba(255,255,255,.72); padding: 72px 0 28px; font-size: .95rem; }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover { color: #F2B9A3; }
.site-footer h4 { color: var(--white); margin-bottom: 16px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid p { margin: 18px 0; max-width: 340px; }
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 52px; padding-top: 24px; font-size: .85rem; opacity: .75; }

/* ========================================================= motion */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease) var(--d, 0s), transform .7s var(--ease) var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } .btn, .link-arrow .icon { transition: none; } }

/* ========================================================= responsive */
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 2px; }
  .nav a, .over-hero .nav > ul > li:not(.menu-cta) > a { color: var(--forest); padding: 13px 14px; }
  .nav .menu-cta a { margin: 8px 0 0; text-align: center; }
  .grid-2, .contact-grid, .cta-band { grid-template-columns: 1fr; }
  .cta-band .actions { justify-content: flex-start; }
  .pillars { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .minister .photo { max-width: 460px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .times-bar .wrap { grid-template-columns: 1fr; }
  .time { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; }
  .time:first-child { border-top: 0; }
  .row-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { min-height: 640px; }
  .steps > li { padding: 70px 20px 20px; }
  .steps > li::before { top: 18px; left: 20px; }
}
