/*
Theme Name: Wells Recovery Foundation
Theme URI: https://wellsrecoveryfoundation.org
Author: OpenAI
Description: A restrained, editorial WordPress theme for The Wells Recovery Foundation.
Version: 2.3.10
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: wells-recovery
License: GNU General Public License v2 or later
*/

:root {
  --ink: #12182a;
  --blue: #496276;
  --slate: #2e3e56;
  --mist: #7d91a5;
  --gold: #c0a168;
  --sand: #d6c08e;
  --paper: #f7f7f5;
  --white: #ffffff;
  --body: #3b4b5c;
  --rule: rgba(73, 98, 118, 0.22);
  --wide: 0.16em;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --container: 1280px;
  --section: clamp(4.5rem, 9vw, 8rem);
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.28vw + 0.95rem, 1.12rem);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.skip-link { position: absolute; left: -9999px; top: 1rem; z-index: 9999; padding: .75rem 1rem; background: var(--ink); color: #fff; }
.skip-link:focus { left: 1rem; }
.wrap { width: 100%; max-width: var(--container); margin-left: auto; margin-right: auto; padding-left: var(--pad); padding-right: var(--pad); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.label,
.site-nav a,
h2,
.section-label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: var(--wide);
  font-weight: 600;
  font-size: .71rem;
  line-height: 1.4;
}
.eyebrow { display: inline-block; color: var(--blue); padding-top: .85rem; border-top: 2px solid var(--gold); margin-bottom: 2rem; }
h1,h2,h3 { color: var(--ink); margin: 0; }
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 6.75rem);
  line-height: .98;
  letter-spacing: -.035em;
  max-width: 11.5ch;
}
h2 { color: var(--ink); }
h3 { font-family: var(--serif); font-size: clamp(1.45rem, 1.6vw, 2rem); font-weight: 400; line-height: 1.15; }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }
.lede { font-family: var(--sans); font-size: clamp(1.08rem, .7vw + .95rem, 1.35rem); line-height: 1.55; color: var(--slate); max-width: 46ch; }

.site-header { background: rgba(247,247,245,.96); }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-top: 2rem; padding-bottom: 2rem; }
.brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.site-logo { width: min(355px, 48vw); height: auto; }
.custom-logo { width: min(355px, 48vw); height: auto; }
.site-nav ul { list-style: none; display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 3.4rem); margin: 0; padding: 0; }
.site-nav a { color: var(--ink); text-decoration: none; padding-bottom: .35rem; border-bottom: 1px solid transparent; }
.site-nav a:hover { border-color: var(--gold); }
.menu-toggle { display: none; appearance: none; background: none; border: 0; color: var(--ink); padding: .5rem; }
.menu-toggle span { display: block; width: 25px; height: 1.5px; background: currentColor; margin: 5px 0; }

.hero { padding-top: clamp(5rem, 10vw, 10rem); padding-bottom: clamp(4rem, 8vw, 7rem); }
.hero .lede { margin-top: 2.6rem; }
.gold-mark { display: inline-block; width: 2.3rem; height: 2px; background: var(--gold); margin: 2rem 0 0; }
.interval { margin-top: clamp(4rem, 8vw, 7rem); display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 15rem); align-items: center; gap: 1.5rem; }
.node .label { color: var(--ink); display: block; }
.node .sub { font-family: var(--serif); font-size: 1.05rem; font-style: italic; color: var(--slate); display: block; margin-top: .45rem; line-height: 1.45; }
.node--end { text-align: right; }
.span { position: relative; padding-bottom: 2.3rem; }
.rail { position: relative; height: 2px; background: var(--gold); }
.rail::before,.rail::after { content: ""; position: absolute; top: -10px; width: 3px; height: 22px; background: var(--ink); }
.rail::before { left: 0; } .rail::after { right: 0; }
.span .caption { position: absolute; left: 50%; transform: translateX(-50%); top: -2.5rem; white-space: nowrap; color: var(--gold); }

