/* Shared floating navigation, including the standalone homepage. */
@media screen {
  html { scroll-padding-top: 105px; }
  body .masthead {
    position: fixed;
    inset: max(12px, env(safe-area-inset-top, 0px)) auto auto 50%;
    transform: translateX(-50%);
    width: min(1120px, calc(100% - 32px));
    min-height: 68px;
    margin: 0;
    padding: 10px 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 100;
    border: 1px solid #26382a24;
    border-radius: 20px;
    background: #f7f6eff5;
    color: #26382a;
    box-shadow: 0 5px 22px #172a1d18;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  body[class^="page-"] { padding-top: 94px; }
  body .masthead > nav, body .masthead .wide-nav { display: none; }
  body .masthead .mobile-actions { display: flex; align-items: center; gap: 22px; }
  body .masthead .mobile-work { display: inline-flex; align-items: center; min-height: 44px; font: 650 15px/1.2 var(--body, var(--sans, sans-serif)); }
  body .masthead > .menu-toggle, body .masthead .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #26382a33;
    border-radius: 12px;
    background: #26382a;
    color: #f7f6ef;
    font: 700 15px/1.2 var(--body, var(--sans, sans-serif));
    cursor: pointer;
  }
  body .masthead .menu-toggle:hover { background: #376248; color: #fffdf6; }
  body .masthead .menu-toggle svg { display: block; width: 20px; height: 20px; }
  body #navigation:not([open]) { display: none !important; }
  body #navigation[open] {
    display: block !important;
    position: fixed;
    inset: 0;
    width: min(540px, calc(100vw - 32px));
    height: fit-content;
    max-width: none;
    max-height: calc(100svh - 32px);
    margin: auto;
    padding: 24px 28px;
    box-sizing: border-box;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid #26382a29;
    border-radius: 22px;
    background: var(--fine-grain, var(--paper-grain, none)), #f7f6ef;
    color: #26382a;
    box-shadow: 0 24px 80px #172a1d38;
    font-family: var(--body, var(--sans, sans-serif));
  }
  body #navigation::backdrop { background: #172a1d80; backdrop-filter: blur(6px); }
  body:has(#navigation[open]) { overflow: hidden; }
  body #navigation .menu-masthead { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #26382a29; font: 600 12px/1.5 var(--body, var(--sans, sans-serif)); }
  body #navigation .close-menu { display: flex; align-items: center; justify-content: center; position: static; width: auto; min-width: 44px; min-height: 44px; padding: 8px 12px; margin: 12px 0 4px auto; border: 1px solid #26382a33; border-radius: 10px; background: transparent; color: #26382a; font: 600 14px/1.2 var(--body, var(--sans, sans-serif)); cursor: pointer; }
  body #navigation .close-menu svg { display: block; width: 20px; height: 20px; }
  body #navigation nav { display: flex; flex-direction: column; gap: 0; margin-top: 4px; }
  body #navigation nav a { display: flex; align-items: center; gap: 18px; width: 100%; min-height: 53px; padding: 9px 12px 9px 0; box-sizing: border-box; border-bottom: 1px solid #26382a24; color: #26382a; font: 400 clamp(28px, 4vw, 38px)/1.15 var(--editorial, var(--serif, Georgia)); letter-spacing: -.02em; text-decoration: none; }
  body #navigation nav a::before { content: attr(data-section); flex: 0 0 22px; color: #57634f; font: 600 11px/1 var(--body, var(--sans, sans-serif)); letter-spacing: .04em; }
  body #navigation nav a:hover { background: #26382a0a; }
  body #navigation p { margin: 18px 0 0; color: #57634f; font-size: 12px; line-height: 1.5; }
  body #navigation :focus-visible, body .masthead :focus-visible { outline: 2px solid #376248; outline-offset: 4px; }
  @media (max-width: 760px) {
    body .masthead { width: calc(100% - 24px); min-height: 62px; padding: 8px 12px; gap: 8px; border-radius: 16px; }
    body .masthead .mobile-actions { gap: 12px; }
    body .masthead .brand-text { display: none; }
    body .masthead .brand-camera { width: 36px; height: 35px; }
    body .masthead .mobile-work { font-size: 14px; }
    body #navigation[open] { padding: 18px 22px; }
    body #navigation nav a { min-height: 49px; font-size: 30px; }
    body[class^="page-"] { padding-top: 86px; }
  }
  @media (max-height: 580px) {
    body #navigation[open] { padding: 12px 22px; }
    body #navigation nav a { min-height: 38px; padding-block: 5px; font-size: 26px; }
    body #navigation p { margin-top: 10px; }
  }
}

/* Quick feedback for the shared field-guide menu. */
@media screen and (prefers-reduced-motion: no-preference) {
  @keyframes field-menu-open {
    from { opacity: .65; translate: 0 6px; }
    to { opacity: 1; translate: 0 0; }
  }
  body #navigation[open] { animation: field-menu-open 160ms ease-out; }
  body .masthead .menu-toggle, body #navigation .close-menu {
    transition: scale 100ms ease-out, background-color 120ms ease-out;
  }
  body .masthead .menu-toggle:active, body #navigation .close-menu:active { scale: .97; }
  body #navigation nav a { transition: padding-left 130ms ease-out, background-color 130ms ease-out; }
  body #navigation nav a:focus-visible { padding-left: 4px; }
  @media (hover: hover) and (pointer: fine) {
    body #navigation nav a:hover { padding-left: 4px; }
  }
}

