/* ============================================================
   FarmAccess — styles.css
   Mobile-first, pure CSS, no external dependencies.
   ============================================================ */

/* ===== CUSTOM PROPERTIES ===================================== */
:root {
  /* Colour palette */
  --clr-forest:    #1B4332;
  --clr-green:     #2D6A4F;
  --clr-sage:      #52B788;
  --clr-mint:      #B7E4C7;
  --clr-mint-lt:   #D8F3DC;
  --clr-accent:    #E9C46A;   /* harvest gold — CTA buttons */
  --clr-accent-dk: #D4A84E;
  --clr-cream:     #FDFBF7;
  --clr-sand:      #F0ECE5;
  --clr-earth:     #A07850;
  --clr-text:      #1A1A1A;
  --clr-muted:     #5C5047;
  --clr-white:     #FFFFFF;

  /* Typography */
  --font-display: Georgia, 'Palatino Linotype', Palatino, 'Book Antiqua', serif;
  --font-body:    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Spacing scale */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;

  /* Layout */
  --nav-h:         3.5rem;
  --container-max: 72rem;
  --container-pad: 1.25rem;
  --radius-sm:     0.375rem;
  --radius-md:     0.75rem;
  --radius-lg:     1rem;
  --radius-xl:     1.25rem;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.07);
  --shadow-md:     0 4px 18px rgba(0,0,0,0.10);
  --trans:         200ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--clr-text);
  background: var(--clr-cream);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
ul[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }

/* Visible focus ring for keyboard users */
:focus-visible {
  outline: 3px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ===== SKIP LINK ============================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-4);
  z-index: 9999;
  background: var(--clr-accent);
  color: var(--clr-forest);
  font-weight: 700;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.875rem;
}
.skip-link:focus {
  top: var(--sp-2);
}

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

.section {
  padding-block: var(--sp-16);
}

.section--tinted {
  background: var(--clr-sand);
}

/* ===== SECTION TYPOGRAPHY ==================================== */
.section__heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--clr-forest);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.section__sub {
  font-size: 1.0625rem;
  color: var(--clr-muted);
  margin-bottom: var(--sp-10);
}

/* ===== BUTTONS =============================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--trans), transform var(--trans), box-shadow var(--trans);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn--sm {
  font-size: 0.8125rem;
  padding: var(--sp-2) var(--sp-4);
}

.btn--lg {
  font-size: 1.0625rem;
  padding: var(--sp-4) var(--sp-8);
  min-height: 3rem;
}

/* Green button — used in nav */
.btn--primary {
  background: var(--clr-sage);
  color: var(--clr-forest);
}
.btn--primary:hover {
  background: var(--clr-mint);
  transform: translateY(-1px);
}

/* Harvest gold — main CTA buttons */
.btn--accent {
  background: var(--clr-accent);
  color: var(--clr-forest);
  box-shadow: 0 3px 12px rgba(233,196,106,0.4);
}
.btn--accent:hover {
  background: var(--clr-accent-dk);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,196,106,0.5);
}

.btn__arrow {
  width: 1.1em;
  height: 1.1em;
  flex-shrink: 0;
  transition: transform var(--trans);
}
.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* ===== HEADER / NAV ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 67, 50, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

/* Wordmark */
.wordmark {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-white);
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.wordmark:hover { color: var(--clr-mint); }
.wordmark__icon {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--clr-sage);
  flex-shrink: 0;
}

/* Hamburger toggle */
.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.4rem;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--trans);
}
.nav__toggle:hover { background: rgba(255,255,255,0.1); }

.nav__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--clr-white);
  border-radius: 2px;
  transition: transform var(--trans), opacity var(--trans);
  transform-origin: center;
}

/* Animated X when open */
.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__toggle[aria-expanded="true"] .nav__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav menu — mobile: hidden overlay below header */
.nav__menu {
  display: none;
  flex-direction: column;
  gap: var(--sp-1);
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--clr-forest);
  padding: var(--sp-4) var(--container-pad) var(--sp-6);
  border-bottom: 3px solid var(--clr-sage);
  list-style: none;
}
.nav__menu.is-open { display: flex; }

.nav__link {
  display: block;
  color: rgba(255,255,255,0.80);
  font-size: 1rem;
  font-weight: 500;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color var(--trans);
}
.nav__link:hover { color: var(--clr-mint); }

.nav__cta {
  margin-top: var(--sp-3);
  align-self: flex-start;
}

/* ===== HERO ================================================== */
.hero {
  position: relative;
  background: linear-gradient(155deg, #1B4332 0%, #2D6A4F 60%, #40916C 100%);
  color: var(--clr-white);
  padding-top: var(--sp-20);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: calc(80vh - var(--nav-h));
}

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  padding-bottom: var(--sp-16);
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clr-sage);
  margin-bottom: var(--sp-4);
}

