/* ==========================================================================
   Hutchins Family Giving Account
   ========================================================================== */

:root {
  --forest-900: #142a1f;
  --forest-800: #1f3a2c;
  --forest-600: #3d5e44;
  --moss-400: #9fb48f;
  --moss-200: #dfe5d2;
  --sand-50: #fbf8f2;
  --sand-100: #f6efe2;
  --sand-200: #ece2cf;
  --clay-500: #c26a3d;
  --clay-300: #e9a66b;
  --ink: #1d2620;
  --ink-soft: #4b5a50;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 1px 2px rgba(20, 42, 31, .04), 0 12px 32px -12px rgba(20, 42, 31, .18);
  --header-h: 72px;
  --gutter: clamp(20px, 5vw, 40px);
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--sand-50);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--forest-900);
  font-variation-settings: "opsz" 96;
}

h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h3 { font-size: 1.3rem; font-variation-settings: "opsz" 24; }
p { margin: 0 0 1em; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--clay-300);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 820px; }

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

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--forest-800); color: var(--sand-100);
  padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.eyebrow {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-500);
  margin-bottom: 1rem;
}

.section { padding-block: clamp(72px, 11vw, 140px); }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--forest-800);
  color: var(--sand-100);
  box-shadow: 0 10px 24px -10px rgba(31, 58, 44, .6);
}
.btn-primary:hover { background: var(--forest-900); }

.btn-ghost {
  color: var(--forest-800);
  box-shadow: inset 0 0 0 1.5px rgba(31, 58, 44, .35);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--forest-800); }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(251, 248, 242, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(31, 58, 44, .08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--forest-800);
  position: relative;
  z-index: 2;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.site-nav {
  display: flex;
  gap: 32px;
}
.site-nav a {
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: var(--forest-800);
  position: relative;
  padding-block: 6px;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1.5px;
  background: var(--clay-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 48px; height: 48px;
  margin-right: -10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
}
.nav-toggle-bar {
  position: absolute;
  left: 13px; right: 13px;
  height: 2px;
  background: var(--forest-800);
  border-radius: 2px;
  transition: transform .3s ease;
}
.nav-toggle-bar:nth-child(2) { top: 19px; }
.nav-toggle-bar:nth-child(3) { top: 27px; }
.nav-open .nav-toggle-bar:nth-child(2) { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: var(--header-h) var(--gutter) 40px;
    background: var(--sand-100);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
  }
  .site-nav a {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 400;
    padding-block: 10px;
  }
  .site-nav a::after { display: none; }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  padding-top: calc(var(--header-h) + clamp(48px, 12vh, 140px));
  padding-bottom: clamp(220px, 34vw, 400px);
  background: linear-gradient(180deg, var(--sand-100) 0%, #f3e3cb 100%);
  overflow: hidden;
}

.hero-content { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(2.6rem, 7.4vw, 5.6rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin-bottom: 1.5rem;
  font-variation-settings: "opsz" 144;
}
.hero-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay-500);
}

.hero-lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-bottom: 2.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-landscape {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  width: 100%;
  height: clamp(240px, 38vw, 520px);
  pointer-events: none;
}
.hero-landscape .sun { animation: rise 2.4s cubic-bezier(.2, .7, .2, 1) both; }

@keyframes rise {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: none; }
}

@media (max-width: 600px) {
  .hero { min-height: 0; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ---------- Mission ---------- */

.mission { background: var(--forest-800); color: var(--sand-100); }
.mission .eyebrow { color: var(--clay-300); }

.mission-statement {
  margin: 0 0 2rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.6vw, 3.4rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  font-variation-settings: "opsz" 144;
}

.mission-body {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: rgba(246, 239, 226, .78);
  max-width: 40rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(56px, 8vw, 96px);
}

.pillar {
  padding: 32px 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 1px rgba(246, 239, 226, .1);
}
.pillar h3 { color: #fff; margin-bottom: .6rem; }
.pillar p { color: rgba(246, 239, 226, .72); margin: 0; font-size: 1rem; }
.pillar-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--clay-300);
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
}

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
}

/* ---------- Causes ---------- */

.cause-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.cause {
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 24px 26px;
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease;
}
.cause:hover {
  transform: translateY(-4px);
  box-shadow: 0 1px 2px rgba(20, 42, 31, .04), 0 22px 40px -16px rgba(20, 42, 31, .25);
}
.cause h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.cause p { color: var(--ink-soft); font-size: .97rem; margin: 0; }

.cause-icon {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--moss-200);
  color: var(--forest-800);
  margin-bottom: 22px;
}
.cause-icon svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cause-icon circle[r="1"] { fill: currentColor; }

