/* =========================================================
   Tierravit — editorial storefront
   ========================================================= */
:root {
  --lime: #bada55;
  --lime-dark: #a6c744;
  --green: #2f6a1c;
  --green-deep: #16330e;
  --green-900: #0d2608;
  --blue: #5e97ff;
  --ink: #161a12;
  --body: #4b5347;
  --muted: #8f8f8f;
  --paper: #fafafa;
  --paper-alt: #f2f4ee;
  --line: #e2e2e2;
  --white: #ffffff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 4px 14px rgba(20, 40, 10, .06);
  --shadow-md: 0 18px 44px rgba(20, 40, 10, .12);
  --container: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --font: "Inter", -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--white);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3 {
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.12;
  margin: 0;
  letter-spacing: -.02em;
  font-weight: 800;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }

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

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--green); color: #fff; padding: 10px 18px;
  border-radius: 0 0 10px 10px; transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--green);
  margin: 0 0 14px;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: .98rem;
  padding: 15px 26px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn--lime { background: var(--lime); color: #17240a; }
.btn--lime:hover { background: var(--lime-dark); box-shadow: 0 12px 26px rgba(186, 218, 85, .38); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: #245414; box-shadow: 0 12px 26px rgba(47, 106, 28, .3); }
.btn--ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.5); backdrop-filter: blur(4px); }
.btn--ghost:hover { background: rgba(255,255,255,.18); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green); font-weight: 700; font-size: .95rem;
  transition: gap .25s var(--ease), color .25s var(--ease);
}
.link-arrow:hover { gap: 14px; color: var(--green-900); }

/* ---------------- Utility bar ---------------- */
.utility-bar {
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
  font-size: .82rem;
}
.utility-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 42px; gap: 16px;
}
.utility-bar__tag { color: var(--muted); letter-spacing: .02em; }
.utility-bar__links { display: flex; gap: 26px; flex-wrap: wrap; }
.utility-bar__links a { color: var(--ink); font-weight: 600; transition: color .2s; }
.utility-bar__links a:last-child { color: var(--green); }
.utility-bar__links a:hover { color: var(--green); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-stuck { box-shadow: 0 8px 30px rgba(20,40,10,.08); border-color: var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 86px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--paper-alt);
  display: grid; place-items: center;
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-size: 1.85rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; }
.brand__name-accent { color: var(--green); }
.brand__sub { font-size: .68rem; color: var(--muted); letter-spacing: .06em; margin-top: 6px; text-transform: uppercase; }

.primary-nav > ul { display: flex; align-items: center; gap: 8px; }
.primary-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; font-weight: 600; font-size: .98rem; color: var(--ink);
  border-radius: 8px; transition: color .2s, background .2s;
}
.primary-nav > ul > li > a:hover { color: var(--green); background: var(--paper-alt); }
.primary-nav a svg { transition: transform .25s var(--ease); }
.has-menu { position: relative; }
.has-menu:hover > a svg { transform: rotate(180deg); }
.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 10px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.has-menu:hover .submenu,
.has-menu:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu a { display: block; padding: 10px 12px; font-weight: 500; border-radius: 8px; }
.submenu a:hover { background: var(--paper-alt); color: var(--green); }

