/* ============================================================
   GREENFIELD SITE NAV — standalone copy for /comps
   ------------------------------------------------------------
   SOURCE OF TRUTH in styles.css:
     nav + mobile menu   lines  131-447
     media-kit popup     lines 2277-2324   (media-kit-menu.js)
     follow-us popup     lines 2337-2462   (follow-popup.js)
     plus three nav rules lifted out of shared @media blocks,
     restated at the bottom of this file.

   Verbatim extracts. If the site nav changes in styles.css,
   RE-EXTRACT rather than hand-patching. Same reasoning as
   footer.css: this page carries its own :root and body rules
   and cannot load styles.css.

   Deliberate changes from the source:
     1. The custom properties these blocks need are scoped to
        the nav/popup roots instead of :root.
     2. The nav is always solid here. On the marketing pages it
        starts transparent over a dark hero and gains a
        background on scroll; this page has no hero, so it uses
        the same treatment knowledge.css gives light pages.
     3. .hp-field is NOT repeated — footer.css already carries
        it, and both stylesheets load on this page.
   ============================================================ */

/* ── Element resets the source blocks assume ─────────────────
   styles.css sets these globally (lines 65-68); the nav depends
   on them silently. The host page carries the `a` and `img`
   resets but not `button`, which left .nav-hamburger rendering
   as a browser-default button box on mobile.

   :where() pins each selector to (0,0,1) — exactly the
   specificity of styles.css's bare element rules — so component
   classes such as .fu-popup-submit keep their own backgrounds.
   A plain `.nav button` would be (0,1,1) and would override
   them. */
:where(.nav, .mobile-menu, .mk-popup, .fu-popup) a { text-decoration: none; }
:where(.nav, .mobile-menu, .mk-popup, .fu-popup) button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: var(--font);
}

.nav, .mobile-menu, .mk-popup, .fu-popup {
    --white: #ffffff;
    --gray-200: #c4c4d0;
    --accent-blue: #4a90d9;
    --accent-green: #3dcf8e;
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-pad: clamp(20px, 4vw, 80px);
    --container-max: 1400px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    font-family: var(--font);
}

/* ---------- NAVIGATION ---------- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 var(--container-pad);
    height: 80px;
    display: flex;
    align-items: center;
    transition: background 0.5s, backdrop-filter 0.5s, box-shadow 0.5s, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav.scrolled {
    background: rgba(1, 17, 50, 0.97);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-hidden {
    transform: translateY(-100%);
}

.nav-inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.nav-logo svg {
    width: 156px;
    height: 32px;
    transition: opacity 0.3s;
}

.nav-logo:hover svg {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--gray-200);
    position: relative;
    padding: 4px 0;
    transition: color 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-blue);
    transition: width 0.4s var(--ease-out-expo);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link-active {
    color: var(--white) !important;
    opacity: 1 !important;
}

.nav-link-active::after {
    width: 100% !important;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* CTA Button */
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--white);
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.15), rgba(74, 144, 217, 0.05));
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: 100px;
}

.btn-cta:hover {
    border-color: rgba(74, 144, 217, 0.4);
    transform: translateY(-1px);
}

.btn-cta:hover::before {
    opacity: 1;
}

.btn-cta-icon {
    display: flex;
    transition: transform 0.4s var(--ease-out-expo);
}

.btn-cta:hover .btn-cta-icon {
    transform: translate(2px, -2px);
}

/* ===== Disruptors 60 nav button (accent-blue pill + green "NEW" badge) ===== */
.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    line-height: 1;
    border-radius: 100px;
    border: 1px solid rgba(74, 144, 217, 0.45);
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.18), rgba(74, 144, 217, 0.05));
    color: var(--white) !important;
    position: relative;
    overflow: visible;
    transition: border-color 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.nav-pill::after { display: none; } /* no hover underline on the pill */

.nav-pill:hover {
    border-color: rgba(74, 144, 217, 0.75);
    transform: translateY(-1px);
}

/* Anchor for the badge when the item is NOT a pill (plain text link + badge) */
.nav-has-badge { position: relative; overflow: visible; }

.nav-new-badge {
    /* Sits just AFTER the label like an exponent (x²), not on top of it. The
       nav gap is only 32px (24px under 1200px) and the pill is ~30px, so it
       necessarily reaches into that gap — which is fine because the badge
       floats ABOVE the nav text line and never crosses the neighbour's glyph
       box. Measured: text overlap 24px -> 2px; badge band 19-31 vs Careers
       glyphs 32-48. Do not widen the pill without re-measuring both. */
    position: absolute;
    top: -9px;
    right: -28px;
    font-size: 0.5rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #04140b;
    background: var(--accent-green);
    border-radius: 100px;
    padding: 2px 5px;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Mobile menu: the green "NEW" chip floats to the RIGHT of the label, out of
   flow, so the link is only as wide as "Disruptors 60" — keeping the text
   centred with the other menu items (the badge is the part that hangs right). */
.mobile-has-badge { position: relative; }
.mobile-new-badge {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 14px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #04140b;
    background: var(--accent-green);
    border-radius: 100px;
    padding: 3px 8px;
    line-height: 1;
    white-space: nowrap;
}

/* Hamburger */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 1001;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--white);
    transition: all 0.4s var(--ease-out-expo);
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: #000a1f;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    will-change: opacity;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transition: opacity 0.35s ease, visibility 0s linear 0s;
}

