/* ==========================================================================
   UCCCU, Uganda Crane Creameries Cooperative Union Ltd
   Design system: "Pastoral Modernism"
   Palette: forest green, bone white, ink black
   Type: Instrument Serif (display) / Manrope (text)
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-regular.woff2") format("woff2");
}

@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/instrument-serif-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --forest-950: #04150f;
  --forest-900: #07251a;
  --forest-800: #0a3527;
  --forest-700: #0e4533;
  --forest-600: #14573f;
  --green-500: #1e7a55;
  --green-400: #2e9e6b;
  --green-300: #63be93;
  --mint-200: #c9e6d4;
  --mint-100: #e4f1e9;
  --mint-50: #eff7f2;

  --paper: #f6f7f2;
  --white: #ffffff;
  --ink: #0b0f0c;
  --ink-soft: #26302a;
  --muted: #4d5b52;
  --muted-light: #5b6a61;
  --line: rgba(11, 15, 12, 0.13);
  --line-strong: rgba(11, 15, 12, 0.22);
  --line-light: rgba(255, 255, 255, 0.16);

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  --shell: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(76px, 9vw, 132px);
  --radius: 18px;
  --radius-lg: 28px;

  --ease: cubic-bezier(0.22, 0.65, 0.28, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 2px 10px rgba(4, 21, 15, 0.05);
  --shadow-md: 0 18px 50px rgba(4, 21, 15, 0.1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.68;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img,
svg,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--mint-200);
  color: var(--forest-900);
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

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

.section--ink :focus-visible,
.hero :focus-visible,
.footer :focus-visible {
  outline-color: var(--mint-200);
}

.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;
}

/* ---------- Layout ---------- */
.shell {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell--narrow {
  max-width: calc(980px + var(--gutter) * 2);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

.section--white {
  background: var(--white);
}

.section--paper {
  background: var(--paper);
}

.section--mint {
  background: var(--mint-50);
}

.section--ink {
  background: var(--forest-900);
  color: var(--paper);
}

.section--flush-top {
  padding-top: 0;
}

.section--flush-bottom {
  padding-bottom: 0;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.4rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

h2 {
  font-size: clamp(2.5rem, 4.4vw, 4.4rem);
  line-height: 0.98;
}

h3 {
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  line-height: 1.08;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.15;
}

em {
  font-style: italic;
}

.display-xl {
  font-size: clamp(3.4rem, 7vw, 7rem);
  line-height: 0.92;
  letter-spacing: -0.035em;
}

.display-lg {
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: 0.96;
}

.display-md {
  font-size: clamp(2.15rem, 3.5vw, 3.5rem);
}

.display-sm {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
}

.lede {
  max-width: 48ch;
  font-size: clamp(1.1rem, 1.45vw, 1.28rem);
  line-height: 1.72;
  color: var(--muted);
}

.section--ink .lede,
.hero .lede {
  color: rgba(255, 255, 255, 0.72);
}

.small {
  font-size: 14.5px;
  line-height: 1.65;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.21em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--green-500);
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  flex: none;
  background: currentColor;
}

.eyebrow--light {
  color: var(--mint-200);
}

.eyebrow--muted {
  color: var(--muted-light);
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted-light);
}

.section-label span {
  color: var(--forest-600);
}

.section--ink .section-label {
  color: rgba(255, 255, 255, 0.5);
}

.section--ink .section-label span {
  color: var(--green-300);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(38px, 5vw, 64px);
}

.section-head__title {
  max-width: 18ch;
}

.section-head__aside {
  max-width: 38ch;
  padding-bottom: 6px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest-700);
  transition: color 0.25s ease, gap 0.25s ease;
}

.text-link svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease);
}

.text-link:hover {
  color: var(--green-500);
  gap: 14px;
}

.section--ink .text-link {
  color: var(--mint-200);
}

.prose p {
  margin-bottom: 1.15em;
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--ink);
  font-weight: 700;
}

.section--ink .prose p {
  color: rgba(255, 255, 255, 0.68);
}

.section--ink .prose strong {
  color: var(--white);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 27px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s var(--ease);
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
  transition: transform 0.3s var(--ease);
}

.btn:hover svg {
  transform: translate(3px, -3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--dark {
  background: var(--forest-800);
  color: var(--white);
}

.btn--dark:hover {
  background: var(--green-500);
}

.btn--light {
  background: var(--paper);
  color: var(--forest-900);
}

.btn--light:hover {
  background: var(--mint-200);
}

.btn--outline {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--outline:hover {
  border-color: var(--forest-800);
  background: var(--forest-800);
  color: var(--white);
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.34);
  color: var(--white);
}

.btn--outline-light:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--forest-900);
}

