/* ============================================
   Peak Harvest Agritech: Design Tokens
   ============================================ */
:root {
  --forest: #16261C;
  --forest-2: #1E3226;
  --paper: #F6F4EC;
  --paper-2: #EFEBDD;
  --moss: #3F6B4A;
  --moss-light: #6B9973;
  --gold: #B68D40;
  --gold-light: #D4B672;
  --charcoal: #262622;
  --stone: #DAD5C6;
  --cream-text: #EDE9DA;

  --font-display: "Domine", Georgia, serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

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

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: inherit;
}

h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.25rem; font-weight: 600; font-family: var(--font-body); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--forest);
  color: var(--cream-text);
  padding: 0.75rem 1.25rem;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* ============================================
   Eyebrow / labels
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 0.9rem;
}
.section-dark .eyebrow { color: var(--gold-light); }

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.7rem;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--moss);
  color: var(--paper);
  border: 1px solid var(--moss);
}
.btn-primary:hover { background: var(--forest-2); border-color: var(--forest-2); }

.btn-outline {
  border: 1px solid rgba(237, 233, 218, 0.4);
  color: var(--cream-text);
}
.btn-outline:hover { border-color: var(--gold-light); color: var(--gold-light); }

.btn-ghost {
  border: 1px solid var(--stone);
  color: var(--charcoal);
}
.btn-ghost:hover { border-color: var(--moss); color: var(--moss); }

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 236, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--stone);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  margin-right: auto;
}

/* ============================================
   Logo
   ============================================ */
.brand-logo { height: 26px; width: auto; display: block; }
.footer-logo-crop {
  display: flex;
  align-items: center;
  height: 26px;
  overflow: hidden;
}
.footer-logo { height: 120px; width: auto; flex: none; }

.site-nav ul {
  display: flex;
  gap: 2rem;
}
.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding-block: 0.3rem;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.3s var(--ease);
}
.site-nav a:hover::after { right: 0; }

.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
}
.nav-toggle span {
  height: 2px;
  background: var(--charcoal);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--paper);
  border-top: 1px solid var(--stone);
}
.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.mobile-nav a { font-size: 1.05rem; font-weight: 500; }
.mobile-nav.is-open { display: flex; }

@media (max-width: 860px) {
  .site-nav, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ============================================
   Sections: light/dark rhythm
   ============================================ */
.section { padding-block: clamp(4rem, 9vw, 7rem); scroll-margin-top: 84px; }
.section-tint { background: var(--paper-2); }
.section-dark {
  background: var(--forest);
  color: var(--cream-text);
}
.section-dark h2, .section-dark h1 { color: var(--paper); }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-lede {
  margin-top: 1rem;
  font-size: 1.08rem;
  color: var(--charcoal);
  opacity: 0.78;
}
.section-dark .section-lede { color: var(--cream-text); opacity: 0.75; }

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: min(92vh, 820px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(3rem, 8vw, 6rem);
  isolation: isolate;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -32%;
  height: 164%;
  background-size: cover;
  background-position: center;
  z-index: -1;
  will-change: transform;
  filter: saturate(1.55) contrast(1.18) brightness(1.12);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(0deg, rgba(22,38,28,0.68) 0%, rgba(22,38,28,0.52) 22%, rgba(22,38,28,0.32) 45%, rgba(22,38,28,0.24) 65%, rgba(22,38,28,0.04) 82%, rgba(22,38,28,0.06) 100%),
    linear-gradient(90deg, rgba(22,38,28,0.36) 0%, rgba(22,38,28,0.03) 48%);
}
.hero-content { position: relative; z-index: 1; }
.hero-title {
  font-size: clamp(2.5rem, 5.6vw, 4.25rem);
  color: var(--paper);
  margin-bottom: 1.4rem;
  max-width: 17ch;
  text-shadow: 0 3px 20px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.4);
}
.hero-sub {
  font-size: 1.15rem;
  max-width: 50ch;
  color: var(--cream-text);
  opacity: 0.95;
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 14px rgba(0,0,0,0.55);
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero .eyebrow {
  color: var(--gold-light);
  display: inline-block;
  background: rgba(22, 38, 28, 0.55);
  padding: 0.4em 0.7em;
  border-radius: 2px;
  backdrop-filter: blur(2px);
}

/* ============================================
   Research timeline (signature element)
   ============================================ */
.timeline { padding-top: 0.5rem; }
.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: clamp(1.8rem, 3.4vw, 2.6rem);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--forest);
  border: 1.5px solid var(--gold-light);
  z-index: 1;
}
.timeline-item::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.3rem;
  bottom: 0;
  width: 1px;
  background: rgba(237, 233, 218, 0.2);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::after { display: none; }
