/*
 * nav-footer.css — incremental additions on top of app.css.
 *
 * All values use the existing design tokens defined in app.css (:root).
 * This file does NOT redefine base .vp-header or .vp-footer rules already
 * in app.css — it only adds new modifiers, components, and the rich footer
 * grid that replaces the minimal single-line footer from before.
 *
 * Load order: app.css → nav-footer.css (declared in functions.php).
 */

/* ── Header: per-page background image modifier ──────────────────────── */
.vp-header--has-bg {
    /* Image comes from the inline style attribute set in header.php.
       We clear the frosted-glass bg so the image shows through cleanly,
       then restore the dark tint via ::before instead. */
    background-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.vp-header--has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}
.vp-header--has-bg .vp-header-inner {
    position: relative;
    z-index: 1;
}

/* ── Account button ──────────────────────────────────────────────────── */
.vp-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}
.vp-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: transparent;
    border: 1px solid var(--vp-line-strong);
    border-radius: 2px;
    color: var(--vp-text-dim);
    cursor: pointer;
    padding: 7px 12px;
    font-family: var(--vp-font-mono);
    font-size: 12px;
    letter-spacing: 0.4px;
    transition: color 0.2s var(--vp-ease), border-color 0.2s var(--vp-ease);
}
.vp-account-btn:hover {
    color: var(--vp-white);
    border-color: var(--vp-white);
}
@media (max-width: 900px) {
    .vp-account-label { display: none; }
    .vp-account-btn   { border: none; padding: 6px; }
}

.vp-account-menu {
    background: var(--vp-surface);
    border: 1px solid var(--vp-line-strong);
    border-radius: 4px;
    padding: 6px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.vp-account-menu-logout {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--vp-text-dim);
    font-family: var(--vp-font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: left;
    cursor: pointer;
    border-radius: 2px;
}
.vp-account-menu-logout:hover {
    color: var(--vp-white);
    background: var(--vp-surface-raised);
}

/* ── Navigation: top-level menu class ───────────────────────────────── */
/*
 * .vp-menu is the class passed as menu_class to wp_nav_menu().
 * The base layout (display:flex, gap, link colours) is already handled
 * by .vp-nav ul / .vp-nav a in app.css. We only add what's new here:
 * relative positioning for dropdown anchoring, and sub-menu overrides
 * to prevent the flex row layout from leaking into nested lists.
 */
.vp-nav .vp-menu > li {
    position: relative;
}

/* Sub-menu: vertical dropdown panel */
.vp-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 220px;
    /* Override the flex-row layout the parent .vp-nav ul rule sets */
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--vp-bg-alt);
    border: 1px solid var(--vp-line);
    box-shadow: 0 12px 28px rgba(0,0,0,0.45);
    border-radius: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s var(--vp-ease),
                transform 0.15s var(--vp-ease),
                visibility 0.15s;
    z-index: 160;
}
/* Open via CSS :hover on desktop */
.vp-nav .vp-menu li.menu-item-has-children:hover > .sub-menu,
.vp-nav .vp-menu li.menu-item-has-children.is-open  > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.vp-nav .sub-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 13px;
    color: var(--vp-text-dim);
    text-decoration: none;
    white-space: nowrap;
    font-family: var(--vp-font-body);
    transition: color 0.2s var(--vp-ease), background 0.2s var(--vp-ease);
}
.vp-nav .sub-menu a:hover {
    color: var(--vp-white);
    background: rgba(255,255,255,0.04);
}
/* Chevron indicator on parent items */
.vp-nav .vp-menu li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 5px;
    margin-top: -3px;
    vertical-align: middle;
}
/* Hide sub-menus inside the mobile slide-in panel (handled by drawer) */
@media (max-width: 900px) {
    .vp-nav .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: transparent;
        padding: 4px 0 4px 16px;
        display: none;
    }
    .vp-nav .vp-menu li.menu-item-has-children.is-open > .sub-menu {
        display: flex;
    }
    .vp-nav .sub-menu a {
        font-size: 14px;
        padding: 8px 0;
    }
    .vp-nav .vp-menu li.menu-item-has-children > a::after {
        float: right;
        margin-top: 6px;
    }
}

