/* Shared site navigation (.pnav) — one nav system for BOTH the homepage
   (BaseLayout) and the sub-pages (PageLayout). Loaded on every page.
   .pnav__links renders as a sibling AFTER <header class="pnav"> (Chrome
   backdrop-filter traps position:fixed children otherwise). */

.pnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad);
  background: rgba(10, 9, 8, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.pnav .logo { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.02em; text-decoration: none; }
.pnav .logo__v { color: var(--orange); }
.pnav__links { display: flex; gap: 1.6rem; }
.pnav__links a { font-weight: 400; font-size: 0.82rem; color: var(--grey); text-decoration: none; letter-spacing: 0.04em; }
.pnav__links a:hover, .pnav__links a[aria-current="page"] { color: var(--paper); }
.pnav__ind { display: none; }
.pnav__burger { display: none; }
.pnav__actions { display: flex; align-items: center; gap: 0.7rem; }
.pnav__phone { display: inline-flex; align-items: center; gap: 0.45rem; }
.pnav__close, .pnav__cta, .pnav__head, .pnav__foot, .pnav__num { display: none; }

/* desktop: float the links as a bar TRULY centred on the viewport (left:50% +
   translateX). The nav only shows in full at >=1220px — wide enough that the
   centred links clear the logo (left) and the phone+CTA (right); below that it
   collapses to the hamburger rather than cramming or drifting off-centre. */
@media (min-width: 1220px) {
  .pnav__links {
    position: fixed;
    inset: 0 auto auto 50%;
    transform: translateX(-50%);
    height: 60px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.45rem, 0.8vw, 1.05rem);
    z-index: 55;
    pointer-events: auto;
    background: transparent;
  }
  .pnav__links a {
    position: relative; z-index: 1;
    padding: 0.5rem 0.85rem;
    font-size: clamp(0.72rem, 0.8vw, 0.82rem);
    white-space: nowrap;
    transition: color 0.25s ease, transform 0.25s ease;
  }
  .pnav__links a:hover { transform: translateY(-1px); }
  /* sliding glow indicator — nav.js glides it to the hovered link, and rests it
     under the section in view (aria-current, set by the main.js scroll-spy). */
  .pnav__ind {
    display: block;
    position: absolute; left: 0; top: 50%;
    height: 2.15rem; width: 0;
    transform: translate(0, -50%);
    border-radius: 999px;
    background: rgba(255, 128, 0, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 128, 0, 0.35),
                0 8px 22px -8px rgba(255, 128, 0, 0.55);
    opacity: 0; z-index: 0; pointer-events: none;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                width 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease;
  }
  .pnav__ind.is-on { opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    .pnav__ind { transition: opacity 0.3s ease; }
    .pnav__links a { transition: color 0.25s ease; }
    .pnav__links a:hover { transform: none; }
  }
  .pnav__actions { gap: 0.5rem; }
  .pnav__actions .btn { font-size: 0.78rem; padding: 0.5rem 0.9rem; }
  .pnav__phone { padding-inline: 0.65rem; }
}

