/*
Theme Name: CFC Community Theme
Theme URI: https://example.com/cfc-community-theme
Author: OpenAI Codex
Description: Custom WordPress theme for Conservation For Community.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: cfc-community-theme
*/

:root {
  --bg: #f7f3ec;
  --surface: rgba(255, 252, 247, 0.9);
  --surface-strong: #fffdf9;
  --surface-soft: rgba(255, 252, 247, 0.72);
  --ink: #1f2a23;
  --muted: #667267;
  --line: rgba(31, 42, 35, 0.1);
  --forest: #244533;
  --forest-deep: #1a2f22;
  --gold: #aa7a33;
  --sage: #d9e1d2;
  --shadow: 0 20px 50px rgba(23, 36, 27, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, #faf7f1 0%, #f4efe8 100%);
  padding-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.hero,
.section,
.site-footer {
  padding-left: min(6vw, 4rem);
  padding-right: min(6vw, 4rem);
}

.page-hero {
  padding: 2rem min(6vw, 4rem) 3.5rem;
  background: linear-gradient(180deg, #faf7f1 0%, #f2ece4 100%);
  border-bottom: 1px solid var(--line);
}

.hero {
  min-height: 92vh;
  padding-top: 2rem;
  padding-bottom: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: clip;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(16, 28, 21, 0.7), rgba(16, 28, 21, 0.32)),
    linear-gradient(180deg, rgba(250, 247, 241, 0.08), rgba(250, 247, 241, 0.72));
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 2;
}

.page-nav {
  margin-bottom: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
}

.brand-dark .brand-mark {
  background: var(--forest);
  border: none;
}

.brand-dark .brand-text,
.page-nav-links a {
  color: var(--ink);
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #f7f4ed;
  letter-spacing: 0.08em;
}

.brand-text {
  max-width: 16rem;
  line-height: 1.1;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.96rem;
}

.menu-toggle {
  display: none;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(248, 242, 232, 0.28);
  border-radius: 999px;
  background: rgba(248, 242, 232, 0.1);
  color: #f8f2e8;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.5fr 0.95fr;
  gap: 2.5rem;
  align-items: end;
  margin-top: 6rem;
  position: relative;
  z-index: 1;
}

.page-hero-copy {
  max-width: 42rem;
}

.hero-copy {
  max-width: 44rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
}

.hero .brand-text,
.hero .nav-links a,
.hero .intro,
.hero h1,
.hero .hero-card .card-text,
.hero .hero-card .stat-label,
.hero .hero-card .card-label {
  color: #f8f2e8;
}

.hero .brand-mark {
  background: rgba(248, 242, 232, 0.16);
  border: 1px solid rgba(248, 242, 232, 0.35);
}

.hero .button-secondary {
  background: rgba(248, 242, 232, 0.08);
  border-color: rgba(248, 242, 232, 0.22);
  color: #f8f2e8;
}

.hero .hero-card {
  background: rgba(18, 33, 25, 0.34);
  border-color: rgba(248, 242, 232, 0.16);
}

.hero .stat-number {
  color: #fff8ef;
}

h1,
h2,
h3 {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Newsreader", serif;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(3.1rem, 6.6vw, 5.8rem);
  max-width: 12ch;
  margin-bottom: 1.1rem;
}

h2 {
  font-size: clamp(2.15rem, 4.2vw, 3.7rem);
  margin-bottom: 0;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.intro,
.panel p,
.feature-card p,
.team-card p,
.project-card p,
.card-text {
  line-height: 1.7;
  color: var(--muted);
}

.intro {
  font-size: 1.06rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.button {
  padding: 0.9rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 180ms ease, background-color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--forest);
  color: #fff;
}

.button-secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
}

.hero-card,
.panel,
.feature-card,
.team-card,
.project-card {
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: var(--surface);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 1.8rem;
}

.card-label,
.role {
  margin: 0 0 0.75rem;
  color: var(--forest);
  font-weight: 800;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1.8rem;
}

.stat-number {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--forest-deep);
}

.stat-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  position: relative;
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 2.4rem;
}

.section-heading::after {
  content: "";
  display: block;
  width: 4rem;
  height: 0.12rem;
  margin-top: 1.15rem;
  border-radius: 999px;
  background: rgba(170, 122, 51, 0.5);
}

.section-lead {
  margin: 1rem 0 0;
  max-width: 40rem;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1rem;
}

.section-lead-dark {
  color: rgba(248, 242, 232, 0.78);
}

.section-light {
  background: transparent;
}

.section-accent {
  background: rgba(217, 225, 210, 0.16);
}