/* ── Footer: 3-column grid layout ───────────────────────────────────── */
/*
 * Replaces the single-line footer from app.css. The base .vp-footer rule
 * in app.css (border-top, padding, margin-top) is intentionally left —
 * the grid adds its own internal padding so the outer spacing stays correct.
 */
.vp-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding: 56px 0 40px;
}
@media (max-width: 782px) {
    .vp-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

/* Footer background image modifier */
.vp-footer--has-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.vp-footer--has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(8,8,10,0.88);
    pointer-events: none;
}
.vp-footer--has-bg .vp-footer-grid,
.vp-footer--has-bg .vp-footer-bottom {
    position: relative;
    z-index: 1;
}

/* Column: Brand */
.vp-footer-logo {
    display: inline-block;
    font-family: var(--vp-font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--vp-white);
    text-decoration: none;
    margin-bottom: 14px;
}
.vp-footer-desc {
    color: var(--vp-text-dim);
    font-size: 14px;
    line-height: 1.7;
    max-width: 40ch;
    margin: 0 0 18px;
}
.vp-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.vp-social-link {
    color: var(--vp-text-faint);
    text-decoration: none;
    font-size: 12px;
    font-family: var(--vp-font-mono);
    letter-spacing: 0.4px;
    transition: color 0.2s var(--vp-ease);
}
.vp-social-link:hover { color: var(--vp-white); }

/* Column: Services + Contact shared heading */
.vp-footer-heading {
    font-family: var(--vp-font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--vp-text-faint);
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--vp-line);
}

/* Footer services nav */
.vp-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.vp-footer-links a {
    color: var(--vp-text-dim);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s var(--vp-ease);
}
.vp-footer-links a:hover { color: var(--vp-white); }

/* Contact column */
.vp-footer-contact-line {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--vp-text-dim);
}
.vp-footer-contact-line a {
    color: var(--vp-text-dim);
    text-decoration: none;
    transition: color 0.2s var(--vp-ease);
}
.vp-footer-contact-line a:hover { color: var(--vp-white); }

/* Bottom legal bar */
.vp-footer-bottom {
    border-top: 1px solid var(--vp-line);
}
.vp-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
}
.vp-footer-legal-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.vp-footer-legal-links a {
    color: var(--vp-text-faint);
    text-decoration: none;
    font-family: var(--vp-font-mono);
    font-size: 11px;
    letter-spacing: 0.3px;
    transition: color 0.2s var(--vp-ease);
}
.vp-footer-legal-links a:hover { color: var(--vp-text); }

/* ── Hero inline link (used on hub pages where the card is already <a>) ── */
/* Distinct from .vp-hero-card-cta: this is used when the card itself is
   not the clickable element — purely a visual arrow nudge. */
.vp-hero-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--vp-white);
    font-size: 13px;
    font-family: var(--vp-font-mono);
    letter-spacing: 0.3px;
    text-decoration: none;
}
.vp-hero-inline-link .arrow { transition: transform 0.3s var(--vp-ease); }
.vp-hero-card a:hover .vp-hero-inline-link .arrow,
.vp-hero-card:hover     .vp-hero-inline-link .arrow { transform: translateX(4px); }

@media (prefers-reduced-motion: reduce) {
    .vp-header--has-bg,
    .vp-footer--has-bg { transition: none; }
    .vp-nav .sub-menu  { transition: none; }
    .vp-account-btn    { transition: none; }
}

/* ── Homepage: full-bleed main hero ──────────────────────────────────── */
/*
 * The main hero sits above the 3-card stack. It supports an optional
 * background image (set in Appearance > Theme Images → Homepage Hero —
 * Main Background). Without one, it renders as a solid dark surface.
 *
 * Colours: 100% monochrome, using the same --vp-* tokens as the rest of
 * the theme. The user's reference used a gold accent (#c9974d) — replaced
 * here with var(--vp-white) to stay true to the premium monochrome system.
 * The .vp-btn-solid rule in app.css (white bg, dark text) is NOT redefined.
 */
