/* ============================================================================
   chrome.css — shared site chrome: sticky nav + mobile menu + footer.
   Extracted from home.html so every public page (home, shop, results,
   community, legal) renders the same header/footer from one source.

   Self-contained on purpose: it ships its own Space Grotesk @font-face and
   every custom property has a fallback, so it looks right whether or not the
   host page defines --font / --bg / --txt / --brand-accent.
   ============================================================================ */

@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/SpaceGrotesk-Regular.woff2") format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url("../fonts/SpaceGrotesk-Medium.woff2") format('woff2');
    font-weight: 500; font-style: normal; font-display: swap;
}

/* ── Sticky navigation ─────────────────────────────────────────────────── */
.sticky-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 600;
    height: 52px;
    background: #111111;
    transition: background 0.28s ease;
}
.sticky-nav::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 100%; height: 28px;
    background: linear-gradient(to bottom, #111111, transparent);
    pointer-events: none;
    transition: opacity 0.28s ease;
}
body.menu-open .sticky-nav { background: transparent; }
body.menu-open .sticky-nav::after { opacity: 0; }
.nav-inner {
    position: absolute;
    top: 0; bottom: 0;
    left: 0; right: 0;
    display: flex;
    align-items: center;
    padding: 0 27px;
}

/* ── Mobile menu panel ─────────────────────────────────────────────────── */
.mobile-menu {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 580;
    background: rgba(17,17,17,0.88);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 68px 28px 100px;
    opacity: 0; pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.mobile-menu.is-open {
    opacity: 1; pointer-events: auto;
    transform: translateY(0);
}
.mobile-menu::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #000);
    pointer-events: none;
}
.mobile-menu-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mobile-menu-link {
    font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif); font-size: 11px;
    color: rgba(255,255,255,0.7); text-decoration: none;
    letter-spacing: 0.12em; line-height: 1;
    text-transform: uppercase;
    background: none; border: 1px solid rgba(255,255,255,0.15);
    padding: 14px 20px; text-align: left;
    transition: border-color 0.2s, color 0.2s;
}
.mobile-menu-link:hover, .mobile-menu-link.is-active {
    border-color: rgba(255,255,255,0.5); color: #fff;
}
.mobile-menu-link:last-child:nth-child(odd) {
    grid-column: 1 / -1; text-align: center;
}

.nav-logo {
    display: flex; align-items: center; flex-shrink: 0;
    margin-right: 16px; opacity: 0.9; transition: opacity 0.2s;
}
.nav-logo:hover { opacity: 0.6; }
.nav-logo img { display: block; filter: brightness(0) invert(1); }

.nav-hamburger {
    background: none; border: none; cursor: pointer;
    display: none; flex-direction: column; justify-content: center;
    gap: 5px; width: 25px; height: 22px; padding: 0;
    flex-shrink: 0; margin-left: 14px;
}
.nav-hamburger span {
    display: block; height: 1.5px; background: #fff;
    transition: transform 0.25s, opacity 0.2s; transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-links { display: flex; align-items: center; }
.nav-link {
    color: #fff; font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif); font-size: 11px; font-weight: 400;
    text-decoration: none; padding: 0 20px; height: 52px;
    display: flex; align-items: center; white-space: nowrap; transition: opacity 0.2s;
}
.nav-link:hover { opacity: 0.6; }
.nav-link.is-active { opacity: 0.55; }
.nav-search {
    position: absolute; left: 50%; top: 0; bottom: 0;
    transform: translateX(-50%);
    display: flex; align-items: center;
    pointer-events: none;
}
.nav-search-icon, .nav-search-input { pointer-events: auto; }
@keyframes nav-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.nav-search-caret {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    left: 0; /* updated by JS */
    color: rgba(255,255,255,0.45);
    font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif);
    font-size: 14px; font-weight: 400; line-height: 1;
    animation: nav-blink 1.1s step-start infinite;
    user-select: none; pointer-events: none;
}
.nav-search-input:focus ~ .nav-search-caret,
.nav-search.is-typing .nav-search-caret { display: none; }
.nav-search-input {
    background: none; border: none; outline: none;
    color: rgba(255,255,255,0.55); font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif);
    font-size: 14px; font-weight: 400; width: 160px;
    caret-color: rgba(255,255,255,0.6);
}
.nav-search-input::placeholder { color: rgba(255,255,255,0.35); }
.nav-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.nav-login {
    color: #fff; font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif); font-size: 11px; font-weight: 400;
    text-decoration: none; padding: 0 20px; height: 52px;
    display: flex; align-items: center; transition: opacity 0.2s;
    background: none; border: none; cursor: pointer;
}
.nav-login:hover { opacity: 0.6; }

/* Cart button — hover swaps the white icon for the red one. The red img must
   overlay the white (absolute + top/left 0); without the offsets an absolutely
   positioned element stays at its static position (to the right of the white
   icon), making the icon appear to shift right on hover. */
