/* Elohim Ministries International: site styles.
   Built from the style guide in design/style-guide (tokens.css, README.md). */

:root {
  --white: #FFFFFF;
  --mist: #EEF6FC;
  --heaven: #8EC1EA;
  --sky: #7DB9E8;
  --covenant: #1F6FB2;
  --covenant-hover: #185A92;
  --deep: #12324F;
  --stone: #4B6478;
  --line: #D6E6F3;
  --field: #7C96AB;
  --error: #B3261E;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Nunito Sans', 'Segoe UI', Arial, sans-serif;

  --radius-field: 10px;
  --radius-card: 16px;
  --radius-photo: 24px;

  --wrap: 1200px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --section: clamp(56px, 8vw, 96px);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--deep);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

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

a { color: var(--covenant); }
a:hover { color: var(--covenant-hover); }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--covenant); color: var(--white); padding: 10px 18px; border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---------- Type ---------- */

h1, h2, h3 { margin: 0; text-wrap: balance; }

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 3.8vw, 40px); line-height: 1.12; }
.h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(24px, 2.6vw, 30px); line-height: 1.2; }
.h3 { font-family: var(--sans); font-weight: 700; font-size: 22px; line-height: 1.3; }
.card-title { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.25; }

.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--stone); }
.muted { color: var(--stone); }
.caption { font-size: 14px; line-height: 1.5; color: var(--stone); }

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--covenant);
}

.scripture {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 28px);
  line-height: 1.4;
  margin: 0;
}

p { margin: 0; }
.prose { display: flex; flex-direction: column; gap: 16px; max-width: 65ch; }

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

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid var(--covenant);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--covenant); color: var(--white); }
.btn-primary:hover { background: var(--covenant-hover); border-color: var(--covenant-hover); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--covenant); }
.btn-secondary:hover { background: var(--mist); color: var(--covenant-hover); border-color: var(--covenant-hover); }
.btn-plain { background: var(--white); color: var(--deep); border-color: var(--white); }
.btn-plain:hover { background: var(--mist); border-color: var(--mist); color: var(--deep); }

.text-link { font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

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

.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(6px);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 14px; padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--deep); text-decoration: none; }
.brand:hover { color: var(--deep); }
.brand svg { flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; gap: 3px; }
.brand-name strong { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1; }
.brand-name small { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; color: var(--stone); }

.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; font-size: 15px; font-weight: 600; }
.site-nav a { color: var(--deep); text-decoration: none; padding: 10px 0; }
.site-nav a:hover { color: var(--covenant); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--sky); }
.site-nav .btn { padding: 10px 22px; min-height: 44px; color: var(--white); }

@media (max-width: 760px) {
  .site-header { position: static; }
  .site-nav { width: 100%; gap: 0 18px; }
  .site-nav .btn { margin-left: auto; }
}

/* ---------- Sections ---------- */

.section { padding-top: var(--section); padding-bottom: var(--section); }
.section-mist { background: var(--mist); }
.section-heaven { background: var(--heaven); }
.section-line { border-top: 1px solid var(--line); }

.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; align-items: center; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(32px, 5vw, 64px); }
.split > * { flex: 1 1 420px; min-width: 0; }

/* Hero */
.hero .split > .hero-text { display: flex; flex-direction: column; gap: 22px; }

.framed { position: relative; padding: 0 24px 24px 0; }
.framed::before {
  content: ""; position: absolute; top: 24px; left: 24px; right: 0; bottom: 0;
  background: var(--heaven); border-radius: var(--radius-photo);
}
.framed img { position: relative; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-photo); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; }
.pillar { display: flex; flex-direction: column; gap: 10px; }
.pillar .icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--mist);
  display: grid; place-items: center; color: var(--covenant);
}
.pillar .ref { font-size: 13px; font-weight: 700; color: var(--covenant); }

/* Mission list */
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list li::before {
  content: ""; flex-shrink: 0; width: 10px; height: 10px; margin-top: 8px;
  border-radius: 50%; background: var(--sky);
}

/* Video card */
.video-card {
  position: relative; display: block; border-radius: var(--radius-photo); overflow: hidden;
  color: var(--white); text-decoration: none;
}
.video-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.video-card .play {
  position: absolute; left: 20px; bottom: 20px; right: 20px;
  display: flex; align-items: center; gap: 14px;
  background: rgba(18, 50, 79, 0.82); padding: 14px 18px; border-radius: 14px;
}
.video-card .play-dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white); color: var(--covenant);
  display: grid; place-items: center; flex-shrink: 0;
}
.video-card .play strong { display: block; font-size: 16px; }
.video-card .play span { font-size: 13px; opacity: .9; }
.video-card:hover { color: var(--white); }
.video-card:hover .play { background: rgba(31, 111, 178, 0.92); }

