/* ============================================================
   Soulsoil — Carbon Credit Platform
   Warm earth-tone design system, vanilla CSS
   ============================================================ */

:root {
  /* Palette — warm earth tones */
  --soil-deep: #2E2016;
  --soil: #3D2B1F;
  --brown: #7A5230;
  --brown-soft: #9A6D3F;
  --sage: #6F7F4C;
  --sage-deep: #55663A;
  --sage-soft: #8FA06A;
  --cream: #F7F1E6;
  --cream-2: #EFE6D4;
  --gold: #C9A24B;
  --gold-deep: #A9812F;
  --ink: #2A241F;
  --ink-soft: #5A4E42;
  --white: #FFFFFF;

  /* Typography */
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Radius & shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(46, 32, 22, 0.08);
  --shadow-md: 0 12px 30px rgba(46, 32, 22, 0.12);
  --shadow-lg: 0 26px 60px rgba(46, 32, 22, 0.18);

  --container: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 17px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.12;
  color: var(--soil);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1rem; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(64px, 9vw, 120px) 0;
}

.section--tint { background: var(--cream-2); }
.section--soil {
  background: linear-gradient(160deg, var(--soil) 0%, var(--soil-deep) 100%);
  color: var(--cream);
}
.section--soil h2, .section--soil h3 { color: var(--cream); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.section-head { max-width: 660px; margin-bottom: 52px; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }
.section--soil .section-head p { color: rgba(247, 241, 230, 0.82); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), color 0.25s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: var(--gold);
  color: var(--soil-deep);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--gold-deep); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--sage { background: var(--sage); color: var(--white); }
.btn--sage:hover { background: var(--sage-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--soil { background: var(--brown); color: var(--cream); }
.btn--soil:hover { background: var(--soil); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 241, 230, 0.5);
}
.btn--ghost:hover { border-color: var(--cream); background: rgba(247, 241, 230, 0.1); transform: translateY(-2px); }
.btn--outline {
  background: transparent;
  color: var(--soil);
  border-color: var(--brown-soft);
}
.btn--outline:hover { background: var(--soil); color: var(--cream); transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 16px 0;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.site-header.scrolled {
  background: rgba(247, 241, 230, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--cream);
  letter-spacing: -0.02em;
  transition: color 0.3s var(--ease);
}
.logo .logo-mark { width: 34px; height: 34px; flex: none; }
.scrolled .logo { color: var(--soil); }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.nav-links {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(247, 241, 230, 0.9);
  transition: color 0.2s var(--ease);
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.scrolled .nav-links a { color: var(--ink); }

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
}
.nav-toggle span {
  width: 26px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), background 0.3s var(--ease);
}
.scrolled .nav-toggle span { background: var(--soil); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 140px 0 80px;
}
.hero-bg {
  position: absolute;
  inset: -8% 0 0 0;
  height: 116%;
  z-index: 0;
  will-change: transform;
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(46, 32, 22, 0.86) 0%, rgba(61, 43, 31, 0.62) 45%, rgba(46, 32, 22, 0.28) 100%),
    linear-gradient(0deg, rgba(46, 32, 22, 0.7) 0%, rgba(46, 32, 22, 0) 45%);
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero .badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  background: rgba(201, 162, 75, 0.16);
  border: 1px solid rgba(201, 162, 75, 0.5);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.hero h1 {
  color: var(--cream);
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--gold); font-style: italic; }
.hero-sub {
  color: rgba(247, 241, 230, 0.92);
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  max-width: 560px;
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 52px;
  padding-top: 30px;
  border-top: 1px solid rgba(247, 241, 230, 0.22);
}
.hero-stats .stat .num {
  font-family: var(--font-head);
  font-size: 2rem;
  color: var(--gold);
  font-weight: 600;
  line-height: 1;
}
.hero-stats .stat .label {
  font-size: 0.85rem;
  color: rgba(247, 241, 230, 0.78);
  margin-top: 6px;
}