.cause:nth-child(4n + 2) .cause-icon { background: #f5dcc6; color: #8a4223; }
.cause:nth-child(4n + 3) .cause-icon { background: #dde6ea; color: #2f5363; }
.cause:nth-child(4n + 4) .cause-icon { background: #efe5c8; color: #6b5317; }

.cause-more {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--sand-200);
}
.cause-more:hover { box-shadow: inset 0 0 0 1.5px var(--moss-400); }
.cause-more .cause-icon { background: var(--forest-800) !important; color: var(--sand-100) !important; }

/* Fill out the last row on wide screens */
@media (min-width: 1025px) {
  .cause-more {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 22px;
    align-content: center;
  }
  .cause-more .cause-icon { grid-row: span 2; margin: 0; align-self: center; }
  .cause-more h3 { align-self: end; }
}

@media (max-width: 1024px) { .cause-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .cause-grid { grid-template-columns: 1fr; gap: 14px; }
  .cause {
    display: grid;
    grid-template-columns: 52px 1fr;
    column-gap: 18px;
    padding: 22px 20px;
  }
  .cause-icon { grid-row: span 2; margin: 0; }
  .cause h3 { align-self: end; }
}

/* ---------- Grants ---------- */

.grants { background: var(--sand-100); }

.section-lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
  margin: 1.25rem 0 0;
}

/* Two balanced columns; groups have different lengths. */
.grant-groups {
  columns: 2;
  column-gap: 20px;
}

.grant-group {
  break-inside: avoid;
  margin-bottom: 20px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px);
  box-shadow: var(--shadow);
}
.grant-group > h3 {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-500);
  margin-bottom: 8px;
}

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

.grantee { padding: 20px 0; }
.grantee + .grantee { border-top: 1px solid var(--sand-200); }
.grantee:last-child { padding-bottom: 0; }

.grantee-name {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--forest-900);
  text-decoration: none;
  font-variation-settings: "opsz" 24;
}
a.grantee-name::after {
  content: "↗";
  display: inline-block;
  margin-left: .3em;
  font-size: .8em;
  color: var(--clay-500);
  transition: transform .2s ease;
}
a.grantee-name:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.grantee-name:hover::after { transform: translate(2px, -2px); }

.grantee p {
  color: var(--ink-soft);
  font-size: .97rem;
  margin: .35rem 0 .6rem;
}

.grantee-place {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  color: var(--ink-soft);
}
.grantee-place.is-local::before {
  content: "Local";
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--moss-200);
  color: var(--forest-800);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .grant-groups { columns: 1; }
}

/* ---------- Family ---------- */

.family-inner {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}

.family-text h2 { margin-bottom: 1.5rem; }
.family-text p:not(.eyebrow):not(.signature) { color: var(--ink-soft); font-size: 1.1rem; }
.signature {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--forest-800);
  margin-top: 1.5rem;
}

/* One wide photo on top, two square photos below. */
.photo-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(160deg, var(--moss-200), var(--moss-400));
  box-shadow: var(--shadow);
}
.photo-a { grid-column: span 2; aspect-ratio: 3 / 2; }
.photo-b, .photo-c { aspect-ratio: 1 / 1; }
.photo-b { background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(160deg, #f5dcc6, var(--clay-300)); }
.photo-c { background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, .55), transparent 60%),
    linear-gradient(160deg, #dde6ea, #9db4bf); }

.photo img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.photo:hover img { transform: scale(1.04); }

.photo-credit {
  grid-column: span 2;
  margin: 2px 0 0;
  text-align: right;
  font-size: .8rem;
  color: var(--ink-soft);
}
.photo-credit a {
  color: var(--forest-800);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--sand-200);
}
.photo-credit a:hover { border-color: var(--clay-500); }

@media (max-width: 860px) {
  .family-inner { grid-template-columns: 1fr; }
  .photo-mosaic { order: -1; }
}
@media (max-width: 480px) {
  .photo-mosaic { gap: 10px; }
  .photo { border-radius: var(--radius); }
}

/* ---------- Approach ---------- */

.approach { background: var(--sand-100); }

.principles {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: principle;
  border-top: 1px solid var(--sand-200);
}
.principles li {
  counter-increment: principle;
  padding: 32px 28px 8px 0;
}
.principles li + li { padding-left: 28px; border-left: 1px solid var(--sand-200); }
.principles li::before {
  content: counter(principle, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--clay-500);
  margin-bottom: 1rem;
}
.principles h3 { margin-bottom: .6rem; }
.principles p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

@media (max-width: 1024px) {
  .principles { grid-template-columns: repeat(2, 1fr); }
  .principles li:nth-child(3) { padding-left: 0; border-left: 0; }
  .principles li:nth-child(n + 3) { border-top: 1px solid var(--sand-200); margin-top: 24px; }
}
@media (max-width: 560px) {
  .principles { grid-template-columns: 1fr; }
  .principles li,
  .principles li + li { padding: 26px 0; border-left: 0; margin: 0; }
  .principles li + li { border-top: 1px solid var(--sand-200); }
}

/* ---------- Quote ---------- */

.quote-band {
  position: relative;
  padding-block: clamp(80px, 12vw, 150px);
  background: var(--clay-500);
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.quote-band::before {
  content: "";
  position: absolute;
  width: 640px; height: 640px;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .14), transparent 65%);
}
.quote-band figure { position: relative; margin: 0; }
.quote-band blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 144;
}
.quote-band figcaption {
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .8;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--forest-900);
  color: rgba(246, 239, 226, .75);
  padding-top: 64px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 48px;
}

.footer-brand { display: flex; gap: 16px; align-items: center; color: var(--sand-100); }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--sand-100);
  margin: 0;
}
.footer-tag { margin: 0; font-size: .95rem; }

.footer-label {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--clay-300);
  margin-bottom: .4rem;
}
.footer-contact a {
  color: var(--sand-100);
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(246, 239, 226, .3);
}
.footer-contact a:hover { border-color: var(--clay-300); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(246, 239, 226, .12);
  font-size: .85rem;
}
.footer-bottom p { margin: 0; }

/* ---------- Reveal on scroll ---------- */

.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}
.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
