/* ============================================================
   Site navigation (.pnav) — lifted verbatim from premium.css so a page
   can carry the shared navbar without loading the whole design system
   (premium.css also redefines .shell / .section / .eyebrow, which would
   collide with a page that has its own styles).

   The tokens the nav needs are scoped to .pnav itself, so they cannot
   leak into the host page's own :root variables.

   Keep in sync with premium.css if the navbar there changes.
   ============================================================ */

.pnav {
    --line:          rgba(255, 255, 255, 0.085);
    --surface-hover: rgba(255, 255, 255, 0.055);
    --text:          #F4F5F7;
    --text-dim:      #B4BAC6;
    --text-muted:    #7F8797;
    --accent:        #7C8CF8;
    --accent-soft:   #A9B4FF;
    --radius:        14px;
    --shell:         1240px;
    --ease:          cubic-bezier(0.22, 1, 0.36, 1);
    --font-body:     'Inter', system-ui, -apple-system, sans-serif;
    --font-display:  'Inter', system-ui, -apple-system, sans-serif;
}

.pnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 9, 11, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* The ads pages keep their light body, so the nav needs a solid dark plate
   there instead of the translucent one that assumes an obsidian page. */
html:not(.theme-dark) .pnav {
    background: #0B0C10;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

html:not(.theme-dark) .pnav__mobile { background: #0B0C10; }

.pnav__inner {
    max-width: var(--shell);
    margin-inline: auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.pnav__brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    flex-shrink: 0;
}

/* The mark is lit, not outlined — a glowing cube on an accent plate, with a
   halo behind it so it reads instantly against the dark bar. */
.pnav__mark {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #8e9bff 0%, #6b7bf0 45%, #3f4dc4 100%);
    box-shadow:
        0 0 0 1px rgba(169, 180, 255, 0.5),
        0 0 22px -2px rgba(124, 140, 248, 0.75),
        0 6px 18px -6px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transition: box-shadow 0.4s var(--ease), transform 0.6s var(--ease);
}

/* Pulsing halo */
.pnav__mark::after {
    content: '';
    position: absolute;
    inset: -9px;
    border-radius: 18px;
    background: radial-gradient(circle, rgba(124, 140, 248, 0.85), transparent 68%);
    opacity: 0.9;
    z-index: -1;
    animation: mark-pulse 2.4s ease-in-out infinite;
}

@keyframes mark-pulse {
    0%, 100% { opacity: 0.5; transform: scale(0.95); }
    50%      { opacity: 1;   transform: scale(1.25); }
}

/* A light sweeps across the mark — an unmistakable "powered on" cue rather
   than a static glow. */
.pnav__mark::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    background: linear-gradient(105deg,
        transparent 30%,
        rgba(255, 255, 255, 0.85) 48%,
        transparent 66%);
    background-size: 260% 100%;
    background-position: 180% 0;
    animation: mark-sweep 3.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mark-sweep {
    0%, 55%  { background-position: 180% 0; }
    85%, 100% { background-position: -80% 0; }
}

/* The real brand lockup (mark + wordmark in one asset). It replaces the
   built mark/word pair, so it carries its own sizing and hover lift. */
.pnav__logo {
    height: 34px;
    width: auto;
    display: block;
    transition: opacity .35s var(--ease), transform .6s var(--ease);
}

.pnav__brand:hover .pnav__logo {
    opacity: .88;
    transform: translateY(-1px);
}

.pfoot .pnav__logo { height: 30px; }

@media (max-width: 640px) {
    .pnav__logo { height: 29px; }
}

/* The wordmark lights with it */
.pnav__brand .pnav__word {
    background: linear-gradient(100deg, #FFFFFF 0%, #FFFFFF 38%, #A9B4FF 50%, #FFFFFF 62%, #FFFFFF 100%);
    background-size: 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: word-sweep 3.6s ease-in-out infinite;
}

@keyframes word-sweep {
    0%, 55%   { background-position: 180% 0; }
    85%, 100% { background-position: -60% 0; }
}

.pnav__mark svg {
    width: 21px;
    height: 21px;
    stroke: #FFFFFF !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.pnav__brand:hover .pnav__mark {
    transform: rotate(-90deg) scale(1.06);
    box-shadow:
        0 0 0 1px rgba(199, 207, 255, 0.8),
        0 0 34px 0 rgba(124, 140, 248, 0.95),
        0 6px 20px -6px rgba(0, 0, 0, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.pnav__word {
    font-family: var(--font-display);
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #FFFFFF;
}

@media (prefers-reduced-motion: reduce) {
    .pnav__mark::after { animation: none; opacity: 0.8; }
    .pnav__mark::before,
    .pnav__brand .pnav__word { animation: none; }
    .pnav__brand .pnav__word { -webkit-text-fill-color: #FFFFFF; }
}

.pnav__links {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

@media (min-width: 1024px) {
    .pnav__links { display: flex; }
    .pnav__burger { display: none !important; }
}

.pnav__link {
    position: relative;
    padding: 9px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 9px;
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
    white-space: nowrap;
}

.pnav__link:hover,
.pnav__link[aria-current="page"] {
    color: var(--text);
    background: var(--surface-hover);
}

.pnav__link[aria-current="page"]::after {
    content: '';
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 1px;
    background: var(--accent);
}

/* Services dropdown */
.pnav__drop { position: relative; }

.pnav__panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: 320px;
    padding: 8px;
    background: rgba(14, 16, 21, 0.96);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.pnav__drop:hover .pnav__panel,
.pnav__drop:focus-within .pnav__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.pnav__item {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-dim);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.pnav__item:hover { background: var(--surface-hover); color: var(--text); }

.pnav__item i {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    color: var(--accent-soft);
    flex-shrink: 0;
}

.pnav__item b { display: block; font-size: 0.85rem; font-weight: 600; }
.pnav__item span { display: block; font-size: 0.72rem; color: var(--text-muted); }

.pnav__burger {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.pnav__mobile {
    display: none;
    padding: 10px 24px 22px;
    border-top: 1px solid var(--line);
    background: rgba(8, 9, 11, 0.98);
}

.pnav__mobile.is-open { display: block; }

.pnav__mobile a {
    display: block;
    padding: 13px 4px;
    font-size: 0.95rem;
    color: var(--text-dim);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.pnav__mobile a:last-of-type { border-bottom: 0; }
.pnav__mobile a:hover { color: var(--text); }

.tag-new {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 7px;
    font-family: var(--font-body);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-soft);
    border: 1px solid rgba(124, 140, 248, 0.4);
    border-radius: 20px;
    vertical-align: middle;
}

/* `.pnav__mobile a` above sets a dim link colour, which also caught the
   primary button inside the sheet and left its label barely readable. */
.pnav__mobile a.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #FFFFFF;
    border-bottom: 0;
    padding: 14px 20px;
    text-align: center;
}

.pnav__mobile a.btn:hover { color: #FFFFFF; }
