/* =========================================================================
   Cow Dignity & Farmers Progress Foundation — Design System
   Warm · Premium · Minimal · Accessible (WCAG 2.2 AA)
   ========================================================================= */

/* ---- Design tokens ------------------------------------------------------ */
:root {
  /* Brand palette */
  --forest:        #1f5c3d;   /* Forest Green  — primary */
  --forest-dark:   #143d29;
  --forest-light:  #2f7a52;
  --earth:         #6b4423;   /* Earth Brown   — secondary */
  --earth-dark:    #4a2f18;
  --cream:         #f7f2e7;   /* Cream         — surfaces */
  --cream-dark:    #efe7d4;
  --white:         #ffffff;
  --gold:          #c9973f;   /* Golden        — accent (use sparingly) */
  --orange:        #e08b3e;   /* Soft Orange   — CTA highlight */
  --ink:           #22201c;   /* body text */
  --ink-soft:      #56504a;
  --line:          #e2dac8;

  /* Feedback */
  --ok:      #2f7a52;
  --warn:    #b8860b;
  --danger:  #b23b2e;

  /* Typography */
  --font-head: 'Poppins', 'Hind', system-ui, sans-serif;
  --font-body: 'Noto Sans', 'Mukta', system-ui, sans-serif;

  /* Spacing scale (8pt) */
  --s1: .5rem;  --s2: 1rem;  --s3: 1.5rem;  --s4: 2rem;
  --s5: 3rem;   --s6: 4rem;  --s7: 6rem;

  /* Radius / shadow / layout */
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px; --r-full: 999px;
  --shadow-sm: 0 1px 3px rgba(20,61,41,.08);
  --shadow-md: 0 8px 24px rgba(20,61,41,.10);
  --shadow-lg: 0 20px 50px rgba(20,61,41,.16);
  --wrap: 1160px;
  --focus: 0 0 0 3px rgba(224,139,62,.55);
}

/* ---- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; display: block; height: auto; }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; color: var(--forest-dark); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p  { color: var(--ink-soft); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }

/* ---- Layout helpers ----------------------------------------------------- */
.wrap { width: min(var(--wrap), 92%); margin-inline: auto; }
.section { padding-block: var(--s7); }
.section--tint { background: var(--cream); }
.center { text-align: center; }
.grid { display: grid; gap: var(--s3); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.eyebrow { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 600; color: var(--orange); margin-bottom: var(--s1); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); }

/* ---- Skip link (a11y) --------------------------------------------------- */
.skip { position: absolute; left: -999px; top: 0; background: var(--forest); color: #fff;
  padding: .6rem 1rem; z-index: 200; border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; }

/* ---- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head);
  font-weight: 600; font-size: 1rem; padding: .8rem 1.5rem; border-radius: var(--r-full);
  border: 2px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: #cf7c2f; box-shadow: var(--shadow-md); }
.btn--forest { background: var(--forest); color: #fff; }
.btn--forest:hover { background: var(--forest-dark); }
.btn--ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: #fff; }
.btn--lg { padding: 1rem 2rem; font-size: 1.08rem; }

/* ---- Header / Nav ------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }

/* Top utility bar */
.topbar { background: var(--forest-dark); color: #e7efe9; font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .4rem; }
.topbar__contact { display: flex; gap: 1.4rem; }
.topbar__contact a { color: #cfe0d6; display: inline-flex; align-items: center; gap: .35rem; }
.topbar__contact a:hover { color: #fff; text-decoration: none; }
.topbar .lang-switch { border: 1px solid rgba(255,255,255,.35); border-radius: var(--r-full);
  padding: .18rem .7rem; background: transparent; color: #fff; font-size: .8rem; cursor: pointer; }
.topbar .lang-switch option { color: #222; }

/* Main nav */
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-block: .7rem; }
.brand { display: flex; align-items: center; gap: .65rem; font-family: var(--font-head);
  font-weight: 700; color: var(--forest-dark); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 42px; height: 42px; border-radius: var(--r-full); background: var(--forest);
  color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; line-height: 1.12; }
.brand__text small { font-weight: 500; color: var(--ink-soft); font-size: .7rem; }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; white-space: nowrap;
  padding: .2rem 0; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav-links a:hover { color: var(--forest); text-decoration: none; }
.nav-links a.on { color: var(--forest-dark); border-bottom-color: var(--forest); }
.nav-actions { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; }
.nav-mobile-extra { display: none; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--forest); cursor: pointer; }

/* ---- Hero --------------------------------------------------------------- */
.hero { position: relative; background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201,151,63,.18), transparent),
    linear-gradient(160deg, var(--cream), var(--white)); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s5); align-items: center;
  padding-block: var(--s7); }
