/* =========================================================
   JUPITER BLUE — SITE MAP
   Page-specific styles for sitemap.php.

   Loaded AFTER brand.css + Nav.css + Style.css + footer.css +
   pages.css. Tokens come from brand.css only. Honours customer
   (light) + trade (dark) via body[data-theme].

   Inherits the pages.css idiom:
   - Editorial. Hairlines, not boxes. Micro ALL-CAPS labels.
   - Tabular numerals on the A–Z rail.
   - Orange (--jb-accent) only on the closing CTA action.
   - Blue (--jb-blue) restrained: active letter, link hover, rails.
   ========================================================= */


/* ---------------------------------------------------------
   HERO META — tabular counts under the lede
   --------------------------------------------------------- */
.sitemap-hero__meta {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--ink-3);
    font-variant-numeric: tabular-nums slashed-zero;
}
.sitemap-hero__meta span { position: relative; }
.sitemap-hero__meta span + span::before {
    content: '';
    position: absolute;
    left: -10px; top: 50%;
    width: 1px; height: 10px;
    background: var(--line);
    transform: translateY(-50%);
}


/* =========================================================
   1. DIRECTORY — the site_navigation tree as columns.
   Each top-level section is a grid cell so a section never
   splits awkwardly across a column break.
   ========================================================= */
.sitemap-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin: 0 0 24px;
}
.sitemap-col {
    background: var(--paper);
    padding: 32px 28px;
}

/* Section heading — the matrix micro-label idiom, but readable.
   Links if the section node itself has a URL. */
.sitemap-col__title {
    margin: 0 0 18px;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: var(--tracking-tight);
    color: var(--ink);
    line-height: 1.2;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.sitemap-col__title a {
    color: var(--ink);
    text-decoration: none;
    border: none;
    transition: color 180ms ease;
}
.sitemap-col__title a:hover,
.sitemap-col__title a:focus-visible { color: var(--jb-blue); outline: none; }


/* ---- The nested tree ------------------------------------------- */
.sitemap-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}
/* Nested levels get a hairline spine + indent so depth reads clearly. */
.sitemap-tree .sitemap-tree {
    margin: 6px 0 10px 6px;
    padding-left: 14px;
    border-left: 1px solid var(--line);
}
.sitemap-node { margin: 0; }

.sitemap-tree a,
.sitemap-node__label {
    display: block;
    padding: 7px 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--ink-2);
    text-decoration: none;
    border: none;
    transition: color 180ms ease, padding-left 180ms ease;
}
.sitemap-tree a:hover,
.sitemap-tree a:focus-visible {
    color: var(--jb-blue);
    padding-left: 6px;
    outline: none;
}
/* a non-link grouping label inside the tree */
.sitemap-node__label {
    color: var(--ink-3);
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    cursor: default;
}


/* =========================================================
   2. A–Z RAIL — sticky index of jump links.
   Sits below your global nav. If your top nav is sticky, bump
   --sitemap-rail-top to its height so the rail tucks beneath it.
   ========================================================= */
.alpha-rail {
    --sitemap-rail-top: 0px;
    position: sticky;
    top: var(--sitemap-rail-top);
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 14px 0;
    margin: 0 0 8px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}
.alpha-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-btn);
    font-size: 0.78rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: var(--tracking-tight);
    color: var(--ink-2);
    text-decoration: none;
    transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.alpha-chip:hover,
.alpha-chip:focus-visible,
.alpha-chip.is-active {
    color: #fff;
    background: var(--ink);
    border-color: var(--ink);
    outline: none;
}
.alpha-chip.is-active {
    background: var(--jb-blue);
    border-color: var(--jb-blue);
}
.alpha-chip--empty {
    color: var(--ink-3);
    opacity: 0.4;
    pointer-events: none;
}


/* =========================================================
   3. ALPHA GROUPS — letter heading + product columns
   ========================================================= */
.alpha-group {
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 88px;   /* clears the sticky rail + nav on jump */
}
.alpha-group:first-of-type { border-top: none; margin-top: 12px; }

.alpha-group__letter {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: var(--tracking-tighter);
    color: var(--ink);
    line-height: 1;
    margin: 0 0 18px;
    font-variant-numeric: tabular-nums slashed-zero;
}

.alpha-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 280px 3;       /* balanced multi-column flow */
    column-gap: 40px;
}
.alpha-list li {
    break-inside: avoid;
    margin: 0;
}
.alpha-list a {
    display: block;
    padding: 9px 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--ink-2);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: color 180ms ease, padding-left 180ms ease;
}
.alpha-list a:hover,
.alpha-list a:focus-visible {
    color: var(--jb-blue);
    padding-left: 6px;
    outline: none;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .sitemap-col { padding: 28px 22px; }
    .alpha-list { columns: 220px 2; column-gap: 28px; }
}
@media (max-width: 560px) {
    .alpha-list { columns: 1; }
    .alpha-chip { min-width: 30px; height: 30px; font-size: 0.72rem; }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .sitemap-tree a,
    .alpha-list a,
    .alpha-chip,
    .sitemap-col__title a { transition: none; }
    html { scroll-behavior: auto; }
}
