/* ================================================================
   Herd Security — Shared Stylesheet
   Extracted from inline styles across all pages.
   Pages keep a small <style> block for :root overrides and
   page-specific rules only.
   ================================================================ */

/* ── VARIABLES (defaults — pages may override in inline <style>) ── */
:root {
    --navy: #1a3c2a;
    --navy-mid: #244d36;
    --navy-light: #2e5e42;
    --teal: #2DD4A8;
    --teal-dim: #1FA882;
    --teal-glow: rgba(45, 212, 168, 0.12);
    --amber: #F0B429;
    --amber-glow: rgba(240, 180, 41, 0.1);
    --cream: #F7F5F0;
    --cream-dark: #EDE9E1;
    --warm-gray: #9A9589;
    --white: #FFFFFF;
    --text-primary: #0F1A2E;
    --text-secondary: #5A5750;
    --text-muted: #9A9589;
    --border: #EDE9E1;
    --border-light: #F7F5F0;
    --shadow-sm: 0 1px 3px rgba(15,26,46,0.05);
    --shadow-md: 0 4px 20px rgba(15,26,46,0.08);
    --shadow-lg: 0 12px 40px rgba(15,26,46,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --font-display: 'Montserrat', 'Fraunces', Georgia, sans-serif;
    --font-body: 'Montserrat', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Semantic aliases — pages override these */
    --nav-bg: #1a3c2a;
    --accent: #2DD4A8;
    --accent-secondary: #F0B429;
    --background: #F7F5F0;
    --surface: #F7F5F0;
    --surface-alt: #EDE9E1;
}

/* ── RESET ── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ── NAV ── */
.nav {
    position: sticky; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(15, 26, 46, 0.08);
}
.nav-content {
    display: flex; justify-content: space-between; align-items: center;
    gap: 32px; height: 64px;
}
.logo-wrapper { text-decoration: none; display: flex; align-items: center; }
.nav-logo { height: 28px; width: auto; }
.nav-links {
    display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center;
}
.nav-link {
    color: rgba(0,0,0,0.85); text-decoration: none; font-size: 14px; font-weight: 500;
    padding: 8px 16px; border-radius: 8px; transition: all 0.2s ease; white-space: nowrap;
}
.nav-link:hover { color: #000; background: rgba(0,0,0,0.05); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    display: flex; align-items: center; gap: 5px; cursor: pointer;
    color: rgba(0,0,0,0.85); font-size: 14px; font-weight: 500;
    padding: 8px 16px; border-radius: 8px; transition: all 0.2s ease; user-select: none;
}
.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle { color: #000; background: rgba(0,0,0,0.05); }
.dropdown-chevron { width: 14px; height: 14px; transition: transform 0.2s ease; opacity: 0.6; }
.nav-dropdown.open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-menu {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #fff; border: 1px solid var(--cream-dark, var(--border));
    border-radius: 14px;
    box-shadow: 0 16px 48px rgba(15,26,46,0.14);
    min-width: 480px; padding: 12px; padding-top: 20px;
    opacity: 0; visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1); z-index: 200;
}
.dropdown-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dropdown-menu.dropdown-narrow { min-width: 340px; }
.dropdown-narrow .dropdown-grid { grid-template-columns: 1fr; }
.nav-dropdown.open .dropdown-menu,
.nav-dropdown:hover .dropdown-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-dropdown:hover .nav-dropdown-toggle { color: #000; background: rgba(0,0,0,0.05); }
.nav-dropdown:hover .dropdown-chevron { transform: rotate(180deg); }
.dropdown-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 16px; border-radius: 10px;
    text-decoration: none; transition: background 0.15s ease;
}
.dropdown-item:hover { background: var(--surface, var(--cream)); }
.dropdown-item-icon {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--teal-glow);
}
.dropdown-item-icon svg {
    width: 18px; height: 18px; stroke: var(--teal-dim); fill: none;
    stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.dropdown-item-text { display: flex; flex-direction: column; }
.dropdown-item-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.dropdown-item-desc { font-size: 12px; color: var(--warm-gray, var(--text-muted)); margin-top: 3px; line-height: 1.4; }

.nav-cta {
    background: var(--nav-bg); color: var(--white, #fff);
    padding: 9px 22px; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 14px;
    transition: all 0.2s ease; white-space: nowrap;
}
.nav-cta:hover {
    background: var(--teal, #2DD4A8); color: var(--nav-bg);
    box-shadow: 0 4px 20px rgba(45,212,168,0.3);
}

/* ── MOBILE NAV ── */
.mobile-menu-btn {
    display: none; background: none; border: none; cursor: pointer; padding: 8px;
    width: 40px; height: 40px; position: relative; z-index: 301;
}
.mobile-menu-btn span {
    display: block; width: 22px; height: 2px; background: var(--text-primary);
    border-radius: 2px; transition: all 0.3s ease; position: absolute; left: 9px;
}
.mobile-menu-btn span:nth-child(1) { top: 12px; }
.mobile-menu-btn span:nth-child(2) { top: 19px; }
.mobile-menu-btn span:nth-child(3) { top: 26px; }
.mobile-menu-btn.active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

.mobile-menu {
    display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(24px);
    z-index: 200; overflow-y: auto; padding: 1rem 1.5rem 2rem;
    opacity: 0; transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.mobile-menu.open { opacity: 1; transform: translateY(0); pointer-events: auto; }

.mobile-menu-links { display: flex; flex-direction: column; gap: 0; }
.mobile-menu-link {
    display: block; padding: 14px 0; font-size: 16px; font-weight: 500;
    color: var(--text-primary); text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.mobile-menu-link:hover { color: var(--teal-dim); }

.mobile-menu-section { border-bottom: 1px solid rgba(0,0,0,0.06); }
.mobile-menu-section-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 0; font-size: 16px; font-weight: 500;
    color: var(--text-primary); cursor: pointer; width: 100%;
    background: none; border: none; font-family: inherit;
}
.mobile-menu-section-toggle svg {
    width: 16px; height: 16px; transition: transform 0.2s ease; opacity: 0.5;
}
.mobile-menu-section.open .mobile-menu-section-toggle svg { transform: rotate(180deg); }

.mobile-menu-subitems {
    display: none; padding: 0 0 8px 16px; flex-direction: column; gap: 0;
}
.mobile-menu-section.open .mobile-menu-subitems { display: flex; }
.mobile-menu-subitem {
    display: block; padding: 10px 0; font-size: 14px; font-weight: 400;
    color: var(--text-secondary); text-decoration: none;
}
.mobile-menu-subitem:hover { color: var(--teal-dim); }

.mobile-menu-cta {
    display: block; margin-top: 1.5rem; text-align: center;
    background: var(--nav-bg); color: var(--white, #fff);
    padding: 14px 24px; border-radius: 10px;
    text-decoration: none; font-weight: 600; font-size: 15px;
}

/* ── SHARED SECTION STYLES ── */
.section { padding: 100px 0; }
.section h2 { font-size: 44px; margin-bottom: 18px; color: var(--text-primary); }
.section-dark { background: var(--surface); }
.section-subtitle { font-size: 18px; color: var(--text-secondary); line-height: 1.7; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 72px; }
.section-label {
    color: var(--teal-dim); font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; font-size: 12px; margin-bottom: 16px;
}

/* ── SHARED CTA STYLES ── */
.cta-group { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-primary {
    background: var(--teal); color: var(--nav-bg);
    padding: 14px 28px; border-radius: 10px; text-decoration: none;
    font-weight: 600; font-size: 15px; transition: all 0.2s ease; display: inline-block;
}
.cta-primary:hover {
    background: var(--teal-dim); color: #fff;
    transform: translateY(-2px); box-shadow: 0 8px 30px rgba(45,212,168,0.3);
}
.cta-secondary {
    background: transparent; color: var(--nav-bg);
    padding: 14px 28px; border-radius: 10px; text-decoration: none;
    font-weight: 600; font-size: 15px; transition: all 0.2s ease;
    display: inline-block; border: 1.5px solid rgba(15,26,46,0.18);
}
.cta-secondary:hover {
    background: var(--nav-bg); color: #fff; border-color: var(--nav-bg);
}

/* ── SHARED CTA SECTION ── */
.cta-section {
    background: var(--nav-bg); color: white; padding: 100px 0;
    text-align: center; position: relative; overflow: hidden;
}
.cta-section::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 800px; height: 800px; transform: translate(-50%,-50%);
    background: radial-gradient(circle, rgba(45,212,168,0.12) 0%, rgba(45,212,168,0.04) 40%, transparent 60%);
    pointer-events: none;
}
.cta-section-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.cta-section h2 { font-size: 44px; color: white; margin-bottom: 20px; }
.cta-section p { font-size: 19px; margin-bottom: 40px; opacity: 0.75; line-height: 1.7; }

/* ── SHARED COMPARISON STYLES ── */
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.comparison-card {
    padding: 40px 36px; border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.comparison-card.traditional,
.comparison-card.old { background: #fff; }
.comparison-card.herd {
    background: linear-gradient(135deg, rgba(45,212,168,0.04), rgba(45,212,168,0.1));
    border-color: var(--teal-dim);
}
.comparison-card h3 { font-size: 22px; margin-bottom: 24px; font-weight: 600; }
.comparison-card.herd h3 { color: var(--teal-dim); }
.comparison-list { list-style: none; }
.comparison-list li {
    padding: 12px 0 12px 32px; position: relative;
    color: var(--text-secondary); font-size: 15px; line-height: 1.6;
    border-bottom: 1px solid var(--border);
}
.comparison-list li:last-child { border-bottom: none; }
.comparison-list li::before {
    content: ''; position: absolute; left: 0; top: 17px;
    width: 18px; height: 18px; border-radius: 50%;
}
.traditional .comparison-list li::before,
.old .comparison-list li::before {
    background: rgba(154,149,137,0.15); border: 2px solid var(--warm-gray);
}
.herd .comparison-list li::before { background: var(--teal-dim); }
.herd .comparison-list li::after {
    content: ''; position: absolute; left: 4px; top: 22px;
    width: 10px; height: 5px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
}

/* ── SHARED FEATURE BLOCK ── */
.feature-block {
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
    align-items: center; padding: 80px 0;
    border-bottom: 1px solid var(--border);
}
.feature-block:last-child { border-bottom: none; }
.feature-block.reverse .feature-text,
.feature-block.reverse .feature-block-content { order: 2; }
.feature-block.reverse .feature-visual,
.feature-block.reverse .feature-block-visual { order: 1; }

/* ── SHARED ANIMATIONS ── */
@keyframes fadeInUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ── FOOTER ── */
.footer { background: #000; color: white; padding: 60px 0 30px; border-top: none; }
.footer-content {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px; margin-bottom: 40px;
}
.footer-logo { height: 28px; width: auto; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { opacity: 0.7; line-height: 1.7; font-size: 14px; color: #fff; }
.footer-links h4 {
    font-size: 13px; margin-bottom: 16px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; color: #fff;
}
.footer-links ul { list-style: none; }
.footer-links a {
    color: rgba(255,255,255,0.8); text-decoration: none; display: block;
    padding: 5px 0; transition: all 0.2s ease; font-size: 14px;
}
.footer-links a:hover { color: white; }
.footer-bottom {
    text-align: center; padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6; font-size: 13px; color: #fff;
}
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.footer-social a { color: rgba(255,255,255,0.7); transition: color 0.2s ease; }
.footer-social a:hover { color: #fff; }

/* ── SCROLL FADE ── */
.scroll-fade { opacity: 0; transform: translateY(20px); transition: all 0.6s ease-out; }
.scroll-fade.visible { opacity: 1; transform: translateY(0); }

/* ── RESPONSIVE — SHARED BREAKPOINTS ── */
@media (max-width: 968px) {
    .comparison-grid { grid-template-columns: 1fr; }
    .feature-block { grid-template-columns: 1fr; gap: 40px; }
    .feature-block.reverse .feature-text,
    .feature-block.reverse .feature-block-content { order: 1; }
    .feature-block.reverse .feature-visual,
    .feature-block.reverse .feature-block-visual { order: 2; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .mobile-menu-btn { display: block; }
    .mobile-menu { display: block; }
    .section h2 { font-size: 32px; }
    .cta-group { flex-direction: column; align-items: center; }
    .footer-content { grid-template-columns: 1fr; gap: 40px; }
    .container { padding: 0 20px; }
}