/* ============================================================
   How It Works
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
}
.step {
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--r-lg);
  padding: 38px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.step-icon {
  width: 66px; height: 66px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  background: linear-gradient(150deg, var(--cream-2), var(--cream));
  border: 1px solid rgba(122, 82, 48, 0.16);
}
.step-icon svg { width: 34px; height: 34px; }
.step .num-tag {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.step h3 { font-size: 1.35rem; margin-bottom: 10px; }
.step p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }

/* ============================================================
   Split feature (For Farmers / For Corporates)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split--reverse .split-media { order: 2; }
.split-copy h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.split-copy .lead { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 24px; }
.feature-list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 16px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .tick {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(111, 127, 76, 0.16);
  display: grid; place-items: center;
  margin-top: 2px;
}
.feature-list .tick svg { width: 15px; height: 15px; color: var(--sage-deep); }
.feature-list strong { display: block; color: var(--soil); font-size: 1.02rem; }
.feature-list span.desc { color: var(--ink-soft); font-size: 0.95rem; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  position: relative;
}
.gallery figure {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.gallery figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.gallery figure:hover img { transform: scale(1.06); }
.gallery .g-tall { grid-row: span 2; }
.gallery .g-badge {
  position: absolute;
  left: -18px; bottom: 24px;
  background: var(--white);
  border-radius: var(--r-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  display: flex; gap: 12px; align-items: center;
  max-width: 240px;
}
.gallery .g-badge svg { width: 30px; height: 30px; flex: none; color: var(--gold-deep); }
.gallery .g-badge .g-num { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--soil); line-height: 1.1; }
.gallery .g-badge .g-lbl { font-size: 0.8rem; color: var(--ink-soft); }

/* ============================================================
   Why Soulsoil
   ============================================================ */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  background: rgba(247, 241, 230, 0.06);
  border: 1px solid rgba(247, 241, 230, 0.14);
  border-radius: var(--r-lg);
  padding: 32px 26px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.why-card:hover { transform: translateY(-6px); background: rgba(247, 241, 230, 0.1); border-color: rgba(201, 162, 75, 0.5); }
.why-card .why-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(201, 162, 75, 0.16);
  margin-bottom: 20px;
}
.why-card .why-icon svg { width: 28px; height: 28px; color: var(--gold); }
.why-card h3 { font-size: 1.2rem; color: var(--cream); margin-bottom: 8px; }
.why-card p { color: rgba(247, 241, 230, 0.76); font-size: 0.94rem; margin: 0; }

/* ============================================================
   Testimonials
   ============================================================ */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.quote-card {
  background: var(--white);
  border: 1px solid var(--cream-2);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.quote-card .qmark {
  font-family: var(--font-head);
  font-size: 4rem;
  line-height: 0.6;
  color: var(--gold);
  opacity: 0.5;
  display: block;
  margin-bottom: 6px;
}
.quote-card blockquote {
  margin: 0 0 24px;
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--soil);
  line-height: 1.4;
}
.quote-author { display: flex; align-items: center; gap: 14px; }
.quote-author .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--sage);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  flex: none;
}
.quote-author.avatar--gold .avatar { background: var(--gold-deep); }
.quote-author .who strong { display: block; color: var(--soil); }
.quote-author .who span { color: var(--ink-soft); font-size: 0.9rem; }
.placeholder-note {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-top: 30px;
  font-style: italic;
}

/* ============================================================
   Final CTA
   ============================================================ */
