/* ============================================================
   First Christian Church (Disciples of Christ) — Wagoner, OK
   Shared stylesheet
   Aesthetic: grounded editorial — deep green on cream, warm serifs,
   generous space, subtle paper texture. Built for readability
   (older adults, first-time visitors) and accessibility.
   ============================================================ */

/* ----- Design tokens ------------------------------------------------ */
:root {
  /* Color */
  --cream:        #f7f1e4;   /* page background */
  --cream-soft:   #fbf7ee;   /* cards / raised surfaces */
  --cream-deep:   #efe6d2;   /* alternating sections */
  --green:        #244233;   /* primary deep green */
  --green-dark:   #16291f;   /* darkest green (footer) */
  --green-soft:   #3a5e48;   /* hover / secondary green */
  --green-tint:   #e4ecde;   /* faint green wash */
  --ink:          #2a2620;   /* warm near-black body text */
  --ink-soft:     #544d42;   /* muted body text */
  --gold:         #a9772f;   /* ochre accent — decorative use (lines, icons, underline) */
  --gold-soft:    #c79a55;
  --gold-ink:     #855b1d;   /* accent TEXT on light — WCAG AA (>=4.8:1 on cream/cream-deep) */
  --gold-on-green:#d2a861;   /* accent TEXT/links on green sections — WCAG AA (5:1) */
  --chalice:      #9c2b22;   /* denominational red, used sparingly */
  --line:         rgba(42, 38, 32, 0.14);
  --line-strong:  rgba(42, 38, 32, 0.24);

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Newsreader", Georgia, "Times New Roman", serif;

  /* Spacing & shape */
  --radius:   4px;
  --radius-lg: 10px;
  --maxw:     1140px;
  --gutter:   clamp(1.25rem, 4vw, 3rem);
  --shadow:   0 1px 2px rgba(22, 41, 31, 0.06),
              0 12px 30px -18px rgba(22, 41, 31, 0.35);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--body);
  font-size: clamp(1.075rem, 0.95rem + 0.45vw, 1.225rem); /* large, legible */
  line-height: 1.72;
  color: var(--ink);
  background-color: var(--cream);
  /* subtle paper texture + warm vignette */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(58, 94, 72, 0.06), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }

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

/* ----- Typography --------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 460;
  color: var(--green);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-optical-sizing: auto;
}

h1 { font-size: clamp(2.4rem, 1.6rem + 3.6vw, 4.1rem); font-weight: 480; }
h2 { font-size: clamp(1.85rem, 1.4rem + 1.9vw, 2.7rem); }
h3 { font-size: clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem); color: var(--ink); }
h4 { font-size: 1.15rem; color: var(--ink); letter-spacing: 0; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.55rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 380;
}

strong { font-weight: 600; }

blockquote {
  margin: 1.8rem 0;
  padding: 0.4rem 0 0.4rem 1.6rem;
  border-left: 3px solid var(--gold);
  font-family: var(--display);
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-style: italic;
  font-weight: 380;
  color: var(--green);
  line-height: 1.35;
}

/* Eyebrow label */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 1.8rem;
  height: 1px;
  background: var(--gold-soft);
}

/* ----- Layout ------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 760px; }
.container--mid    { max-width: 920px; }

section { padding-block: clamp(3.5rem, 2rem + 7vw, 7rem); }
.section--tint  { background: var(--cream-deep); }
.section--green {
  background: var(--green);
  color: var(--cream);
}
.section--green h1, .section--green h2, .section--green h3 { color: var(--cream-soft); }
.section--green .eyebrow { color: var(--gold-on-green); }
.section--green a { color: var(--gold-on-green); }
.section--green a:hover { color: #e7cb95; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--green);
  color: var(--cream);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--cream); }

/* ----- Header / Nav ------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 241, 228, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--green);
}
.brand:hover { color: var(--green); }
.brand__mark { width: 34px; height: 40px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 520;
  letter-spacing: -0.01em;
}
.brand__sub {
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--gold-ink);
  font-weight: 600;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  padding: 0.4rem 0.2rem;
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0.2rem; right: 0.2rem; bottom: 0.05rem;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav__links a:hover { color: var(--green); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__links a[aria-current="page"] { color: var(--green); font-weight: 600; }

.nav__cta { margin-left: 0.4rem; }
/* CTA is an <a> inside .nav__links — keep button colors, not nav-link color/underline */
.nav__cta .btn--primary,
.nav__cta .btn--primary:hover { color: var(--cream-soft); }
.nav__cta a::after { display: none; }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  width: 46px; height: 42px;
  cursor: pointer;
  color: var(--green);
}
.nav__toggle svg { margin: auto; display: block; }

/* ----- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.2s var(--ease),
              color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--green);
  color: var(--cream-soft);
  box-shadow: var(--shadow);
}
.btn--primary:hover { background: var(--green-soft); color: var(--cream-soft); }

.btn--outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn--outline:hover { background: var(--green); color: var(--cream-soft); }

.section--green .btn--outline { color: var(--cream-soft); border-color: rgba(247,241,228,0.6); }
.section--green .btn--outline:hover { background: var(--cream-soft); color: var(--green); }
.section--green .btn--primary { background: var(--gold); color: var(--green-dark); }
.section--green .btn--primary:hover { background: var(--gold-soft); color: var(--green-dark); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.8rem;
}

/* ----- Hero --------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 9vw, 8rem);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__eyebrow { margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: 0.6rem; }
.hero__lead { margin-top: 1.2rem; max-width: 36ch; }
.hero__meta {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  font-size: 1rem;
  color: var(--ink-soft);
}
.hero__meta .label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.hero__meta strong { color: var(--ink); font-weight: 600; }

/* ----- Image placeholders ------------------------------------------ */
.imgph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  background:
    repeating-linear-gradient(45deg, rgba(36,66,51,0.035) 0 14px, transparent 14px 28px),
    var(--green-tint);
  border: 1.5px dashed var(--green-soft);
  border-radius: var(--radius-lg);
  color: var(--green);
  padding: 1.5rem;
  min-height: 220px;
  overflow: hidden;
}
.imgph svg { opacity: 0.6; }
.imgph__label {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0;
}
.imgph__alt {
  font-size: 0.82rem;
  color: var(--ink-soft);
  max-width: 32ch;
  line-height: 1.4;
}
.imgph__tag {
  position: absolute;
  top: 0.7rem; left: 0.7rem;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--cream);
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  font-family: var(--body);
  font-weight: 600;
}
.imgph--tall  { min-height: 480px; height: 100%; }
.imgph--wide  { min-height: 320px; }
.imgph--hero  { min-height: 420px; }

