/* ============================
   NON-AI PROJECT — Stylesheet
   Inspired by nongmoproject.org
   ============================ */

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

:root {
  --orange:    #e57e3e;
  --orange-dk: #c96a2c;
  --dark:      #313131;
  --charcoal:  #32373c;
  --mid:       #5a5f66;
  --light:     #f5f4f0;
  --white:     #ffffff;
  --border:    #e4e1d8;
  --radius:    9999px;
  --shadow:    0 2px 16px rgba(0,0,0,.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
}

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--orange); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s, color .2s, transform .15s;
  border: 2px solid transparent;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--charcoal);
  color: var(--white);
}
.btn-primary:hover { background: var(--orange); color: var(--white); }

.btn-outline {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--charcoal);
}
.btn-outline:hover { background: var(--charcoal); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--orange);
  border-color: var(--white);
}
.btn-white:hover { background: var(--orange); color: var(--white); border-color: var(--orange); }

/* ========= HEADER / NAV ========= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-img {
  height: 52px;
  width: auto;
  border-radius: 6px;
}
.footer-logo-img {
  height: 48px;
  width: auto;
  border-radius: 6px;
}

/* Nav links */
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 28px; }
.main-nav a {
  font-weight: 500;
  font-size: .95rem;
  color: var(--dark);
  transition: color .15s;
}
.main-nav a:hover { color: var(--orange); }

.nav-cta {
  flex-shrink: 0;
  padding: 10px 22px;
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.nav-cta:hover { background: var(--orange-dk); }

.hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark);
  margin-left: auto;
}

/* ========= HERO ========= */
.hero {
  background: var(--light);
  padding: 80px 0 72px;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 14px;
}

.hero-text h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.25;
  color: var(--dark);
  margin-bottom: 20px;
  max-width: 580px;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--mid);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stamp {
  text-align: center;
  flex-shrink: 0;
}
.hero-stamp-svg {
  width: 240px;
  height: 240px;
  filter: drop-shadow(0 4px 24px rgba(229,126,62,.2));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.stamp-caption {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--mid);
  font-style: italic;
}

/* ========= STATS BANNER ========= */
.stats-banner {
  background: var(--orange);
  padding: 36px 0;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--white);
}
.stat-label {
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  text-transform: uppercase;
  letter-spacing: .08em;
}

/* ========= GENERIC SECTION ========= */
.section { padding: 88px 0; }
.section-alt { background: var(--light); }

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-header h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
  color: var(--dark);
}
.section-header p { color: var(--mid); font-size: 1.05rem; }

.section-cta { text-align: center; margin-top: 44px; }

/* ========= CARDS GRID ========= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 18px;
}
.card-icon svg { width: 100%; height: 100%; }

.card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark);
}
.card p { font-size: .95rem; color: var(--mid); }

/* ========= TWO COLUMN ========= */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--orange);
  margin-bottom: 12px;
}

.two-col-text h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.6rem, 2.5vw, 2rem);
  margin-bottom: 18px;
}
.two-col-text > p {
  color: var(--mid);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.feature-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.feature-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }

.quote-card {
  background: var(--light);
  border-left: 4px solid var(--orange);
  border-radius: 0 12px 12px 0;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.quote-card p {
  font-style: italic;
  color: var(--dark);
  margin-bottom: 8px;
  font-size: .97rem;
}
.quote-card cite { font-size: .85rem; color: var(--mid); font-style: normal; }

/* ========= STANDARDS GRID ========= */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.standard-item {
  border-top: 3px solid var(--orange);
  padding-top: 20px;
}
.standard-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange);
  opacity: .35;
  margin-bottom: 8px;
  line-height: 1;
}
.standard-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.standard-item p { font-size: .93rem; color: var(--mid); }

/* ========= PROJECTS GRID ========= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  transition: box-shadow .2s, transform .2s;
}
.project-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}
.project-badge {
  display: inline-block;
  background: #edf7ed;
  color: #2d7a2d;
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  letter-spacing: .04em;
}
.project-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.project-category {
  font-size: .8rem;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .08em;
  display: block;
  margin-bottom: 10px;
}
.project-card p { font-size: .92rem; color: var(--mid); margin-bottom: 16px; }
.project-link {
  font-size: .88rem;
  font-weight: 700;
  color: var(--charcoal);
  transition: color .15s;
}
.project-link:hover { color: var(--orange); }

/* ========= CTA BLOCK ========= */
.section-cta-block {
  background: var(--charcoal);
  padding: 80px 0;
}

.cta-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 60px;
  align-items: center;
}

.cta-stamp-img { width: 160px; height: 160px; object-fit: contain; }

.cta-text h2 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--white);
  margin-bottom: 16px;
}
.cta-text > p { color: rgba(255,255,255,.75); font-size: 1.05rem; margin-bottom: 28px; }

.cta-steps {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cta-step {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,.85);
  font-size: .92rem;
  font-weight: 500;
}
.cta-step span {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--orange);
  color: white;
  font-weight: 800;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========= FOOTER ========= */