.content-section { padding-top: var(--section); padding-bottom: var(--section); }
.grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: clamp(2rem, 7vw, 7rem); align-items: start; }
.grid > div:last-child { max-width: 61ch; }
.funds { list-style: none; margin: 0; padding: 0; }
.funds li { padding: 2rem 0; border-top: 1px solid var(--rule); }
.funds li:first-child { border-top: 0; padding-top: 0; }
.funds h3 { margin-bottom: .7rem; }

.band { background: var(--ink); color: var(--sand); text-align: center; }
.band .wrap { padding-top: clamp(4.5rem, 10vw, 8rem); padding-bottom: clamp(4.5rem, 10vw, 8rem); }
.band-mark { width: 86px; margin: 0 auto 2.2rem; }
.band .wrap::before {
  content: "";
  display: block;
  width: clamp(54px, 6vw, 76px);
  aspect-ratio: 700 / 779;
  margin: 0 auto 2.2rem;
  background: url("assets/images/wells-mark.png") center / contain no-repeat;
}
.band .legacy-band-mark { display: none !important; }
.band .tag { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.12; color: var(--white); margin: 0 auto; max-width: 18ch; font-weight: 300; }
.band .label { color: var(--gold); display: block; margin-top: 2rem; }

.contact .mail { font-family: var(--sans); font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: .2rem; overflow-wrap: anywhere; }
.disclaimer { margin-top: 2rem; color: var(--mist); font-size: .94rem; }
.site-footer { border-top: 1px solid var(--rule); background: #f0f0ed; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: end; padding-top: 3rem; padding-bottom: 3.5rem; }
.footer-logo { width: min(290px, 55vw); margin-bottom: 1.8rem; }
.footer-copy { color: var(--mist); font-size: .88rem; max-width: 66ch; }
.footer-nav ul { list-style: none; display: flex; gap: 2rem; margin: 0; padding: 0; }
.footer-nav a { font-family: var(--sans); font-size: .67rem; letter-spacing: .13em; text-transform: uppercase; text-decoration: none; color: var(--ink); }

.entry-wrap { padding-top: 6rem; padding-bottom: 7rem; }
.entry-title { font-family: var(--serif); font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1; margin-bottom: 2rem; }
.entry-content { max-width: 720px; }
.entry-content h2,.entry-content h3 { margin-top: 2em; margin-bottom: .7em; }

@media (max-width: 820px) {
  .site-head { padding-top: 1.4rem; padding-bottom: 1.4rem; }
  .site-logo,.custom-logo { width: min(245px, 65vw); }
  .menu-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 86px; left: 0; right: 0; background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); z-index: 10; }
  .site-nav.is-open { display: block; }
  .site-nav ul { display: block; padding: 1.2rem var(--pad) 2rem; }
  .site-nav li { border-bottom: 1px solid var(--rule); }
  .site-nav a { display: block; padding: 1.1rem 0; }
  h1 { font-size: clamp(3.1rem, 14vw, 5.2rem); }
  .hero { padding-top: 4.5rem; }
  .interval { grid-template-columns: 1fr; text-align: center; }
  .node--end { text-align: center; }
  .span { width: 2px; height: 105px; padding: 0; margin: .5rem auto; background: var(--gold); }
  .rail { display: none; }
  .span::before,.span::after { content:""; position:absolute; left:-5px; width:12px; height:3px; background:var(--ink); }
  .span::before { top:0; } .span::after { bottom:0; }
  .span .caption { left: 50%; top: 50%; transform: translate(-50%,-50%); background: var(--paper); padding: .65rem 0; }
  .grid { grid-template-columns: 1fr; gap: 1.7rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-nav ul { flex-wrap: wrap; gap: 1rem 1.5rem; }
}

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



/* Keep native block-editor layout rules from re-centering individual children.
   Every homepage section and the header now share the same content rail. */
.wp-block-group.wrap.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.wp-block-group.wrap > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  width: 100%;
  max-width: none;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.site-header .wrap,
main .wrap,
.site-footer .wrap {
  max-width: var(--container);
}

