/* Mindful Essence Foundation — shared styles
   Palette and type match Mindful Essence Psychiatry & Wellness */
:root {
  --black: #0e0e0e;
  --charcoal: #1c1c1c;
  --charcoal-2: #151515;
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --gold-dim: #a07f4f;
  --ivory: #f5f0e8;
  --text: #b8b0a5;
  --mauve: #9e7b7b;
  --line: rgba(201, 169, 110, 0.22);
  --glow: rgba(201, 169, 110, 0.13);
  --stripe: linear-gradient(90deg, var(--black), var(--black));
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 5vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--ivory);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.3rem); }
h3 { font-size: clamp(1.5rem, 2.4vw, 1.95rem); font-weight: 400; }
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); }
p { margin: 0; max-width: 64ch; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-weight: 400;
  font-size: 11.5px; letter-spacing: .32em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: var(--gold-dim); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 14, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; color: var(--ivory); }
.brand:hover { color: var(--ivory); }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 400; letter-spacing: .02em; }
.brand-sub { font-size: 10px; letter-spacing: .38em; text-transform: uppercase; color: var(--gold); margin-top: 5px; }

.nav-links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 400;
  color: var(--text); padding-block: 6px; border-bottom: 1px solid transparent;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ivory); border-bottom-color: var(--gold); }
.nav-links .btn { border-bottom: 1px solid var(--gold); }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ivory);
  width: 46px; height: 46px; cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 20px; height: 1px; background: currentColor; position: relative; content: "";
}
.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  padding: 16px 30px; border: 1px solid var(--gold); background: var(--gold); color: var(--black);
  cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--black); }
