/* ================================================================
   EARTHKIND COLLECTIVE — style.css
   Sections: Reset → Tokens → Base → Layout → Header → Hero →
             Challenge → Vision → Intersections → Offering →
             Contact → Footer → Animations → Responsive
   ================================================================ */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

/* ── Tokens ──────────────────────────────────────────────────── */
:root {
  /* Palette */
  --dark:        #13130D;
  --dark-2:      #1C1C13;
  --dark-3:      #25251A;
  --gold:        #C9A84C;
  --gold-hover:  #B89338;
  --gold-glow:   rgba(201,168,76,0.22);
  --cream:       #F5F0E4;
  --cream-2:     #EDE8DC;
  --cream-3:     #E0D9CC;
  --text:        #E8E3D5;
  --text-muted:  rgba(232,227,213,0.58);
  --text-dark:   #1C1C13;

  /* Typography */
  --serif:   'Fraunces', Georgia, serif;
  --sans:    'DM Sans', system-ui, sans-serif;
  --script:  'Pinyon Script', cursive;

  /* Fluid type scale — reduced 30% from original */
  --t-xs:  clamp(0.58rem,  0.56rem + 0.11vw, 0.65rem);
  --t-sm:  clamp(0.68rem,  0.65rem + 0.13vw, 0.76rem);
  --t-md:  clamp(0.78rem,  0.75rem + 0.14vw, 0.87rem);
  --t-lg:  clamp(0.9rem,   0.84rem + 0.24vw, 1.06rem);
  --t-xl:  clamp(1.08rem,  0.96rem + 0.56vw, 1.44rem);
  --t-2xl: clamp(1.32rem,  1.12rem + 0.88vw, 1.94rem);
  --t-3xl: clamp(1.58rem,  1.28rem + 1.33vw, 2.44rem);
  --t-4xl: clamp(1.96rem,  1.52rem + 2.1vw,  3.56rem);
  --t-5xl: clamp(2.24rem,  1.72rem + 2.45vw, 4.16rem);

  /* Spacing */
  --s-xs:  0.5rem;
  --s-sm:  1rem;
  --s-md:  2rem;
  --s-lg:  4rem;
  --s-xl:  6.5rem;
  --s-2xl: 10rem;

  /* Layout */
  --max-w:   1200px;
  --gutter:  clamp(1.25rem, 5vw, 3rem);

  /* Motion */
  --ease:  cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:   0.65s;

  /* Header */
  --hdr-h: 72px;
}

/* ── Base ────────────────────────────────────────────────────── */
body {
  font-family: var(--sans);
  font-size: var(--t-md);
  line-height: 1.7;
  color: var(--text);
  background: var(--dark);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 150;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

p { max-width: 60ch; }
strong { font-weight: 500; }

.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--gold); color: var(--dark);
  padding: 0.5rem 1rem; border-radius: 0 0 4px 4px;
  font-weight: 500; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ── Wrap ────────────────────────────────────────────────────── */