/* Scripture band */
.scripture-band { text-align: center; }
.scripture-band .wrap { max-width: 820px; display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden;
}
.card img { width: 100%; height: 210px; object-fit: cover; }
.card-body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.card-body .text-link { margin-top: auto; padding-top: 6px; }

/* Stats */
.stats { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 8px; }
.stat strong {
  display: block; font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1;
  color: var(--covenant); font-variant-numeric: tabular-nums;
}
.stat span { font-size: 14px; color: var(--stone); }

/* Leaders */
.leaders { display: flex; flex-direction: column; gap: 28px; }
.leader {
  display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px);
  background: var(--white); border-radius: var(--radius-card); padding: clamp(20px, 3vw, 32px);
}
.leader img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius-card); }
.leader-body { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.leader-role { font-size: 15px; font-weight: 700; color: var(--stone); }
.degrees { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.degrees li {
  font-size: 13px; font-weight: 600; color: var(--deep);
  background: var(--mist); border-radius: 999px; padding: 6px 12px;
}
.quote {
  margin: 4px 0 0; padding: 18px 22px; background: var(--mist); border-radius: 14px;
  font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.45;
}
.quote cite { display: block; margin-top: 8px; font-family: var(--sans); font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--covenant); }

@media (max-width: 720px) {
  .leader { grid-template-columns: minmax(0, 1fr); }
  .leader img { max-width: 320px; }
}

/* Give band */
.give-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.give-band .give-text { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }

/* Forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; font-weight: 400; color: var(--stone); }
.field input, .field textarea {
  font-family: var(--sans); font-size: 16px; color: var(--deep);
  background: var(--white); border: 1px solid var(--field); border-radius: var(--radius-field);
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--sky); outline-offset: 1px; border-color: var(--covenant); }
.form .btn { justify-self: start; }
@media (max-width: 560px) { .form { grid-template-columns: minmax(0, 1fr); } }

.contact-aside { display: flex; flex-direction: column; gap: 14px; }
.contact-aside .email { font-size: 18px; font-weight: 700; word-break: break-all; }
address { font-style: normal; }
.mail { font-size: 16px; font-weight: 600; line-height: 1.55; color: var(--deep); }

/* Simple content pages */
.page-hero { background: var(--mist); padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(40px, 6vw, 64px); }
.page-hero .wrap { display: flex; flex-direction: column; gap: 16px; }
.page-hero .lead { max-width: 640px; }

.ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.way {
  display: flex; flex-direction: column; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px;
}
.way .btn, .way .text-link { margin-top: auto; align-self: flex-start; }
.way .btn { margin-top: 8px; }

.note {
  background: var(--mist); border-radius: var(--radius-card); padding: 24px; display: flex; flex-direction: column; gap: 8px;
}

/* Footer */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding-top: 48px; padding-bottom: 40px; font-size: 14px; color: var(--stone); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.footer-brand strong { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--deep); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 24px; align-content: flex-start; font-weight: 600; }
.footer-links a { color: var(--deep); text-decoration: none; padding: 6px 0; }
.footer-links a:hover { color: var(--covenant); }

/* Card giving (giving.html) */
.give-panel {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start;
  border: 1px solid var(--line); border-radius: var(--radius-card); padding: clamp(24px, 4vw, 40px);
}
.give-intro { display: flex; flex-direction: column; gap: 12px; }
.give-form { display: flex; flex-direction: column; gap: 20px; }
.give-form[hidden] { display: none; }
.give-form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.give-form legend { font-size: 14px; font-weight: 700; margin-bottom: 8px; width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 76px; padding: 10px 18px;
  border: 2px solid var(--line); border-radius: 999px; background: var(--white);
  font-weight: 700; color: var(--deep); cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.chip input:hover + span { border-color: var(--sky); }
.chip input:checked + span { border-color: var(--covenant); background: var(--mist); color: var(--covenant); }
.chip input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }
.give-other { max-width: 260px; }
.give-other[hidden] { display: none; }
.give-form .btn { align-self: flex-start; }
.give-form .btn:disabled { opacity: .7; cursor: progress; }
.give-error { color: var(--error); font-weight: 600; }
.give-fine { font-size: 13px; color: var(--stone); }
@media (max-width: 820px) { .give-panel { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.give-checkout { display: flex; flex-direction: column; gap: 16px; min-width: 0; scroll-margin-top: 100px; }
.give-checkout[hidden] { display: none; }
.give-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.give-summary strong { font-size: 18px; color: var(--deep); }
.link-button { background: none; border: 0; padding: 6px 0; font: inherit; font-weight: 700; color: var(--covenant); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
#checkout { min-height: 420px; }