.nav-cta {
  background: var(--green); color: #fff !important;
  padding: 12px 22px !important; border-radius: 8px;
}
.nav-cta:hover { background: #245414 !important; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 620px;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; animation: heroZoom 18s var(--ease) forwards; }
@keyframes heroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(13,38,8,.94) 0%, rgba(13,38,8,.82) 34%, rgba(13,38,8,.35) 62%, rgba(13,38,8,.05) 88%),
    linear-gradient(0deg, rgba(13,38,8,.35), rgba(13,38,8,0) 55%);
}
.hero__inner { position: relative; z-index: 2; padding-block: 90px; max-width: var(--container); }
.hero .eyebrow { color: var(--lime); }
.hero__title { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.25); }
.hero__lead { max-width: 520px; margin-top: 26px; font-size: 1.18rem; color: rgba(255,255,255,.9); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* ---------------- USP bar ---------------- */
.usp-bar { background: #fff; border-bottom: 1px solid var(--line); }
.usp-bar__list {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 30px 0;
}
.usp {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 26px;
  border-right: 1px solid var(--line);
}
.usp:last-child { border-right: 0; }
.usp__icon {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: var(--paper-alt); display: grid; place-items: center;
}
.usp__body { display: flex; flex-direction: column; }
.usp__body strong { color: var(--ink); font-size: 1.02rem; font-weight: 700; }
.usp__body span { color: var(--muted); font-size: .92rem; }

/* ---------------- Section head ---------------- */
.section-head { max-width: 640px; margin: 0 auto 54px; text-align: center; }
.section-head h2 { position: relative; display: inline-block; padding-bottom: 14px; }
.section-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 66px; height: 4px; border-radius: 4px; background: var(--lime);
}
.section-head__lead { margin-top: 20px; color: var(--body); font-size: 1.06rem; }
.section-head--left { margin-left: 0; text-align: left; max-width: 720px; }
.section-head--left h2::after { left: 0; transform: none; }

/* ---------------- About ---------------- */
.about { padding: 96px 0; background: #fff; }
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 68px; align-items: center; }
.about__media { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.about__media img { width: 100%; height: 480px; object-fit: cover; transition: transform .8s var(--ease); }
.about__media:hover img { transform: scale(1.04); }
.about__badge {
  position: absolute; right: 20px; bottom: 20px;
  background: var(--lime); color: #17240a; border-radius: 14px;
  padding: 14px 20px; display: flex; flex-direction: column; line-height: 1.1;
  box-shadow: 0 12px 26px rgba(0,0,0,.18);
}
.about__badge strong { font-size: 1.7rem; font-weight: 800; }
.about__badge span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }
.about__content h2 { margin-bottom: 20px; }
.about__content p { margin-bottom: 22px; font-size: 1.06rem; }
.about__list { margin: 0 0 32px; display: grid; gap: 12px; }
.about__list li { position: relative; padding-left: 30px; font-weight: 500; color: var(--ink); }
.about__list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 16px; height: 9px; border-left: 2.5px solid var(--green);
  border-bottom: 2.5px solid var(--green); transform: rotate(-45deg);
}

/* ---------------- Services ---------------- */
.services { padding: 96px 0; background: var(--paper); }
.services__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 28px; display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card__icon {
  width: 58px; height: 58px; border-radius: 14px; background: var(--paper-alt);
  display: grid; place-items: center; margin-bottom: 22px;
  transition: background .3s var(--ease);
}
.service-card:hover .service-card__icon { background: #e8f3d8; }
.service-card h3 { margin-bottom: 12px; }
.service-card p { flex: 1; font-size: .98rem; margin-bottom: 22px; }

/* ---------------- Recognise ---------------- */
.recognise { padding: 96px 0; background: #fff; }
.recognise__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 68px; align-items: center; }
.recognise__content h2 { margin-bottom: 22px; }
.recognise__content p { font-size: 1.06rem; margin-bottom: 26px; }
.checklist { display: grid; gap: 14px; margin-bottom: 34px; }
.checklist li { position: relative; padding-left: 40px; font-weight: 600; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 26px; height: 26px;
  border-radius: 50%; background: var(--lime);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317240a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 15px; background-position: center; background-repeat: no-repeat;
}
.recognise__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.recognise__media img { width: 100%; height: 460px; object-fit: cover; }

/* ---------------- Audience ---------------- */
.audience { padding: 96px 0; background: var(--paper); }
.audience__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 8px; }
.audience-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; border-top: 4px solid var(--green);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.audience-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.audience-card h3 { margin-bottom: 10px; font-size: 1.12rem; }
.audience-card p { font-size: .96rem; }