.mobile-menu-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.mobile-menu-link {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--gray-200);
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo), color 0.3s;
    will-change: transform, opacity;
}

.mobile-menu.active .mobile-menu-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-link:hover {
    color: var(--white);
}

.mobile-cta {
    margin-top: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s var(--ease-out-expo), color 0.3s;
    will-change: transform, opacity;
}

.mobile-cta-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    vertical-align: middle;
}

.mobile-menu.active .mobile-cta {
    transform: translateY(0);
    opacity: 1;
}

/* Stagger mobile links — open only */
.mobile-menu.active .mobile-menu-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { transition-delay: 0.08s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { transition-delay: 0.11s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { transition-delay: 0.14s; }
.mobile-menu.active .mobile-menu-link:nth-child(5) { transition-delay: 0.17s; }
.mobile-menu.active .mobile-menu-link:nth-child(6) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-cta { transition-delay: 0.23s; }

/* ========== MEDIA KIT CONTEXT MENU POPUP ========== */
.mk-popup {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.mk-popup.mk-popup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mk-popup-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 12px;
    background: rgba(1, 17, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 196, 162, 0.2);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(6, 196, 162, 0.08);
}

.mk-popup-link:hover {
    border-color: rgba(6, 196, 162, 0.4);
    background: rgba(1, 17, 50, 1);
}

.mk-popup-icon {
    flex-shrink: 0;
    color: rgba(6, 196, 162, 0.8);
}


/* ========== FOLLOW US NEWSLETTER POPUP ========== */
.fu-popup {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    transition: opacity 0.18s ease, transform 0.18s ease;
    width: 300px;
}

.fu-popup.fu-popup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.fu-popup-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    border-radius: 12px;
    background: rgba(1, 17, 50, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(6, 196, 162, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(6, 196, 162, 0.08);
}

.fu-popup-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.3;
    margin: 0;
}

.fu-popup-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fu-popup-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.fu-popup-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.fu-popup-input:focus { border-color: rgba(6, 196, 162, 0.5); }

.fu-popup-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: rgba(6, 196, 162, 0.15);
    color: var(--accent-green);
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.fu-popup-submit:hover { background: rgba(6, 196, 162, 0.25); }

/* Loading state */
.fu-popup-form.is-loading .fu-popup-input,
.fu-popup-form.is-loading .fu-popup-submit {
    opacity: 0.5;
    pointer-events: none;
}

.fu-popup-form.is-loading .fu-popup-submit {
    color: transparent;
    position: relative;
}

.fu-popup-form.is-loading .fu-popup-submit::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(6, 196, 162, 0.3);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: mc-spin 0.6s linear infinite;
}

.fu-popup-feedback {
    display: none;
    font-size: 0.78rem;
    line-height: 1.4;
}

.fu-popup-feedback.fu-feedback-success {
    display: block;
    color: var(--accent-green);
    font-weight: 500;
}

.fu-popup-feedback.fu-feedback-error {
    display: block;
    color: #e8735a;
}

.fu-popup-input:disabled,
.fu-popup-submit:disabled { cursor: not-allowed; }

@media (max-width: 600px) {
    .fu-popup { width: calc(100vw - 40px); max-width: 320px; }
}

/* ── Always-solid nav (see note 2) ───────────────────────────
   Mirrors knowledge.css's treatment for light pages: there is no
   dark hero underneath, so a transparent nav would leave white
   logo and links on a near-white page. */
.nav, .nav.scrolled {
    background: rgba(1, 17, 50, 0.97);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── Mobile menu open ────────────────────────────────────────
   The always-solid nav above is right at rest, but wrong once the
   mobile menu opens: the menu is a full-screen #000a1f overlay at
   z-index 999 and the nav sits above it at 1000, so its lighter
   navy band stays painted across the top and the close icon reads
   as sitting in a box. On the marketing pages the nav is
   transparent at rest, so this never shows.

   nav-scroll.js already toggles body.menu-open — no JS needed. */
body.menu-open .nav,
body.menu-open .nav.scrolled {
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
}

/* Lock the page behind the open menu. The marketing pages get this
   from Lenis (main.js calls lenis.stop()); this page has no Lenis,
   so without it the dashboard scrolls underneath the overlay. */
body.menu-open { overflow: hidden; }

/* ── Clear the fixed nav ─────────────────────────────────────
   .nav is position:fixed at 80px tall, so the dashboard would
   start underneath it. The offset lives here rather than in the
   dashboard's own CSS so the source file stays standalone — it
   has no nav when opened directly from the project folder.
   .sec already carries scroll-margin-top:80px, which matches. */
.wrap { padding-top: calc(80px + clamp(28px, 4vw, 56px)); }

/* ── Nav rules that live inside shared @media blocks in
   styles.css (lines ~2006, ~2124, ~2191) and could not be
   lifted wholesale without dragging unrelated selectors. ── */
@media (max-width: 1200px) {
    .nav-links { gap: 24px; }
    .nav-link { font-size: 0.75rem; }
}
@media (max-width: 1024px) {
    .nav-links { display: none; }
    .nav-hamburger { display: flex; }
}
@media (max-width: 768px) {
    .btn-cta { display: none; }
}
