/* Wise Mega site additions. wm.css ships unchanged; everything here is production wiring
   (fixed header, menu overlay, focus rings, art direction) or a reference-page inline style
   moved out of the markup so the CSP can stay at 'self'. Values come from tokens.css. */

/* ---------- Page shell ---------- */
/* wm-stage sits on <body>. Clip (not hide) horizontal overflow so position: sticky keeps working. */
body.wm-stage { min-height: 100vh; overflow-x: clip; }
html { scroll-padding-top: 96px; }
/* <picture> must not become a flex/grid item (wm-cta has a grid gap); the img inside is absolutely positioned. */
.wm-stage picture { display: contents; }
.wm-stage picture > source { display: none; }

/* ---------- Header ---------- */
/* Overlay header stays in view so the scrolled state (wm-header--scrolled) is visible. */
.wm-header--overlay { position: fixed; }
.wm-header__toggle { padding: 0; color: var(--chrome-highlight); cursor: pointer; }
/* Without JS the menu cannot open: hide the toggle; the footer navigation remains. */
html:not(.js) .wm-header__toggle { display: none; }
/* Horizontal SVG lockup (6.77:1) fitting rules. wm.css heights apply wherever they fit. */
/* Below 1024px the nav list is hidden; hide its <nav> wrapper too so it adds no second flex gap. */
@media (max-width: 1023px) { .wm-header > nav { display: none; } }
/* 1024-1151px: logo (298px) + nav + Let's Connect need 1113px; drop the button, which repeats
   the Contact nav link, instead of shrinking the logo or the nav. */
@media (min-width: 1024px) and (max-width: 1151px) { .wm-header .wm-btn { display: none; } }
/* Below 384px a 36px lockup (244px) plus toggle cannot fit: 30px lockup (README minimum 28px),
   24px gap; footer lockup scales to the column. */
@media (max-width: 383px) {
  .wm-header { gap: var(--space-5); }
  .wm-header__logo, .wm-header--scrolled .wm-header__logo, .wm-menu__top img { height: 30px; }
  .wm-footer__brand img { width: 100%; max-width: 325px; height: auto; } /* 325px = wm.css 48px height */
}
/* Mobile hero copy is bottom-aligned with 64px top padding, less than the 80px header: on narrow
   phones, where the copy outgrows the hero, the eyebrow would slide under the header. */
@media (max-width: 767px) {
  .wm-hero__content { padding-top: 96px; }
  .site-notfound .wm-hero__content { padding-top: var(--space-8); } /* 404 numeral already clears the header */
}

/* ---------- Mobile menu overlay ---------- */
.wm-menu { position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain; }
.wm-menu[hidden] { display: none; }
@media (min-width: 1024px) { .wm-menu { display: none; } }
.wm-menu__close { padding: 0; cursor: pointer; }
html.site-menu-open, html.site-menu-open body { overflow: hidden; }

/* ---------- Focus rings for elements wm.css does not cover ---------- */
.wm-stage :where(a, button, select, input, textarea):focus-visible { outline: none; box-shadow: var(--focus-ring); }
.wm-platinum :where(a, button):focus-visible { box-shadow: var(--focus-ring-ink); }

/* ---------- Reference inline styles, moved here ---------- */
.site-self-start { justify-self: start; }
.site-mt-2 { margin-top: var(--space-2); }
.site-gap-32 { gap: var(--space-6); }
.site-gap-48 { gap: var(--space-7); }
.site-gap-56 { gap: 56px; }
.site-measure-36 { max-width: 36rem; }
.site-panel-content { padding-block: 96px; }
.site-measure-1000 { max-width: 1000px; }
.site-step-num { color: var(--titanium); }
/* Legal pages: plain hero spacing and display-page title size */
.site-legal-hero { padding-top: 200px; }
/* The sticky TOC sits inside <nav>; let the nav span the grid row so the list has room to stick. */
.wm-legal > nav { align-self: stretch; }
.site-title-page { font-size: clamp(44px, 5vw, 72px); }
/* Contact */
.site-contact-block--last { border-bottom: 1px solid var(--hairline); }
/* Contact email links: titanium with a hairline underline, chrome-highlight on hover (as footer links). */
.wm-contact-block__value a { color: var(--titanium); text-decoration: underline; text-decoration-color: var(--hairline-strong);
  text-underline-offset: 4px; transition: color var(--duration-fast) var(--ease-quiet), text-decoration-color var(--duration-fast) var(--ease-quiet); }
.wm-contact-block__value a:hover { color: var(--chrome-highlight); text-decoration-color: var(--chrome-highlight); }
.site-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-5); }
/* Privacy notice under the form / sent state: eyebrow heading + wm-field__help text, hairline above. */
.site-form-notice { display: grid; gap: var(--space-3); padding-top: var(--space-5); border-top: 1px solid var(--hairline); }
.site-actions { display: flex; flex-wrap: wrap; gap: 20px; margin-top: var(--space-2); }
.site-self-center { align-self: center; }
/* Honeypot field: off-screen for people, present for bots. */
.site-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* 404 */
.site-notfound { min-height: 820px; }
.site-title-notfound { font-size: clamp(40px, 4.4vw, 64px); }

/* ---------- Narrow phones (320-359px): keep content inside the viewport ---------- */
/* wm-btn never wraps and has 30px side padding, so "Explore Our Approach" needs 301px of a 272px column. */
@media (max-width: 359px) {
  .wm-btn { padding-inline: var(--space-3); white-space: normal; text-align: center; }
}
/* The 160px "404" is 289px wide; scale it down only where it would not fit (identical from 348px up). */
.wm-notfound__code { font-size: min(160px, 46vw); }

/* Statement band: titanium-ribbons backdrop at 42% */
.site-statement-band { position: relative; isolation: isolate; overflow: hidden; padding: var(--space-10) var(--gutter-desktop); }
.site-statement-band__media { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: 0.42; }

/* ---------- Photography art direction (brand/photography.md) ---------- */
.site-pos-hero-earth { object-position: 70% 50%; }
.site-pos-global-network { object-position: 65% 50%; }
.site-pos-mountain-dawn { object-position: 62% 55%; }
.site-pos-mountain-dawn-hero { object-position: 60% 55%; } /* About hero, as in the reference page */
.site-pos-titanium-ribbons { object-position: 75% 50%; }
.site-pos-financial-district { object-position: 75% 50%; }
.site-pos-office-lobby { object-position: 60% 55%; }
@media (max-width: 767px) {
  .site-pos-hero-earth { object-position: 78% 40%; }
  .site-pos-global-network { object-position: 70% 45%; }
  .site-pos-mountain-dawn, .site-pos-mountain-dawn-hero { object-position: 60% 55%; }
  .site-pos-titanium-ribbons { object-position: 80% 50%; }
  .site-pos-financial-district { object-position: 82% 50%; }
  .site-pos-office-lobby { object-position: 72% 55%; }
}