/* Compact editorial navigation. */
@media screen {
 body #navigation.editorial-menu[open]{padding:16px clamp(16px,4vw,26px);max-height:calc(100dvh - 24px)}
 body #navigation.editorial-menu .menu-masthead{align-items:center;padding-bottom:6px}
 body #navigation.editorial-menu .menu-wordmark{color:inherit;text-decoration:none;font-weight:700}
 body #navigation.editorial-menu .close-menu{margin:0;padding:6px 9px}
 body #navigation.editorial-menu .menu-primary{margin-top:1px}
 body #navigation.editorial-menu .menu-primary a{min-height:46px;padding:4px 3px;gap:12px;font-size:clamp(27px,4vw,35px)}
 body #navigation.editorial-menu .menu-primary a::after{content:none}
 body #navigation.editorial-menu .menu-arrow{margin-left:auto;font:400 18px/1 Helvetica,Arial,sans-serif;transition:transform 150ms ease}
 body #navigation.editorial-menu a:is(:hover,:focus-visible) .menu-arrow{transform:translate(2px,-2px)}
 body #navigation.editorial-menu .menu-project{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;margin-top:10px;padding:9px 12px;border:1px solid #26382a23;border-radius:12px;background:#e7ebdf;color:#26382a;text-decoration:none;transition:background-color 150ms ease}
 body #navigation.editorial-menu .menu-project:hover{background:#dce4d5}
 body #navigation.editorial-menu .project-copy{display:grid;gap:2px;font:400 13px/1.2 Helvetica,Arial,sans-serif}
 body #navigation.editorial-menu .project-label{font-size:9px;font-weight:700;letter-spacing:.11em}
 body #navigation.editorial-menu .project-title{font-size:clamp(23px,5vw,29px);line-height:1.03;letter-spacing:-.05em}
 body #navigation.editorial-menu .menu-secondary{display:flex;flex-flow:row wrap;gap:0 18px;margin:0}
 body #navigation.editorial-menu .menu-secondary a{width:auto;min-height:44px;padding:0;border:0;font:650 14px/1.2 var(--body,var(--sans,sans-serif));letter-spacing:normal}
 body #navigation.editorial-menu .menu-secondary a::before,body #navigation.editorial-menu .menu-secondary a::after{content:none}
 body #navigation.editorial-menu .menu-secondary a:hover{text-decoration:underline;background:transparent}
 body #navigation.editorial-menu p{margin:0;font-size:10px;font-weight:650;letter-spacing:.06em}
}
@media screen and (prefers-reduced-motion:no-preference){
 @keyframes editorial-menu-fade{from{opacity:0}to{opacity:1}}
 @keyframes editorial-menu-dim{from{opacity:1}to{opacity:0}}
 body #navigation.editorial-menu[open]{animation:editorial-menu-fade 160ms ease-out both}
 body #navigation.editorial-menu[open]::backdrop{animation:editorial-menu-fade 160ms ease-out both}
 body #navigation.editorial-menu.menu-closing[open],body #navigation.editorial-menu.menu-closing[open]::backdrop{animation:editorial-menu-dim 150ms ease-in both}
}
@media (prefers-reduced-motion:reduce){body #navigation.editorial-menu :is(.menu-arrow,.menu-project){transition:none}}