/* ----- Cards / grids ------------------------------------------------ */
.grid {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2rem);
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split--text-first { }

.card {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.2rem);
  box-shadow: 0 10px 30px -24px rgba(22,41,31,0.5);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-tint);
  color: var(--green);
  margin-bottom: 1rem;
}
.card h3 { color: var(--green); margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }

/* Numbered / labeled list of beliefs etc. */
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line);
}
.feature:first-of-type { border-top: none; }
.feature__marker {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--gold-ink);
  font-weight: 500;
  line-height: 1;
  padding-top: 0.2rem;
}
.feature h3 { margin-bottom: 0.3rem; }

/* Decorative chalice divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  max-width: 240px;
  color: var(--gold-soft);
}
.divider::before, .divider::after {
  content: ""; flex: 1; height: 1px; background: var(--line-strong);
}

/* ----- Prose helper (long copy pages) ------------------------------ */
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }

/* ----- Info / detail list ------------------------------------------ */
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.info-list li:first-child { border-top: none; }
.info-list .ico { color: var(--gold); padding-top: 0.2rem; }
.info-list .label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.placeholder-pill {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  background: var(--green-tint);
  color: var(--green-soft);
  border: 1px dashed var(--green-soft);
  padding: 0.05rem 0.5rem;
  border-radius: 100px;
  font-weight: 600;
}

/* ----- FAQ (details/summary) --------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 2.5rem 1rem 0;
  position: relative;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--green);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.4rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.6rem;
  color: var(--gold);
  transition: transform 0.2s var(--ease);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1.1rem; color: var(--ink-soft); }

/* ----- Forms -------------------------------------------------------- */
.form-note {
  background: var(--green-tint);
  border: 1px dashed var(--green-soft);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: 0.92rem;
  color: var(--green-soft);
  margin-bottom: 1.6rem;
}
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
  color: var(--ink);
}
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--body);
  font-size: 1.05rem;
  color: var(--ink);
  background: var(--cream-soft);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(58,94,72,0.18);
}
.field textarea { min-height: 150px; resize: vertical; }
.field .hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.3rem; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ----- Footer ------------------------------------------------------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(247,241,228,0.82);
  padding-block: clamp(3rem, 2rem + 4vw, 4.5rem) 2rem;
  font-size: 0.98rem;
}
.site-footer a { color: rgba(247,241,228,0.82); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
.footer__brand .brand__name { color: var(--cream-soft); font-size: 1.3rem; }
.footer__brand .brand__sub { color: var(--gold-soft); } /* AA on dark footer (5.97:1) */
.footer__brand p { color: rgba(247,241,228,0.62); max-width: 34ch; margin-top: 0.8rem; }
.footer h4 {
  color: var(--gold-soft);
  font-family: var(--body);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.55rem; }
.footer__bottom {
  margin-top: 2.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(247,241,228,0.16);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(247,241,228,0.55);
}

/* ----- Page intro banner ------------------------------------------- */
.page-intro {
  padding-block: clamp(3rem, 2rem + 5vw, 5.5rem) clamp(2rem,1.5rem+3vw,3.5rem);
  background: var(--cream-deep);
  border-bottom: 1px solid var(--line);
}
.page-intro .lead { margin-top: 1rem; max-width: 60ch; }

/* ----- Motion: staggered reveal on load ---------------------------- */
.reveal { opacity: 0; transform: translateY(18px); }
.is-ready .reveal {
  animation: fade-up 0.8s var(--ease) forwards;
}
.is-ready .reveal[data-delay="1"] { animation-delay: 0.08s; }
.is-ready .reveal[data-delay="2"] { animation-delay: 0.16s; }
.is-ready .reveal[data-delay="3"] { animation-delay: 0.24s; }
.is-ready .reveal[data-delay="4"] { animation-delay: 0.32s; }
.is-ready .reveal[data-delay="5"] { animation-delay: 0.40s; }

@keyframes fade-up {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll-in reveal for lower sections */
.scroll-reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.scroll-reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .scroll-reveal { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; }
  .btn:hover, .card--hover:hover { transform: none; }
}

/* ----- Responsive --------------------------------------------------- */
@media (max-width: 900px) {
  .hero__grid, .split { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .imgph--tall { min-height: 320px; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 76px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream-soft);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
    transform: translateY(-130%);
    transition: transform 0.32s var(--ease);
    visibility: hidden;
  }
  .nav__links.open { transform: translateY(0); visibility: visible; }
  .nav__links a { padding: 0.9rem 0.2rem; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav__links a::after { display: none; }
  .nav__cta { margin: 0.8rem 0 0; }
  .nav__cta .btn { width: 100%; }
  .nav__toggle { display: grid; place-items: center; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .field--row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .nav__links { transition: none; }
}