.timeline-item-current::before { background: var(--gold-light); }
.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--gold-light);
  margin-bottom: 0.45rem;
}
.timeline-text {
  font-size: 0.98rem;
  color: var(--cream-text);
  opacity: 0.82;
  max-width: 32ch;
}
.timeline-item-current .timeline-text { color: var(--paper); opacity: 0.95; }

/* ============================================
   About
   ============================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  row-gap: 0;
  align-items: start;
}
.about-heading { grid-column: 1; grid-row: 1; }
.about-body { grid-column: 1; grid-row: 2; }
.stat-callout { grid-column: 2; grid-row: 2; }
.about-heading h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.about-body p { margin-bottom: 1.2rem; font-size: 1.05rem; max-width: 62ch; }
.about-body p:last-child {
  margin-bottom: 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--stone);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--forest-2);
}

.stat-callout {
  border: 1px solid var(--stone);
  background: var(--paper-2);
  padding: clamp(2rem, 4vw, 2.75rem);
}
.stat-callout-number {
  font-family: var(--font-mono);
  font-size: clamp(3.4rem, 6.5vw, 4.8rem);
  color: var(--gold);
  line-height: 1;
  margin: 0.4rem 0 1.1rem;
}
.stat-callout-number .stat-suffix { font-size: 0.55em; }
.stat-callout-label {
  font-size: 1.02rem;
  color: var(--charcoal);
  opacity: 0.82;
  max-width: 30ch;
}
.stat-callout-source {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--stone);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--charcoal);
  opacity: 0.5;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-heading, .about-body, .stat-callout { grid-column: 1; grid-row: auto; }
}

/* ============================================
   Our Solution: supply chain
   ============================================ */
.chain-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 2vw, 1.4rem);
}
.chain-step {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(218, 213, 198, 0.7);
  border-radius: 3px;
  padding: clamp(1.8rem, 2.6vw, 2.3rem) clamp(1.2rem, 2vw, 1.6rem);
  box-shadow: 0 1px 2px rgba(22, 38, 28, 0.04), 0 10px 28px -12px rgba(22, 38, 28, 0.12);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.chain-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(22, 38, 28, 0.06), 0 20px 36px -14px rgba(22, 38, 28, 0.18);
  border-color: rgba(182, 141, 64, 0.4);
}
.chain-index {
  position: absolute;
  top: clamp(1.4rem, 2vw, 1.8rem);
  right: clamp(1.2rem, 2vw, 1.6rem);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--stone);
}
.chain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(182, 141, 64, 0.1);
  color: var(--gold);
  margin-bottom: 1.3rem;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.chain-step:hover .chain-icon {
  background: rgba(182, 141, 64, 0.16);
  transform: scale(1.06);
}
.chain-step h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.chain-step p { font-size: 0.92rem; opacity: 0.75; }

@media (max-width: 960px) {
  .chain-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .chain-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Product
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.85fr;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  row-gap: 0;
  align-items: stretch;
}
.product-heading { grid-column: 1; grid-row: 1; max-width: 640px; }
.product-lede { grid-column: 1; grid-row: 2; max-width: 640px; }
.trademark {
  font-size: 0.32em;
  font-weight: 400;
  vertical-align: top;
  position: relative;
  top: 0.3em;
  margin-left: 0.1em;
  color: var(--gold);
}

.fact-grid {
  grid-column: 1;
  grid-row: 3;
  max-width: 640px;
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.75rem;
}
.fact-grid li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}
.fact-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(63, 107, 74, 0.1);
  color: var(--moss);
  margin-top: 0.1rem;
}
.fact-grid h3 { font-size: 0.98rem; margin-bottom: 0.35rem; }
.fact-grid p { font-size: 0.9rem; opacity: 0.75; }

.mode-panel {
  grid-column: 2;
  grid-row: 3;
  margin-top: 2.4rem;
  background: var(--forest);
  padding: clamp(1.8rem, 3vw, 2.4rem);
  box-shadow: 0 1px 2px rgba(22, 38, 28, 0.05), 0 16px 32px -14px rgba(22, 38, 28, 0.28);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mode-panel .eyebrow { color: var(--gold-light); }
.mode-list {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
}
.mode-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid rgba(237, 233, 218, 0.15);
  font-size: 0.98rem;
  color: var(--cream-text);
}
.mode-list li:first-child { padding-top: 0; }
.mode-list li:last-child { border-bottom: none; padding-bottom: 0; }
.mode-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(182, 141, 64, 0.18);
  color: var(--gold-light);
}