.site-footer {
  background: #1e2124;
  color: rgba(255,255,255,.7);
  padding-top: 64px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo { margin-bottom: 14px; }
.footer-tagline {
  font-weight: 600;
  font-size: .95rem;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
  margin-bottom: 12px;
}
.footer-legal { font-size: .8rem; color: rgba(255,255,255,.45); }

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.footer-col h5 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.5);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: .9rem;
  color: rgba(255,255,255,.7);
  transition: color .15s;
}
.footer-col a:hover { color: var(--orange); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ========= APPLICATION FORM ========= */
.apply-form {
  max-width: 780px;
  margin: 0 auto;
}

.form-fieldset {
  border: none;
  padding: 0;
  margin-bottom: 40px;
}

.form-fieldset legend {
  font-family: 'Merriweather', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.form-row .form-group {
  margin-bottom: 0;
}

.form-group label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--dark);
}

.required { color: var(--orange); }

.form-hint {
  font-weight: 400;
  color: var(--mid);
  font-size: .85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: var(--dark);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0aaa0; }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(229,126,62,.12);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192,57,43,.1);
}

.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 100px; }

.declaration-error-anchor + .field-error {
  padding-left: 36px;
}

.field-error {
  display: block;
  font-size: .8rem;
  color: #c0392b;
  margin-top: 4px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.form-note {
  font-size: .82rem;
  color: var(--mid);
  margin-top: 6px;
}

.form-note-center { text-align: center; margin-top: 12px; }

/* Declaration checkbox */
.form-declaration {
  margin-bottom: 32px;
  padding: 20px 24px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
}

.checkbox-label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
  font-size: .93rem;
  color: var(--dark);
  line-height: 1.55;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: border-color .15s, background .15s;
}

.checkbox-label input:checked ~ .checkbox-custom {
  background: var(--orange);
  border-color: var(--orange);
}

.checkbox-label input:checked ~ .checkbox-custom::after {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  border: 2px solid white;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.checkbox-label.error .checkbox-custom {
  border-color: #c0392b;
}

/* Form actions */
.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

/* Success state */
.form-success {
  text-align: center;
  padding: 48px 32px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
}

.success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #edf7ed;
  color: #2d7a2d;
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success h3 {
  font-family: 'Merriweather', serif;
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--dark);
}

.form-success p { color: var(--mid); font-size: 1rem; }

/* ========= SHARE STORY FORM ========= */
.share-story-toggle { margin-top: 8px; }

.btn-sm {
  padding: 9px 18px;
  font-size: .88rem;
}

.share-form {
  margin-top: 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.share-form h4 {
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--dark);
}

.share-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.share-form-success {
  margin-top: 14px;
  font-size: .9rem;
  font-weight: 600;
  color: #2d7a2d;
}

.projects-loading {
  color: var(--mid);
  font-size: .95rem;
  padding: 20px 0;
}

/* ========= POLICY PAGES ========= */
.policy-hero {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 52px;
}

.policy-hero .eyebrow { margin-bottom: 14px; }

.policy-hero h1 {
  font-family: 'Merriweather', serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--dark);
  margin-bottom: 12px;
}

.policy-hero p {
  font-size: .95rem;
  color: var(--mid);
}

/* .policy-prose {
  max-width: 740px;
  margin: 0 auto;
} */

.policy-lead {
  font-size: 1.08rem;
  color: var(--mid);
  border-left: 4px solid var(--orange);
  padding-left: 20px;
  margin-bottom: 48px;
  line-height: 1.75;
}

.policy-prose h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.3rem;
  color: var(--dark);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.policy-prose h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  margin-top: 28px;
  margin-bottom: 10px;
}

.policy-prose p {
  color: var(--mid);
  margin-bottom: 16px;
  line-height: 1.75;
}

.policy-prose ul {
  list-style: none;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.policy-prose ul li {
  color: var(--mid);
  padding-left: 20px;
  position: relative;
  line-height: 1.65;
}

.policy-prose ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}

.policy-prose a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.policy-prose a:hover { color: var(--orange-dk); }

.policy-prose strong { color: var(--dark); }

.policy-table-wrap {
  margin: 16px 0 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

/* Mobile-first: stack cells as labeled blocks */
.policy-table thead { display: none; }

.policy-table tr {
  display: block;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.policy-table tr:last-child { border-bottom: none; }

.policy-table tr:nth-child(even) { background: #faf9f7; }

.policy-table td {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  color: var(--mid);
  line-height: 1.6;
  border: none;
}

.policy-table td::before {
  content: attr(data-label);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--orange);
}

/* Desktop: restore standard table layout */
@media (min-width: 640px) {
  .policy-table thead { display: table-header-group; }

  .policy-table tr {
    display: table-row;
    padding: 0;
    border-bottom: none;
  }

  .policy-table tr:nth-child(even) { background: none; }
  .policy-table tr:nth-child(even) td { background: #faf9f7; }

  .policy-table th {
    background: var(--light);
    color: var(--dark);
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }

  .policy-table td {
    display: table-cell;
    flex-direction: unset;
    gap: unset;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
  }

  .policy-table td::before { display: none; }

  .policy-table tr:last-child td { border-bottom: none; }
}

/* ========= RESPONSIVE ========= */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-stamp { display: flex; flex-direction: column; align-items: center; }
  .hero-stamp-svg { width: 180px; height: 180px; }

  .two-col { grid-template-columns: 1fr; gap: 40px; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); }

  .cta-inner { grid-template-columns: 1fr; text-align: center; }
  .cta-stamp { display: flex; justify-content: center; }
  .cta-steps { justify-content: center; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .main-nav, .nav-cta { display: none; }
  .hamburger { display: block; }

  .hero { padding: 48px 0; }
  .section { padding: 60px 0; }

  .stats-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }

  .form-row { grid-template-columns: 1fr; }
}
