/*
 * .gp-nav — two-tier site nav for the Performance design.
 *
 * Tier 1 (utility bar):  thin row, "LEGACY · LIVES · ON" left,
 *                        socials + secondary links + SIGN IN right
 * Tier 2 (main row):     logo left, primary nav center, gold CTA right
 *
 * Sub-labels under primary nav items render below the link in a
 * smaller mono treatment, fading in on hover. Markup contract:
 *   <li><a data-sublabel="success modules">Workouts</a></li>
 *
 * The active item gets a 2px gold underline + gold color.
 */

/* ── shared header container ─────────────────────────────────────── */
.gp-header {
    background: var(--gp-bg);
    color: var(--gp-text);
    border-bottom: var(--gp-border-w) solid var(--gp-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ── utility bar (top tier) ──────────────────────────────────────── */
.gp-utility {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px var(--gp-page-gutter);
    border-bottom: var(--gp-border-w) solid var(--gp-border);
    font-family: var(--gp-font-mono);
    font-size: var(--gp-fs-meta-sm);
    letter-spacing: var(--gp-ls-meta);
    text-transform: uppercase;
    color: var(--gp-text-dim);
}

/* "LEGACY · LIVES · ON" — brand-line in gold */
.gp-utility__legacy {
    letter-spacing: var(--gp-ls-meta);
    color: var(--gp-gold);
}

.gp-utility__right {
    display: flex;
    align-items: center;
    gap: var(--gp-space-6);
}

.gp-utility__divider {
    width: 1px;
    height: 12px;
    background: var(--gp-border);
}

.gp-utility__links {
    display: flex;
    gap: var(--gp-space-6);
    align-items: center;
}
.gp-utility__links a {
    color: var(--gp-text);   /* white by default */
    text-decoration: none;
    transition: color var(--gp-dur-base) var(--gp-ease-standard);
}
.gp-utility__links a:hover { color: var(--gp-gold); }
.gp-utility__signin { color: var(--gp-gold) !important; }
.gp-utility__signin:hover { color: var(--gp-gold-deep) !important; }

/* Inline social icon row (used here + in footer). Light by default
   in the utility bar; the footer overrides to a dimmer treatment. */
.gp-social {
    display: inline-flex;
    align-items: center;
    gap: var(--gp-space-4);
    color: var(--gp-text);
}
.gp-social a {
    display: inline-flex;
    color: inherit;
    transition: color var(--gp-dur-base) var(--gp-ease-standard);
}
.gp-social a:hover { color: var(--gp-gold); }
.gp-social svg { display: block; }

/* In the footer, social icons sit in a darker context — dim them. */
.gp-footer .gp-social { color: var(--gp-text-dim); }
.gp-footer .gp-social a:hover { color: var(--gp-gold); }

/* ── main row (bottom tier) ──────────────────────────────────────── */
.gp-main-row {
    display: flex;
    align-items: center;
    gap: var(--gp-space-9);
    padding: 10px var(--gp-page-gutter);
}

/* Logo lockup (swoosh + wordmark) */
.gp-logo {
    display: inline-flex;
    align-items: center;
    gap: var(--gp-space-3);
    text-decoration: none;
    flex-shrink: 0;
}
/* The mark is a black-on-transparent PNG (gp_logo.png). Render it via
   CSS mask + currentColor so it tints to brand gold without needing
   per-color exports. */
.gp-logo__swoosh {
    display: inline-block;
    width: 44px;
    height: 30px;
    background-color: var(--gp-gold);
    -webkit-mask-image: url("../../img/gp_logo-gold.png");
            mask-image: url("../../img/gp_logo-gold.png");
    -webkit-mask-size: contain;
            mask-size: contain;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
}
.gp-logo__wordmark {
    font-family: var(--gp-font-display);
    font-size: var(--gp-fs-logo);
    font-weight: 400;
    letter-spacing: 0.06em;
    color: var(--gp-text);
    line-height: 1;
}
.gp-logo__wordmark .gp-logo__accent { color: var(--gp-gold); }

/* Primary nav */
.gp-nav {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
}
.gp-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 36px;
}
.gp-nav__list li { display: flex; }
.gp-nav__link {
    position: relative;
    padding-bottom: 4px;
    font-family: var(--gp-font-display);
    font-size: var(--gp-fs-nav);
    font-weight: 400;
    letter-spacing: var(--gp-ls-nav);
    text-transform: uppercase;
    color: var(--gp-text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    /* Explicit line-height so the body inherited line-height (1.43 from
       Bootstrap on legacy pages, 1.5 from base.css elsewhere) doesn't
       change nav item height between pages. */
    line-height: 1;
    transition:
        color var(--gp-dur-base) var(--gp-ease-standard),
        border-color var(--gp-dur-base) var(--gp-ease-standard);
}
.gp-nav__link:hover { color: var(--gp-gold); border-color: var(--gp-gold); }
.gp-nav__link.is-active { color: var(--gp-gold); border-color: var(--gp-gold); }

/* Sub-label under nav items (data-sublabel attr).
   Always-visible at low opacity; brightens on hover. */
.gp-nav__link[data-sublabel]::after {
    content: attr(data-sublabel);
    display: block;
    margin-top: 4px;
    font-family: var(--gp-font-mono);
    font-size: var(--gp-fs-meta-xs);
    font-weight: 400;
    letter-spacing: var(--gp-ls-meta);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.30);
    /* Same explicit line-height — keeps the sub-label compact on every
       page regardless of body line-height inheritance. */
    line-height: 1.15;
    transition: color var(--gp-dur-base) var(--gp-ease-standard);
}
.gp-nav__link[data-sublabel]:hover::after,
.gp-nav__link.is-active[data-sublabel]::after {
    color: var(--gp-gold);
}

/* CTA on the right */
.gp-main-row__cta {
    flex-shrink: 0;
}

/* ── hamburger button (visible <900px) ────────────────────────────── */
.gp-hamburger {
    display: none;
    background: transparent;
    border: 0;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    margin-left: auto;
}
.gp-hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--gp-text);
    transition: transform var(--gp-dur-base) var(--gp-ease-out),
                opacity var(--gp-dur-base) var(--gp-ease-out);
}

