/**
 * Page-specific styles for templates/template-tools.php.
 *
 * Extracted verbatim from the inline <style> block in the template
 * (it was previously re-emitted on every page-view and never HTTP-cached).
 * The matching enqueue is in functions.php under the bv-tools-page handle.
 */

/* ==========================================================================
   TOOLS PAGE — v4.0 Editorial Premium
   ========================================================================== */

.bv-toolsv4 {
    background: var(--bv-dark-bg);
    color: var(--bv-dark-text);
    overflow-x: hidden;
}

.bv-toolsv4-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====== HERO ====== */
.bv-toolsv4-hero {
    position: relative;
    padding: var(--bv-hero-pad-top) 0 var(--bv-hero-pad-bottom);
    isolation: isolate;
    overflow: hidden;
}

.bv-toolsv4-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 60% at 80% 30%, rgba(8, 145, 178, 0.16) 0%, transparent 60%),
        radial-gradient(60% 60% at 20% 80%, rgba(201, 169, 97, 0.10) 0%, transparent 60%);
}

.bv-toolsv4-hero-grid {
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(80% 80% at 50% 30%, #000 30%, transparent 80%);
}

.bv-toolsv4-hero-eyebrow {
    font-family: var(--bv-font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--bv-gold);
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 28px;
}

.bv-toolsv4-hero-eyebrow::before {
    content: '';
    width: 32px;
    height: 1px;
    background: currentColor;
}

.bv-toolsv4-hero h1 {
    font-family: var(--bv-font-editorial);
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.95;
    letter-spacing: -0.025em;
    margin: 0 0 28px;
    color: #fff;
    max-width: 18ch;
}

.bv-toolsv4-hero h1 em {
    font-style: italic;
    color: var(--bv-gold);
    font-weight: 500;
}

.bv-toolsv4-hero-sub {
    max-width: 600px;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.72);
    margin: 0;
}

/* ====== STICKY CATEGORY NAV ====== */
.bv-toolsv4-nav {
    position: sticky;
    top: 64px;
    z-index: 30;
    background: rgba(10, 10, 11, 0.78);
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    margin: 0 0 clamp(60px, 8vw, 100px);
}

body.admin-bar .bv-toolsv4-nav { top: 96px; }
@media screen and (max-width: 782px) {
    body.admin-bar .bv-toolsv4-nav { top: 110px; }
}

.bv-toolsv4-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bv-toolsv4-nav-inner::-webkit-scrollbar { display: none; }

.bv-toolsv4-nav-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px;
    color: rgba(255,255,255,0.55);
    font-family: var(--bv-font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.3s var(--bv-ease), border-color 0.3s var(--bv-ease);
}

.bv-toolsv4-nav-link svg { width: 14px; height: 14px; }

.bv-toolsv4-nav-link:hover { color: #fff; }

.bv-toolsv4-nav-link.is-active {
    color: var(--bv-gold);
    border-bottom-color: var(--bv-gold);
}

/* ====== SECTION HEADERS ====== */
.bv-toolsv4-section {
    padding: var(--bv-section-y) 0;
    position: relative;
}

/* Adjacent sibling sections share air via the border, not extra padding */
.bv-toolsv4-section + .bv-toolsv4-section {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: var(--bv-section-y);
}

.bv-toolsv4-section-header {
    margin-bottom: 56px;
    max-width: 760px;
}

.bv-toolsv4-eyebrow {
    font-family: var(--bv-font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.bv-toolsv4-eyebrow::before {
    content: '';
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
}

.bv-toolsv4-eyebrow.cat-wealth       { color: var(--bv-cat-wealth); }
.bv-toolsv4-eyebrow.cat-health       { color: var(--bv-cat-health); }
.bv-toolsv4-eyebrow.cat-family       { color: var(--bv-cat-family); }
.bv-toolsv4-eyebrow.cat-professional { color: var(--bv-cat-professional); }

.bv-toolsv4-section-title {
    font-family: var(--bv-font-editorial);
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 18px;
    color: #fff;
}

.bv-toolsv4-section-title em {
    font-style: italic;
    color: var(--bv-gold);
}

.bv-toolsv4-section-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
    margin: 0;
    max-width: 56ch;
}

/* ====== PLATFORM CARDS (large) ====== */
.bv-toolsv4-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 24px;
    margin-bottom: 56px;
}

.bv-toolsv4-platform {
    position: relative;
    padding: 40px;
    border-radius: 22px;
    background: linear-gradient(160deg, #18181c 0%, #0e0e11 100%);
    border: 1px solid rgba(255,255,255,0.07);
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.45s var(--bv-ease), border-color 0.4s var(--bv-ease), box-shadow 0.45s var(--bv-ease);
}

.bv-toolsv4-platform:not(a) { /* ParentPod is wrapped non-link due to nested links */ }

.bv-toolsv4-platform::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 100% at 100% 0%, var(--platform-glow, rgba(8,145,178,0.16)) 0%, transparent 55%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.bv-toolsv4-platform > * { position: relative; z-index: 1; }

.bv-toolsv4-platform:hover {
    transform: translateY(-4px);
    border-color: var(--platform-color, var(--bv-gold));
    box-shadow: 0 32px 70px -32px rgba(0,0,0,0.6);
}

.bv-toolsv4-platform-tag {
    font-family: var(--bv-font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--platform-color, var(--bv-gold));
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
}

.bv-toolsv4-platform-tag::before {
    content: '';
    width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

.bv-toolsv4-platform-name {
    font-family: var(--bv-font-editorial);
    font-weight: 500;
    font-size: clamp(1.8rem, 2.6vw, 2.4rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
    color: #fff;
}

.bv-toolsv4-platform-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
    margin: 0 0 28px;
}

.bv-toolsv4-platform-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bv-toolsv4-platform-features li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.45;
    color: rgba(255,255,255,0.78);
}

.bv-toolsv4-platform-features svg {
    width: 16px;
    height: 16px;
    color: var(--platform-color, var(--bv-gold));
    flex-shrink: 0;
    margin-top: 3px;
}

.bv-toolsv4-platform-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--platform-color, var(--bv-gold));
    font-family: var(--bv-font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    transition: gap 0.3s var(--bv-ease);
}

.bv-toolsv4-platform:hover .bv-toolsv4-platform-cta { gap: 14px; color: var(--platform-color, var(--bv-gold)); }

.bv-toolsv4-app-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.bv-toolsv4-app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    min-height: 44px;       /* WCAG 2.5.5 target size */
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.92);
    font-family: var(--bv-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.3s var(--bv-ease), border-color 0.3s var(--bv-ease), color 0.3s var(--bv-ease), transform 0.2s var(--bv-ease);
}

