/**
 * PupLookUp site chrome: header, primary navigation, mobile drawer, Power Breeder promo,
 * footer.
 *
 * Rewritten 2026-11-23 for the "C v2 Personal" design (see plu-personal.css and
 * design/mockups/c2.py). The markup hooks and js/plu-nav.js behaviour are unchanged from the
 * July build: data-open on the drawer and overlay, aria-expanded on the submenu toggles, and
 * .plu-scroll-locked on <html>. The desktop breakpoint moved from 64rem to 75rem (1200px) so the
 * full menu only appears where it fits on one line; js/plu-nav.js watches the same value.
 *
 * Progressive enhancement: the drawer is only hidden once JavaScript has added .plu-js to
 * <html>. With scripting off the navigation renders as a plain list of links under the
 * header instead of vanishing behind a button that cannot open.
 */

/* ==========================================================================
   Header
   ========================================================================== */

.plu-header {
    position: relative;
    z-index: var(--plu-z-header);
    background: transparent;
}

.plu-header__inner {
    display: flex;
    align-items: center;
    gap: var(--plu-space-6);
    min-height: 86px;
    padding-block: var(--plu-space-3);
}

/* --- Logo ----------------------------------------------------------------- */

.plu-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    color: var(--plu-navy-800);
    text-decoration: none;
    padding-bottom: 10px; /* room for the "since 2008" note */
}
.plu-logo:hover { color: var(--plu-navy-800); }
.plu-logo__dog {
    width: 40px;
    height: 40px;
    color: var(--plu-coral-500);
    transform: rotate(-8deg);
    margin: -4px 0 0 -4px;
}
.plu-logo__word {
    font: 900 1.95rem/1 var(--plu-font-display);
    letter-spacing: .01em;
}
.plu-logo__since {
    position: absolute;
    left: 48px;
    bottom: -4px;
    font-size: 1rem;
    color: var(--plu-coral-700);
    transform: rotate(-4deg);
    white-space: nowrap;
}

/* --- Actions (CTA) -------------------------------------------------------- */

.plu-header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--plu-space-4); }
.plu-header__cta { padding: 10px 20px; min-height: 0; }
@media (max-width: 40rem) {
    .plu-header__actions { display: none; }
    .plu-logo__word { font-size: 1.6rem; }
    .plu-logo__dog { width: 34px; height: 34px; }
    .plu-logo__since { left: 42px; }
}

/* --- Menu button ---------------------------------------------------------- */