@media (max-width: 1219px) {
  .pnav .btn { display: none; }   /* hide phone pill + CTA; the hamburger menu carries them */
  .pnav__burger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 26px; height: 18px;
    background: none; border: none; cursor: pointer;
    z-index: 1001; position: relative;
  }
  .pnav__burger span {
    display: block; width: 100%; height: 2px;
    background: var(--paper); border-radius: 2px;
  }

  /* full-screen editorial overlay — outside .pnav so backdrop-filter can't trap it */
  .pnav__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    position: fixed;
    inset: 0;
    padding: 1.4rem var(--pad) 2rem;
    background: var(--ink);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    overflow-y: auto;
  }
  .pnav__links.is-open { transform: translateX(0); pointer-events: auto; }

  /* header row: brand + close */
  .pnav__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.6rem;
  }
  .pnav__brand {
    font-family: var(--display); font-weight: 800; font-size: 1.15rem;
    letter-spacing: 0.02em; color: var(--paper); text-decoration: none;
  }
  .pnav__brand .logo__v { color: var(--orange); }
  .pnav__close {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; padding: 0; flex: none;
    background: var(--paper); color: var(--ink);
    border: none; border-radius: 12px; cursor: pointer;
    transition: background 0.2s ease, transform 0.25s ease;
  }
  .pnav__close svg { width: 20px; height: 20px; }
  .pnav__close:hover, .pnav__close:focus-visible { background: var(--orange); transform: rotate(90deg); }

  /* menu items: numbered, left-aligned; active/hover gets an orange bar */
  .pnav__links > a {
    display: flex; align-items: baseline; gap: 0.85rem;
    padding: 0.28rem 0 0.28rem 1rem;
    border-left: 4px solid transparent;
    font-family: var(--display); font-weight: 900;
    font-size: clamp(2.3rem, 10vw, 3.6rem);
    text-transform: uppercase;
    letter-spacing: -0.035em; line-height: 1.0;
    color: var(--paper); text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
  }
  .pnav__num {
    display: inline-block; flex: none;
    font-family: var(--body); font-weight: 600; font-size: 0.85rem;
    color: var(--grey-dim); letter-spacing: 0.08em;
  }
  .pnav__links > a:hover,
  .pnav__links > a[aria-current="page"] { color: var(--orange); border-left-color: var(--orange); }
  .pnav__links > a:hover .pnav__num,
  .pnav__links > a[aria-current="page"] .pnav__num { color: var(--orange); }

  /* footer: CTA + socials */
  .pnav__foot {
    display: block; margin-top: auto; padding-top: 1.5rem;
    border-top: 1px solid var(--line);
  }
  .pnav__cta {
    display: inline-block;
    padding: 0.85rem 2.2rem;
    background: var(--orange); color: var(--ink);
    font-family: var(--display); font-weight: 700;
    font-size: 1rem; letter-spacing: 0.02em;
    border-radius: 999px; text-decoration: none;
    transition: transform 0.2s ease;
  }
  .pnav__cta:hover { transform: translateY(-2px); color: var(--ink); }
  .pnav__social {
    display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem;
    margin-top: 1.3rem;
  }
  .pnav__social a {
    font-family: var(--body); font-size: 0.85rem; letter-spacing: 0.04em;
    color: var(--grey); text-decoration: none;
  }
  .pnav__social a:hover { color: var(--orange); }

  body.pnav-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .pnav .btn--solid { font-size: 0.72rem; padding: 0.5rem 0.85rem; }
}


/* ── shared site footer (.pfooter) — used on every page ── */
.pfooter { border-top: 1px solid var(--line); padding: 3rem var(--pad) 2.4rem; }
.pfooter__cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; }
.pfooter .logo { font-family: var(--display); font-weight: 800; font-size: 1.1rem; }
.pfooter .logo__v { color: var(--orange); }
.pfooter p { font-size: 0.85rem; color: var(--grey-dim); max-width: 34ch; margin-top: 0.6rem; }
.pfooter__h { font-family: var(--display); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--grey-dim); margin-bottom: 0.7rem; }
.pfooter a { display: block; font-size: 0.88rem; color: var(--grey); text-decoration: none; margin-bottom: 0.45rem; }
.pfooter a:hover { color: var(--orange); }
.pfooter__legal { text-align: left; font-size: 0.74rem; color: var(--grey-dim); margin-top: 1rem; max-width: 34ch; }
.pfooter__social { display: flex; flex-wrap: wrap; gap: 1.3rem; max-width: 1200px; margin: 1.8rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pfooter__social a { display: inline; margin: 0; font-family: var(--body); font-size: 0.85rem; letter-spacing: 0.04em; color: var(--grey); text-decoration: none; }
.pfooter__social a:hover { color: var(--orange); }
@media (max-width: 860px) { .pfooter__cols { grid-template-columns: 1fr 1fr; } }