/* Native block editor homepage */
main > .wp-block-group { margin-top: 0; margin-bottom: 0; }
.wp-block-columns { margin-bottom: 0; }
.wp-block-separator.rule { width: 100%; max-width: none; }
.gold-mark-block { width: 2.3rem !important; max-width: 2.3rem !important; height: 2px; border: 0 !important; background: var(--gold); margin: 2rem 0 0 !important; }
.interval.wp-block-columns { gap: 1.5rem; }
.interval .wp-block-column { flex-basis: auto !important; }
.interval .node { flex: 0 1 15rem !important; }
.interval .span { flex: 1 1 auto !important; }
.interval p { margin-bottom: 0; }
.interval .rail { width: 100%; max-width: none; border: 0; margin: 0; }
.funds .fund-item { padding: 2rem 0; border-top: 1px solid var(--rule); }
.funds .fund-item:first-child { border-top: 0; padding-top: 0; }
.funds .fund-item h3 { margin-bottom: .7rem; }
.mail-line { margin-top: 1.6rem; }
.mail-line a { font-family: var(--sans); font-size: clamp(1.1rem, 2.2vw, 1.6rem); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--gold); padding-bottom: .2rem; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .interval.wp-block-columns { display: grid; grid-template-columns: 1fr; }
  .interval .node, .interval .span { width: 100%; }
  .interval .span { flex: none !important; }
}

/* Production field-editable homepage refinements */
.band .band-inner {
  padding-top: 65px;
  padding-bottom: 65px;
}
.band-mark {
  width: 72px;
  height: auto;
  margin: 0 auto 28px;
  object-fit: contain;
}
.band .tag { margin: 0 auto; }
.band .label { margin-top: 24px; }
.mail-line { margin-top: 1.35rem; }

/* Reusable interior page layouts */
.page-hero { padding-top: clamp(5rem, 9vw, 9rem); padding-bottom: clamp(3.5rem, 7vw, 6rem); }
.page-hero .entry-title { max-width: 13ch; margin-bottom: 1.5rem; }
.page-intro { max-width: 55ch; font-size: clamp(1.1rem, .55vw + 1rem, 1.35rem); color: var(--slate); }
.editorial-page { padding-top: clamp(3.5rem, 7vw, 6.5rem); padding-bottom: clamp(5rem, 9vw, 8rem); }
.editorial-page .entry-content { max-width: 760px; }
.editorial-columns { display:grid; grid-template-columns:minmax(0,15rem) minmax(0,1fr); gap:clamp(2rem,7vw,7rem); align-items:start; }
.editorial-columns .entry-content { max-width: 680px; }
.draft-note { background:#fff8e8; border-left:3px solid var(--gold); padding:1rem 1.2rem; margin-bottom:2rem; }
@media (max-width:820px){
  .band .band-inner { padding-top:65px; padding-bottom:65px; }
  .editorial-columns { grid-template-columns:1fr; gap:1.5rem; }
}

/* v2.1.3 — header rail and mobile timeline corrections */
.site-header .site-head {
  width: 100%;
  max-width: var(--container) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--pad) !important;
  padding-right: var(--pad) !important;
}
.site-header .brand-link,
.site-header .custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}
.site-header .custom-logo-link { line-height: 0; }
.site-header .site-logo,
.site-header .custom-logo {
  display: block;
  margin: 0;
}

@media (max-width: 820px) {
  .site-header .site-head {
    justify-content: space-between;
    text-align: left;
  }
  .site-header .brand-link,
  .site-header .custom-logo-link {
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  /* Keep the transition graphic vertical instead of allowing the
     block-column rule to stretch it into a full-width gold panel. */
  .interval .span,
  .interval.wp-block-columns .span {
    position: relative;
    width: 2px !important;
    min-width: 2px !important;
    max-width: 2px !important;
    height: 105px;
    margin: .5rem auto;
    padding: 0;
    background: var(--gold);
    flex: none !important;
  }
  .interval .span .caption {
    width: max-content;
    max-width: 80vw;
    white-space: nowrap;
  }
}



/* v2.2.0 — expanded Foundation content system */
.home-focus .span .caption { color: var(--gold); }
.section-link { margin-top: 2rem; }
.section-link a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: .18rem; }
.section-link a:hover { border-color: var(--ink); }

