/* UMADAOP of Cincinnati — site styles
   Palette pulled from the tree logo: leaf reds, oranges and peach over warm bark. */

:root {
  color-scheme: light;
  --ember: #B8141C;      /* deep red leaves */
  --flame: #E8490F;      /* orange leaves */
  --peach: #F8B98A;      /* light leaves */
  --bark: #7A2E0E;       /* brown leaves */
  --soil: #2A140A;       /* dark surface, warm not grey */
  --paper: #FFFFFF;
  --blush: #FDEBDD;      /* pale peach surface */

  --bg: var(--paper);
  --surface: var(--blush);
  --text: #1F1712;
  --muted: #5E4E45;
  --line: #EBD8CA;
  --link: var(--ember);
  --on-dark: #FBF3EE;
  --btn-bg: var(--ember);
  --btn-text: #FFFFFF;

  --font-display: "Gabarito", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Verdana", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: 2.375rem;
  --step-4: clamp(2.5rem, 5.6vw, 4.5rem);

  --wrap: 72rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --leaf: 0 42% 0 42%; /* the signature leaf shape */
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1B0F09;
    --surface: #2A1810;
    --text: #F6ECE5;
    --muted: #CDB8AB;
    --line: #47301F;
    --link: #FFA07A;
    --btn-bg: #E8490F;
    --btn-text: #1B0F09;
    --soil: #120A06;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1B0F09; --surface: #2A1810; --text: #F6ECE5; --muted: #CDB8AB;
  --line: #47301F; --link: #FFA07A; --btn-bg: #E8490F; --btn-text: #1B0F09; --soil: #120A06;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--flame); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: var(--step-3); font-weight: 750; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: #000; padding: .75rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Crisis bar ---------- */
.crisis {
  background: var(--soil);
  color: var(--on-dark);
  font-size: var(--step--1);
  text-align: center;
  padding: 0.55rem var(--gutter);
}
.crisis a { color: var(--peach); font-weight: 700; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 52px; height: auto; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1; letter-spacing: 0.01em; }
.brand-name small { display: block; font-weight: 500; font-size: 0.8rem; letter-spacing: 0.02em; color: var(--muted); margin-top: 0.2rem; }

.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; align-items: center; }
.nav a { display: block; padding: 0.5rem 0.7rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 0.98rem; border-radius: 6px; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current="page"] { color: var(--ember); box-shadow: inset 0 -3px 0 var(--flame); border-radius: 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .nav a[aria-current="page"] { color: var(--peach); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  padding: 0.8rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer; line-height: 1.1;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: currentColor; color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-donate { background: var(--flame); color: #fff; padding: 0.65rem 1.15rem; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-donate { color: #1B0F09; } }

.menu-toggle { display: none; background: none; border: 2px solid var(--line); border-radius: 8px; padding: 0.5rem 0.75rem; font: inherit; font-weight: 700; color: var(--text); cursor: pointer; }

@media (max-width: 1060px) {
  .menu-toggle { display: inline-block; }
  .nav { position: absolute; inset: 100% 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: 0.75rem var(--gutter) 1.25rem; }
  .nav a { padding: 0.8rem 0.5rem; font-size: 1.1rem; }
  .nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--flame); padding-left: 1rem; }
  .header-donate { display: none; }
  .nav .nav-donate { display: block; margin-top: .5rem; }
}
.nav .nav-donate { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero h1 { max-width: 13ch; }
.hero .lede { font-size: var(--step-1); color: var(--muted); max-width: 34ch; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 3; border-radius: 0 34% 0 34% !important; object-fit: cover; border-radius: var(--leaf); }
.hero-photo figcaption { font-size: var(--step--1); color: var(--muted); margin-top: 0.75rem; text-align: right; }
.seed { position: absolute; border-radius: 50%; }
.seed.s1 { width: 18px; height: 18px; background: var(--ember); left: -28px; top: 18%; }
.seed.s2 { width: 12px; height: 12px; background: var(--flame); left: -6px; top: 6%; }
.seed.s3 { width: 14px; height: 14px; background: var(--bark); right: 8%; bottom: -10px; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .seed.s1 { left: 6px; top: -22px; } .seed.s2 { left: 34px; top: -14px; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(1.5rem, 4vw, 2.5rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); max-width: 18ch; }
.page-head p { font-size: var(--step-1); color: var(--muted); max-width: 46ch; margin: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-tint { background: var(--surface); }
.section-dark { background: var(--soil); color: var(--on-dark); }
.section-dark a { color: var(--peach); }
.section-intro { max-width: 40rem; margin-bottom: 2.5rem; }
.section-intro p { color: var(--muted); font-size: var(--step-1); }
.section-dark .section-intro p { color: #E6D3C7; }

/* ---------- Continuum of care (a real sequence) ---------- */
.continuum { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; position: relative; counter-reset: stage; }
.continuum::before { content: ""; position: absolute; top: 15px; left: 15px; right: 15px; height: 3px; background: linear-gradient(90deg, var(--peach), var(--flame), var(--ember), var(--bark)); border-radius: 3px; }
.continuum li { position: relative; padding-top: 3.25rem; }
.continuum li::before { content: ""; position: absolute; top: 0; left: 0; width: 32px; height: 32px; border-radius: 0 999px 0 999px; background: var(--c); border: 4px solid var(--bg); }
.section-tint .continuum li::before { border-color: var(--surface); }
.continuum h3 { font-size: var(--step-2); margin-bottom: 0.35em; }
.continuum p { color: var(--muted); }
.continuum a { font-weight: 700; }
@media (max-width: 880px) {
  .continuum { grid-template-columns: 1fr; gap: 0; }
  .continuum::before { top: 15px; bottom: 15px; left: 14px; right: auto; width: 3px; height: auto; background: linear-gradient(180deg, var(--peach), var(--flame), var(--ember), var(--bark)); }
  .continuum li { padding: 0 0 2rem 3.25rem; }
}

/* ---------- Mission statement ---------- */
.statement { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3.2vw, 2.5rem); line-height: 1.25; max-width: 30ch; letter-spacing: -0.01em; margin: 0; }
.statement-label { font-weight: 700; color: var(--peach); margin-bottom: 1rem; }

/* ---------- Split layouts ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.leaf-img { border-radius: var(--leaf); width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.leaf-img.alt { border-radius: 42% 0 42% 0; }

/* ---------- Service detail ---------- */
.service { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.service:last-of-type { border-bottom: 0; }
.service-stage { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 700; color: var(--muted); margin-bottom: 0.75rem; }
.service-stage::before { content: ""; width: 20px; height: 20px; border-radius: 0 999px 0 999px; background: var(--c); }
.service ul { padding-left: 1.2rem; margin: 0 0 1.25rem; max-width: 60ch; }
.service li { margin-bottom: 0.4rem; }
.service-placeholder { aspect-ratio: 16 / 10; border-radius: var(--leaf); background: var(--c); opacity: 0.9; display: grid; place-items: center; }
.service-placeholder img { width: 42%; opacity: 0.95; }

/* ---------- Facts / contact blocks ---------- */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2.5rem; margin: 0; }
.facts div { border-top: 3px solid var(--flame); padding-top: 1rem; }
.facts dt { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); margin-bottom: 0.35rem; }
.facts dd { margin: 0; color: var(--muted); }
.facts dd a { font-weight: 700; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Network list ---------- */
.network { list-style: none; padding: 0; margin: 0; columns: 3 14rem; column-gap: 2.5rem; }
.network li { break-inside: avoid; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-weight: 700; }
.network li.here { color: var(--ember); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .network li.here { color: var(--peach); } }

/* ---------- History ---------- */
.prose p { max-width: 64ch; }
.prose blockquote { margin: 2rem 0 0; font-size: var(--step-3) !important; padding: 0 0 0 1.25rem; border-left: 4px solid var(--flame); font-family: var(--font-display); font-size: var(--step-2); font-weight: 600; line-height: 1.25; max-width: 26ch; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.timeline b { font-family: var(--font-display); font-size: var(--step-1); color: var(--ember); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timeline b { color: var(--peach); } }

/* ---------- Resource list ---------- */
.resource-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.resource-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem 2rem; align-items: baseline; padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.resource-list h3 { margin: 0; }
.resource-list p { grid-column: 1; margin: 0; color: var(--muted); }
.resource-list .contact { grid-column: 2; grid-row: 1 / span 2; font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); text-align: right; }
@media (max-width: 640px) { .resource-list li { grid-template-columns: 1fr; } .resource-list .contact { grid-column: 1; grid-row: auto; text-align: left; } }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; max-width: 38rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.form label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea, .form select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 2px solid var(--line); border-radius: 10px; padding: 0.75rem 0.9rem;
}
.form textarea { min-height: 9rem; resize: vertical; }
.form input:focus, .form textarea:focus, .form select:focus { border-color: var(--flame); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--flame) 30%, transparent); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400 !important; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--ember); }
.form-note { font-size: var(--step--1); color: var(--muted); background: var(--surface); padding: 0.9rem 1rem; border-radius: 10px; border-left: 4px solid var(--flame); }
.form-status { font-weight: 700; padding: 0.9rem 1rem; border-radius: 10px; }
.form-status.ok { background: #E3F4E6; color: #14532D; }
.form-status.err { background: #FDE2E2; color: #7F1D1D; }
.hp { position: absolute; left: -5000px; }

/* ---------- Donate band ---------- */
.donate-band { background: var(--ember); color: #fff; }
.donate-band .split { align-items: center; }
.donate-band h2 { font-size: clamp(2rem, 4vw, 3rem); }
.donate-band p { font-size: var(--step-1); color: #FFE7DA; }
.donate-band .btn-primary { background: #fff; color: var(--ember); }
.donate-band .btn-ghost { color: #fff; }
.donate-band .btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- Empty states ---------- */
.empty { padding: 2rem; border: 2px dashed var(--line); border-radius: 16px; max-width: 44rem; }
.empty h2 { font-size: var(--step-2); }

/* ---------- Footer ---------- */
.site-footer { background: var(--soil); color: var(--on-dark); padding: 3.5rem 0 1.5rem; font-size: 0.98rem; }
.site-footer a { color: var(--on-dark); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem; }
.footer-logo { width: 120px; }
.site-footer h2 { font-size: 1.05rem; color: var(--peach); margin-bottom: 0.75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer address { font-style: normal; }
.footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.15); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; color: #D9C4B7; font-size: var(--step--1); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-photo img { animation: grow 900ms cubic-bezier(.2,.7,.2,1) both; }
  @keyframes grow { from { opacity: 0; transform: scale(.96); border-radius: 999px; } to { opacity: 1; transform: none; } }
}
