/* ═══════════════════════════════════════════
   PartneredWell — Global Design System
   ═══════════════════════════════════════════ */

/* ── CSS Custom Properties ── */
:root {
  --blue: #375CC7;
  --blue-deep: #0c1d4d;
  --blue-dark: #1a3280;
  --blue-mid: #4b6fd6;
  --blue-pale: #eef1f9;
  --heading: #2546a4;  /* section heading color on light backgrounds */
  --teal: #00946E;
  --teal-deep: #005c44;
  --teal-light: #00b888;
  --ink: #0a0e1a;
  --text: #1c2033;
  --muted: #6e7489;
  --light: #f7f6f3;
  --warm: #edeae4;
  --white: #ffffff;
  --card: #ffffff;
  /* ── Brand type (Google Fonts substitutes, see inc/fonts.php) ──
     Headline  = --font-headline @ 700 section headings / 600 hero (Libre Franklin Bold ≈ Franklin Gothic Demi)
     Subheader = --font-headline @ 600 (Libre Franklin SemiBold ≈ Franklin Gothic Medium)
     (one step heavier than the sheet — Libre Franklin is lighter than Franklin Gothic)
     Body      = --font-body     @ 400 (Manrope Regular         ≈ Avenir Next Regular)
     Accent    = --font-body     @ 600 (Manrope SemiBold        ≈ Avenir Next Demi Bold)
     Footer    = --font-body     @ 500 / 700 (Manrope Medium / Bold ≈ Avenir Next Medium / Bold) */
  --font-headline: 'Libre Franklin', 'Franklin Gothic Medium', Arial, sans-serif;
  --font-body: 'Manrope', 'Avenir Next', system-ui, sans-serif;
  /* Legacy aliases — kept so any inline styles saved in the database keep working */
  --serif: var(--font-headline);
  --sans: var(--font-body);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ── Brand ® ── */
.brand-r{font-size:.55em;vertical-align:super;font-weight:400;line-height:1}

/* ── Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--light);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Typographic wrapping — balance headings (even line lengths) and use
   "pretty" on body copy to avoid single-word orphans on the last line.
   Progressive enhancement: unsupported browsers just ignore it. */
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
p, li, figcaption, blockquote { text-wrap: pretty; }

/* WordPress admin bar offset */
.admin-bar .hd { top: 32px; }

/* Safeguard: the WordPress admin bar (logged-in users only) adds a top
   margin to <html>. On the homepage tint that gap navy so it matches the
   hero instead of flashing a white bar. Visitors never see this. */
html:has(body.home) { background: var(--blue-deep); }
@media screen and (max-width: 782px) { .admin-bar .hd { top: 46px; } }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Text Selection ── */
::selection { background: rgba(0, 148, 110, 0.15); color: var(--text); }
::-moz-selection { background: rgba(0, 148, 110, 0.15); color: var(--text); }

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--blue);
  color: #fff;
  padding: 12px 24px;
  border-radius: 0 0 12px 12px;
  z-index: 10000;
  font-weight: 600;
  font-size: 14px;
  transition: top .3s;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
  outline: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(55, 92, 199, 0.3);
}

/* ── Grain Overlay ── */
/* The .grain-overlay div (rendered by the noise-overlay template when the
   grain option is enabled) only holds an SVG <filter> definition referenced
   elsewhere. Take it fully out of flow at 0×0 so its inline SVG can't create
   a line box that pushes the hero down and shows a white bar at the top. */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .02;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px;
}

/* ── Scroll Reveal ── */
[data-r] {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
[data-r="l"] { transform: translateX(-60px); }
[data-r="r"] { transform: translateX(60px); }
[data-r="s"] { transform: scale(.92); }
[data-r].v  { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 15px 34px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all .35s var(--ease);
  letter-spacing: .01em;
}
.btn--w {
  background: #fff;
  color: var(--blue-deep);
}
.btn--w:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.btn--g {
  background: transparent;
  color: rgba(255, 255, 255, .7);
  border: 1.5px solid rgba(255, 255, 255, .15);
}
.btn--g:hover {
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}
.btn--t {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0, 148, 110, .2);
}
.btn--t:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 148, 110, .3);
  background: var(--teal-deep);
}
.btn--ti {
  background: #fff;
  color: var(--teal-deep);
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
}
.btn--ti:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .1);
}