.cart-nav-btn { position: relative; background: none; border: none; cursor: pointer; padding: 0; }
.cart-nav-btn .icon-pair { position: relative; display: inline-flex; }
.cart-nav-btn .icon-white { transition: opacity 0.15s; }
.cart-nav-btn .icon-red { position: absolute; top: 0; left: 0; opacity: 0; transition: opacity 0.15s; }
.cart-nav-btn:hover .icon-white { opacity: 0; }
.cart-nav-btn:hover .icon-red { opacity: 1; }

/* ── Footer (legal) ────────────────────────────────────────────────────── */
#legal {
    width: 100%;
    position: relative;
    background: var(--bg, #000);
    overflow: hidden;
    min-height: 760px;
}
.legal-bg-img { position: absolute; inset: 0; pointer-events: none; }
.legal-bg-img img {
    width: 105%; height: 105%;
    object-fit: cover;
    transform: rotate(-1.31deg);
    transform-origin: center;
}
.legal-blur-overlay {
    position: absolute; inset: 0; z-index: 1;
    backdrop-filter: blur(24px);
    -webkit-mask-image: linear-gradient(to top, black 0%, black 55%, transparent 100%);
    mask-image: linear-gradient(to top, black 0%, black 55%, transparent 100%);
    pointer-events: none;
}
.legal-top-fade {
    position: absolute; top: 0; left: 0; right: 0; height: 20px;
    background: linear-gradient(to bottom, #111111, transparent);
    z-index: 10; pointer-events: none;
}
.legal-panel {
    position: relative; z-index: 5;
    background: rgba(17, 17, 17, 0.55);
    overflow: hidden;
    padding: 94px 255px 80px;
}
.legal-pixel-icon { display: block; width: 100px; height: 89px; margin: 0 auto 120px; }
.legal-pixel-icon img { width: 100%; height: 100%; object-fit: contain; }
.legal-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 60px; }
.legal-col-title {
    font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif);
    font-size: 32px; font-weight: 400;
    color: var(--txt, #fff);
    margin-bottom: 32px; line-height: 1.0008;
}
.legal-links { display: flex; flex-direction: column; gap: 25px; }
.legal-links a {
    font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif);
    font-size: 16px; color: var(--txt, #fff);
    text-decoration: none; line-height: 24px;
    transition: color 0.2s;
}
.legal-links a:hover { color: var(--brand-accent, #AB0000); }
.legal-copyright p { transition: color 0.15s; }
.legal-copyright p:hover { color: var(--brand-accent, #AB0000); }

/* Contact icon grid */
.contact-icons {
    display: grid;
    grid-template-columns: repeat(4, 30px);
    grid-template-rows: 30px;
    gap: 50px; justify-content: space-between; width: 100%;
}
.contact-icons a {
    display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; transition: opacity 0.2s;
}
.contact-icons a:hover { opacity: 0.7; }
.contact-icons a img { width: 100%; height: 100%; object-fit: contain; }
.contact-icon-img { filter: invert(1); transition: filter 0.15s; }
.legal-copyright .contact-icon-img { width: 25px; height: 25px; }
/* Scoped under #legal: the cart button also uses .icon-pair/.icon-white/.icon-red
   with different (inline-flex, unsized) styling on the commerce pages, so the
   footer's icon rules must win inside the footer regardless of page cart CSS. */
#legal .icon-pair { position: relative; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; }
#legal .icon-pair .icon-red { position: absolute; opacity: 0; transition: opacity 0.15s; }
#legal .icon-pair .icon-white { transition: opacity 0.15s; }
.contact-icons a:hover .icon-white,
.legal-copyright:hover .icon-white { opacity: 0; }
.contact-icons a:hover .icon-red,
.legal-copyright:hover .icon-red { opacity: 1; }

.legal-copyright { display: flex; align-items: center; gap: 10px; margin-top: 120px; }
.legal-copyright img { width: 25px; height: 25px; flex-shrink: 0; }
.legal-copyright p {
    font-family: var(--font, 'Space Grotesk', -apple-system, sans-serif);
    font-size: 16px; color: var(--txt, #fff); line-height: 24px;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-inner      { padding: 0 16px; }
    .nav-links      { display: none; }
    .nav-hamburger  { display: flex; }
    .nav-login      { display: none; }
    .nav-search-input { width: 160px; }
}
@media (max-width: 900px) {
    #legal { min-height: auto; }
    .legal-panel { padding: 40px 20px 100px; display: flex; flex-direction: column; align-items: center; }
    .legal-columns { grid-template-columns: 1fr; gap: 28px; width: 100%; max-width: 320px; }
    .legal-col-title { margin-bottom: 12px; font-size: 20px; }
    .legal-links { gap: 12px; }
    .contact-icons { gap: 20px; justify-content: space-between; width: 100%; }
    .legal-copyright { margin-top: 40px; }
    .legal-pixel-icon { margin: 0 auto 36px; }
}