.vp-hero-main {
    background: var(--vp-bg-alt);
    padding: 100px 0 56px;
}
.vp-hero-main--has-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.vp-hero-main--has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(170deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.78) 100%);
    pointer-events: none;
}
.vp-hero-main-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
}
.vp-hero-eyebrow {
    display: block;
    font-family: var(--vp-font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--vp-text-faint);
    margin-bottom: 18px;
}
.vp-hero-heading {
    font-family: var(--vp-font-display);
    font-size: clamp(34px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.1;
    color: var(--vp-white);
    margin: 0 0 20px;
}
.vp-hero-sub {
    font-size: 16px;
    line-height: 1.7;
    color: var(--vp-text-dim);
    max-width: 52ch;
    margin: 0 0 32px;
}
.vp-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}
/* Secondary CTA: white-bordered outline against a dark/image background */
.vp-btn-outline-light {
    background: transparent;
    color: var(--vp-white);
    border: 1px solid rgba(255,255,255,0.35);
    transition: border-color 0.25s var(--vp-ease), background 0.25s var(--vp-ease);
}
.vp-btn-outline-light:hover {
    border-color: var(--vp-white);
    background: rgba(255,255,255,0.06);
}
.vp-hero-quicklinks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-family: var(--vp-font-mono);
    font-size: 11px;
    letter-spacing: 0.5px;
}
.vp-hero-quicklinks a {
    color: var(--vp-text-dim);
    text-decoration: none;
    transition: color 0.2s var(--vp-ease);
}
.vp-hero-quicklinks a:hover { color: var(--vp-white); }
.vp-hero-quicklinks span    { color: var(--vp-text-faint); }

@media (max-width: 900px) {
    .vp-hero-main         { padding: 72px 0 44px; }
    .vp-hero-main-inner   { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .vp-hero-main--has-bg::before { transition: none; }
    .vp-btn-outline-light         { transition: none; }
}

/* ── Static pages: About, Contact, Terms, Privacy ────────────────────── */
/*
 * Shared layout scaffold for simple text-heavy pages.
 * All values use the existing --vp-* dark-theme tokens.
 */
.vp-static-page {
    padding: 64px 0 96px;
}
.vp-static-page--narrow {
    max-width: 760px;
}
.vp-static-page-head {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--vp-line);
}
.vp-static-page-head h1 {
    font-family: var(--vp-font-display);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 600;
    color: var(--vp-white);
    margin: 8px 0 12px;
    line-height: 1.2;
}
.vp-static-page-eyebrow {
    font-family: var(--vp-font-mono);
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--vp-text-faint);
}
.vp-static-page-updated {
    font-family: var(--vp-font-mono);
    font-size: 12px;
    color: var(--vp-text-faint);
    margin-top: 6px;
}
.vp-static-page-body h2 {
    font-family: var(--vp-font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--vp-white);
    margin: 40px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--vp-line);
}
.vp-static-page-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--vp-text);
    margin: 24px 0 10px;
}
.vp-static-page-body p,
.vp-static-page-body li {
    color: var(--vp-text-dim);
    font-size: 15px;
    line-height: 1.75;
}
.vp-static-page-body ul,
.vp-static-page-body ol {
    padding-left: 20px;
    margin-bottom: 16px;
}
.vp-static-page-body a {
    color: var(--vp-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s var(--vp-ease);
}
.vp-static-page-body a:hover { color: var(--vp-white); }

/* Contact page two-column layout */
.vp-contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: start;
}
@media (max-width: 782px) {
    .vp-contact-grid { grid-template-columns: 1fr; }
}
.vp-contact-block {
    margin-bottom: 28px;
}
.vp-contact-block h3 {
    font-family: var(--vp-font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--vp-text-faint);
    margin-bottom: 8px;
}
.vp-contact-block p,
.vp-contact-block a {
    color: var(--vp-text-dim);
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s var(--vp-ease);
}
.vp-contact-block a:hover { color: var(--vp-white); }
.vp-contact-note {
    background: var(--vp-surface);
    border: 1px solid var(--vp-line);
    border-radius: 3px;
    padding: 20px 22px;
    font-size: 14px;
    color: var(--vp-text-dim);
    line-height: 1.6;
}
