/* ==========================================================================
   AgriFarm — reset, elements, typography, layout primitives, utilities
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-wrap: balance;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--green-700);
  text-decoration: none;
  transition: color var(--duration-sm) var(--ease);
}
a:hover { color: var(--gold-600); }

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0 0 var(--space-4); padding-left: var(--space-6); }
li { margin-bottom: var(--space-2); }

hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-8) 0; }

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--gold-500);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--ink-700);
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
  font-size: 0.9em;
}

table { border-collapse: collapse; width: 100%; }

button { font: inherit; cursor: pointer; }

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

::selection {
  background: var(--gold-300);
  color: var(--ink-900);
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--wide { max-width: var(--container-wide); }
.container--narrow { max-width: 820px; }

.section { padding-block: var(--space-16); }
.section--tight { padding-block: var(--space-10); }
.section--loose { padding-block: var(--space-24); }
.section--cream { background: var(--cream); }
.section--green {
  background: var(--green-700);
  color: #fff;
}
.section--dark {
  background: var(--ink-800);
  color: #fff;
}

.section--green h1, .section--green h2, .section--green h3,
.section--dark h1,  .section--dark h2,  .section--dark h3 { color: #fff; }

.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap-2 { gap: var(--space-2); }
.flex-gap-3 { gap: var(--space-3); }
.flex-gap-4 { gap: var(--space-4); }
.flex-wrap { flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Section headings — the reference design's handwritten gold eyebrow
   above a heavy sans heading.
   -------------------------------------------------------------------------- */

.eyebrow {
  display: block;
  font-family: var(--font-script);
  font-size: var(--text-2xl);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--gold-500);
  margin-bottom: var(--space-2);
  line-height: 1.2;
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-10);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head__title { margin-bottom: var(--space-3); }

.section-head__lead {
  font-size: var(--text-lg);
  color: var(--ink-600);
  margin: 0;
}

.section--green .section-head__lead,
.section--dark .section-head__lead { color: rgba(255, 255, 255, 0.78); }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--ink-600); }
.text-gold   { color: var(--gold-600); }
.text-green  { color: var(--green-700); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }

.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.w-full { width: 100%; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: var(--z-toast);
  padding: var(--space-3) var(--space-5);
  background: var(--green-700);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: 0; color: #fff; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: var(--space-12); }
  .section--loose { padding-block: var(--space-16); }
}

@media (max-width: 560px) {
  :root { --container-pad: 1rem; }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--auto { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .eyebrow { font-size: var(--text-xl); }
  .section-head { margin-bottom: var(--space-8); }
}

/* Starting state for anything the motion layer animates in. The class is set
   by animations.js only once GSAP is present and motion is allowed, so if the
   animation layer never loads nothing is hidden in the first place — and if it
   loads but never gets a frame, its failsafe forces these visible. */
.js-reveal-ready [data-reveal],
.js-reveal-ready .hero__content > * {
  opacity: 0;
  transform: translateY(24px);
}

.js-reveal-ready .hero__content > * {
  transform: translateY(36px);
}
