/*
Theme Name: The Grace Commission
Theme URI: https://thegracecommission.org
Author: The Grace Commission
Description: A custom one-page WordPress theme for The Grace Commission, supporting new U.S. Greater Grace churches in their first three years.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: grace-commission
*/

:root {
  --tgc-navy: #102a43;
  --tgc-navy-dark: #071a2c;
  --tgc-blue: #2f5d8c;
  --tgc-blue-soft: #dbe8f3;
  --tgc-red: #a7333f;
  --tgc-red-dark: #7f202c;
  --tgc-cream: #f7f3ea;
  --tgc-white: #ffffff;
  --tgc-ink: #17202a;
  --tgc-muted: #667085;
  --tgc-line: #d7dde5;
  --tgc-gold: #c49a52;
  --tgc-shadow: 0 18px 45px rgba(16, 42, 67, 0.12);
  --tgc-radius: 18px;
  --tgc-max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tgc-ink);
  background: var(--tgc-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--tgc-blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tgc-red); }
button, input, textarea, select { font: inherit; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.tgc-container {
  width: min(calc(100% - 40px), var(--tgc-max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(215, 221, 229, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-branding { display: flex; align-items: center; gap: 14px; min-width: 240px; }
.custom-logo-link { display: inline-flex; }
.custom-logo { max-height: 58px; width: auto; }
.wordmark { text-decoration: none; color: var(--tgc-navy-dark); display: inline-flex; flex-direction: column; line-height: 1.05; }
.wordmark strong { font-size: 1.08rem; letter-spacing: 0.01em; }
.wordmark span { margin-top: 5px; font-size: 0.69rem; color: var(--tgc-muted); letter-spacing: 0.11em; text-transform: uppercase; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 7px; margin: 0; padding: 0; }
.primary-nav a { color: var(--tgc-navy-dark); text-decoration: none; font-size: 0.93rem; font-weight: 650; padding: 10px 11px; border-radius: 10px; }
.primary-nav a:hover { background: var(--tgc-cream); color: var(--tgc-red); }
.primary-nav .menu-item-cta a { background: var(--tgc-red); color: #fff; padding-inline: 17px; }
.primary-nav .menu-item-cta a:hover { background: var(--tgc-red-dark); color: #fff; }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; color: var(--tgc-navy); cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 5px 0; }

.tgc-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 78% 16%, rgba(196, 154, 82, 0.23), transparent 25%),
    linear-gradient(118deg, var(--tgc-navy-dark) 0%, var(--tgc-navy) 58%, #234f78 100%);
  padding: 92px 0 46px;
}
.tgc-hero::before,
.tgc-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
}
.tgc-hero::before { width: 460px; height: 460px; right: -150px; top: -190px; }
.tgc-hero::after { width: 300px; height: 300px; right: 10%; bottom: -210px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 70px; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; color: #f3dcae; font-size: .82rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--tgc-gold); }
.hero-copy h1 { margin: 0; max-width: 820px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.75rem, 6.1vw, 5.35rem); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.hero-copy .lead { max-width: 760px; margin: 27px 0 0; font-size: clamp(1.08rem, 1.7vw, 1.35rem); color: rgba(255,255,255,.84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.tgc-button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 50px; padding: 12px 21px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-weight: 750; line-height: 1.1; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.tgc-button:hover { transform: translateY(-2px); }
.tgc-button-primary { background: var(--tgc-red); color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.tgc-button-primary:hover { background: #bd3c49; color: #fff; }
.tgc-button-light { border-color: rgba(255,255,255,.34); color: #fff; background: rgba(255,255,255,.06); }
.tgc-button-light:hover { background: rgba(255,255,255,.13); color: #fff; }
.tgc-button-outline { border-color: var(--tgc-navy); color: var(--tgc-navy); background: transparent; }
.tgc-button-outline:hover { background: var(--tgc-navy); color: #fff; }
.hero-visual { position: relative; min-height: 420px; }
.hero-card-main { position: absolute; inset: 14px 0 58px 44px; padding: 34px; border-radius: 28px; background: linear-gradient(155deg, rgba(255,255,255,.16), rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.2); box-shadow: 0 28px 80px rgba(0,0,0,.24); backdrop-filter: blur(8px); }
.hero-map { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.map-title { color: rgba(255,255,255,.72); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.map-line { position: relative; height: 188px; margin: 28px 0; }
.map-line::before { content: ""; position: absolute; left: 8%; right: 8%; top: 50%; border-top: 2px dashed rgba(255,255,255,.25); transform: rotate(-7deg); }
.map-pin { position: absolute; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50% 50% 50% 12px; transform: rotate(-45deg); background: var(--tgc-red); box-shadow: 0 12px 25px rgba(0,0,0,.28); }
.map-pin span { transform: rotate(45deg); font-weight: 850; font-size: .8rem; }
.map-pin.one { left: 5%; top: 55%; }
.map-pin.two { right: 7%; top: 18%; background: #fff; color: var(--tgc-navy); }
.map-pin.three { right: 36%; top: 62%; background: var(--tgc-gold); color: var(--tgc-navy-dark); }
.map-caption { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.35; }
.hero-small-card { position: absolute; right: -18px; bottom: 0; width: 220px; padding: 18px 20px; background: var(--tgc-cream); color: var(--tgc-navy-dark); border-radius: 16px; box-shadow: var(--tgc-shadow); }
.hero-small-card strong { display: block; font-size: 1.1rem; }
.hero-small-card span { display: block; margin-top: 3px; font-size: .84rem; color: var(--tgc-muted); }

.progress-strip { position: relative; z-index: 3; margin-top: 44px; }
.progress-inner { display: grid; grid-template-columns: 1.2fr .8fr .8fr; border-radius: 20px; overflow: hidden; background: #fff; color: var(--tgc-ink); box-shadow: 0 18px 40px rgba(0,0,0,.19); }
.progress-intro, .progress-stat { padding: 23px 26px; }
.progress-intro { background: var(--tgc-cream); }
.progress-intro strong { display: block; color: var(--tgc-navy); }
.progress-intro span { color: var(--tgc-muted); font-size: .9rem; }
.progress-stat { border-left: 1px solid var(--tgc-line); }
.progress-stat strong { display: block; color: var(--tgc-red); font-size: 1.8rem; line-height: 1; }
.progress-stat span { display: block; margin-top: 7px; color: var(--tgc-muted); font-size: .88rem; }

.tgc-section { padding: 94px 0; }
.tgc-section-cream { background: var(--tgc-cream); }
.tgc-section-navy { background: var(--tgc-navy-dark); color: #fff; }
.section-heading { max-width: 820px; margin-bottom: 44px; }
.section-kicker { color: var(--tgc-red); font-size: .8rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.tgc-section-navy .section-kicker { color: #f2d69f; }
.section-heading h2 { margin: 10px 0 15px; color: var(--tgc-navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 4.2vw, 3.65rem); line-height: 1.08; letter-spacing: -.035em; }
.tgc-section-navy .section-heading h2 { color: #fff; }
.section-heading p { margin: 0; color: var(--tgc-muted); font-size: 1.08rem; }
.tgc-section-navy .section-heading p { color: rgba(255,255,255,.72); }

.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.mission-copy p:first-child { font-size: 1.22rem; color: var(--tgc-navy); }
.verse-card { margin-top: 30px; padding: 26px 28px; border-left: 4px solid var(--tgc-red); background: #fff; border-radius: 0 var(--tgc-radius) var(--tgc-radius) 0; box-shadow: 0 12px 32px rgba(16,42,67,.08); }
.verse-card blockquote { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.22rem; line-height: 1.55; color: var(--tgc-navy-dark); }
.verse-card cite { display: block; margin-top: 12px; color: var(--tgc-muted); font-style: normal; font-weight: 700; font-size: .85rem; }
.pillar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.pillar-card { padding: 25px; border: 1px solid var(--tgc-line); border-radius: var(--tgc-radius); background: #fff; box-shadow: 0 8px 22px rgba(16,42,67,.045); }
.pillar-card:last-child { grid-column: 1 / -1; }
.pillar-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: var(--tgc-blue-soft); color: var(--tgc-navy); font-size: 1.3rem; }
.pillar-card h3 { margin: 18px 0 8px; color: var(--tgc-navy-dark); font-size: 1.1rem; }
.pillar-card p { margin: 0; color: var(--tgc-muted); font-size: .95rem; }

.church-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.church-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--tgc-line); border-radius: 22px; background: #fff; box-shadow: 0 14px 34px rgba(16,42,67,.08); }
.church-image { min-height: 210px; position: relative; display: flex; align-items: flex-end; padding: 22px; background: linear-gradient(135deg, #203f5e, #4c7194); color: #fff; overflow: hidden; }
.church-image::before { content: ""; position: absolute; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; top: -60px; right: -45px; }
.church-image.has-photo { background-size: cover; background-position: center; }
.church-image.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7,26,44,.82), rgba(7,26,44,.08)); }
.church-image-content { position: relative; z-index: 2; }
.church-status { display: inline-flex; padding: 6px 10px; margin-bottom: 11px; border-radius: 999px; background: rgba(255,255,255,.17); backdrop-filter: blur(4px); font-size: .73rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.church-image h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 1.55rem; line-height: 1.16; }
.church-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.church-meta { color: var(--tgc-red); font-weight: 750; font-size: .88rem; }
.church-body p { color: var(--tgc-muted); }
.church-link { margin-top: auto; font-weight: 750; text-decoration: none; }
.placeholder-church .church-image { background: linear-gradient(135deg, #6e7780, #a0a6ad); }

.adoption-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: start; }
.adoption-points { display: grid; gap: 16px; }
.adoption-point { display: grid; grid-template-columns: 46px 1fr; gap: 15px; align-items: start; padding: 20px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; background: rgba(255,255,255,.05); }
.adoption-number { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--tgc-red); color: #fff; font-weight: 850; }
.adoption-point h3 { margin: 0 0 5px; font-size: 1.05rem; }
.adoption-point p { margin: 0; color: rgba(255,255,255,.7); font-size: .94rem; }
.adoption-note { margin-top: 25px; color: rgba(255,255,255,.75); }

.giving-grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: 30px; align-items: start; }
.give-main { padding: 38px; border-radius: 24px; background: var(--tgc-navy); color: #fff; box-shadow: var(--tgc-shadow); }
.give-main .section-kicker { color: #f2d69f; }
.give-main h3 { margin: 10px 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 2.25rem; line-height: 1.12; }
.give-main p { color: rgba(255,255,255,.76); }
.give-methods { display: grid; gap: 14px; }
.give-method { padding: 22px; border: 1px solid var(--tgc-line); border-radius: 16px; background: #fff; }
.give-method h4 { margin: 0 0 7px; color: var(--tgc-navy-dark); }
.give-method p { margin: 0; color: var(--tgc-muted); font-size: .93rem; }
.give-code { display: inline-flex; margin-top: 10px; padding: 7px 11px; border-radius: 8px; background: var(--tgc-cream); color: var(--tgc-navy); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 750; }
.fine-print { margin-top: 20px; color: var(--tgc-muted); font-size: .8rem; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.news-card { padding: 25px; border-radius: 18px; background: #fff; border: 1px solid var(--tgc-line); }
.news-card .date { color: var(--tgc-red); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.news-card h3 { margin: 10px 0 8px; color: var(--tgc-navy-dark); }
.news-card p { margin: 0; color: var(--tgc-muted); }
.news-card a { display: inline-block; margin-top: 15px; font-weight: 750; text-decoration: none; }

.newsletter-box { display: grid; grid-template-columns: 1fr auto; gap: 25px; align-items: center; margin-top: 44px; padding: 32px; border-radius: 22px; background: var(--tgc-navy-dark); color: #fff; }
.newsletter-box h3 { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; }
.newsletter-box p { margin: 0; color: rgba(255,255,255,.7); }
.newsletter-form { display: flex; gap: 9px; }
.newsletter-form input { min-width: 260px; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 999px; }

.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items: center; }
.about-panel { padding: 34px; border-radius: 22px; background: #fff; border: 1px solid var(--tgc-line); box-shadow: 0 12px 32px rgba(16,42,67,.07); }
.about-panel ul { margin: 0; padding-left: 20px; }
.about-panel li + li { margin-top: 11px; }
.texas-line { display: inline-flex; align-items: center; gap: 9px; margin-top: 22px; color: var(--tgc-red); font-weight: 800; }

.contact-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: 60px; align-items: start; }
.contact-details { display: grid; gap: 16px; margin-top: 25px; }
.contact-item { padding: 17px 19px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 13px; }
.contact-item strong { display: block; }
.contact-item span, .contact-item a { color: rgba(255,255,255,.72); }
.tgc-form { padding: 30px; border-radius: 22px; background: #fff; color: var(--tgc-ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-field { margin-bottom: 15px; }
.form-field label { display: block; margin-bottom: 6px; color: var(--tgc-navy-dark); font-weight: 750; font-size: .88rem; }
.form-field input, .form-field textarea, .form-field select { width: 100%; border: 1px solid var(--tgc-line); border-radius: 11px; padding: 11px 13px; background: #fff; color: var(--tgc-ink); }
.form-field textarea { min-height: 130px; resize: vertical; }
.form-status { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; background: #e8f5e9; color: #1d5b27; }
.form-status.error { background: #fdebec; color: #8a1e28; }

.partner-strip { padding: 55px 0; border-top: 1px solid var(--tgc-line); }
.partner-label { text-align: center; color: var(--tgc-muted); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.partner-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 28px 42px; margin-top: 27px; }
.partner-logo { max-width: 155px; filter: grayscale(1); opacity: .62; transition: opacity .18s ease, filter .18s ease; }
.partner-logo:hover { filter: grayscale(.2); opacity: 1; }
.partner-text { color: #7b8490; font-weight: 800; letter-spacing: .03em; text-align: center; }

.site-footer { background: #061522; color: rgba(255,255,255,.74); padding: 58px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr .7fr .7fr; gap: 45px; }
.footer-brand strong { display: block; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.footer-brand p { max-width: 470px; }
.footer-heading { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-links { list-style: none; padding: 0; margin: 13px 0 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.48); font-size: .82rem; }

.content-area { padding: 80px 0; }
.content-area article { max-width: 850px; margin-inline: auto; }
.entry-title { color: var(--tgc-navy-dark); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1.05; }
.entry-content { font-size: 1.05rem; }
.entry-content h2, .entry-content h3 { color: var(--tgc-navy-dark); }

@media (max-width: 960px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 77px; left: 0; right: 0; padding: 14px 20px 22px; background: #fff; border-bottom: 1px solid var(--tgc-line); box-shadow: 0 18px 30px rgba(16,42,67,.12); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; align-items: stretch; }
  .primary-nav a { display: block; }
  .hero-grid, .mission-grid, .adoption-grid, .giving-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 38px; }
  .hero-visual { min-height: 365px; max-width: 600px; width: 100%; }
  .church-grid, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .tgc-container { width: min(calc(100% - 28px), var(--tgc-max)); }
  .site-branding { min-width: auto; }
  .wordmark span { display: none; }
  .tgc-hero { padding-top: 66px; }
  .hero-copy h1 { font-size: clamp(2.55rem, 14vw, 4.1rem); }
  .hero-visual { min-height: 330px; }
  .hero-card-main { inset: 8px 0 55px 0; padding: 25px; }
  .hero-small-card { right: 8px; }
  .progress-inner { grid-template-columns: 1fr 1fr; }
  .progress-intro { grid-column: 1 / -1; }
  .progress-stat { border-top: 1px solid var(--tgc-line); }
  .progress-stat:first-of-type { border-left: 0; }
  .tgc-section { padding: 72px 0; }
  .pillar-grid, .church-grid, .news-grid { grid-template-columns: 1fr; }
  .pillar-card:last-child { grid-column: auto; }
  .newsletter-box { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { min-width: 0; width: 100%; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
}
