/* ═══════════════════════════════════════════════
   Encofarms Foundation — Stylesheet

   Fonts: Black Han Sans (display), Instrument Sans (body)
   Colors: --primary #00B4CC, --secondary #09090B, --bg #F7FAFB
   ═══════════════════════════════════════════════ */

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

:root {
  --primary: #00B4CC;
  --secondary: #09090B;
  --bg: #F7FAFB;
  --white: #ffffff;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Instrument Sans', sans-serif;
  background: var(--bg);
  color: var(--secondary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}


/* ────────────────────────────────────────────
   NAVIGATION
   ──────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo .logo-dot {
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 28px;
  border-radius: 6px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.nav-cta:hover {
  background: #009bb1;
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 999;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  display: flex;
  opacity: 1;
}

.mobile-menu a {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--primary);
}

.mobile-menu .nav-cta {
  font-size: 1.1rem;
  padding: 14px 40px;
}


/* ────────────────────────────────────────────
   HERO SECTION
   ──────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 72px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  width: 100%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-text {
  width: 100%;
  text-align: left;
  line-height: 0.92;
  margin-bottom: 48px;
  overflow: hidden;
}

.hero-line {
  font-family: 'Black Han Sans', sans-serif;
  font-weight: 400;
  font-size: 26vw;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: block;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  position: relative;
  white-space: nowrap;
  display: inline-block;
  transform-origin: left center;
}

/*
   Hero background images are set via inline style in section-hero.php
   using wp_get_attachment_image_url() from the WordPress Customizer.
   The .hero-line-enco / .hero-line-farms classes only carry clip properties.
*/
.hero-line-enco,
.hero-line-farms {
  background-size: cover;
  background-position: center;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  padding: 14px 40px;
  border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #009bb1;
  border-color: #009bb1;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 180, 204, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--secondary);
  border: 2px solid var(--secondary);
  padding: 14px 40px;
  border-radius: 8px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, transform 0.15s;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--secondary);
  color: var(--white);
  transform: translateY(-2px);
}

.hero-tagline {
  font-family: 'Instrument Sans', sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  color: #6b7280;
  text-align: center;
  max-width: 700px;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.hero-accent {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 180, 204, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-accent-1 { top: 10%; left: -5%; }
.hero-accent-2 { bottom: 5%; right: -8%; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-hint span {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-hint svg {
  width: 18px;
  height: 18px;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.hero-line-wrap {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-line-wrap:first-child { animation-delay: 0.15s; }
.hero-line-wrap:nth-child(2) { animation-delay: 0.3s; }

.hero-ctas,
.hero-tagline {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s ease forwards;
}

.hero-ctas { animation-delay: 0.5s; }
.hero-tagline { animation-delay: 0.65s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ────────────────────────────────────────────
   GALLERY SECTION  (Horizontal Marquee)
   ──────────────────────────────────────────── */

.gallery-section {
  padding: 100px 0 80px;
  overflow: hidden;
  background: var(--bg);
}

.section-header {
  text-align: center;
  padding: 0 24px 52px;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Black Han Sans', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--secondary);
}

.marquee-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.marquee-row {
  display: flex;
  gap: 20px;
  width: max-content;
}

.marquee-track {
  display: flex;
  gap: 20px;
  animation: marqueeScroll 40s linear infinite;
}

.marquee-row.reverse .marquee-track {
  animation: marqueeScrollReverse 45s linear infinite;
}

.marquee-gallery:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  position: relative;
  width: 380px;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.marquee-item:hover {
  transform: rotate(-2deg) scale(1.04);
}

.marquee-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.marquee-item:hover img {
  transform: scale(1.1);
}

.marquee-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 20px 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.marquee-item:hover .caption {
  transform: translateY(0);
}

.caption h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.caption p {
  font-size: 0.75rem;
  opacity: 0.8;
  font-style: italic;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollReverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}


/* ────────────────────────────────────────────
   ABOUT SECTION  (Who We Are / Our Focus)
   ──────────────────────────────────────────── */

.about-section {
  padding: 120px 24px;
  background: var(--secondary);
  color: var(--white);
  overflow: hidden;
}

.about-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.about-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  margin-bottom: 100px;
}

.about-intro {
  position: sticky;
  top: 100px;
}

.about-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 20px;
  display: block;
}

.about-title {
  font-family: 'Black Han Sans', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  margin-bottom: 24px;
}

.about-title .highlight {
  color: var(--primary);
}

.about-description {
  font-size: 1.05rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 32px;
}

.about-stat-row {
  display: flex;
  gap: 40px;
  margin-top: 36px;
}

.about-stat {
  text-align: left;
}

.about-stat .stat-number {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 2.4rem;
  color: var(--primary);
  display: block;
  line-height: 1;
}

.about-stat .stat-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
  display: block;
}

.focus-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.focus-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}

.focus-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  transform: translateX(6px);
}

.focus-card-number {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

.focus-card h3 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--white);
}

.focus-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}


