/**
 * AC Landing Page Nav — styles
 * Shared tokens drive both the desktop sticky bar and the mobile pill.
 * JS toggles .is-mobile to switch presentations.
 */

.ac-lnav {
    /* ---------- Design tokens (overridden by Bricks style controls) ---------- */
    --ac-lnav-bg:           #131346;
    --ac-lnav-accent:       #ec2024;
    --ac-lnav-text:         #ffffff;
    --ac-lnav-cta-bg:       #ec2024;
    --ac-lnav-cta-hover:    #c91a1e;
    --ac-lnav-active:       #ec2024;
    --ac-lnav-bar-align:    flex-end;
    --ac-lnav-bar-height:   64px;
    --ac-lnav-bar-pad-x:    24px;
    --ac-lnav-pill-right:   16px;
    --ac-lnav-pill-bottom:  16px;
    --ac-lnav-z:            9999;

    font-family: inherit;
}

/* =================================================================
   DESKTOP STICKY BAR
   ================================================================= */

.ac-lnav__bar {
    position: fixed;
    left: 0;
    right: 0;
    z-index: var(--ac-lnav-z);
    background: var(--ac-lnav-bg);
    color: var(--ac-lnav-text);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transform: translateY(-110%);         /* Hidden above viewport initially */
    transition: transform 280ms cubic-bezier(0.2, 0.9, 0.3, 1.1),
                opacity 200ms ease;
    opacity: 0;
    pointer-events: none;
}

/* Top vs bottom positioning */
.ac-lnav--bar-top .ac-lnav__bar    { top: 0; }
.ac-lnav--bar-bottom .ac-lnav__bar {
    bottom: 0;
    top: auto;
    transform: translateY(110%);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

/* Slide in once scrolled past threshold */
.ac-lnav.is-visible .ac-lnav__bar {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ac-lnav__bar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: var(--ac-lnav-bar-height);
    padding: 12px var(--ac-lnav-bar-pad-x);
    max-width: 1400px;
    margin: 0 auto;
}

.ac-lnav__bar-title {
    flex-shrink: 0;
    margin-right: auto;                    /* Pushes nav list to the right */
    color: var(--ac-lnav-text);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ac-lnav__bar-list {
    display: flex;
    align-items: center;
    justify-content: var(--ac-lnav-bar-align);
    flex-wrap: wrap;
    flex: 1;
    gap: 12px;                             /* Breathing room between pills */
    margin: 0;
    padding: 0;
    list-style: none;
}

.ac-lnav__bar-item { margin: 0; }

/* ---------- Pill-style link ---------- */
.ac-lnav__bar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;                      /* WCAG 2.5.5 tap target */
    padding: 12px 32px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: var(--ac-lnav-text);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    transition: background 150ms ease,
                border-color 150ms ease,
                color 150ms ease;
}

.ac-lnav__bar-link:hover,
.ac-lnav__bar-link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--ac-lnav-text);
    outline: none;
}

/* Active (scrollspy) — filled pill in accent colour, white text */
.ac-lnav__bar-link.is-active {
    background: var(--ac-lnav-active);
    border-color: var(--ac-lnav-active);
    color: var(--ac-lnav-text);
}
.ac-lnav__bar-link.is-active::after { display: none; }

/* ---------- CTA pill — always red with white text ---------- */
.ac-lnav__bar-link--cta,
.ac-lnav__bar-link--cta:link,
.ac-lnav__bar-link--cta:visited {
    background: var(--ac-lnav-cta-bg);
    border-color: var(--ac-lnav-cta-bg);
    color: var(--ac-lnav-text) !important; /* Lock white text against theme :visited rules */
}

.ac-lnav__bar-link--cta:hover,
.ac-lnav__bar-link--cta:focus-visible,
.ac-lnav__bar-link--cta.is-active {
    background: var(--ac-lnav-cta-hover);
    border-color: var(--ac-lnav-cta-hover);
    color: var(--ac-lnav-text) !important;
}

/* =================================================================
   MOBILE PILL (hidden by default; JS adds .is-mobile on narrow viewports)
   ================================================================= */

.ac-lnav__pill {
    position: fixed;
    right: var(--ac-lnav-pill-right);
    bottom: var(--ac-lnav-pill-bottom);
    z-index: var(--ac-lnav-z);
    display: none;
    pointer-events: none;
}

.ac-lnav.is-mobile .ac-lnav__pill  { display: block; }
.ac-lnav.is-mobile .ac-lnav__bar   { display: none; }
.ac-lnav.is-visible .ac-lnav__pill { pointer-events: auto; }

/* Toggle button */
.ac-lnav__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;                      /* WCAG 2.5.5 tap target */
    padding: 12px 20px;
    background: var(--ac-lnav-bg);
    color: var(--ac-lnav-text);
    border: 2px solid var(--ac-lnav-accent);
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(20px) scale(0.92);
    transition: opacity 200ms ease,
                transform 260ms cubic-bezier(0.2, 0.9, 0.3, 1.1),
                background 150ms ease;
}

.ac-lnav.is-visible .ac-lnav__toggle {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ac-lnav__toggle:focus-visible {
    outline: 2px solid var(--ac-lnav-text);
    outline-offset: 2px;
}

.ac-lnav__chev {
    display: inline-block;
    width: 8px; height: 8px;
    margin-left: 2px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 200ms ease;
}

.ac-lnav[data-acmn-state="open"] .ac-lnav__chev {
    transform: rotate(135deg);
}

/* Pill menu popover */
.ac-lnav__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 220px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--ac-lnav-bg);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(10px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 180ms ease,
                transform 220ms cubic-bezier(0.2, 0.9, 0.3, 1.1);
    pointer-events: none;
    visibility: hidden;
}

.ac-lnav[data-acmn-state="open"] .ac-lnav__menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    visibility: visible;
}

.ac-lnav__link {
    display: block;
    padding: 14px 18px;
    color: var(--ac-lnav-text);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: background 150ms ease, color 150ms ease;
}
.ac-lnav__link:hover,
.ac-lnav__link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

.ac-lnav__link.is-active {
    color: var(--ac-lnav-active);
    background: rgba(255, 255, 255, 0.08);
}

/* Mobile CTA — always white text */
.ac-lnav__link--cta,
.ac-lnav__link--cta:link,
.ac-lnav__link--cta:visited {
    margin-top: 6px;
    background: var(--ac-lnav-cta-bg);
    color: var(--ac-lnav-text) !important;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ac-lnav__link--cta:hover,
.ac-lnav__link--cta:focus-visible {
    background: var(--ac-lnav-cta-hover);
    color: var(--ac-lnav-text) !important;
}
.ac-lnav__link--cta.is-active { color: var(--ac-lnav-text) !important; }

.ac-lnav__empty {
    display: block;
    padding: 14px 18px;
    color: var(--ac-lnav-text);
    opacity: 0.7;
    font-style: italic;
    font-size: 14px;
    list-style: none;
}

/* =================================================================
   Accessibility & builder safety
   ================================================================= */

@media (prefers-reduced-motion: reduce) {
    .ac-lnav__bar,
    .ac-lnav__toggle,
    .ac-lnav__menu,
    .ac-lnav__chev { transition: none; }
}

/* Always visible inside Bricks' builder canvas so editors can click it */
.bricks-is-builder .ac-lnav__bar {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}
.bricks-is-builder .ac-lnav__pill {
    position: relative;
    right: auto; bottom: auto;
    display: inline-block;
    margin-top: 12px;
    pointer-events: auto;
}
.bricks-is-builder .ac-lnav__toggle {
    opacity: 1;
    transform: none;
}