/* Covenant Reformed Presbyterian Church — "Coastal Fort Pierce" design system */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --cream: #f2f5f2;
  --sand: #dde6e2;
  --sand-dark: #c7d6d1;
  --ink: #22302f;
  --driftwood: #5c6e6b;
  --teal: #1f6e86;
  --teal-dark: #164e60;
  --seafoam: #d9944f;
  --seafoam-light: #f3d9b0;
  --white: #ffffff;
  --shadow: 0 8px 24px rgba(34, 48, 47, 0.1);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--sand-dark);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand:hover { text-decoration: none; color: var(--teal); }
.brand .brand-line2 { display: block; font-size: 0.95rem; font-weight: 500; color: var(--driftwood); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
}

.main-nav a {
  display: inline-block;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--teal);
  text-decoration: none;
  border-bottom-color: var(--teal);
}

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--sand-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 400px; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 16px;
  }
  .main-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--sand-dark);
  }
}

/* ---------- Page header (typographic, no photo) ---------- */

.page-header {
  background: linear-gradient(160deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  padding: 56px 0;
  text-align: center;
}
.page-header h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
}
.page-header .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  color: var(--seafoam-light);
  margin-bottom: 10px;
}

/* ---------- Hero (home) ---------- */

.hero {
  background: linear-gradient(160deg, var(--sand) 0%, var(--cream) 60%);
  padding: 64px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--sand-dark);
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--driftwood);
  font-size: 1.05rem;
}

/* ---------- Scripture hero (home) ---------- */

.hero-scripture {
  position: relative;
  min-height: clamp(420px, 68vh, 680px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 90px 24px;
  background: url('../images/bible-hero.jpg') center/cover no-repeat;
}
.hero-scripture::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(18, 22, 24, 0.42), rgba(16, 50, 60, 0.36));
}
.hero-scripture-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}
.scripture-quote {
  margin: 0 0 32px;
}
.scripture-quote p {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  color: var(--white);
  line-height: 1.35;
  margin: 0 0 18px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.6);
}
.scripture-quote cite {
  display: block;
  font-style: normal;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--seafoam-light);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  background: var(--teal);
  color: var(--white);
  border: 2px solid var(--teal);
}
.btn-hero:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
  text-decoration: none;
}
.btn-hero-outline {
  background: transparent;
  border-color: var(--white);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}
.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
}

.worship-section .tile-links { margin-top: 40px; }

.worship-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 620px;
  margin: 36px auto 0;
  padding: 32px 36px;
  text-align: left;
}
.worship-card h2 {
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  text-align: center;
  margin-bottom: 20px;
}
.worship-list { list-style: none; margin: 0 0 18px; padding: 0; }
.worship-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--sand-dark);
  font-size: 0.98rem;
}
.worship-list li:last-child { border-bottom: none; }
.worship-list .time { color: var(--teal); font-weight: 600; white-space: nowrap; }
.worship-note {
  font-size: 0.85rem;
  color: var(--driftwood);
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--sand-dark);
}

/* ---------- Tile links (home) ---------- */

.tile-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0 24px;
}
.tile-link {
  background: var(--white);
  border: 1px solid var(--sand-dark);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.tile-link:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
  border-color: var(--teal);
  transform: translateY(-2px);
  color: var(--teal);
}
@media (max-width: 700px) {
  .tile-links { grid-template-columns: 1fr; }
}

/* ---------- Generic section ---------- */

.section { padding: 56px 0; }
.section-narrow { max-width: 760px; margin: 0 auto; padding: 56px 24px; }
.section-narrow p { text-align: left; }

/* ---------- Leadership ---------- */

.leader-feature {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 48px;
}
.leader-feature img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.leader-feature h2 { margin-bottom: 4px; }
.leader-feature .role { color: var(--teal); font-weight: 600; margin-bottom: 14px; display: block; }

@media (max-width: 640px) {
  .leader-feature { flex-direction: column; align-items: center; text-align: center; }
}

.officers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
@media (max-width: 700px) {
  .officers-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .officers-grid { grid-template-columns: 1fr; }
}
.officer-card { text-align: center; }
.officer-card img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 14px;
  box-shadow: var(--shadow);
}
.officer-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.officer-card .role { color: var(--driftwood); font-size: 0.9rem; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
}
.contact-info h2 { font-size: 1.2rem; }

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 20px;
}
.map-wrap iframe { width: 100%; height: 260px; border: 0; display: block; }

.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-divider {
  border: none;
  border-top: 1px solid var(--sand-dark);
  margin: 20px 0;
}

form.crpc-form {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 32px;
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: var(--driftwood);
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--cream);
  color: var(--ink);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--teal);
  background: var(--white);
}
.form-row textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.85rem; color: var(--driftwood); margin-top: 4px; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

.btn {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--teal-dark); color: var(--white); text-decoration: none; }

.form-success {
  background: var(--seafoam-light);
  border: 1px solid var(--seafoam);
  color: var(--teal-dark);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 18px;
}

/* ---------- Sermons & Resources ---------- */

.sermon-callout {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
  margin-bottom: 44px;
}
.sermon-callout h2 { margin-bottom: 8px; }
.sermon-callout p {
  color: var(--driftwood);
  max-width: 480px;
  margin: 0 auto 20px;
}

.resource-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.resource-list li {
  border-bottom: 1px solid var(--sand-dark);
}
.resource-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 4px;
  color: var(--ink);
  font-weight: 500;
  font-size: 1.05rem;
}
.resource-list a:hover { color: var(--teal); text-decoration: none; }
.resource-list a::after { content: "→"; color: var(--teal); }
.resource-subhead {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--driftwood);
  margin: 36px 0 10px;
}

/* ---------- Gallery ---------- */

.gallery-section { margin-bottom: 44px; }
.gallery-section h2 {
  font-size: 1.15rem;
  color: var(--teal);
}
.gallery-section .caption-note {
  color: var(--driftwood);
  font-size: 0.95rem;
  margin-top: -6px;
  margin-bottom: 16px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.gallery-grid button {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
}
.gallery-grid button:hover img { transform: scale(1.05); }

.hint-text {
  text-align: center;
  color: var(--driftwood);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 6px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 6px;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.25); }

/* ---------- Our Beliefs ---------- */

.belief-block { margin-bottom: 28px; }
.belief-term {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--teal);
}
blockquote {
  border-left: 3px solid var(--seafoam);
  margin: 24px 0;
  padding: 4px 0 4px 22px;
  color: var(--driftwood);
  font-style: italic;
}

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

.site-footer {
  background: var(--ink);
  color: var(--sand);
  padding: 44px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}
.site-footer h3 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.site-footer a { color: var(--seafoam-light); }
.site-footer a:hover { color: var(--white); }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--driftwood);
}
.opc-badge { display: flex; align-items: center; gap: 10px; }
.opc-badge img { width: 32px; height: auto; }