.hero h1 span { color: var(--orange); }
.hero .cta-row { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s4); }
.hero__art { aspect-ratio: 4/3; border-radius: var(--r-lg); background:
    linear-gradient(135deg, var(--forest), var(--forest-light)); box-shadow: var(--shadow-lg);
  display: grid; place-items: center; color: rgba(255,255,255,.9); font-family: var(--font-head); }
.hero__art--photo { background-size: cover; background-position: center; }

/* ---- Photo gallery ------------------------------------------------------ */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.gallery__item { display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/3;
  box-shadow: var(--shadow-sm); background: var(--cream); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery__item:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---- Cards -------------------------------------------------------------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--s3); box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .ic { width: 48px; height: 48px; border-radius: var(--r-md); background: var(--cream);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: var(--s2); }
.card h3 { margin-bottom: .4rem; }
.card__link { font-weight: 600; color: var(--forest); }

/* ---- Stats -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s3); text-align: center; }
.stat .num { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; color: var(--forest); }
.stat .lbl { color: var(--ink-soft); font-size: .95rem; }

/* ---- Forms -------------------------------------------------------------- */
.field { margin-bottom: var(--s2); }
.field label { display: block; font-weight: 600; margin-bottom: .3rem; font-size: .95rem; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; padding: .7rem .9rem; border: 1px solid var(--line);
  border-radius: var(--r-sm); font: inherit; background: var(--white); }
.field .hint { font-size: .82rem; color: var(--ink-soft); margin-top: .25rem; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s4); box-shadow: var(--shadow-md); max-width: 640px; margin-inline: auto; }

/* ---- Alerts ------------------------------------------------------------- */
.alert { padding: .8rem 1rem; border-radius: var(--r-sm); margin-bottom: var(--s2); border: 1px solid; }
.alert--success { background: #eaf5ee; border-color: #bfe0cc; color: #1c5236; }
.alert--error   { background: #faece9; border-color: #eec6bf; color: #7e2b21; }

/* ---- Badges / pills ----------------------------------------------------- */
.pill { display: inline-block; padding: .25rem .7rem; border-radius: var(--r-full); font-size: .78rem;
  font-weight: 600; background: var(--cream-dark); color: var(--earth-dark); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--forest-dark); color: #dfeee6; padding-block: var(--s6) var(--s4); margin-top: var(--s7); }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: var(--s2); }
.site-footer a { color: #b9d6c6; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: var(--s4); }
.footer-links { list-style: none; display: grid; gap: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: var(--s4); padding-top: var(--s3);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s2); font-size: .85rem; color: #9fc0b0; }

/* ---- Breadcrumb --------------------------------------------------------- */
.crumbs { font-size: .85rem; color: var(--ink-soft); padding-block: var(--s2); }
.crumbs a { color: var(--ink-soft); }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .cols-3, .cols-4, .stats, .footer-grid { grid-template-columns: repeat(2, 1fr); }

  /* --- Mobile header: single clean row + slide-down menu --- */
  .topbar { display: none; }                    /* contact + lang move into the menu */
  .nav { flex-wrap: nowrap; gap: .5rem; padding-block: .6rem; }
  .brand { flex: 1 1 auto; min-width: 0; font-size: .98rem; }
  .brand .mark { width: 38px; height: 38px; }
  .brand__text small { font-size: .66rem; }

  .nav-actions { order: 2; flex-shrink: 0; }
  .nav-actions .btn--primary { padding: .5rem 1rem; font-size: .9rem; white-space: nowrap; }
  .nav-toggle { order: 3; display: block; flex-shrink: 0; }

  .nav-links { position: fixed; inset: 58px 0 auto 0; background: var(--white); flex-direction: column;
    align-items: stretch; padding: var(--s2) var(--s3) var(--s3); gap: 0; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); display: none; max-height: calc(100vh - 58px); overflow-y: auto; }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links a { display: block; padding: .85rem .2rem; font-size: 1.02rem; border-bottom: 0; }
  .nav-links a.on { border-bottom: 0; color: var(--forest); }

  /* Contact + language, relocated into the open menu */
  .nav-mobile-extra { display: flex; flex-direction: column; gap: .7rem; padding-top: .9rem; border-bottom: 0; }
  .nav-mobile-extra select { width: 100%; padding: .6rem .7rem; border: 1px solid var(--line);
    border-radius: var(--r-sm); font: inherit; background: var(--white); }
  .nav-mobile-call { color: var(--forest-dark); font-weight: 600; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4, .stats, .footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: var(--s5); }
}
@media (max-width: 380px) {
  .brand__text small { display: none; }
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
