/* In His Hands Children's Home
   Colors follow the existing site: navy, sky, and the repeating pale-blue wash.
   Page copy lives in the HTML files. Change this file for layout and color. */

:root {
  --navy: #0c3d7a;
  --navy-deep: #072a56;
  --ink: #1b2430;
  --muted: #4c5968;
  --paper: #f4fafb;
  --white: #ffffff;
  --line: #d7e2e8;
  --sky: #7fd4ea;
  --mint: #c8f3d4;
  --shadow: 0 18px 40px rgba(12, 61, 122, 0.08);
  --max: 1120px;
  --font: "Inter", "Segoe UI", sans-serif;
  --display: "Abril Fatface", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchors are the headings. Some browsers skip scroll padding when the
   target is taller than the window, which hid these titles. */
h2[id] {
  scroll-margin-top: 7rem;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.65;
  background: #fff;
}

/* Each band repeats the old site's wash: white, pale blue, white. */
.hero,
.page-hero,
.section {
  background: linear-gradient(#fff 0%, rgba(132, 230, 248, 0.4) 60%, #fff 100%);
}

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

a {
  color: var(--navy);
}

a:hover {
  color: var(--navy-deep);
}

:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: white;
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 30;
}

.skip:focus {
  top: 0.75rem;
}

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(215, 226, 232, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand img {
  width: 52px;
  height: auto;
}

.nav-wrap {
  position: relative;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.nav-button span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--navy);
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.btn-solid {
  background: var(--navy);
  color: white !important;
}

.btn-solid:hover {
  background: var(--navy-deep);
  color: white !important;
}

.btn-ghost {
  background: white;
  color: var(--navy) !important;
  border-color: #b9cbe0;
}

.btn-ghost:hover {
  border-color: var(--navy);
  color: var(--navy-deep) !important;
}

.site-nav .btn {
  margin-left: 0.2rem;
}

.hero {
  padding: 3.2rem 0 2.5rem;
}

.hero-grid,
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
.brand span {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  color: var(--navy-deep);
  overflow-wrap: break-word;
}

h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--navy-deep);
}

h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.lede {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  color: var(--muted);
}

.tagline {
  margin: 0 0 1.4rem;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.photo {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #e7eef2;
}

.photo img {
  display: block;
  width: 100%;
  height: auto;
}

.split .photo:not(.photo-small) img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
}

.photo-small {
  max-width: 480px;
  justify-self: center;
}

.btn-on-dark {
  background: white;
  color: var(--navy) !important;
}

.btn-on-dark:hover {
  background: var(--mint);
  color: var(--navy-deep) !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 1.2rem 0 2.4rem;
}

.stack {
  display: grid;
  gap: 2.6rem;
}

.split.reverse {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.split.reverse .copy {
  order: 2;
}

.prose p,
.prose li {
  color: var(--ink);
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.emphasis {
  font-weight: 600;
}

.callout {
  margin: 0.2rem 0 1rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--navy);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 0 12px 12px 0;
  font-weight: 700;
}

.panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(215, 226, 232, 0.95);
  border-radius: 22px;
  padding: 1.4rem 1.4rem 1.1rem;
  box-shadow: var(--shadow);
}

.projects {
  list-style: none;
  margin: 0.4rem 0 1rem;
  padding: 0;
}

.projects li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line);
}

.projects li:last-child {
  border-bottom: 0;
}

.project-amount {
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.project-flag .project-name,
.project-flag .project-amount {
  font-weight: 800;
}

.note {
  color: var(--muted);
  font-size: 0.98rem;
}

.contact-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.contact-lines li {
  margin: 0 0 0.7rem;
}

.contact-lines span {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.team-intro {
  max-width: 40rem;
  margin: 0 auto 1.6rem;
  text-align: center;
}

.team-intro p {
  color: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}

.person {
  margin: 0;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.person img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
}

.person figcaption {
  padding: 0.85rem 0.75rem 1rem;
  text-align: center;
}

.person strong {
  display: block;
  font-size: 0.98rem;
}

.person span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin-top: 0.2rem;
}

.cta {
  margin: 1rem 0 2.5rem;
}

.cta-inner {
  border-radius: 24px;
  padding: 2.4rem 1.6rem;
  text-align: center;
  color: white;
  background:
    linear-gradient(100deg, rgba(7, 42, 86, 0.92), rgba(12, 61, 122, 0.78)),
    url("/images/hero.jpg") center 40% / cover;
}

.cta h2,
.cta p {
  color: white;
}

.cta p {
  max-width: 38rem;
  margin: 0 auto 1.2rem;
}

.page-hero {
  padding: 2.6rem 0 0.4rem;
}

.page-hero p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.12rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.4rem 0 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  background: white;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem 1.2rem 1.2rem;
  box-shadow: var(--shadow);
  min-height: 180px;
}

.card:hover {
  border-color: var(--navy);
  color: var(--ink);
}

.card strong {
  font-size: 1.25rem;
  color: var(--navy-deep);
}

.card span {
  color: var(--muted);
}

.card em {
  margin-top: auto;
  font-style: normal;
  font-weight: 700;
  color: var(--navy);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0 1.6rem;
}

.tier {
  background: white;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.tier h3 {
  color: var(--navy-deep);
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social {
  display: flex;
  gap: 0.6rem;
}

.social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  color: var(--navy);
}

.social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.fine {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.identity {
  margin: 0 0 1.2rem;
  max-width: 38rem;
}

.faq {
  display: grid;
  gap: 0.6rem;
  margin: 1.2rem 0 1.4rem;
}

.faq details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.faq summary {
  font-weight: 700;
  cursor: pointer;
}

.faq details p {
  margin: 0.7rem 0 0;
}

.missing {
  padding: 4rem 0 6rem;
}

@media (max-width: 980px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .nav-button {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.7rem);
    width: min(320px, 80vw);
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    padding: 0.8rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
  }

  .nav-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-nav a {
    padding: 0.45rem 0.4rem;
  }

  .site-nav .btn {
    margin: 0.2rem 0 0;
  }

  .hero-grid,
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .split.reverse .copy {
    order: 0;
  }

  .card-grid,
  .tiers,
  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding-top: 2rem;
  }
}

@media (max-width: 560px) {
  .card-grid,
  .tiers,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .projects li {
    flex-direction: column;
    gap: 0.15rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
