/* Shared editorial navigation and page frame. */
.greeting-title-band { position: relative; }
.page-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: inherit;
    font-family: var(--font-family-title);
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
}
.page-loading[hidden] { display: none; }
.page-pending main,
.page-pending footer,
.page-pending .greeting-title-band > :not(.page-loading) { visibility: hidden; }
.page-pending .greeting-title-band,
.page-pending .page-loading { visibility: visible; }
html:not(.page-pending) .page-loading { display: none; }

.site-header {
    position: relative;
    z-index: 1000;
    min-height: var(--header-height);
    padding: env(safe-area-inset-top, 0px) var(--site-gutter) 0;
    color: var(--brand-deep-blue);
    background: var(--bg-page);
}

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


.logo {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-shrink: 0;
    color: var(--brand-deep-blue);
}
.brand-mark { display: block; width: 80px; height: 80px; object-fit: contain; }
.brand-wordmark {
    display: block;
    color: var(--brand-deep-blue);
    font-family: var(--font-family-title);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.025em;
    line-height: 1.35;
    white-space: nowrap;
}
.site-header .brand-wordmark { font-size: 18px; }
@media (max-width: 599px) {
    .site-header .header-inner { gap: 8px; }
    .logo { gap: 8px; }
    .brand-mark { width: 40px; height: 40px; }
}
.desktop-nav {
    display: flex;
    align-items: center;
    flex-basis: 100%;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding: 0 0 20px;
}

.desktop-nav a {
    padding: 12px 0;
    border-bottom: 2px solid transparent;
    color: var(--brand-deep-blue);
    font-family: var(--font-family-title);
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
}

.desktop-nav a:is([aria-current], :hover) {
    border-bottom-color: var(--brand-royal-blue);
}

.menu-toggle {
    display: none;
}

:is(a, button):focus-visible {
    outline: 2px solid var(--focus-ring-color, var(--brand-royal-blue));
    outline-offset: 6px;
}

.skip-link {
    position: fixed;
    left: 24px;
    top: 16px;
    z-index: 1100;
    padding: 12px 20px;
    color: var(--base-white);
    background: var(--brand-deep-blue);
    transform: translateY(-180%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-main {
    min-height: calc(100vh - var(--header-height));
    padding: 40px var(--site-gutter) 72px;
    scroll-margin-top: 16px;
}

.site-main--interior {
    background: var(--bg-page);
}

.container {
    max-width: var(--max-width-desktop);
    margin: 0 auto;
}

.content-shell {
    padding: 0;
}

/* Without JavaScript the same links remain visible and usable. */
.js-navigation .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    color: var(--brand-deep-blue);
}

.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}
.menu-icon > span {
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor;
}
.menu-toggle[aria-expanded="true"] .menu-icon > :first-child { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon > :nth-child(2) { visibility: hidden; }
.menu-toggle[aria-expanded="true"] .menu-icon > :last-child { transform: translateY(-8px) rotate(-45deg); }

.js-navigation .desktop-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100dvh - var(--header-height) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    padding: 12px max(var(--site-gutter), calc((100% - var(--site-width)) / 2)) calc(24px + env(safe-area-inset-bottom, 0px));
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-page);
}

.js-navigation .desktop-nav.is-open { display: flex; }

.js-navigation .desktop-nav a {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -0.025em;
}

.js-navigation .desktop-nav a[aria-current] { color: var(--brand-royal-blue); }

@media (max-width: 1023px) {
    :root { --header-height: 116px; }
    .header-inner { gap: 0 20px; }
}

/* Section links need only a small margin now that the header scrolls with the page. */
.home-page :is(.home-section, #portfolio) { scroll-margin-top: 24px; }

/* One glyph treatment for every directional navigation control. */
.nav-chevron { display: inline-flex; flex: none; width: 1em; align-items: center; justify-content: center; font-family: var(--font-family-title); font-size: var(--nav-chevron-size); font-style: normal; font-weight: 400; line-height: 1; letter-spacing: 0; vertical-align: -0.06em; }
.nav-chevron[data-direction="left"]::before { content: var(--chevron-left); }
.nav-chevron[data-direction="right"]::before { content: var(--chevron-right); }
.nav-chevron[data-direction="up"]::before { content: var(--chevron-up); }
.nav-chevron[data-direction="down"]::before { content: var(--chevron-down); }
.footer-bottom a, .detail-return { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }

/* Approved CI treatment: a fine edge behind white text, without changing glyph layout. */
.ci-inverse-text {
    --focus-ring-color: var(--base-white);
    -webkit-text-stroke: var(--inverse-text-stroke);
    paint-order: stroke fill;
}
/* The important badge has its own white surface and red text. */
.ci-inverse-text .badge-important { -webkit-text-stroke: 0; }
