/* TheTreeMovement — minimal green, high trust */
:root {
  --forest: #1b4332;
  --leaf: #2d6a4f;
  --mint: #40916c;
  --light: #d8f3dc;
  --cream: #f8f9f3;
  --text: #1a2e1f;
  --muted: #5c6b5f;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(27, 67, 50, 0.12);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
}

a {
  color: var(--leaf);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.wrap {
  width: min(1120px, 92vw);
  margin-inline: auto;
}

.wrap-wide {
  width: min(1600px, 98vw);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 249, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--forest);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(45, 106, 79, 0.3);
  background: #fff;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--forest);
  display: block;
}

.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--leaf);
}

.site-header .nav .btn-primary {
  background: linear-gradient(135deg, var(--leaf), var(--forest));
  color: #fff;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  display: inline-flex;
}

.site-header .nav .btn-primary:hover {
  color: #fff;
  border-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--leaf), var(--forest));
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  text-decoration: none;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border: 2px solid rgba(45, 106, 79, 0.35);
}

.btn-ghost:hover {
  border-color: var(--leaf);
  text-decoration: none;
}

.hero {
  padding: 0.7rem 0 0.35rem;
  background: radial-gradient(ellipse 120% 80% at 50% -20%, var(--light), transparent 55%),
    var(--cream);
}

.hero .wrap {
  text-align: center;
}

.hero-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.hero-bar__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.32rem 0.5rem;
  width: 100%;
}

.hero-bar__title {
  margin: 0;
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--forest);
  line-height: 1.2;
  white-space: nowrap;
}

.hero-bar__lead {
  margin: 0;
  max-width: none;
  font-size: clamp(0.72rem, 1.05vw, 0.82rem);
  color: var(--muted);
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.hero-sponsor-btn {
  padding: 0.42rem 0.78rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

@media (min-width: 769px) {
  .hero-sponsor-btn {
    display: none;
  }
}

.hero-bar__cta {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.35rem;
  align-items: center;
}

.hero-bar__cta .btn {
  padding: 0.42rem 0.78rem;
  font-size: 0.78rem;
  white-space: nowrap;
}

.hero-bar__search {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  width: auto;
  max-width: none;
}

.hero-bar__search input {
  flex: 0 0 170px;
  min-width: 170px;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(45, 106, 79, 0.35);
  border-radius: 999px;
  font-size: 0.8rem;
}

.hero-bar__search .btn {
  padding: 0.4rem 0.7rem;
  font-size: 0.78rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 960px) {
  .hero-bar__row {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.45rem 0.8rem;
  }

  .hero-bar__title,
  .hero-bar__lead,
  .hero-bar__cta,
  .hero-bar__search {
    flex: 0 0 auto;
  }
}

#wall.section {
  padding-top: 0.35rem;
  padding-bottom: 1.1rem;
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--white);
  border-block: 1px solid rgba(45, 106, 79, 0.08);
}

.section h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--forest);
}

.section .sub {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 42rem;
}

.tree-wall-intro {
  margin-bottom: 0.45rem;
}

.tree-wall-stage {
  width: 100%;
  max-width: 100%;
  height: min(62vh, 560px);
  margin-inline: auto;
  overflow: auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  border-radius: var(--radius);
  border: 1px solid rgba(45, 106, 79, 0.2);
  background: var(--white);
  box-shadow: var(--shadow);
}

.tree-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  grid-auto-rows: 44px;
  gap: 2px;
  padding: 2px;
  width: 100%;
  min-height: 100%;
  align-content: start;
}

.tree-cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  background: #eef5f0;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  font-size: 0.48rem;
  text-align: center;
  color: var(--muted);
  overflow: hidden;
  cursor: default;
  border: 1px solid transparent;
}

.tree-cell.filled {
  cursor: pointer;
  background: var(--light);
  border-color: rgba(45, 106, 79, 0.25);
}

.tree-cell.filled:hover {
  border-color: var(--mint);
  z-index: 1;
}

.tree-cell .avatar {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  margin-bottom: 0;
  background: var(--white);
}

.tree-cell .avatar-default,
.tree-cell .avatar-empty {
  object-fit: contain;
  padding: 1px;
  background: #fff;
}

.tree-cell .avatar-empty {
  opacity: 0.42;
}

.tree-cell .tid {
  display: none;
}

.tree-cell .tname {
  display: none;
}

.planted-wall-stage {
  height: auto;
  min-height: 220px;
  max-height: none;
  padding: 0.6rem;
}

.planted-wall-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.45rem;
}

.planted-wall-card {
  background: #f6fbf7;
  border: 1px solid rgba(45, 106, 79, 0.2);
  border-radius: 8px;
  padding: 0.45rem;
  min-height: 190px;
  overflow: hidden;
}

.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  padding: 1.25rem;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid rgba(45, 106, 79, 0.12);
}