.btn.is-soon, .btn.is-soon:hover { background: transparent; border-color: var(--gold-dim); color: var(--gold-dim); cursor: default; }
.btn-ghost { background: transparent; color: var(--gold); }
.btn-ghost:hover { background: var(--gold); color: var(--black); }
.nav-links .btn { padding: 11px 20px; color: var(--black); }
.nav-links .btn:hover { color: var(--black); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Sections ---------- */
section { padding-block: clamp(72px, 10vw, 128px); }
.section-alt { background: var(--charcoal); }
.section-head { display: grid; gap: 20px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head.center { text-align: center; justify-items: center; }
.section-head.center p { margin-inline: auto; }
.lede { font-size: 1.12rem; color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(80px, 12vw, 150px) clamp(64px, 9vw, 110px); border-bottom: 1px solid var(--line); }
.hero::after {
  content: ""; position: absolute; right: -12vw; top: 50%; translate: 0 -50%;
  width: min(62vw, 720px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 68%);
  pointer-events: none;
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.hero h1 { margin-block: 26px 28px; font-size: clamp(2.5rem, 5.2vw, 4.2rem); }
.hero .lede { margin-bottom: 40px; font-size: 1.18rem; }
.hero-mark { justify-self: center; width: min(100%, 340px); color: var(--gold); opacity: .9; }
.hero-mark svg { width: 100%; height: auto; }

.page-hero { padding-block: clamp(72px, 10vw, 120px) clamp(56px, 8vw, 88px); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.page-hero::after {
  content: ""; position: absolute; right: -8vw; top: -20%; width: min(50vw, 560px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--glow) 0%, transparent 65%); pointer-events: none;
}
.page-hero .wrap { position: relative; z-index: 1; display: grid; gap: 24px; }

/* ---------- Pillars / cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cell { background: var(--black); padding: clamp(32px, 4vw, 48px); display: grid; gap: 16px; align-content: start; }
.section-alt .cell { background: var(--charcoal); }
.cell .num { font-family: var(--serif); font-size: 1rem; color: var(--gold); letter-spacing: .12em; }
.cell-icon { width: 42px; height: 42px; color: var(--gold); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.split-body { display: grid; gap: 22px; }

.quote {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.3; color: var(--ivory);
  border-left: 1px solid var(--gold); padding-left: clamp(20px, 3vw, 36px); max-width: 30ch;
}
.quote cite { display: block; margin-top: 18px; font-family: var(--sans); font-style: normal; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }

.frame {
  border: 1px solid var(--line); padding: clamp(28px, 4vw, 44px); position: relative; background: var(--charcoal-2);
}
.frame::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(201,169,110,.1); pointer-events: none; }

.list-lines { list-style: none; padding: 0; margin: 0; display: grid; }
.list-lines li { padding-block: 16px; border-bottom: 1px solid var(--line); display: flex; gap: 16px; align-items: baseline; }
.list-lines li:first-child { border-top: 1px solid var(--line); }
.list-lines li::before { content: "◆"; font-size: 8px; color: var(--gold); flex: none; translate: 0 -2px; }

/* ---------- Program detail ---------- */
.program { display: grid; grid-template-columns: 220px 1fr; gap: clamp(28px, 5vw, 70px); padding-block: clamp(44px, 6vw, 64px); border-top: 1px solid var(--line); }
.program:last-child { border-bottom: 1px solid var(--line); }
.program-label { display: grid; gap: 10px; align-content: start; }
.program-label .tag { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.program-body { display: grid; gap: 18px; }
.program-body ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.program-body li::marker { color: var(--gold); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; background: var(--charcoal); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band .wrap { display: grid; gap: 24px; justify-items: center; }
.cta-band p { margin-inline: auto; }

/* ---------- Donate ---------- */
.donate-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.give-box { background: var(--charcoal); border: 1px solid var(--line); padding: clamp(28px, 4vw, 48px); display: grid; gap: 26px; }
.toggle { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.toggle button, .amounts button {
  font-family: var(--sans); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  background: transparent; color: var(--text); border: 0; padding: 15px 10px; cursor: pointer; transition: background .2s, color .2s;
}
.toggle button[aria-pressed="true"] { background: var(--gold); color: var(--black); font-weight: 500; }
.amounts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.amounts button { border: 1px solid var(--line); font-family: var(--serif); font-size: 1.5rem; letter-spacing: 0; text-transform: none; color: var(--ivory); padding: 14px 6px; }
.amounts button:hover { border-color: var(--gold); }
.amounts button[aria-pressed="true"] { border-color: var(--gold); background: rgba(201,169,110,.12); color: var(--gold-light); }
.field { display: grid; gap: 8px; }
.field label { font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 400; }
.field input, .field textarea, .field select {
  font: inherit; font-weight: 300; color: var(--ivory); background: var(--black);
  border: 1px solid var(--line); padding: 14px 16px; width: 100%; border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); }
.field textarea { min-height: 150px; resize: vertical; }
.money { position: relative; }
.money span { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--gold); }
.money input { padding-left: 32px; }
.fine { font-size: 13.5px; line-height: 1.6; color: #8f887e; }
.give-summary { font-family: var(--serif); font-size: 1.35rem; color: var(--ivory); }
.give-summary strong { color: var(--gold); font-weight: 500; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { padding: 16px 18px; border: 1px solid var(--gold-dim); color: var(--gold-light); font-size: 15px; }

/* ---------- Contact ---------- */
.contact-list { display: grid; gap: 30px; }
.contact-item { display: grid; gap: 6px; }
.contact-item .label { font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); }
.contact-item .value { font-family: var(--serif); font-size: 1.5rem; color: var(--ivory); }

/* ---------- Crisis bar & footer ---------- */
.crisis { background: var(--charcoal-2); border-top: 1px solid var(--line); font-size: 14.5px; }
.crisis .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: center; padding-block: 18px; text-align: center; }
.crisis strong { color: var(--ivory); font-weight: 500; }
.crisis .dot { color: var(--mauve); }

.site-footer { background: var(--black); border-top: 1px solid var(--line); padding-block: 72px 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-family: var(--sans); font-size: 11.5px; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin-bottom: 18px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--gold); }
.footer-about { display: grid; gap: 18px; }
.footer-bottom { margin-top: 56px; padding-top: 26px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 30px; justify-content: space-between; font-size: 13px; color: #857e75; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero h1, .hero .lede, .hero .btn-row, .hero .eyebrow { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero .eyebrow { animation-delay: .05s; }
  .hero h1 { animation-delay: .15s; }
  .hero .lede { animation-delay: .3s; }
  .hero .btn-row { animation-delay: .42s; }
  .hero-mark .ring { transform-origin: 50% 50%; animation: turn 60s linear infinite; }
}
@keyframes rise { from { opacity: .001; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding-block: 14px; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child a { margin-top: 18px; text-align: center; }
  .hero-grid, .split, .donate-grid { grid-template-columns: 1fr; }
  .hero-mark { display: none; }
  .program { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .grid-2, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .brand-name { font-size: 1.2rem; }
  .brand-sub { letter-spacing: .28em; }
  .btn { width: 100%; }
  .nav-links .btn { width: auto; }
}

/* ---------- Quick exit (safety for survivors) ---------- */
.quick-exit {
  position: fixed; z-index: 60;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  background: var(--mauve); color: var(--ivory); border: 1px solid rgba(245,240,232,.25);
  padding: 12px 18px; cursor: pointer; box-shadow: 0 6px 24px rgba(0,0,0,.45);
}
.quick-exit:hover { background: #8a6868; }

/* ---------- Crisis resources ---------- */
.res-num { font-family: var(--serif); font-size: 1.35rem; color: var(--gold-light); line-height: 1.35; }
.crisis .wrap { font-size: 14px; }

/* ============================================================
   GROUP THEMES — each "Who We Serve" page gets its own colors.
   The header and footer stay in Mindful Essence gold.
   ============================================================ */
main[class*="theme-"] { background: var(--black); color: var(--text); }

.theme-law {            /* Law enforcement: navy, black, thin blue line */
  --black: #070a12; --charcoal: #0e1628; --charcoal-2: #0a1120;
  --gold: #4f7fd9; --gold-light: #b9cdf3; --gold-dim: #2d4f93;
  --ivory: #eef2f8; --text: #aab4c6;
  --line: rgba(79, 127, 217, .25); --glow: rgba(47, 90, 190, .22);
  --stripe: linear-gradient(180deg, #000 0 42%, #2f6fdf 42% 58%, #000 58% 100%);
}
.theme-fire {           /* Fire: black, deep red, thin red line */
  --black: #0d0908; --charcoal: #1c1110; --charcoal-2: #150d0c;
  --gold: #d8452f; --gold-light: #f5b19f; --gold-dim: #8f2a1e;
  --ivory: #f7efe9; --text: #bfb0a9;
  --line: rgba(216, 69, 47, .26); --glow: rgba(216, 69, 47, .18);
  --stripe: linear-gradient(180deg, #000 0 42%, #d8452f 42% 58%, #000 58% 100%);
}
.theme-ems {            /* EMS: royal blue and white */
  --black: #08101d; --charcoal: #0f1c31; --charcoal-2: #0b1627;
  --gold: #3f86f2; --gold-light: #ffffff; --gold-dim: #2a5dae;
  --ivory: #ffffff; --text: #b3c0d6;
  --line: rgba(120, 165, 240, .26); --glow: rgba(63, 134, 242, .2);
  --stripe: linear-gradient(180deg, #1d4f9e 0 40%, #ffffff 40% 60%, #1d4f9e 60% 100%);
}
.theme-mil {            /* Military & veterans: olive, khaki, black */
  --black: #0b0c08; --charcoal: #171a11; --charcoal-2: #12140d;
  --gold: #c2ad72; --gold-light: #e8dcb4; --gold-dim: #7f7147;
  --ivory: #f3efe2; --text: #b5b19f;
  --line: rgba(194, 173, 114, .24); --glow: rgba(110, 124, 62, .25);
  --stripe: linear-gradient(90deg, #4b5320 0 33.3%, #c2ad72 33.3% 66.6%, #4b5320 66.6% 100%);
}
.theme-surv {           /* Survivors: purple (DV) and teal (sexual assault) */
  --black: #100c15; --charcoal: #1b1523; --charcoal-2: #16111d;
  --gold: #b196e3; --gold-light: #e2d6f7; --gold-dim: #6f5a99;
  --ivory: #f6f1fb; --text: #bcb2c8;
  --line: rgba(177, 150, 227, .24); --glow: rgba(120, 90, 190, .2);
  --stripe: linear-gradient(90deg, #7a5bc0 0 50%, #3fa7a3 50% 100%);
}
.theme-school {         /* Schools: chalkboard green and pencil yellow */
  --black: #0b110e; --charcoal: #142019; --charcoal-2: #101a14;
  --gold: #e6bd52; --gold-light: #f6e0a2; --gold-dim: #a3822f;
  --ivory: #f5f2e6; --text: #b4bcb0;
  --line: rgba(230, 189, 82, .22); --glow: rgba(70, 130, 95, .22);
  --stripe: linear-gradient(90deg, #2e5a44 0 70%, #e6bd52 70% 100%);
}

.signature { height: 10px; background: var(--stripe); }
.group-emblem { justify-self: center; width: min(100%, 300px); color: var(--gold); }
.group-emblem svg { width: 100%; height: auto; }
.accent-word { color: var(--gold); }
.secondary-accent { color: #56c1bd; }

/* Who-we-serve tiles (each tile carries its own theme class) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  display: grid; gap: 12px; align-content: start;
  background: var(--charcoal); color: var(--text);
  padding: clamp(26px, 3vw, 36px); border: 1px solid var(--line); position: relative;
  transition: transform .25s, border-color .25s;
}
.tile::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--stripe); }
.tile:hover { transform: translateY(-3px); border-color: var(--gold); color: var(--text); }
.tile .tile-icon { width: 44px; height: 44px; color: var(--gold); margin-top: 6px; }
.tile h3 { color: var(--ivory); }
.tile .tile-tag { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.tile .go { color: var(--gold); font-size: 14px; }
@media (max-width: 980px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } }
.tile .tile-icon svg { width: 100%; height: 100%; }
@media (max-width: 900px) { .group-emblem { display: none; } }

/* ---------- Bold group tiles: each one in its own full colors ---------- */
.theme-law    { --tile-bg: linear-gradient(160deg, #13244a 0%, #0a1430 55%, #03060e 100%); --tile-ink: #ffffff; --tile-accent: #6f9cf0; }
.theme-fire   { --tile-bg: linear-gradient(160deg, #a3261a 0%, #5e140d 55%, #1a0705 100%); --tile-ink: #fff4ef; --tile-accent: #ffb199; }
.theme-ems    { --tile-bg: linear-gradient(160deg, #2f74e6 0%, #1a4fb0 60%, #0f2f6e 100%); --tile-ink: #ffffff; --tile-accent: #ffffff; }
.theme-mil    { --tile-bg: linear-gradient(160deg, #5a6428 0%, #3b421a 60%, #1c200c 100%); --tile-ink: #f6f0dc; --tile-accent: #e3cf92; }
.theme-surv   { --tile-bg: linear-gradient(150deg, #6c4cb3 0%, #4a3584 50%, #1f6f6c 100%); --tile-ink: #ffffff; --tile-accent: #bff0ec; }
.theme-school { --tile-bg: linear-gradient(160deg, #2c5a43 0%, #1c3d2d 60%, #0f2219 100%); --tile-ink: #fbf6e6; --tile-accent: #f2c95a; }

.tiles { gap: 18px; }
.tile {
  background: var(--tile-bg); border: 0; color: var(--tile-ink);
  min-height: 300px; padding: 40px 32px 32px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.tile::before { height: 10px; }
.tile:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0,0,0,.5); color: var(--tile-ink); }
.tile .tile-icon {
  position: absolute; right: -28px; bottom: -28px; width: 190px; height: 190px;
  color: var(--tile-ink); opacity: .16; margin: 0; transition: opacity .25s, transform .4s;
}
.tile:hover .tile-icon { opacity: .26; transform: rotate(-6deg); }
.tile .tile-tag { color: var(--tile-accent); font-weight: 500; font-size: 12px; position: relative; }
.tile h3 { color: var(--tile-ink); font-size: clamp(1.7rem, 2.3vw, 2.1rem); font-weight: 400; position: relative; max-width: 17ch; }
.tile .go {
  position: relative; align-self: end; margin-top: auto; justify-self: start;
  color: var(--tile-ink); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 500;
  border-bottom: 1px solid var(--tile-accent); padding-bottom: 4px;
}
.tile { grid-template-rows: auto auto 1fr auto; }
