/* =========================================================================
   My Father's House — Church of God in Christ
   Design system : elegant & minimal, earthy & warm
   ========================================================================= */

:root {
  /* --- Warm sand / paper --- */
  --sand-50:  oklch(0.985 0.006 80);
  --sand-100: oklch(0.967 0.010 78);
  --sand-150: oklch(0.945 0.013 78);
  --sand-200: oklch(0.910 0.016 76);
  --sand-300: oklch(0.860 0.020 74);

  /* --- Warm ink --- */
  --ink:      oklch(0.275 0.014 55);
  --ink-soft: oklch(0.430 0.013 50);
  --ink-mute: oklch(0.560 0.012 50);

  /* --- Accents --- */
  --terra:       oklch(0.605 0.128 42);
  --terra-deep:  oklch(0.500 0.115 40);
  --terra-soft:  oklch(0.930 0.030 55);
  --sage:        oklch(0.620 0.046 152);
  --sage-deep:   oklch(0.470 0.040 152);
  --sage-soft:   oklch(0.935 0.018 150);

  --line: color-mix(in oklab, var(--ink) 14%, transparent);
  --line-soft: color-mix(in oklab, var(--ink) 8%, transparent);

  --shadow-sm: 0 1px 2px color-mix(in oklab, var(--ink) 8%, transparent);
  --shadow-md: 0 14px 40px -18px color-mix(in oklab, var(--ink) 40%, transparent);
  --shadow-lg: 0 30px 70px -30px color-mix(in oklab, var(--ink) 45%, transparent);

  --font-head: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", monospace;

  --maxw: 1180px;
  --pad: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --radius-lg: 8px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--sand-50);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

::selection { background: var(--terra); color: var(--sand-50); }

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.display {
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.015em; }
p { text-wrap: pretty; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra-deep);
  font-weight: 500;
}
.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.32rem);
  color: var(--ink-soft);
  line-height: 1.6;
}
.script {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 400;
}

/* --- Layout --- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: 760px; margin-inline: auto; padding-inline: var(--pad); }
section { position: relative; }
.section-pad { padding-block: clamp(64px, 10vw, 130px); }
.divider { height: 1px; background: var(--line-soft); border: 0; }

.grid { display: grid; gap: clamp(24px, 4vw, 56px); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .cols-3.keep-2, .cols-4.keep-2 { grid-template-columns: 1fr 1fr; }
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.85em 1.5em;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .18s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--terra); color: var(--sand-50); }
.btn-primary:hover { background: var(--terra-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--ink); color: var(--sand-50); border-color: var(--ink); }
.btn-light { background: var(--sand-50); color: var(--ink); }
.btn-light:hover { background: var(--sand-150); }
.btn-arrow svg { transition: transform .2s ease; }
.btn-arrow:hover svg { transform: translateX(3px); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.4em;
  font-family: var(--font-head); font-weight: 500;
  color: var(--terra-deep);
  border-bottom: 1px solid transparent;
}
.link-arrow svg { transition: transform .2s ease; }
.link-arrow:hover svg { transform: translateX(3px); }

/* =========================================================================
   Header
   ========================================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in oklab, var(--sand-50) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav {
  display: flex; align-items: center; gap: 1.5rem;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.7rem; margin-right: auto; }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--terra);
  color: var(--sand-50);
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem;
}
.brand-name {
  font-family: var(--font-head); font-weight: 600;
  font-size: 1.02rem; letter-spacing: -0.02em; line-height: 1.1;
}
.brand-name span { display: block; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); }
.nav-links { display: flex; align-items: center; gap: 0.3rem; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500;
  font-size: 0.93rem; color: var(--ink-soft);
  padding: 0.5em 0.8em; border-radius: 999px;
  transition: color .18s ease, background .18s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--sand-150); }
.nav-links a[aria-current="page"] { color: var(--terra-deep); }
.nav-cta { margin-left: 0.4rem; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; color: var(--ink); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 1000px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 200;
  background: var(--sand-50);
  display: flex; flex-direction: column;
  padding: 24px var(--pad) 40px;
  transform: translateY(-100%);
  transition: transform .4s cubic-bezier(.6,.05,.25,1);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu-top { display: flex; align-items: center; height: 78px; }
.mobile-menu-top .nav-toggle { display: inline-flex; margin-left: auto; }
.mobile-links { display: flex; flex-direction: column; gap: 0.2rem; margin-top: 1.5rem; }
.mobile-links a {
  font-family: var(--font-head); font-weight: 500;
  font-size: 1.7rem; letter-spacing: -0.02em;
  padding: 0.5rem 0; color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-links a[aria-current="page"] { color: var(--terra-deep); }
.mobile-menu .btn { margin-top: 1.8rem; align-self: flex-start; }

/* =========================================================================
   Placeholder imagery
   ========================================================================= */
