/* =========================================================
   AVIDITY CAPITAL — Homepage v2 Styles
   Additive stylesheet. Depends on style.css.
   Adds: dropdown nav, resources grid, philosophy section,
   de-emphasized Journey card, Legacy CTA stack.
   ========================================================= */


/* =========================================================
   GLOBAL OVERFLOW SAFEGUARD
   Prevents any rogue absolutely-positioned element on the
   homepage from producing a horizontal scrollbar.
   ========================================================= */
html, body {
    overflow-x: hidden;
}


/* =========================================================
   NAV DROPDOWN
   ========================================================= */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(248, 246, 241, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    transition: color 0.2s;
}

.nav-dropdown-toggle:hover {
    color: #E8C97A;
}

.site-header.scrolled .nav-dropdown-toggle {
    color: #0A1628;
}

.site-header.scrolled .nav-dropdown-toggle:hover {
    color: #C9A84C;
}

.nav-caret {
    font-size: 0.6rem !important;
    transition: transform 0.25s;
}

.nav-dropdown.open .nav-caret {
    transform: rotate(180deg);
}

/*
 * Dropdown menu — uses visibility/pointer-events (NOT display:none/block)
 * so the opacity + translateY CSS transitions actually animate.
 * display:none is not a transitionable property; visibility:hidden is.
 *
 * Open state:   visibility delay = 0s  (appears immediately on open).
 * Closed state: visibility delay = 0.25s (waits for fade-out to finish
 *               before removing the element from pointer events).
 */
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    right: 0;
    min-width: 340px;
    background: #FFFFFF;
    border: 1px solid #EEF0F4;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(7, 30, 51, 0.18);
    padding: 0.75rem 0;
    /* Animatable hidden state */
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0.25s;
    z-index: 100;
}

/*
 * Invisible bridge element fills the 1rem visual gap between the toggle
 * button and the menu panel. Without this, the cursor crossing that gap
 * triggers mouseleave and fires the close timer before reaching the menu.
 * Width is capped at 100% of the menu to avoid any horizontal overflow.
 */
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    width: 100%;
    height: 1rem;
    background: transparent;
    pointer-events: auto;
}

.nav-dropdown.open .nav-dropdown-menu {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
    /* Visibility becomes visible immediately on open */
    transition: opacity 0.25s, transform 0.25s, visibility 0s linear 0s;
}

.nav-dropdown-menu li {
    display: block;
}

.nav-dropdown-menu a {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.75rem 1.5rem;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: inherit !important;
    border-left: 2px solid transparent;
    transition: background 0.2s, border-left-color 0.2s;
}

.nav-dropdown-menu a:hover {
    background: #F8F6F1;
    border-left-color: #C9A84C;
    color: inherit !important;
}

.nav-dropdown-menu a span {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0D3B5E;
    line-height: 1.3;
}

.nav-dropdown-menu a em {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.8rem;
    font-style: italic;
    color: #4A5568;
    font-weight: 400;
    line-height: 1.35;
}


/* =========================================================
   RESOURCES SECTION
   ========================================================= */
.hv2-resources {
    background: #F8F6F1;
}

.hv2-resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

.hv2-resource {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #EEF0F4;
    border-radius: 4px;
    padding: 2rem 2.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    min-height: 280px;
}

.hv2-resource:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(13, 59, 94, 0.12);
    border-color: rgba(201, 168, 76, 0.45);
}

.hv2-resource--featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #0D3B5E 0%, #1A527A 100%);
    border-color: rgba(201, 168, 76, 0.4);
    color: #F8F6F1;
    position: relative;
    overflow: hidden;
}

.hv2-resource--featured::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 90% 20%, rgba(201, 168, 76, 0.15) 0%, transparent 45%);
    pointer-events: none;
}

.hv2-resource--featured > * {
    position: relative;
    z-index: 1;
}

.hv2-resource-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #C9A84C;
    background: transparent;
    padding: 0;
    margin-bottom: 0.85rem;
    align-self: flex-start;
}

.hv2-resource--featured .hv2-resource-tag {
    color: #E8C97A;
}

.hv2-resource-tag--gold {
    color: #C9A84C;
}

.hv2-resource h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #0D3B5E;
    line-height: 1.2;
    margin-bottom: 0.85rem;
}

.hv2-resource--featured h3 {
    color: #FFFFFF;
    font-size: 1.85rem;
}

.hv2-resource p {
    font-size: 0.92rem;
    color: #4A5568;
    line-height: 1.75;
    margin-bottom: 1.5rem;
    flex: 1;
}

.hv2-resource--featured p {
    color: rgba(248, 246, 241, 0.88);
    font-size: 1rem;
}

.hv2-resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #EEF0F4;
    font-size: 0.8rem;
}

.hv2-resource--featured .hv2-resource-meta {
    border-top-color: rgba(201, 168, 76, 0.25);
}

.hv2-resource-meta > span:first-child {
    color: #718096;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.hv2-resource--featured .hv2-resource-meta > span:first-child {
    color: rgba(248, 246, 241, 0.6);
}

.hv2-resource-meta > span:first-child i {
    color: #C9A84C;
    font-size: 0.75rem;
}

.hv2-resource-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #0D3B5E;
    transition: color 0.2s;
}