.btn--sm {
  min-height: 46px;
  padding: 0 21px;
  font-size: 11px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Top bar ---------- */
.topbar {
  position: relative;
  z-index: 101;
  background: var(--forest-900);
  color: rgba(255, 255, 255, 0.62);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 37px;
}

.topbar__group {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.topbar__item svg {
  width: 12px;
  height: 12px;
  color: var(--green-300);
}

.topbar a {
  transition: color 0.2s ease;
}

.topbar a:hover {
  color: var(--white);
}

.topbar__reg {
  color: rgba(255, 255, 255, 0.56);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(4, 21, 15, 0.07);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 44px);
  height: 86px;
  transition: height 0.3s var(--ease);
}

.site-header.is-scrolled .header__inner {
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  flex: none;
}

.brand__mark {
  width: auto;
  height: 56px;
  transition: height 0.3s var(--ease);
}

.site-header.is-scrolled .brand__mark {
  height: 46px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
}

.brand__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--forest-900);
}

.brand__sub {
  max-width: 190px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--muted-light);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 32px);
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding: 7px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.045em;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--green-500);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.32s var(--ease);
}

.nav__link:hover,
.nav__link.is-active {
  color: var(--forest-700);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.nav__foot {
  display: none;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
}

.menu-toggle__bars {
  position: relative;
  width: 20px;
  height: 13px;
}

.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}

.menu-toggle__bars span:first-child {
  top: 2px;
}

.menu-toggle__bars span:last-child {
  top: 9px;
}

body.menu-open .menu-toggle__bars span:first-child {
  top: 6px;
  transform: rotate(45deg);
}

body.menu-open .menu-toggle__bars span:last-child {
  top: 6px;
  transform: rotate(-45deg);
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  overflow: hidden;
  padding-top: clamp(64px, 8vw, 100px);
  background: var(--forest-950);
  color: rgba(255, 255, 255, 0.64);
}

.footer__top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr 0.65fr 0.65fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(48px, 6vw, 72px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 10px;
  color: var(--forest-900);
}

.footer__brand img {
  width: auto;
  height: 58px;
}

.footer__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.footer__brand-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.footer__brand-sub {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--muted);
}

.footer__statement {
  max-width: 17ch;
  margin-top: 26px;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  line-height: 1.16;
  color: var(--white);
}

.footer__statement em {
  color: var(--mint-200);
}

.footer__col h2,
.footer__col h3 {
  margin-bottom: 18px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.footer__list a,
.footer__contact a {
  display: inline-block;
  padding: 5px 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.footer__list a:hover,
.footer__contact a:hover {
  color: var(--mint-200);
}

.footer__contact address {
  font-style: normal;
  font-size: 14.5px;
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.7);
}

.footer__contact p {
  margin-top: 10px;
}

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.socials a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: var(--white);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    transform 0.25s var(--ease);
}

.socials a svg {
  width: 16px;
  height: 16px;
}

.socials a:hover {
  background: var(--mint-200);
  border-color: var(--mint-200);
  color: var(--forest-900);
  transform: translateY(-2px);
}

.footer__word {
  position: relative;
  z-index: 1;
  margin-top: clamp(30px, 4vw, 56px);
  font-family: var(--font-display);
  font-size: clamp(6rem, 19vw, 18rem);
  line-height: 0.62;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.075);
  user-select: none;
  pointer-events: none;
}

.footer__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.56);
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.55);
}

.footer__bottom a:hover {
  color: var(--white);
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--forest-800);
}

.field label span {
  color: var(--green-500);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.45;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234d5b52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(46, 158, 107, 0.12);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8a968e;
}

.field__error {
  display: none;
  font-size: 12px;
  font-weight: 600;
  color: #a52a2a;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: #a52a2a;
}

.field.has-error .field__error {
  display: block;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.check input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--green-500);
  flex: none;
}

.form-status {
  display: none;
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.55;
}

.form-status.is-visible {
  display: block;
}

.form-status--success {
  background: var(--mint-100);
  color: var(--forest-800);
}

.form-status--info {
  background: var(--mint-50);
  color: var(--forest-800);
}

.form-status--error {
  background: #fbeaea;
  color: #7d2020;
}

.form-status a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Motion ---------- */
.reveal {
  will-change: opacity, transform;
}

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