.bv-toolsv4-app-link svg { width: 13px; height: 13px; }

.bv-toolsv4-app-link:hover,
.bv-toolsv4-app-link:focus-visible {
    background: var(--bv-gold-subtle);
    border-color: var(--bv-gold-dim);
    color: var(--bv-gold);
}

.bv-toolsv4-app-link:focus-visible {
    outline: 2px solid var(--bv-gold);
    outline-offset: 2px;
}

.bv-toolsv4-app-link:active { transform: scale(0.97); }

/* ====== TOOL CARDS (compact) ====== */
.bv-toolsv4-tools {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.bv-toolsv4-tool {
    display: flex;
    flex-direction: column;
    padding: 28px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    color: #fff;
    transition: transform 0.4s var(--bv-ease), border-color 0.3s var(--bv-ease), background 0.3s var(--bv-ease);
}

.bv-toolsv4-tool:hover {
    transform: translateY(-3px);
    border-color: var(--platform-color, var(--bv-gold));
    background: rgba(255, 255, 255, 0.05);
}

.bv-toolsv4-tool-num {
    font-family: var(--bv-font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: var(--platform-color, var(--bv-gold));
    margin: 0 0 24px;
}

.bv-toolsv4-tool-name {
    font-family: var(--bv-font-editorial);
    font-weight: 500;
    font-size: 1.4rem;
    line-height: 1.15;
    margin: 0 0 10px;
    color: #fff;
}

.bv-toolsv4-tool-desc {
    font-size: 0.92rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.6);
    margin: 0 0 20px;
    flex: 1;
}

.bv-toolsv4-tool-cta {
    font-family: var(--bv-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s var(--bv-ease), color 0.3s var(--bv-ease);
}

.bv-toolsv4-tool:hover .bv-toolsv4-tool-cta { gap: 14px; color: var(--platform-color, var(--bv-gold)); }

/* ====== OUTRO ====== */
.bv-toolsv4-outro {
    padding: var(--bv-section-y) 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.bv-toolsv4-outro-quote {
    max-width: 760px;
    margin: 0 auto 80px;
    text-align: center;
    font-family: var(--bv-font-editorial);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    line-height: 1.4;
    color: #fff;
}

.bv-toolsv4-outro-quote a {
    color: var(--bv-gold);
    border-bottom: 1px solid currentColor;
}

.bv-toolsv4-outro h2 {
    font-family: var(--bv-font-editorial);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-align: center;
    margin: 0 0 12px;
}

.bv-toolsv4-outro h2 em { font-style: italic; color: var(--bv-gold); }

.bv-toolsv4-outro-sub {
    text-align: center;
    color: rgba(255,255,255,0.6);
    margin: 0 auto 40px;
    max-width: 520px;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 700px) {
    .bv-toolsv4-platforms { grid-template-columns: 1fr; }
    .bv-toolsv4-platform { padding: 32px 28px; }
}