.step strong {
  display: block;
  color: var(--mint);
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.id-card-preview {
  max-width: 360px;
  margin: 1.5rem auto 0;
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--forest), #234d3a);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.id-card-preview .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.testimonials {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.t-card {
  padding: 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(45, 106, 79, 0.1);
  box-shadow: 0 4px 20px rgba(27, 67, 50, 0.06);
}

.t-card .photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--light);
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.t-card blockquote {
  margin: 0 0 1rem;
  font-style: italic;
  color: var(--text);
}

.t-card cite {
  font-style: normal;
  font-weight: 600;
  color: var(--forest);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  text-align: center;
}

.stat {
  padding: 1.25rem;
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid rgba(45, 106, 79, 0.1);
}

.stat .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--forest);
}

.stat .lbl {
  font-size: 0.85rem;
  color: var(--muted);
}

.faq details {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(45, 106, 79, 0.12);
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--forest);
}

.faq details p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

.site-footer {
  padding: 3rem 0 2rem;
  background: var(--forest);
  color: rgba(255, 255, 255, 0.88);
  margin-top: 2rem;
}

.site-footer a {
  color: var(--light);
}

.site-footer .foot-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.site-footer .tagline {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social a:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(27, 67, 50, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  position: relative;
}

.modal .close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: none;
  background: var(--cream);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--forest);
}

.modal h3 {
  margin: 0 0 0.5rem;
  color: var(--forest);
}

.modal .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0.35rem 0;
}

.modal .turn {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--light);
  border-radius: 8px;
  font-weight: 600;
  color: var(--forest);
  text-align: center;
}

.db-error {
  background: #fff3cd;
  border: 1px solid #ffc107;
  color: #664d03;
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.sponsor-section {
  background: radial-gradient(90% 120% at 50% -25%, rgba(216, 243, 220, 0.9), transparent 55%), var(--cream);
}

.sponsor-wrap {
  width: min(900px, 94vw);
}

.sponsor-hero {
  text-align: center;
  margin-bottom: 1.1rem;
}

.sponsor-kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint);
  font-weight: 700;
}

.sponsor-title {
  margin: 0.25rem 0 0;
  font-size: clamp(1.5rem, 3.3vw, 2.15rem);
  line-height: 1.2;
  color: var(--forest);
}

.sponsor-sub {
  margin: 0.45rem auto 0;
  max-width: 620px;
  color: var(--muted);
}

.sponsor-form {
  background: #fff;
  border: 1px solid rgba(45, 106, 79, 0.2);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(27, 67, 50, 0.08);
  padding: 1.1rem;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.sponsor-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sponsor-field--full {
  grid-column: 1 / -1;
}

.sponsor-field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--forest);
}

.sponsor-field input[type="text"],
.sponsor-field input[type="email"],
.sponsor-field input[type="tel"],
.sponsor-field input[type="file"] {
  width: 100%;
  border: 1px solid rgba(45, 106, 79, 0.32);
  border-radius: 10px;
  padding: 0.62rem 0.72rem;
  font: inherit;
  background: #fff;
  color: var(--text);
}

.sponsor-field input[type="file"] {
  padding: 0.48rem 0.62rem;
}

.sponsor-field input:focus-visible {
  outline: 2px solid rgba(64, 145, 108, 0.32);
  border-color: var(--mint);
}

.sponsor-upload {
  margin-top: 0.9rem;
}

.sponsor-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.sponsor-submit {
  margin-top: 1.1rem;
}

.sponsor-message {
  margin: 0.85rem 0 0;
  color: var(--muted);
  min-height: 1.1rem;
}

@media (max-width: 1024px) {
  .hero-bar__row {
    flex-wrap: wrap;
  }

  .hero-bar__lead {
    text-align: center;
    max-width: 100%;
    white-space: normal;
  }

  .hero-sponsor-btn {
    order: 3;
  }

  .sponsor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-header .inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #fff;
    border: 1px solid rgba(45, 106, 79, 0.15);
    border-radius: 10px;
    padding: 0.75rem;
    box-shadow: 0 10px 30px rgba(27, 67, 50, 0.12);
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.45rem 0.35rem;
    border-radius: 8px;
  }

  .nav .btn {
    width: 100%;
    justify-content: center;
  }

  .site-header .nav .btn-primary {
    display: inline-flex;
  }

  .hero {
    padding: 0.8rem 0 0.65rem;
  }

  .hero-bar__title {
    white-space: normal;
    text-align: center;
  }

  .hero-bar__search {
    width: 100%;
    justify-content: center;
  }

  .hero-bar__search input {
    flex: 1;
    min-width: 150px;
  }

  .tree-wall-stage {
    height: min(50vh, 360px);
    max-width: 100%;
  }
}

@media print {
  .site-header,
  .site-footer,
  .hero-bar__cta,
  .hero-bar__search,
  .modal-overlay {
    display: none !important;
  }
}