.ph {
  position: relative; overflow: hidden;
  background-color: var(--sand-150);
  background-image: repeating-linear-gradient(
    -45deg,
    color-mix(in oklab, var(--sage) 16%, transparent) 0 2px,
    transparent 2px 13px
  );
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  color: var(--ink-mute);
}
.ph::after {
  content: attr(data-label);
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--sand-50);
  color: var(--ink-mute);
  padding: 0.4em 0.85em; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.ph.terra {
  background-image: repeating-linear-gradient(
    -45deg,
    color-mix(in oklab, var(--terra) 18%, transparent) 0 2px,
    transparent 2px 13px
  );
}

/* =========================================================================
   Cards & misc components
   ========================================================================= */
.card {
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--sand-300); }

.pill {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--sage-deep);
  background: var(--sage-soft);
  padding: 0.4em 0.85em; border-radius: 999px;
}
.pill.terra { color: var(--terra-deep); background: var(--terra-soft); }

.stat-num { font-family: var(--font-head); font-size: clamp(2.2rem,4vw,3.2rem); font-weight: 600; letter-spacing: -0.03em; color: var(--terra-deep); }

/* Section heading block */
.head-block { max-width: 640px; }
.head-block .eyebrow { display: block; margin-bottom: 1rem; }
.head-block h2 { margin-bottom: 1rem; }

/* Interior page hero */
.page-hero { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(28px, 4vw, 52px); }
.page-hero .eyebrow { display: block; margin-bottom: 1.1rem; }
.page-hero h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); letter-spacing: -0.035em; margin-bottom: 1.2rem; }
.page-hero .lead { max-width: 56ch; }
.breadcrumb { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 1.4rem; }
.breadcrumb a { color: var(--ink-mute); }
.breadcrumb a:hover { color: var(--terra-deep); }

/* Tinted section */
.tint-sage { background: var(--sage-soft); }
.tint-sand { background: var(--sand-100); }
.tint-ink { background: var(--ink); color: var(--sand-100); }
.tint-ink h1, .tint-ink h2, .tint-ink h3 { color: var(--sand-50); }
.tint-ink .eyebrow { color: color-mix(in oklab, var(--terra) 70%, white); }
.tint-ink .lead { color: color-mix(in oklab, var(--sand-100) 80%, transparent); }

/* =========================================================================
   Forms
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: 0.92rem; }
.field .hint { font-size: 0.82rem; color: var(--ink-mute); }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem;
  padding: 0.8em 1em;
  background: var(--sand-50);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--terra);
  box-shadow: 0 0 0 3px var(--terra-soft);
}
.field textarea { resize: vertical; min-height: 130px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.95rem; color: var(--ink-soft); }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--terra); margin-top: 3px; flex: none; }

.form-success {
  display: none;
  background: var(--sage-soft);
  border: 1px solid color-mix(in oklab, var(--sage) 40%, transparent);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  color: var(--sage-deep);
  font-family: var(--font-head); font-weight: 500;
}
.form-success.show { display: block; animation: rise .4s ease; }

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

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--ink); color: color-mix(in oklab, var(--sand-100) 78%, transparent); }
.site-footer .wrap { padding-block: clamp(56px, 8vw, 90px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(28px, 4vw, 56px); }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--sand-50); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; font-family: var(--mono); font-weight: 500; margin-bottom: 1.1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links a { color: color-mix(in oklab, var(--sand-100) 72%, transparent); font-size: 0.96rem; transition: color .18s ease; }
.footer-links a:hover { color: var(--sand-50); }
.footer-brand .brand-mark { background: var(--terra); }
.footer-bottom {
  border-top: 1px solid color-mix(in oklab, var(--sand-100) 16%, transparent);
  margin-top: clamp(40px, 5vw, 64px); padding-top: 1.6rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  font-size: 0.85rem; color: color-mix(in oklab, var(--sand-100) 55%, transparent);
}

/* =========================================================================
   Reveal-on-scroll
   Base state is fully visible (robust for print / no-JS / paused tabs).
   When JS is active we arm a gentle fade-up that the IntersectionObserver
   releases — but the page is never dependent on it to show content.
   ========================================================================= */
.reveal { opacity: 1; transform: none; }
html.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
html.anim .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.anim .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
