/* ========================================
   SITE-WIDE BASE: accessibility, motion, shared components
   ======================================== */

/* Skip link — visible on keyboard focus */
.skip-link {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 10000;
    padding: 12px 20px;
    background: #112921;
    color: #fff;
    font: 600 1rem/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 8px;
    text-decoration: none;
}
.skip-link:focus {
    top: 16px;
    outline: 3px solid #ffc107;
    outline-offset: 2px;
}

main:focus { outline: none; }

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

/* Consistent, high-contrast keyboard focus (WCAG 2.2 AA) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid #ffc107;
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(17, 41, 33, 0.85);
    border-radius: 4px;
}

/* Mega menus open for keyboard users too */
.nav-item-dropdown:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    max-height: 500px;
}

/* Mobile menu: a real button + a panel that is unreachable when closed */
.hamburger-menu { min-width: 30px; }
.mobile-menu:not(.active):not(.open) { visibility: hidden; transition: right 0.4s ease, visibility 0s linear 0.4s; }
.mobile-menu.active, .mobile-menu.open { visibility: visible; }
body.menu-open { overflow: hidden; }

/* Shared buttons */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary { background: #ffc107; color: #112921; border-color: #ffc107; }
.btn-primary:hover { background: #ffd54f; border-color: #ffd54f; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: #112921; border-color: #112921; }
.btn-secondary:hover { background: #112921; color: #fff; }
.on-dark .btn-secondary { color: #fff; border-color: #fff; background: rgba(17, 41, 33, 0.35); }
.on-dark .btn-secondary:hover { background: #fff; color: #112921; }

/* Returns / metrics disclosure */
.returns-disclosure {
    max-width: 75ch;
    margin: 16px auto 0;
    padding: 12px 16px;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #3d4a44;
    background: #f4f1e8;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    text-align: left;
}
.returns-disclosure--dark { color: #f3f1ea; background: rgba(255, 255, 255, 0.08); }
.metric-scope {
    max-width: 75ch;
    margin: 20px auto 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    opacity: 0.85;
    text-align: center;
}

/* Simple pages (404, confirmations) */
.simple-page { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1a1a1a; background: #f7f5ee; }
.simple-page-main { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 160px 5% 80px; }
.simple-page-hero { max-width: 640px; text-align: center; }
.simple-page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 8px 0 16px; color: #112921; }
.simple-page-label { letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8125rem; font-weight: 700; color: #4d6443; }
.simple-page-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 28px; }

/* Body copy: left aligned and readable line length */
.prose-readable { max-width: 75ch; text-align: left; }
.prose-readable p { text-align: left; }

/* Content must never depend on JavaScript or animation to be visible */
.no-js [animate],
.no-js [animate-who],
.no-js .who-we-are-paragraph.hidden { opacity: 1 !important; transform: none !important; display: block !important; visibility: visible !important; }
.no-js #intro-splash,
.no-js .read-more-btn { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    #intro-splash { display: none !important; }
}

@media print {
    #intro-splash, .main-header, .agro-whatsapp-float, .skip-link, .hero-video { display: none !important; }
    * { opacity: 1 !important; transform: none !important; visibility: visible !important; animation: none !important; }
    .who-we-are-paragraph.hidden { display: block !important; }
}

/* ========================================
   HOMEPAGE HERO
   ======================================== */
.hero-container { background: #112921 center / cover no-repeat; }
.hero-h1 { max-width: 20ch; text-wrap: balance; word-spacing: normal; letter-spacing: normal; }
.hero-h1 br { display: block; }
.hero-buttons { flex-wrap: wrap; }
.hero-cta-primary, .hero-cta-secondary { padding: 16px 28px; }
.hero-video-toggle {
    position: absolute;
    right: 24px;
    bottom: 24px;
    z-index: 5;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(17, 41, 33, 0.7);
    color: #fff;
    cursor: pointer;
}
.hero-video-toggle[hidden] { display: none; }
.hero-video-toggle .icon-play { display: none; }
.hero-video-toggle.is-paused .icon-play { display: block; }
.hero-video-toggle.is-paused .icon-pause { display: none; }
button.read-more-btn { background: none; border: 0; font: inherit; color: inherit; padding: 0; cursor: pointer; }
@media (max-width: 768px) {
    .hero-buttons { flex-direction: column; align-items: stretch; gap: 12px; }
    .hero-cta-primary, .hero-cta-secondary { width: 100%; text-align: center; }
    .hero-video-toggle { right: 16px; bottom: 16px; }
}

/* Metrics: value shown above its label; markup is a <dl> (label = term, value = definition) */
dl.metrics-grid { margin: 0; }
.metrics-item { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.metrics-item-value { margin: 0; }
.no-js .agri-feature { opacity: 1; transform: none; }
