/* Page shell: decorative background, sticky header, nav, mobile menu, footer.
   Everything here appears on all 13 routes. */

/* ── Decorative background ───────────────────────────────────────────────── */

.page-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.page-bg__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(20px);
}

.page-bg__blob--blue {
    top: -18vw;
    left: -10vw;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle at 50% 50%, rgb(31 123 255 / 0.16), rgb(31 123 255 / 0) 62%);
    animation: gn-drift 46s ease-in-out infinite;
}

.page-bg__blob--violet {
    bottom: -22vw;
    right: -12vw;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle at 50% 50%, rgb(139 47 224 / 0.15), rgb(139 47 224 / 0) 62%);
    animation: gn-drift2 54s ease-in-out infinite;
}

.page-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 72px 72px;
    animation: gn-grid 46s linear infinite;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgb(var(--surface-page-rgb) / 0.9);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 0 var(--page-gutter);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo {
    height: 36px;
    width: auto;
    display: block;
}

/* The wordmark is dark ink, so the dark theme needs the white variant. */
.logo--dark {
    display: none;
}

[data-theme="dark"] .logo--light {
    display: none;
}

[data-theme="dark"] .logo--dark {
    display: block;
}

/* ── Primary nav ─────────────────────────────────────────────────────────── */

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.site-nav__link {
    position: relative;
    padding: 9px 14px 11px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    color: var(--ink-secondary);
    transition: color 0.18s, background 0.18s;
}

.site-nav__link:hover {
    color: var(--ink);
    background: rgb(var(--ink-rgb) / 0.07);
}

.site-nav__link.is-active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Menu + theme toggles ────────────────────────────────────────────────── */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    cursor: pointer;
}

.menu-toggle__bar {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    border: 1px solid rgb(var(--ink-rgb) / 0.2);
    background: rgb(var(--ink-rgb) / 0.05);
    color: var(--ink-secondary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.theme-toggle:hover {
    background: rgb(var(--ink-rgb) / 0.12);
    color: var(--ink);
}

/* Show the icon for the theme you would switch TO. */
.theme-toggle__icon--sun {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--moon {
    display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
    display: block;
}

/* ── Mobile menu ─────────────────────────────────────────────────────────── */
/* 2026-09-24: was a dropdown below the header, now a full-screen overlay.
   js/nav.js locks body scroll while it is open. */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    background: rgb(var(--surface-page-rgb) / 0.985);
    backdrop-filter: blur(18px);
    animation: gn-rise 0.22s ease-out both;
}

.mobile-menu__bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 var(--page-gutter);
    /* Aligns with the header underneath, so the logo does not jump. */
    height: var(--header-height);
    border-bottom: 1px solid var(--border);
}

.mobile-menu__logo {
    display: flex;
    align-items: center;
}

.mobile-menu__logo .logo {
    height: 34px;
}

.mobile-menu__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-strong);
    background: var(--surface-card);
    color: var(--ink);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

/* Centred, but scrollable if the viewport is short. */
.mobile-menu__body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 6vw, 48px) var(--page-gutter);
}

.mobile-menu__nav {
    display: grid;
    gap: 2px;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 4px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
}

.mobile-menu__chevron {
    color: var(--ink-faint);
    font-size: 18px;
}

.mobile-menu__link:hover {
    color: var(--accent-text);
}

.mobile-menu__link:hover .mobile-menu__chevron {
    color: var(--accent-text);
}

.mobile-menu__cta {
    margin-top: 32px;
    padding: 17px;
    border-radius: var(--radius-xl);
    font-size: 17px;
}

.mobile-menu__meta {
    margin-top: 26px;
    display: grid;
    gap: 7px;
    font-size: 15px;
    color: var(--ink-muted);
}

.mobile-menu__meta a {
    color: var(--ink-muted);
}

.mobile-menu__meta a:hover {
    color: var(--accent-text);
}

/* Set by js/nav.js while the overlay is open. */
.is-scroll-locked {
    overflow: hidden;
}

/* ── Scroll progress ─────────────────────────────────────────────────────── */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    z-index: 60;
    background: linear-gradient(90deg, var(--brand), var(--accent), #c77dff);
}

/* ── Main ────────────────────────────────────────────────────────────────── */

main {
    position: relative;
    z-index: 1;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
    position: relative;
    z-index: 1;
    background: var(--surface-inverse);
}

.site-footer__inner {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: clamp(40px, 4.5vw, 58px) var(--page-gutter) clamp(26px, 3vw, 34px);
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1.2fr;
    gap: clamp(24px, 3vw, 40px);
    align-items: start;
}

.site-footer__brand,
.site-footer__col {
    min-width: 0;
}

.site-footer__logo {
    display: block;
    width: fit-content;
}

.site-footer__logo img {
    height: 34px;
    width: auto;
    display: block;
}

.site-footer__name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-top: 18px;
}

/* Label and value in two columns so the colon aligns, and stays aligned if a
   second row (an SST number, say) is added back later. */
.site-footer__reg {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    row-gap: 3px;
    margin: 12px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    color: rgb(255 255 255 / 0.72);
}

/* Sentence case, not uppercase. The footer's caps treatment belongs to
   .site-footer__heading, which earns it with 0.16em tracking at 11.5px. Caps at
   13.5px with 0.04em read as shouting rather than as a label, and put "NO." next
   to a number where it can be misread as the word. A registration number is a
   quiet legal disclosure, so it recedes. */
.site-footer__reg-label {
    font-weight: 600;
    color: rgb(255 255 255 / 0.82);
    white-space: nowrap;
}

.site-footer__reg-value {
    margin: 0;
}

.site-footer__blurb {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgb(255 255 255 / 0.72);
    max-width: 38ch;
    margin: 16px 0 0;
}

.site-footer__tagline {
    font-size: 13.5px;
    line-height: 1.6;
    color: #fff;
    margin: 14px 0 0;
}

.site-footer__heading {
    font-size: 11.5px;
    letter-spacing: 0.16em;
    color: rgb(255 255 255 / 0.5);
    font-weight: 600;
    font-family: var(--font-sans);
    text-transform: uppercase;
}

.site-footer__links {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.site-footer__link {
    width: fit-content;
    font-size: 13.5px;
    color: rgb(255 255 255 / 0.82);
    transition: color 0.18s;
}

.site-footer__link:hover {
    color: #fff;
}

.site-footer__address {
    display: grid;
    gap: 2px;
    margin-top: 14px;
    font-size: 13.5px;
    font-style: normal;
    line-height: 1.55;
    color: rgb(255 255 255 / 0.72);
}

.site-footer__contact {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.site-footer__hours {
    font-size: 13px;
    color: rgb(255 255 255 / 0.5);
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.site-footer__legal a {
    color: rgb(255 255 255 / 0.62);
    transition: color 0.18s;
}

.site-footer__legal a:hover {
    color: #fff;
}

.site-footer__bar {
    max-width: var(--page-max);
    margin: 0 auto;
    padding: 16px var(--page-gutter) 28px;
    border-top: 1px solid rgb(255 255 255 / 0.14);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 28px;
    font-size: 12.5px;
    color: rgb(255 255 255 / 0.5);
}