.final-cta { text-align: center; }
.final-cta .cta-wrap {
  background: linear-gradient(155deg, var(--sage-deep) 0%, var(--sage) 55%, var(--gold-deep) 130%);
  border-radius: var(--r-lg);
  padding: clamp(48px, 7vw, 80px) 30px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.final-cta .cta-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(247, 241, 230, 0.15), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(46, 32, 22, 0.25), transparent 45%);
}
.final-cta h2 { color: var(--cream); font-size: clamp(2rem, 4.5vw, 3rem); position: relative; }
.final-cta p { color: rgba(247, 241, 230, 0.9); font-size: 1.15rem; max-width: 560px; margin: 0 auto 32px; position: relative; }
.final-cta .cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; position: relative; }
.final-cta .btn--primary { background: var(--cream); color: var(--soil); }
.final-cta .btn--primary:hover { background: var(--white); }
.final-cta .btn--outline { color: var(--cream); border-color: rgba(247, 241, 230, 0.7); }
.final-cta .btn--outline:hover { background: rgba(247, 241, 230, 0.14); color: var(--cream); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--soil-deep);
  color: rgba(247, 241, 230, 0.72);
  padding: 72px 0 30px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(247, 241, 230, 0.14);
}
.footer-brand .logo { color: var(--cream); margin-bottom: 16px; }
.footer-brand p { font-size: 0.94rem; max-width: 280px; }
.footer-col h4 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer-col a { font-size: 0.95rem; transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--gold); }
.newsletter p { font-size: 0.94rem; margin-bottom: 14px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(247, 241, 230, 0.24);
  background: rgba(247, 241, 230, 0.06);
  color: var(--cream);
  font-family: inherit;
  font-size: 0.95rem;
}
.newsletter-form input::placeholder { color: rgba(247, 241, 230, 0.5); }
.newsletter-form input:focus { outline: none; border-color: var(--gold); }
.newsletter-form button { padding: 12px 22px; flex: none; }
.form-msg { font-size: 0.85rem; margin-top: 10px; min-height: 18px; }
.form-msg.ok { color: var(--sage-soft); }
.form-msg.err { color: #E9A17C; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.86rem;
}
.footer-bottom .legal { display: flex; gap: 20px; flex-wrap: wrap; }

/* ============================================================
   Modal (registration)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 32, 22, 0.6);
  backdrop-filter: blur(4px);
}
.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--cream);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  animation: pop 0.32s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal-card h3 { font-size: 1.7rem; margin-bottom: 6px; }
.modal-card .modal-sub { color: var(--ink-soft); margin-bottom: 24px; }
.modal-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--cream-2);
  display: grid; place-items: center;
  transition: background 0.2s var(--ease);
}
.modal-close:hover { background: #E2D4BC; }
.modal-close svg { width: 18px; height: 18px; color: var(--soil); }

.role-toggle { display: flex; gap: 10px; margin-bottom: 22px; }
.role-toggle button {
  flex: 1;
  padding: 12px;
  border-radius: var(--r-md);
  border: 2px solid var(--cream-2);
  background: var(--white);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--ink-soft);
  transition: all 0.2s var(--ease);
}
.role-toggle button.active { border-color: var(--sage); background: rgba(111, 127, 76, 0.1); color: var(--sage-deep); }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--soil); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--cream-2);
  background: var(--white);
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sage); }
.field input.invalid, .field textarea.invalid { border-color: #C8663C; }
.field .err-text { color: #C8663C; font-size: 0.8rem; margin-top: 5px; min-height: 14px; display: block; }
.field textarea { resize: vertical; min-height: 90px; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split--reverse .split-media { order: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links, .nav .nav-cta { display: none; }
  .nav-toggle { display: flex; }

  .nav.open {
    position: fixed;
    inset: 0 0 auto 0;
    top: 62px;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    box-shadow: var(--shadow-md);
  }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 0; }
  .nav.open .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--cream-2); color: var(--ink); }
  .nav.open .nav-links a::after { display: none; }
  .nav.open .nav-cta { display: inline-flex; margin-top: 14px; }

  .hero { padding: 120px 0 70px; }
  .hero-stats { gap: 28px; }
  .why-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .gallery .g-badge { left: 0; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero-cta .btn, .final-cta .cta-buttons .btn { width: 100%; }
  .modal-card { padding: 32px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