/* ---------------- CTA + Stats ---------------- */
.cta-stats {
  background: linear-gradient(135deg, var(--green-900), var(--green-deep) 70%);
  color: #fff; border-top: 1px solid rgba(186,218,85,.4);
}
.cta-stats__inner {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 60px; align-items: center;
  padding: 72px 24px;
}
.cta-stats__lead h2 { color: #fff; margin-bottom: 16px; }
.cta-stats__lead p { color: rgba(255,255,255,.8); margin-bottom: 28px; max-width: 440px; }
.cta-stats__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.cta-stats__stats li {
  padding-left: 28px; border-left: 1px solid rgba(186,218,85,.45);
  display: flex; flex-direction: column;
}
.cta-stats__stats strong { font-size: clamp(2.2rem, 4vw, 3.1rem); font-weight: 800; color: var(--lime); line-height: 1; }
.cta-stats__stats span { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; color: rgba(255,255,255,.85); margin-top: 12px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--green-900); color: rgba(255,255,255,.78); }
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.5fr; gap: 44px;
  padding: 72px 24px 54px;
}
.site-footer .brand__name { color: #fff; font-size: 1.55rem; }
.site-footer .brand__name-accent { color: var(--lime); }
.site-footer__brand address { font-style: normal; margin-top: 20px; line-height: 1.9; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: var(--lime); }
.site-footer__col h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.site-footer__col ul { display: grid; gap: 11px; }
.site-footer__news h3 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
.site-footer__news p { font-size: .95rem; margin-bottom: 18px; }
.newsletter { display: flex; flex-wrap: wrap; gap: 12px; }
.newsletter input {
  flex: 1 1 190px; min-width: 0;
  padding: 14px 16px; border-radius: 8px; border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.06); color: #fff; font-size: .95rem; font-family: inherit;
}
.newsletter input::placeholder { color: rgba(255,255,255,.55); }
.newsletter input:focus { border-color: var(--lime); background: rgba(255,255,255,.1); }
.newsletter .btn { padding: 14px 24px; }
.newsletter__msg { flex-basis: 100%; font-size: .88rem; color: var(--lime); min-height: 0; margin: 0; }
.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  flex-wrap: wrap;
  padding: 26px 24px; border-top: 1px solid rgba(186,218,85,.25);
  font-size: .85rem;
}
.site-footer__bottom nav { display: flex; gap: 22px; }

/* ---------------- Reveal ---------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.usp.reveal:nth-child(2) { transition-delay: .08s; }
.usp.reveal:nth-child(3) { transition-delay: .16s; }
.usp.reveal:nth-child(4) { transition-delay: .24s; }
.services__grid .reveal:nth-child(2), .audience__grid .reveal:nth-child(2) { transition-delay: .08s; }
.services__grid .reveal:nth-child(3), .audience__grid .reveal:nth-child(3) { transition-delay: .16s; }
.services__grid .reveal:nth-child(4), .audience__grid .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .services__grid, .audience__grid { grid-template-columns: repeat(2, 1fr); }
  .cta-stats__inner { grid-template-columns: 1fr; gap: 44px; }
}

@media (max-width: 900px) {
  .utility-bar__tag { display: none; }
  .utility-bar__inner { justify-content: flex-end; }

  .nav-toggle { display: flex; }
  .primary-nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px);
    background: #fff; padding: 100px 26px 40px;
    transform: translateX(105%); transition: transform .4s var(--ease);
    box-shadow: -20px 0 50px rgba(0,0,0,.12); overflow-y: auto; z-index: 90;
  }
  .primary-nav.is-open { transform: translateX(0); }
  .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
  .primary-nav a { padding: 14px 12px; font-size: 1.05rem; }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-left: 2px solid var(--line);
    border-radius: 0; margin: 0 0 8px 12px; padding: 0 0 0 10px; min-width: 0;
  }
  .submenu a { padding: 9px 8px; font-size: .95rem; }
  .has-menu > a svg { margin-left: auto; }
  .nav-cta { display: inline-flex; justify-content: center; margin-top: 10px; }

  .about__grid, .recognise__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__media img, .recognise__media img { height: 360px; }
  .recognise__media { order: -1; }
  .cta-stats__stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .utility-bar__links { gap: 16px; font-size: .76rem; }
  .site-header__inner { min-height: 72px; }
  .brand__name { font-size: 1.5rem; }
  .brand__sub { display: none; }

  .hero { min-height: 560px; }
  .hero__inner { padding-block: 70px; }
  .hero__lead { font-size: 1.05rem; }
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }

  .usp-bar__list { grid-template-columns: 1fr 1fr; gap: 4px; padding: 20px 0; }
  .usp { padding: 14px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .usp:nth-child(odd) { border-right: 1px solid var(--line); }
  .usp:nth-last-child(-n+2) { border-bottom: 0; }

  .about, .services, .recognise, .audience { padding: 64px 0; }
  .services__grid, .audience__grid { grid-template-columns: 1fr; }
  .about__media img, .recognise__media img { height: 300px; }

  .cta-stats__inner { padding: 52px 24px; }
  .cta-stats__stats { grid-template-columns: 1fr; gap: 26px; }
  .cta-stats__stats li { padding-left: 0; border-left: 0; border-top: 1px solid rgba(186,218,85,.45); padding-top: 20px; }

  .site-footer__grid { grid-template-columns: 1fr; gap: 34px; padding: 54px 24px 40px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