/* ────────────────────────────────────────────
   VIDEO PLAYERS  (Stories from the Field)
   ──────────────────────────────────────────── */

.about-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 9 / 14;
  background: #111;
  cursor: pointer;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 40%, transparent 70%, rgba(0, 0, 0, 0.3) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  pointer-events: none;
  transition: opacity 0.3s;
}

.video-tag {
  align-self: flex-start;
  background: var(--primary);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
}

.video-info p {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.7);
  font-style: italic;
}

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s, opacity 0.3s;
  cursor: pointer;
  pointer-events: auto;
  opacity: 1;
}

.play-btn svg {
  width: 20px;
  height: 20px;
  fill: white;
  margin-left: 3px;
}

.play-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-card.playing .play-btn {
  opacity: 0;
  pointer-events: none;
}

.video-card.playing:hover .play-btn {
  opacity: 1;
  pointer-events: auto;
}

.video-card.playing .play-btn svg {
  margin-left: 0;
}

.video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  border-radius: 0 3px 0 0;
  width: 0%;
  transition: width 0.3s linear;
}

.video-card:hover {
  box-shadow: 0 12px 40px rgba(0, 180, 204, 0.15);
}


/* ────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────── */

.footer {
  background: #050507;
  color: rgba(255, 255, 255, 0.6);
  padding: 80px 24px 40px;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  font-family: 'Black Han Sans', sans-serif;
  font-size: 1.6rem;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 28px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.footer-socials a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 180, 204, 0.08);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-col h5 {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col ul li a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
}

.footer-bottom-links {
  display: flex;
  gap: 24px;
}

.footer-bottom-links a {
  color: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 600px) {
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .footer-links {
    grid-template-columns: 1fr;
  }
}


/* ────────────────────────────────────────────
   SCROLL REVEAL ANIMATION
   ──────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }


/* ────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────── */

@media (max-width: 1000px) {
  .about-top {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-intro {
    position: static;
  }

  .about-videos {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .nav-links,
  .nav > .nav-inner > .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-inner {
    padding: 0 24px;
  }

  .hero-text {
    margin-bottom: 36px;
  }
}

@media (max-width: 700px) {
  .about-section {
    padding: 80px 20px;
  }

  .about-top {
    gap: 36px;
    margin-bottom: 60px;
  }

  .about-stat-row {
    gap: 24px;
  }

  .about-videos {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
    gap: 20px;
  }

  .focus-card {
    padding: 24px;
  }
}

@media (max-width: 600px) {
  .marquee-item {
    width: 280px;
    height: 190px;
  }

  .gallery-section {
    padding: 60px 0 48px;
  }
}

@media (max-width: 480px) {
  .nav-inner {
    padding: 0 16px;
    height: 60px;
  }

  .hero {
    padding: 60px 16px 48px;
  }

  .hero-text {
    margin-bottom: 28px;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
    text-align: center;
  }

  .hero-tagline {
    padding: 0 8px;
  }

  .scroll-hint {
    display: none;
  }
}