.plu-nav-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    background: none;
    border: 0;
    color: var(--plu-navy-800);
    cursor: pointer;
    font: inherit;
}
.plu-nav-toggle::before {
    content: "menu";
    font: 700 1.35rem/1 var(--plu-font-hand);
}
/* Three slightly wobbly lines, drawn rather than ruled. */
.plu-nav-toggle__bars {
    display: block;
    width: 28px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 22'%3E%3Cg fill='none' stroke='%231f2a44' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M3 4 C 11 2, 19 5, 27 3'/%3E%3Cpath d='M3 11 C 12 13, 18 9, 27 11'/%3E%3Cpath d='M3 18 C 10 16, 20 20, 27 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.plu-js .plu-nav-toggle { display: inline-flex; }
@media (min-width: 40.0625rem) { .plu-js .plu-nav-toggle { margin-left: 0; } }
@media (max-width: 40rem) { .plu-nav-toggle { margin-left: auto; } }

/* ==========================================================================
   Primary navigation
   ========================================================================== */

.plu-nav__list { list-style: none; margin: 0; padding: 0; }
.plu-nav__link {
    color: var(--plu-navy-500);
    font-weight: 600;
    text-decoration: none;
}
.plu-nav__link:hover,
.plu-nav__link[aria-current="page"] { color: var(--plu-navy-800); }
/* Hover and current page: a coral underline, so the menu visibly reacts (2026-11-24). */
.plu-nav__link:not(.plu-btn):hover,
.plu-nav__item--has-children:hover > .plu-nav__link,
.plu-nav__link:not(.plu-btn)[aria-current="page"] {
    text-decoration: underline;
    text-decoration-color: var(--plu-coral-500);
    text-decoration-thickness: 3px;
    text-underline-offset: 7px;
}
/* "Breeder Login": the header button's shape, in the logo's navy (plu-btn--blue). */
.plu-nav__link.plu-btn--blue,
.plu-nav__link.plu-btn--blue:hover,
.plu-nav__link.plu-btn--blue[aria-current="page"] { color: var(--plu-white); }
.plu-nav__submenu { list-style: none; margin: 0; padding: 0; }
.plu-nav__submenu a { color: var(--plu-navy-800); text-decoration: none; font-weight: 600; }
.plu-nav__submenu a:hover,
.plu-nav__submenu a[aria-current="page"] { color: var(--plu-coral-700); }
.plu-nav__toggle {
    background: none; border: 0; padding: 4px; margin-left: 2px; cursor: pointer;
    color: var(--plu-navy-500); vertical-align: middle;
}
.plu-nav__toggle[aria-expanded="true"] .plu-nav__chevron { transform: rotate(180deg); }
.plu-nav__close { display: none; }
.plu-nav__item--cta { display: none; }

/* --- Desktop: inline menu with hand-drawn dropdown panels ---------------- */

@media (min-width: 75rem) {
    .plu-js .plu-nav-toggle { display: none; }

    /* The nav fills the bar so "Breeder Login" (pushed right) sits beside "List your puppies". */
    .plu-nav { order: 2; flex: 1 1 auto; }
    .plu-header__actions { order: 3; margin-left: -12px; } /* the header's 24px gap less 12: the two buttons sit 12px apart */

    .plu-nav__list { display: flex; align-items: center; gap: 20px; }
    .plu-nav__link { white-space: nowrap; }
    .plu-nav__item.plu-nav__item--cta { display: none; }
    .plu-nav__item { position: relative; display: flex; align-items: center; }
    .plu-nav__item--account { margin-left: auto; }
    .plu-nav__link--account.plu-btn { padding: 10px 20px; min-height: 0; } /* same as .plu-header__cta */

    .plu-nav__submenu {
        display: none;
        position: absolute;
        top: calc(100% + 12px);
        left: -18px;
        min-width: 230px;
        padding: 14px 20px;
        background: var(--plu-white);
        border: 2.5px solid var(--plu-navy-800);
        border-radius: var(--plu-radius-sketch-2);
        box-shadow: var(--plu-shadow-offset);
        transform: rotate(-1deg);
        z-index: 5;
    }
    .plu-nav__submenu li { padding: 5px 0; }
    .plu-nav__toggle[aria-expanded="true"] + .plu-nav__submenu { display: block; }
    /* Mouse: open on hover. The ::before strip bridges the 12px gap under the item, so the
       panel doesn't close while the pointer travels down to it. */
    @media (any-hover: hover) {
        .plu-nav__item--has-children:hover > .plu-nav__submenu { display: block; }
        .plu-nav__item--has-children:hover > .plu-nav__toggle .plu-nav__chevron { transform: rotate(180deg); }
    }
    .plu-nav__submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; }
    /* Keyboard and no-JS: reveal on focus within, so the links are never unreachable. */
    .plu-nav__item:focus-within > .plu-nav__submenu { display: block; }
    html:not(.plu-js) .plu-nav__item:hover > .plu-nav__submenu { display: block; }
}

/* --- Small screens with JS: slide-in drawer ------------------------------ */

