/* ==========================================================================
   Sportzey site chrome — nav + footer, design system.
   Loaded AFTER the legacy stylesheets so it wins over base.css's nav rules.
   ========================================================================== */

/* The old nav was position:fixed and base.css pushed content down by 70px to
   compensate. The new nav is sticky and occupies real layout space, so that
   offset would leave a gap on every page. */
.main-content {
    margin-top: 0 !important;
}

/* --------------------------------------------------- nav */

.sz-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 232, 204, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: var(--sz-border-w-bold) solid var(--sz-ink-900);
}

.sz-nav__inner {
    max-width: 1360px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px clamp(16px, 4vw, 44px);
}

.sz-nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.sz-nav__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.sz-nav__wordmark {
    font-family: var(--sz-font-display);
    font-size: 30px;
    letter-spacing: 0.04em;
    color: var(--sz-ink-900);
    line-height: 1;
}

.sz-nav__links {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.8vw, 26px);
}

.sz-nav__link {
    font-family: var(--sz-font-ui);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: lowercase;
    text-decoration: none;
    color: var(--sz-ink-700);
    white-space: nowrap;
    transition: color var(--sz-duration-fast) var(--sz-ease-out);
}

.sz-nav__link:hover {
    color: var(--sz-accent-600);
}

.sz-nav__link.is-active {
    font-weight: 700;
    color: var(--sz-accent-600);
    border-bottom: 2px solid var(--sz-accent-500);
}

.sz-nav__cta {
    padding: 10px 22px;
    font-size: 14px;
}

.sz-nav__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: var(--sz-border-w-default) solid var(--sz-ink-900);
    padding: 11px;
    cursor: pointer;
}

.sz-nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--sz-ink-900);
}

/* the middle bar picks up the accent — a small scorecard tell */
.sz-nav__burger span:nth-child(2) {
    background: var(--sz-accent-500);
}

/* --------------------------------------------------- mobile overlay
   Real markup hidden by CSS, not built in JS. The previous implementation
   constructed the whole menu imperatively with !important inline styles. */

.sz-navmenu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: var(--sz-paper-100);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: calc(var(--sz-nav-h) + 16px) clamp(24px, 8vw, 80px) 32px;
    /* A short phone in landscape cannot fit eight poster-scale links; without
       this the overflowing items were simply unreachable. */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--sz-duration-base) var(--sz-ease-out), visibility var(--sz-duration-base);
}

.sz-navmenu.is-open {
    opacity: 1;
    visibility: visible;
}

.sz-navmenu__link {
    font-family: var(--sz-font-display);
    /* Sized against viewport height as well as width, so the list shrinks to
       fit rather than scrolling on a landscape phone. */
    font-size: clamp(28px, min(8vw, 7.2vh), 56px);
    line-height: 1.05;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--sz-ink-900);
    /* Poster type is visually large but the glyph box is short — pad the row so
       the tap target matches what the eye reads as the link. */
    padding: 4px 0;
    min-height: var(--sz-tap);
    display: flex;
    align-items: center;
}

.sz-navmenu__link.is-active,
.sz-navmenu__link:hover {
    color: var(--sz-accent-600);
}

.sz-navmenu__cta {
    margin-top: 14px;
    align-self: flex-start;
}

.sz-navmenu__close {
    position: fixed;
    top: 14px;
    right: clamp(16px, 5vw, 28px);
    width: 46px;
    height: 46px;
    background: var(--sz-paper-100);
    border: var(--sz-border-w-default) solid var(--sz-ink-900);
    color: var(--sz-ink-900);
    font-size: 18px;
    font-family: var(--sz-font-ui);
    cursor: pointer;
    z-index: 1;
}

/* Seven links plus a CTA stop fitting well before the old 900px cut — between
   900 and ~1080 they were colliding with the wordmark. */
@media (max-width: 1080px) {
    .sz-nav__links {
        display: none;
    }
    .sz-nav__burger {
        display: flex;
    }
}

@media (max-width: 600px) {
    .sz-nav__inner {
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .sz-nav__logo {
        width: 36px;
        height: 36px;
    }
    .sz-nav__wordmark {
        font-size: 24px;
    }
}

/* --------------------------------------------------- footer */

.sz-footer {
    background: var(--sz-paper-100);
    border-top: var(--sz-border-w-bold) solid var(--sz-ink-900);
    padding: clamp(44px, 6vw, 72px) clamp(20px, 5vw, 64px) 30px;
    font-family: var(--sz-font-ui);
}

.sz-footer__grid {
    max-width: 1360px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.sz-footer__col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sz-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sz-footer__logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sz-footer__wordmark {
    font-family: var(--sz-font-display);
    font-size: 26px;
    color: var(--sz-ink-900);
}

.sz-footer__tagline {
    margin: 0;
    font-family: var(--sz-font-editorial);
    font-style: italic;
    font-size: 15px;
    color: var(--sz-ink-700);
}

.sz-footer__heading {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: lowercase;
    color: var(--sz-accent-600);
}

.sz-footer__link {
    font-size: 15px;
    font-weight: 500;
    text-transform: lowercase;
    text-decoration: none;
    color: var(--sz-ink-700);
    transition: color var(--sz-duration-fast) var(--sz-ease-out);
    /* Footer links sit in a tight stack; the extra row height is what makes
       them individually tappable rather than a wall of text. */
    padding: 3px 0;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
}

.sz-footer__link:hover {
    color: var(--sz-accent-600);
}

.sz-footer__bottom {
    max-width: 1360px;
    margin: 40px auto 0;
    border-top: 1px solid var(--sz-border-hairline);
    padding-top: 20px;
}

.sz-footer__bottom p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--sz-ink-500);
}

/* Three auto-fit columns collapse to one on a phone; tighten the gap so the
   footer doesn't become a screen and a half of its own. */
@media (max-width: 768px) {
    .sz-footer__grid {
        gap: 28px;
    }
    .sz-footer__bottom {
        margin-top: 28px;
    }
}