.wrap {
  width: min(var(--max-w), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section { position: relative; overflow: hidden; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 2px;
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: background 0.25s ease, color 0.25s ease,
              transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover {
  background: var(--gold-hover);
  box-shadow: 0 8px 28px var(--gold-glow);
}
.btn-full { width: 100%; justify-content: center; }

/* Spinner */
.btn-spinner {
  display: none;
  width: 15px; height: 15px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: var(--dark);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-label  { opacity: 0.4; }
.btn.loading .btn-spinner { display: inline-block; }

/* ── Shared text styles ──────────────────────────────────────── */
.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: var(--t-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s-sm);
}

.section-title        { font-size: var(--t-3xl); color: var(--text); margin-bottom: var(--s-md); }
.section-title.dark   { color: var(--text-dark); }
.section-sub          { font-size: var(--t-lg); color: var(--text-muted); font-weight: 300; margin-bottom: var(--s-lg); }
.section-sub.dark     { color: rgba(28,28,19,0.52); }
.body-copy            { font-size: var(--t-lg); color: var(--text-muted); font-weight: 300; line-height: 1.8; }

/* ═══════════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hdr-h);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}
.site-header.scrolled {
  background: rgba(19,19,13,0.93);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255,255,255,0.06);
}

.hdr-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  font-family: var(--sans);
  font-size: var(--t-md);
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--cream);
  transition: color 0.2s;
}
.site-logo:hover { color: var(--gold); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--s-md);
}
.site-nav a {
  font-size: var(--t-sm);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--cream); }

.nav-cta {
  padding: 0.45rem 1.2rem;
  border: 1px solid rgba(201,168,76,0.45);
  color: var(--gold) !important;
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s !important;
}
.nav-cta:hover {
  background: rgba(201,168,76,0.1);
  border-color: var(--gold) !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 110;
}
.nav-toggle .bar {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--cream);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ═══════════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-block: var(--hdr-h) var(--s-xl);
  overflow: hidden; /* clip parallax image edges */
}

.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-img   { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    /* Bottom fade → blends into challenge dark-2 */
    linear-gradient(to bottom,
      transparent 55%,
      rgba(19,19,13,0.70) 80%,
      var(--dark-2) 100%
    ),
    /* General scene darkening */
    linear-gradient(
      150deg,
      rgba(13,13,8,0.82) 0%,
      rgba(13,13,8,0.38) 55%,
      rgba(13,13,8,0.62) 100%
    );
}

.hero-body { position: relative; z-index: 1; max-width: 780px; }

.hero-title {
  font-size: var(--t-5xl);
  color: var(--cream);
  font-weight: 300;
  margin-bottom: var(--s-md);
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: var(--t-lg);
  color: var(--text-muted);
  font-weight: 300;
  max-width: 50ch;
  margin-bottom: var(--s-lg);
}

/* ═══════════════════════════════════════════════════════════════
   CHALLENGE
═══════════════════════════════════════════════════════════════ */
.challenge {
  background: var(--dark-2);
  padding-block: var(--s-xl);
}

/* Fade challenge bottom into cream (Intersections bg) */
.challenge::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--cream));
  pointer-events: none;
  z-index: 2;
}

.challenge-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.challenge-img-wrap {
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 2px;
}
.challenge-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 7s ease;
}
.challenge-img-wrap:hover img { transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════════════
   VISION
═══════════════════════════════════════════════════════════════ */
.vision {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.vision-media { position: absolute; inset: 0; }
.vision-img   { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.vision-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(13,13,8,0.75) 0%,
    rgba(13,13,8,0.3) 65%,
    rgba(13,13,8,0.15) 100%
  );
}

.vision-body { position: relative; z-index: 1; }

.vision-label {
  display: block;
  font-family: var(--script);
  font-size: clamp(1.55rem, 3.5vw, 2.66rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.1em;
}

.vision-title {
  font-size: var(--t-5xl);
  color: var(--cream);
  font-weight: 300;
  max-width: 14ch;
}

/* ═══════════════════════════════════════════════════════════════
   INTERSECTIONS
═══════════════════════════════════════════════════════════════ */
.intersections {
  background: var(--cream);
  padding-block: var(--s-xl);
  text-align: center;
  /* Top & bottom gradient blends via pseudo-elements */
}

/* Top of intersections fades in from challenge dark-2 */
.intersections::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, var(--dark-2), transparent);
  pointer-events: none;
  z-index: 2;
}

/* Bottom of intersections fades out to offering dark */
.intersections::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--dark));
  pointer-events: none;
  z-index: 2;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: var(--s-lg);
}

.icon-card {
  background: var(--cream-2);
  border: 1px solid var(--cream-3);
  border-radius: 4px;
  padding: clamp(1.5rem, 3vw, 2.75rem) 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.icon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(28,28,19,0.1);
}