.hero__heading {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-6);
  max-width: 14ch;
}

.hero__lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.82);
  max-width: 44ch;
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}

.hero__footnote {
  margin-top: var(--sp-4);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}

/* Decorative highland silhouette at the bottom of the hero */
.hero__landscape {
  line-height: 0;
  margin-top: auto;
  pointer-events: none;
}
.hero__landscape svg {
  width: 100%;
  height: auto;
}

/* ===== ABOUT ================================================= */
.about__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  max-width: 68ch;
}

.about__body p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--clr-text);
}

/* ===== FEATURES ============================================== */
.features__grid {
  display: grid;
  gap: var(--sp-6);
}

.feature-card {
  background: var(--clr-white);
  border-radius: var(--radius-xl);
  padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(27,67,50,0.07);
  transition: box-shadow var(--trans), transform var(--trans);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: var(--sp-5);
}
.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--clr-forest);
  margin-bottom: var(--sp-3);
}

.feature-card__body {
  font-size: 0.9375rem;
  color: var(--clr-muted);
  line-height: 1.7;
}

/* ===== COMMUNITIES =========================================== */
.communities__body {
  font-size: 1.0625rem;
  line-height: 1.8;
  max-width: 68ch;
  margin-bottom: var(--sp-8);
}

.community-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-10);
}

.community-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: 0.9375rem;
  font-weight: 500;
}

.community-item__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.35em;
  flex-shrink: 0;
}

.community-item--active .community-item__dot {
  background: var(--clr-sage);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.25);
}

.community-item--soon {
  color: var(--clr-muted);
  font-style: italic;
  font-weight: 400;
}
.community-item--soon .community-item__dot {
  background: var(--clr-earth);
  opacity: 0.5;
}

.community-item__loc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--clr-muted);
  margin-top: 0.1em;
}

/* PRRM callout block */
.prrm-block {
  display: inline-block;
  background: var(--clr-mint-lt);
  border-left: 4px solid var(--clr-sage);
  padding: var(--sp-4) var(--sp-6);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.prrm-block__label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--clr-green);
  margin-bottom: var(--sp-1);
}
.prrm-block__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--clr-forest);
}

/* ===== CTA BAND ============================================== */
.cta-band {
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
  color: var(--clr-white);
  padding-block: var(--sp-20);
  text-align: center;
}

.cta-band__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cta-band__heading {
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
}

.cta-band__sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.70);
  max-width: 40ch;
  margin-bottom: var(--sp-8);
  line-height: 1.65;
}

/* ===== FOOTER ================================================ */
.site-footer {
  background: var(--clr-forest);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  padding-block: var(--sp-10);
}

.footer__grid {
  display: grid;
  gap: var(--sp-8);
}

.footer__wordmark {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-white);
  display: block;
  margin-bottom: var(--sp-1);
}

.footer__tagline {
  color: var(--clr-sage);
  font-size: 0.8125rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--sp-6);
  row-gap: var(--sp-2);
}
.footer__nav a {
  color: rgba(255,255,255,0.60);
  font-size: 0.875rem;
  transition: color var(--trans);
}
.footer__nav a:hover { color: var(--clr-mint); }

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.footer__meta strong { color: rgba(255,255,255,0.85); }

.footer__email {
  color: var(--clr-sage);
  transition: color var(--trans);
}
.footer__email:hover { color: var(--clr-mint); }

.footer__copy {
  margin-top: var(--sp-2);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}
.footer__copy a {
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--trans);
}
.footer__copy a:hover { color: rgba(255,255,255,0.7); }

/* ===== RESPONSIVE BREAKPOINTS ================================ */

/* Tablet and up — 640px */
@media (min-width: 640px) {
  :root { --container-pad: 1.75rem; }

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

  .community-list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--sp-6);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Desktop — 900px */
@media (min-width: 900px) {
  :root { --container-pad: 2rem; }

  /* Show inline nav, hide toggle */
  .nav__toggle { display: none; }

  .nav__menu {
    display: flex !important;   /* override JS-toggled inline display:none */
    flex-direction: row;
    align-items: center;
    gap: var(--sp-6);
    position: static;
    background: transparent;
    padding: 0;
    border: none;
    list-style: none;
  }

  .nav__link {
    font-size: 0.875rem;
    padding: 0;
    border-bottom: none;
    color: rgba(255,255,255,0.75);
  }
  .nav__link:hover { color: var(--clr-mint); }

  .nav__cta { margin-top: 0; }

  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1.4fr 1fr 2fr;
    align-items: start;
  }
}

/* Very wide */
@media (min-width: 1200px) {
  .hero__content { padding-top: var(--sp-8); }
}

/* ===== REDUCED MOTION ======================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===== PRINT ================================================= */
@media print {
  .site-header, .cta-band, .hero__landscape { display: none; }
  .hero { min-height: auto; padding-top: var(--sp-8); }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