@media (max-width: 74.999rem) {
    .plu-js .plu-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(86vw, 340px);
        z-index: var(--plu-z-drawer);
        overflow-y: auto;
        padding: 64px 26px 30px;
        background: var(--plu-white);
        border-left: 2.5px solid var(--plu-navy-800);
        box-shadow: -8px 0 0 var(--plu-sun-500);
        transform: translateX(110%);
        visibility: hidden;
        transition: transform .25s ease, visibility 0s linear .25s;
    }
    .plu-js .plu-nav[data-open="true"] {
        transform: translateX(0);
        visibility: visible;
        transition: transform .25s ease;
    }
    .plu-js .plu-nav__close {
        display: inline-flex;
        position: absolute;
        top: 16px;
        right: 16px;
        padding: 8px;
        background: none;
        border: 0;
        color: var(--plu-navy-800);
        cursor: pointer;
    }

    .plu-nav__list { display: flex; flex-direction: column; gap: 2px; }
    .plu-nav__item { border-bottom: 1.5px dashed var(--plu-paper-line); padding: 10px 0; }
    .plu-nav__link { color: var(--plu-navy-800); font-size: 1.1rem; }
    .plu-nav__submenu { padding: 6px 0 2px 14px; }
    .plu-nav__submenu li { padding: 5px 0; }
    .plu-js .plu-nav__submenu { display: none; }
    .plu-js .plu-nav__toggle[aria-expanded="true"] + .plu-nav__submenu { display: block; }
    .plu-nav__item--cta { display: block; border-bottom: 0; padding-top: 18px; }
    .plu-nav__item--account { border-bottom: 0; padding-top: 18px; }
    .plu-nav__link--account.plu-btn { display: flex; width: 100%; font-size: 1rem; }

    /* Without JS the list just sits under the header, wrapped. */
    html:not(.plu-js) .plu-header__inner { flex-wrap: wrap; }
    html:not(.plu-js) .plu-nav { flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .plu-js .plu-nav, .plu-js .plu-nav[data-open="true"] { transition: none; }
}

.plu-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--plu-z-overlay);
    background: rgba(20, 28, 48, .35);
}
.plu-nav-overlay[data-open="true"] { display: block; }
@media (min-width: 75rem) { .plu-nav-overlay[data-open="true"] { display: none; } }

.plu-scroll-locked,
.plu-scroll-locked body { overflow: hidden; }

/* ==========================================================================
   Power Breeder promo (a kraft-paper card)
   ========================================================================== */

.plu-promo { margin: var(--plu-space-12) 0 0; }
.plu-promo__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--plu-space-5) var(--plu-space-8);
    padding: 26px 30px;
    background: #ecdcc0;
    border: 2px dashed rgba(31, 42, 68, .25);
    transform: rotate(-.4deg);
}
.plu-promo__lede { margin: 0 0 8px; font-size: 1.08rem; }
.plu-promo__lede a { color: var(--plu-coral-700); font-weight: 600; }
.plu-promo__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--plu-navy-700); font-size: .95rem; }
.plu-promo__list li::before { content: "✓ "; color: var(--plu-coral-700); font-weight: 700; }

/* ==========================================================================
   Footer
   ========================================================================== */

.plu-footer {
    margin-top: var(--plu-space-16);
    padding: var(--plu-space-12) 0 var(--plu-space-10);
    border-top: 2px dashed var(--plu-paper-line);
    color: var(--plu-navy-500);
}
.plu-footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: var(--plu-space-8);
}
.plu-footer__heading {
    margin: 0 0 var(--plu-space-3);
    font: 900 1.5rem/1 var(--plu-font-display);
    color: var(--plu-navy-800);
}
.plu-footer__about { margin: 0; max-width: 30ch; }
.plu-footer__hand { margin: 10px 0 0; font-size: 1.45rem; color: var(--plu-coral-700); transform: rotate(-1.5deg); }
.plu-footer__list { list-style: none; margin: 0; padding: 0; }
.plu-footer__list li { padding: 3px 0; }
.plu-footer__list a { color: var(--plu-navy-600); font-weight: 600; text-decoration: none; }
.plu-footer__list a:hover { color: var(--plu-coral-700); }
.plu-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--plu-space-3);
    margin-top: var(--plu-space-10);
    padding-top: var(--plu-space-5);
    border-top: 1.5px dashed var(--plu-paper-line);
    font-size: .9rem;
}
.plu-footer__bottom p { margin: 0; }
.plu-footer__bottom a { color: inherit; }