.section-dark {
  background: linear-gradient(180deg, #1c3225, #16271d);
  color: #f8f2e8;
}

.section-dark .eyebrow,
.section-dark .project-card p {
  color: rgba(248, 242, 232, 0.72);
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.focus-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.feature-card,
.project-card {
  padding: 1.6rem;
}

.feature-image-card {
  padding: 0;
  overflow: hidden;
}

.feature-image-card img {
  width: 100%;
  height: 100%;
  min-height: 20rem;
  object-fit: cover;
}

.icon-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 1.4rem;
}

.gallery-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  overflow: hidden;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.gallery-card-wide {
  grid-row: span 2;
}

.gallery-image {
  width: 100%;
  height: 19rem;
  display: block;
  object-fit: cover;
  background: #d9ddd4;
  cursor: zoom-in;
  transition: none;
}

.gallery-card-wide .gallery-image {
  height: 100%;
  min-height: 39.5rem;
}

.rotate-180 {
  transform: rotate(180deg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.team-card {
  padding: 1.45rem;
}

.portrait-placeholder {
  min-height: 14rem;
  margin-bottom: 1rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(36, 69, 51, 0.9), rgba(170, 122, 51, 0.35)),
    #ddd;
  color: rgba(255, 248, 239, 0.88);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-card h3,
.panel h3,
.feature-card h3,
.project-card h3 {
  letter-spacing: -0.02em;
}

.project-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.project-card-light {
  background: var(--surface);
  border-color: var(--line);
}

.project-card-light p,
.project-card-light h3 {
  color: var(--ink);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.1fr;
  gap: 2rem;
  align-items: start;
  background: #efe8de;
}

.footer-copy {
  max-width: 34ch;
  line-height: 1.7;
  color: var(--muted);
}

.contact-list {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}

.contact-list a {
  font-weight: 700;
  color: var(--forest);
}

.contact-form {
  display: grid;
  gap: 1rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: rgba(255, 252, 247, 0.86);
  box-shadow: var(--shadow);
}

.page-section-tight {
  padding-top: 3.5rem;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.panel-link {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.panel-link-compact {
  padding: 1.35rem 1.4rem;
  min-height: 12rem;
  justify-content: space-between;
}

.panel-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(23, 36, 27, 0.08);
  border-color: rgba(36, 69, 51, 0.16);
}

.panel-link p {
  margin: 0;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  color: var(--forest);
  font-size: 0.92rem;
  font-weight: 700;
}

.link-arrow::after {
  content: "\2192";
  font-size: 1rem;
}

.gallery-grid-expanded {
  grid-template-columns: 1.15fr 1fr;
  align-items: start;
}

.gallery-card-tall .gallery-image {
  min-height: 30rem;
  height: 30rem;
}

.gallery-image-rotated {
  transform: rotate(90deg) scale(1.32);
}

.contact-form label {
  display: grid;
  gap: 0.45rem;
  color: var(--forest-deep);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(31, 45, 33, 0.16);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(35, 75, 53, 0.6);
  box-shadow: 0 0 0 4px rgba(35, 75, 53, 0.08);
}

.contact-form .button {
  justify-self: start;
  border: none;
  cursor: pointer;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--forest);
  line-height: 1.5;
}

.form-status.is-error {
  color: #9a3b2d;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: rgba(10, 18, 12, 0.88);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-image {
  max-width: min(92vw, 72rem);
  max-height: 78vh;
  border-radius: 1.2rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
  margin: 1rem 0 0;
  text-align: center;
  color: #f8f2e8;
  max-width: 50rem;
}

.lightbox-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 3rem;
  height: 3rem;
  border: none;
  border-radius: 999px;
  background: rgba(248, 242, 232, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 960px) {
  .hero-content,
  .two-column,
  .three-column,
  .focus-layout,
  .link-grid,
  .team-grid,
  .site-footer,
  .gallery-grid,
  .gallery-grid-expanded {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

  .hero {
    min-height: auto;
  }

  .site-nav {
    flex-direction: column;
    align-items: start;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-menu-toggle {
    color: var(--ink);
    border-color: rgba(31, 42, 35, 0.15);
    background: rgba(255, 255, 255, 0.68);
  }

  .nav-links {
    display: none;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(248, 242, 232, 0.18);
    border-radius: 1rem;
    background: rgba(11, 27, 19, 0.52);
    backdrop-filter: blur(10px);
  }

  .nav-links.nav-open {
    display: grid;
    gap: 0.85rem;
  }

  .page-nav-links {
    background: rgba(255, 252, 247, 0.95);
    border-color: rgba(31, 42, 35, 0.12);
  }

  .page-nav-links a {
    color: var(--ink);
  }

  .gallery-card-wide {
    grid-row: span 1;
  }

  .gallery-card-wide .gallery-image,
  .gallery-image,
  .gallery-card-tall .gallery-image {
    min-height: 18rem;
    height: 18rem;
  }
}

@media (max-width: 640px) {
  .hero,
  .section,
  .site-footer {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .hero {
    padding-top: 1rem;
  }

  .hero-content {
    margin-top: 3rem;
  }

  .hero-card,
  .panel,
  .feature-card,
  .team-card,
  .project-card,
  .contact-form {
    border-radius: 1.2rem;
  }
}