.hv2-resource--featured .hv2-resource-arrow {
    color: #E8C97A;
}

.hv2-resource-arrow i {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.hv2-resource:hover .hv2-resource-arrow {
    color: #C9A84C;
}

.hv2-resource:hover .hv2-resource-arrow i {
    transform: translateX(3px);
}

/* CTA card (last tile, not a link) */
.hv2-resource--cta {
    background: #FBF7EB;
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-left: 3px solid #C9A84C;
}

.hv2-resource--cta:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

.hv2-resource-btn {
    align-self: flex-start;
    margin-top: auto;
}


/* =========================================================
   LEGACY CTA STACK (two buttons side-by-side)
   ========================================================= */
.hv2-legacy-ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}


/* =========================================================
   INVESTMENT PHILOSOPHY SECTION
   ========================================================= */
.hv2-philosophy {
    background: #FFFFFF;
}

.hv2-philosophy-inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}

.hv2-philosophy-inner .section-title em {
    color: #C9A84C;
}

.hv2-philosophy-body {
    font-size: 1.05rem;
    color: #4A5568;
    line-height: 1.85;
    margin-bottom: 1.25rem;
    text-align: left;
}

.hv2-philosophy-body:last-of-type {
    margin-bottom: 2rem;
}

.hv2-philosophy-body strong {
    color: #0D3B5E;
    font-weight: 600;
}

.hv2-philosophy-pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 2rem;
    background: #F8F6F1;
    border-radius: 4px;
    border-top: 3px solid #C9A84C;
}

.hv2-pp {
    text-align: center;
    padding: 0.5rem;
}

.hv2-pp i {
    font-size: 1.4rem;
    color: #C9A84C;
    margin-bottom: 0.75rem;
    display: block;
}

.hv2-pp h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0D3B5E;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.hv2-pp p {
    font-size: 0.82rem;
    color: #4A5568;
    line-height: 1.6;
}

.hv2-philosophy-cta {
    margin-top: 1rem;
}


/* =========================================================
   AVIDITY JOURNEY — DE-EMPHASIZED CARD
   ========================================================= */
.hv2-journey {
    background: #F8F6F1;
    padding: 4rem 0;
}

.hv2-journey-card {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto;
    background: #FFFFFF;
    border-radius: 4px;
    padding: 3rem;
    box-shadow: 0 2px 20px rgba(13, 59, 94, 0.06);
    border-left: 3px solid #C9A84C;
}

.hv2-journey-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 500;
    color: #0D3B5E;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hv2-journey-title em {
    color: #C9A84C;
    font-style: italic;
}

.hv2-journey-body {
    font-size: 0.97rem;
    color: #4A5568;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.hv2-journey-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.hv2-journey-icon {
    width: 88px;
    height: 88px;
    background: linear-gradient(135deg, #0D3B5E 0%, #1A527A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E8C97A;
    font-size: 2.2rem;
    box-shadow: 0 8px 24px rgba(13, 59, 94, 0.25);
}

.hv2-journey-badge {
    text-align: center;
    padding: 0.9rem 1.75rem;
    background: #F8F6F1;
    border-radius: 100px;
    border: 1px solid #EEF0F4;
}

.hv2-journey-badge span {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #718096;
    margin-bottom: 0.15rem;
}

.hv2-journey-badge strong {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-weight: 500;
    color: #0D3B5E;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .hv2-resource-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hv2-resource--featured {
        grid-column: span 2;
    }

    .hv2-philosophy-pillars {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .hv2-journey-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem;
    }

    .hv2-journey-visual {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hv2-resource-grid {
        grid-template-columns: 1fr;
    }

    .hv2-resource--featured {
        grid-column: span 1;
    }

    .hv2-resource {
        padding: 1.75rem;
        min-height: 0;
    }

    .hv2-philosophy-pillars {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.75rem;
    }

    .hv2-journey-card {
        padding: 2rem;
    }

    /*
     * Mobile nav dropdown — flatten into the hamburger menu's linear list.
     * The toggle button is hidden; links render directly in the nav.
     * Override the visibility/pointer-events hidden state with !important
     * so the menu is always visible inside the open hamburger panel.
     */
    .nav-dropdown-menu {
        position: static;
        visibility: visible !important;
        pointer-events: auto !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        min-width: 0;
        text-align: center;
        margin-top: 1rem;
    }

    /* Bridge pseudo-element not needed in the hamburger panel */
    .nav-dropdown-menu::before {
        display: none;
    }

    .nav-dropdown-toggle {
        display: none;
    }

    .nav-dropdown-menu a {
        padding: 0.5rem 1rem;
        text-align: center;
        align-items: center;
        border-left: none;
    }

    .nav-dropdown-menu a span {
        color: rgba(248, 246, 241, 0.88);
        font-size: 1rem;
    }

    .nav-dropdown-menu a em {
        color: rgba(248, 246, 241, 0.55);
        font-size: 0.8rem;
    }

    .nav-dropdown-menu a:hover {
        background: transparent;
    }

    .nav-dropdown-menu a:hover span {
        color: #C9A84C;
    }

    .hv2-legacy-ctas {
        flex-direction: column;
    }

    .hv2-legacy-ctas .btn {
        width: 100%;
        justify-content: center;
    }
}