.icon-wrap { width: 52px; height: 52px; color: #3E5E43; }
.icon-wrap svg { width: 100%; height: 100%; }

.icon-label {
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dark);
  line-height: 1.45;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   OFFERING
═══════════════════════════════════════════════════════════════ */
.offering {
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding-block: var(--s-xl);
}

.offering-media { position: absolute; inset: 0; overflow: hidden; }
.offering-img   { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.offering-overlay {
  position: absolute; inset: 0;
  background:
    /* Top fade in from intersections dark */
    linear-gradient(to bottom,
      var(--dark) 0%,
      rgba(13,13,8,0.55) 18%,
      transparent 38%
    ),
    /* Bottom fade out to contact dark */
    linear-gradient(to top,
      var(--dark) 0%,
      rgba(13,13,8,0.55) 15%,
      transparent 35%
    ),
    /* Left-heavy scene darkening */
    linear-gradient(110deg,
      rgba(13,13,8,0.88) 0%,
      rgba(13,13,8,0.62) 45%,
      rgba(13,13,8,0.28) 100%
    );
}

.offering-body { position: relative; z-index: 1; max-width: 620px; }

.offering-title {
  font-size: var(--t-3xl);
  color: var(--cream);
  font-weight: 300;
  margin-bottom: var(--s-md);
  line-height: 1.2;
}
.offering-title em { font-style: italic; color: var(--gold); }

.offering-copy {
  font-size: var(--t-lg);
  color: var(--text-muted);
  font-weight: 300;
  margin-bottom: var(--s-lg);
}

/* ═══════════════════════════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════════════════════════ */
.contact {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-block: var(--s-xl);
}

.contact-media { position: absolute; inset: 0; overflow: hidden; }
.contact-img   { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.contact-overlay {
  position: absolute; inset: 0;
  background:
    /* Top fade in from offering dark */
    linear-gradient(to bottom,
      var(--dark) 0%,
      rgba(13,13,8,0.70) 12%,
      rgba(13,13,8,0.80) 100%
    ),
    /* Bottom fade to footer dark */
    linear-gradient(to top,
      var(--dark) 0%,
      transparent 20%
    );
}

.contact-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.contact-headline {
  font-size: var(--t-3xl);
  color: var(--cream);
  font-weight: 300;
  position: sticky;
  top: calc(var(--hdr-h) + 2rem);
}

/* ── Form ─────────────────────────────────────────────────── */
.contact-form { display: flex; flex-direction: column; gap: 1.2rem; }

/* Honeypot: invisible, traps bots */
.hp-trap {
  position: absolute;
  width: 0; height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

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

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

.field label {
  font-size: var(--t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

.req { color: var(--gold); }

.field input,
.field textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 2px;
  padding: 0.8rem 1rem;
  color: var(--cream);
  font-size: var(--t-md);
  font-weight: 300;
  transition: border-color 0.25s ease, background 0.25s ease;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(232,227,213,0.25); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(201,168,76,0.55);
  background: rgba(255,255,255,0.09);
}
.field input.error,
.field textarea.error { border-color: rgba(220,80,80,0.55); }

/* Checkbox */
.field-check .check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
}

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

.checkmark {
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px; height: 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 2px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.check-label input:checked ~ .checkmark {
  background: var(--gold);
  border-color: var(--gold);
}
.check-label input:checked ~ .checkmark::after {
  content: '';
  display: block;
  width: 10px; height: 6px;
  border-left: 2px solid var(--dark);
  border-bottom: 2px solid var(--dark);
  transform: rotate(-45deg) translateY(-1px);
}
.check-label input:focus-visible ~ .checkmark {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.check-copy { display: flex; flex-direction: column; gap: 0.3rem; }
.check-copy strong { font-size: var(--t-md); color: var(--cream); font-weight: 500; }
.check-copy small  { font-size: var(--t-sm); color: var(--text-muted); line-height: 1.55; }
.check-copy em     { font-style: italic; color: var(--gold); }

/* Status */
.form-status {
  font-size: var(--t-sm);
  text-align: center;
  min-height: 1.5em;
}
.form-status.success { color: #7BC67A; }
.form-status.error   { color: #E07070; }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-block: var(--s-lg);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  flex-wrap: wrap;
}

.footer-brand {
  font-family: var(--sans);
  font-size: var(--t-md);
  color: var(--cream);
  letter-spacing: 0.04em;
}

.footer-right { text-align: right; display: flex; flex-direction: column; gap: 0.2rem; }
.footer-right p { font-size: var(--t-sm); color: var(--text-muted); max-width: unset; }
.photo-credit { font-size: 0.71rem !important; margin-top: 0.2rem; }
.photo-credit a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.photo-credit a:hover { color: var(--gold); }

/* ═══════════════════════════════════════════════════════════════
   SCROLL PROGRESS BAR
═══════════════════════════════════════════════════════════════ */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px var(--gold-glow);
}

/* ═══════════════════════════════════════════════════════════════
   PARALLAX IMAGES
═══════════════════════════════════════════════════════════════ */
.hero-img,
.offering-img,
.contact-img {
  will-change: transform;
  /* Oversized so parallax movement never exposes section edges */
  height: 140%;
  top: -20%;
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════
   REVEAL ANIMATIONS — directional variants
═══════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.reveal[data-dir="left"]  { transform: translateX(-48px); }
.reveal[data-dir="right"] { transform: translateX(48px); }
.reveal[data-dir="scale"] { transform: scale(0.92) translateY(16px); }

.reveal.visible               { opacity: 1; transform: none; }

.reveal[data-delay="80"]  { transition-delay: 80ms;  }
.reveal[data-delay="100"] { transition-delay: 100ms; }
.reveal[data-delay="160"] { transition-delay: 160ms; }
.reveal[data-delay="200"] { transition-delay: 200ms; }
.reveal[data-delay="240"] { transition-delay: 240ms; }
.reveal[data-delay="300"] { transition-delay: 300ms; }
.reveal[data-delay="400"] { transition-delay: 400ms; }

/* Icon card bounce entrance */
.icon-card {
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease),
              opacity var(--dur) var(--ease);
}
.icon-card.reveal         { transform: scale(0.88) translateY(20px); }
.icon-card.reveal.visible { transform: none; opacity: 1; }

/* Offering title line-by-line */
.offering-title .line {
  display: block;
  overflow: hidden;
}
.offering-title .line span {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.offering-title.visible .line:nth-child(1) span { opacity: 1; transform: none; transition-delay: 0ms; }
.offering-title.visible .line:nth-child(2) span { opacity: 1; transform: none; transition-delay: 120ms; }
.offering-title.visible .line:nth-child(3) span { opacity: 1; transform: none; transition-delay: 240ms; }

/* Kinetic challenge image — slow zoom on entry */
.challenge-img-wrap img {
  transition: transform 8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1.06);
}
.challenge-img-wrap.visible img { transform: scale(1.0); }

@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .challenge-grid { grid-template-columns: 1fr; gap: var(--s-lg); }
  .challenge-img-wrap { aspect-ratio: 16/9; max-height: 380px; }

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

  .contact-inner { grid-template-columns: 1fr; }
  .contact-headline { position: static; font-size: var(--t-2xl); margin-bottom: var(--s-md); }
}

@media (max-width: 640px) {
  :root { --hdr-h: 60px; }

  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    inset: var(--hdr-h) 0 0;
    background: rgba(19,19,13,0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    z-index: 99;
  }
  .site-nav.open { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: 2rem; text-align: center; }
  .site-nav a  { font-size: var(--t-2xl); letter-spacing: 0.04em; }
  .nav-cta     { padding: 0.6rem 1.6rem; }

  .hero-title   { font-size: var(--t-3xl); }
  .vision-title { font-size: var(--t-3xl); }
  .hero { align-items: center; padding-bottom: var(--s-lg); }

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

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}