.mode-list-grid {
  flex-direction: row;
  text-align: center;
}
.mode-list-grid li {
  flex: 1 1 0;
  flex-direction: column;
  gap: 0.7rem;
  padding-block: 0;
  border-bottom: none;
  border-right: 1px solid rgba(237, 233, 218, 0.15);
  font-size: 0.85rem;
}
.mode-list-grid li:last-child { border-right: none; }

@media (max-width: 860px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-heading, .product-lede, .fact-grid, .mode-panel { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
  .fact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Impact / stats
   ============================================ */
.impact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .impact-grid { grid-template-columns: 1fr; }
}

.stat-grid {
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}
.stat {
  display: grid;
  grid-template-columns: clamp(150px, 20vw, 185px) 1fr;
  align-items: center;
  column-gap: 1.6rem;
  border-top: 1px solid rgba(182, 141, 64, 0.35);
  padding-top: 1.4rem;
}
.stat-number {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.6vw, 2.6rem);
  color: var(--gold-light);
  line-height: 1;
}
.stat-suffix { font-size: 0.65em; }
.stat-label { font-size: 0.96rem; opacity: 0.75; max-width: 40ch; }

.stat-number-stacked {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.22;
}
.stat-source {
  margin-top: clamp(2rem, 4vw, 2.8rem);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  opacity: 0.5;
}

@media (max-width: 560px) {
  .stat { grid-template-columns: 1fr; row-gap: 0.6rem; }
}

/* ============================================
   Partners
   ============================================ */
.partner-groups {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 4vw, 2.75rem);
}
.partner-group-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  opacity: 0.5;
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--stone);
}
.partner-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.1rem;
}
.partner-logo-card {
  height: 108px;
  background: #FFFFFF;
  border: 1px solid var(--stone);
  border-radius: 4px;
  padding: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.3s var(--ease);
}
.partner-logo-card:hover { border-color: var(--moss-light); }
.partner-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.3s var(--ease), opacity 0.3s var(--ease);
}
.partner-logo-card:hover img { filter: grayscale(0); opacity: 1; }
.partner-logo-card img.is-compact { transform: scale(0.8); }
.partner-logo-card img.is-oversized-canvas { transform: scale(1.4); }

/* ============================================
   Contact
   ============================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: start;
}
.contact-grid h2 { color: var(--paper); }

.contact-card {
  border: 1px solid rgba(237, 233, 218, 0.2);
  padding: clamp(1.8rem, 3vw, 2.4rem);
}
.contact-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-block: 1rem;
  border-bottom: 1px solid rgba(237, 233, 218, 0.15);
  transition: opacity 0.3s var(--ease);
}
.contact-link:first-child { padding-top: 0; }
a.contact-link:hover { opacity: 0.7; }
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.contact-value { font-size: 1.1rem; color: var(--paper); }
.contact-btn { margin-top: 1.6rem; width: 100%; }

@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer { background: var(--forest); border-top: 1px solid rgba(237, 233, 218, 0.12); padding-block: 2rem; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-word { color: var(--gold-light); }
.footer-word strong { color: var(--paper); }
.footer-copy { font-size: 0.85rem; color: rgba(237, 233, 218, 0.55); }

/* ============================================
   Scroll reveal — layered depth
   ============================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0) scale(1); }

/* Staggered cascade for grouped items, so rows arrive as layered depth rather than all at once */
.chain-grid .chain-step:nth-child(1) { transition-delay: 0s; }
.chain-grid .chain-step:nth-child(2) { transition-delay: 0.08s; }
.chain-grid .chain-step:nth-child(3) { transition-delay: 0.16s; }
.chain-grid .chain-step:nth-child(4) { transition-delay: 0.24s; }
.chain-grid .chain-step:nth-child(5) { transition-delay: 0.32s; }

.stat-grid .stat:nth-child(1) { transition-delay: 0s; }
.stat-grid .stat:nth-child(2) { transition-delay: 0.1s; }
.stat-grid .stat:nth-child(3) { transition-delay: 0.2s; }

/* Parallax layers */
[data-parallax],
[data-parallax-local] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  [data-parallax],
  [data-parallax-local] { transform: none !important; }
}