.story-section,
.foundation-section { padding-top: var(--section); padding-bottom: var(--section); }
.story-section + .story-section,
.foundation-section + .foundation-section { border-top: 1px solid var(--rule); }
.story-section .grid,
.foundation-section .grid { align-items: start; }
.story-section .grid > div:last-child,
.foundation-section .grid > div:last-child { max-width: 68ch; }
.story-section p + p,
.foundation-section p + p { margin-top: 1.35rem; }

.values-list { list-style: none; padding: 0; margin: 0; }
.values-list li { border-top: 1px solid var(--rule); padding: 1.55rem 0; }
.values-list li:first-child { border-top: 0; padding-top: 0; }
.values-list strong { display: block; font-family: var(--sans); font-size: .78rem; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; color: var(--ink); margin-bottom: .55rem; }

.page-band { background: var(--ink); color: var(--white); text-align: center; }
.page-band .band-inner { padding-top: 65px; padding-bottom: 65px; }
.page-band .band-mark { width: 72px; margin-bottom: 28px; }
.page-band .tag { font-family: var(--serif); font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.12; font-weight: 300; max-width: 20ch; margin: 0 auto; }
.page-band .label { display: block; color: var(--gold); margin-top: 24px; }

@media (max-width: 820px) {
  .story-section,
  .foundation-section { padding-top: clamp(3.5rem, 10vw, 5rem); padding-bottom: clamp(3.5rem, 10vw, 5rem); }
  .values-list li { padding: 1.35rem 0; }
}


/* v2.3.0 — exact-copy information architecture */
.page-hero--with-copy { padding-bottom: clamp(4rem, 7vw, 6.5rem); }
.page-hero--with-copy .entry-title { margin-bottom: clamp(2rem, 3.2vw, 3.25rem); }
.page-intro--copy { max-width: 58ch; font-size: clamp(1.08rem, .55vw + 1rem, 1.35rem); line-height: 1.62; color: var(--slate); }
.page-intro--copy p + p { margin-top: 1.35rem; }
.values-list li { display: grid; grid-template-columns: 1.1rem minmax(0,1fr); gap: .55rem; align-items: start; }
.values-list .value-bullet { color: var(--gold); line-height: 1.45; }
.values-list strong { display: inline; margin-right: .35rem; }
.values-list strong + span { display: inline; }
@media (max-width: 820px) {
  .page-hero--with-copy .entry-title { margin-bottom: 1.75rem; }
}


/* v2.3.1 — reduce header logo on desktop/laptop only */
@media (min-width: 821px) {
  .site-header .site-logo,
  .site-header .custom-logo {
    width: 249px;
    max-width: 100%;
    height: auto;
  }
}


/* v2.3.2 — keep the same reduced header logo size across every page */
@media (min-width: 821px) {
  .site-header .site-head > .brand-link > img,
  .site-header .site-head > .custom-logo-link > img,
  .site-header img.site-logo,
  .site-header img.custom-logo {
    width: 249px !important;
    max-width: 249px !important;
    height: auto !important;
  }
}


/* v2.3.3 — universal desktop header logo sizing */
@media (min-width: 821px) {
  body .site-header .site-head img.site-logo,
  body .site-header .site-head img.custom-logo,
  body .site-header .site-head .custom-logo-link img {
    width: 249px !important;
    max-width: 249px !important;
    height: auto !important;
  }
}

/* v2.3.4 — footer logo matches header logo size site-wide */
@media (min-width: 821px) {
  body .site-footer img.footer-logo {
    width: 249px !important;
    max-width: 249px !important;
    height: auto !important;
  }
}

@media (max-width: 820px) {
  body .site-footer img.footer-logo {
    width: min(245px, 65vw) !important;
    max-width: min(245px, 65vw) !important;
    height: auto !important;
  }
}

/* v2.3.7 — consistent larger editorial labels across all page templates */
h2,
.eyebrow {
  font-size: .82rem;
}

/* v2.3.9 — match homepage Education / Connection / Therapeutic Support labels to subsection label size */
.home .home-focus .label {
  font-size: .82rem;
}

/* v2.3.10 — homepage focus labels: match all editorial subsection labels */
.home-focus .label,
.home-focus .caption {
  font-size: .82rem !important;
}