/* ═══════════════════════════════════════════
   LABELS
   ═══════════════════════════════════════════ */
.lbl {
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--teal);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lbl::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.lbl--center {
  justify-content: center;
}
.lbl--center::after {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

/* ═══════════════════════════════════════════
   CONTENT SECTIONS
   ═══════════════════════════════════════════ */
.sec {
  padding: 120px 24px;
  position: relative;
}
.sec--warm {
  background: var(--warm);
}

.sec__wrap {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.sec__wrap--single {
  grid-template-columns: 1fr;
  max-width: 800px;
  text-align: center;
}
/* Modifier classes instead of inline styles so the 1024px single-column
   collapse below can still win (an inline grid-template-columns beats any
   media query and breaks the section on mobile) */
.sec__wrap--wide {
  grid-template-columns: 1fr 1.3fr;
}
.sec__wrap--rtl {
  direction: rtl;
  position: relative;
  z-index: 1;
}

.sec__stat {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(64px, 9vw, 110px);
  letter-spacing: -.03em;
  line-height: .8;
  margin-bottom: 10px;
  color: var(--teal);
}
.sec__h {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--heading);
  letter-spacing: -.01em;
  line-height: 1.2;
  margin-bottom: 20px;
}
.sec__p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 12px;
  font-weight: 400;
}
.sec__sub {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: .03em;
}

/* ── Arrow Link ── */
.arr {
  font-weight: 600;
  font-size: 14px;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap .35s var(--ease);
  margin-top: 4px;
}
.arr:hover {
  gap: 16px;
}
.arr svg {
  transition: transform .35s var(--ease);
}
.arr:hover svg {
  transform: translateX(2px);
}

/* ── Two-Column Lists ── */
.list-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 40px;
  margin: 24px 0;
}
.list-grid li {
  font-size: 16px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  font-weight: 400;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.list-grid li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}

/* ── Image Box ── */
.imgbox {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
}
.imgbox::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  z-index: -1;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  opacity: .1;
  filter: blur(20px);
  transition: opacity .5s;
}
.imgbox:hover::before {
  opacity: .2;
}
.imgbox img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.imgbox:hover img {
  transform: scale(1.03);
}
.imgbox::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10, 14, 26, .08));
  pointer-events: none;
}

/* ═══════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════ */
.form {
  max-width: 640px;
  margin: 0 auto;
}
.form__group {
  margin-bottom: 20px;
}
.form__label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--white);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
  outline: none;
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(55, 92, 199, .1);
}
.form__textarea {
  min-height: 140px;
  resize: vertical;
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form__note {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
  font-weight: 400;
  padding: 16px;
  background: rgba(55, 92, 199, .04);
  border-radius: 12px;
  border-left: 3px solid var(--blue);
}

/* ═══════════════════════════════════════════
   RESPONSIVE — Global Elements
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .sec__wrap,
  .sec__wrap--wide {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .sec__wrap--rtl {
    direction: ltr;
  }
  .imgbox img {
    height: 340px;
  }
  .lbl {
    justify-content: center;
  }
  .list-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sec {
    padding: 80px 20px;
  }
  .imgbox img {
    height: 260px;
  }
  .form__row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════
   Legal / Policy page content (page-legal.php)
   ═══════════════════════════════════════════ */
.legal-content {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.8;
  font-weight: 400;
}
.legal-content > *:first-child { margin-top: 0; }
.legal-content h2 {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--heading);
  line-height: 1.25;
  margin: 44px 0 16px;
}
.legal-content h3 {
  font-family: var(--font-headline);
  font-weight: 600;
  font-size: 18px;
  color: var(--text);
  margin: 30px 0 12px;
}
.legal-content p { margin: 0 0 18px; }
.legal-content ul,
.legal-content ol { margin: 0 0 20px; padding-left: 24px; }
.legal-content li { margin-bottom: 10px; line-height: 1.7; }
.legal-content a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s var(--ease);
}
.legal-content a:hover { color: var(--teal); }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content hr {
  border: none;
  border-top: 1px solid var(--warm);
  margin: 36px 0;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14px;
}
.legal-content th,
.legal-content td {
  border: 1px solid var(--warm);
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
}
.legal-content th {
  background: var(--light);
  color: var(--text);
  font-weight: 600;
}