/* ── full-screen mobile overlay ───────────────────────────────────── */
.gp-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--gp-bg);
    padding: 80px var(--gp-page-gutter) 40px;
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform var(--gp-dur-slow) var(--gp-ease-out);
    display: flex;
    flex-direction: column;
    gap: var(--gp-space-6);
}
.gp-mobile-menu[aria-hidden="false"] {
    transform: translateY(0);
}
.gp-mobile-menu__close {
    position: absolute;
    top: 18px;
    right: 18px;
    background: transparent;
    border: 0;
    color: var(--gp-text);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 6px 12px;
}
.gp-mobile-menu__close:hover { color: var(--gp-gold); }
.gp-mobile-menu__nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.gp-mobile-menu__nav a {
    display: block;
    padding: 16px 0;
    text-decoration: none;
    border-bottom: 1px solid var(--gp-border);
}
.gp-mobile-menu__label {
    display: block;
    font-family: var(--gp-font-display);
    font-size: 28px;
    letter-spacing: var(--gp-ls-display-normal);
    text-transform: uppercase;
    color: var(--gp-text);
    line-height: 1;
}
.gp-mobile-menu__sub {
    display: block;
    margin-top: 6px;
    font-family: var(--gp-font-mono);
    font-size: 11px;
    letter-spacing: var(--gp-ls-meta);
    text-transform: uppercase;
    color: var(--gp-text-muted);
}
.gp-mobile-menu__util {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gp-space-5);
    padding-top: var(--gp-space-3);
    font-family: var(--gp-font-mono);
    font-size: var(--gp-fs-meta-sm);
    letter-spacing: var(--gp-ls-meta);
    text-transform: uppercase;
}
.gp-mobile-menu__util a {
    color: var(--gp-text);
    text-decoration: none;
}
.gp-mobile-menu__util a:hover { color: var(--gp-gold); }
.gp-mobile-menu__signin { color: var(--gp-gold) !important; }
.gp-mobile-menu__cta {
    align-self: flex-start;
}
/* Lock body scroll when overlay open */
body.gp-mobile-open { overflow: hidden; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    /* Drop the gold "Become a Member" CTA before the nav items start
       getting squished against it. Members can still reach signup via
       SIGN IN in the utility bar (links to the same amember flow); the
       hamburger menu shows the CTA again below 900px. */
    .gp-main-row__cta { display: none; }
}

@media (max-width: 1100px) {
    .gp-nav__list { gap: 24px; }
    .gp-utility__right { gap: var(--gp-space-4); }
    .gp-utility__links { gap: var(--gp-space-4); }
}

@media (max-width: 900px) {
    /* Replace inline nav + CTA with the hamburger toggle */
    .gp-nav,
    .gp-main-row__cta { display: none; }
    .gp-hamburger { display: flex; }
    /* Hide utility-bar secondary links; keep brand line + socials + signin */
    .gp-utility__links a:not(.gp-utility__signin),
    .gp-utility__divider { display: none; }
    .gp-utility__legacy { font-size: 10px; }
    .gp-main-row { gap: var(--gp-space-5); padding: 8px var(--gp-page-gutter); }
}

@media (max-width: 480px) {
    .gp-utility { padding: 5px 16px; }
    .gp-main-row { padding: 6px 16px; }
    .gp-utility__right { gap: var(--gp-space-3); }
    .gp-mobile-menu { padding: 70px 24px 32px; }
    .gp-mobile-menu__label { font-size: 24px; }
}
