/* Additive navigation only. The captured original stylesheets stay unchanged. */
html { scroll-padding-top: calc(var(--site-header-height, 100px) + 16px); }
.site-menu-toggle, .mobile-contact-link { display: none; }
.site-menu-toggle[hidden], .back-to-top[hidden] { display: none !important; }

/* The original header is already sticky; only its scrolled spacing changes. */
body.enhancements-ready > header { transition: padding .2s ease, min-height .2s ease; }
body.enhancements-ready > header.is-compact { min-height: 84px; padding-top: 12px; padding-bottom: 12px; }
.preview-return { padding-top: 22px; padding-bottom: 0; }
.preview-return .back-link { margin-bottom: 0; min-height: 44px; display: inline-flex; align-items: center; }
.back-link::before { content: "←"; display: inline-block; margin-right: 9px; text-decoration: none; }
.back-to-top {
  position: fixed; z-index: 20;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  width: 46px; height: 46px; padding: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink); background: var(--paper); border: 1px solid var(--line);
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 3px 15px #102a4314;
  transition: background .18s ease, color .18s ease;
}
.back-to-top svg { width: 22px; height: 22px; }
.back-to-top:hover { background: var(--ink); color: var(--paper); }

/* Keep the original photo frame, label and caption still while the photo moves. */
.portrait-photo-viewport { width: 100%; overflow: hidden; background: var(--ink); flex-shrink: 0; }
.portrait-photo-viewport > img { transform-origin: center top; }
.contact-office { margin-top: 26px; padding-top: 23px; border-top: 1px solid var(--line); }
.contact-direct .contact-office h3 { color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: 0; line-height: 1.4; margin: 0 0 10px; }
.contact-direct .contact-office .contact-address { margin: 0 0 14px; }
.contact-office .text-link { display: inline-block; max-width: 100%; }

/* Content remains visible even if animation support or JavaScript fails. */
@keyframes gentle-entry {
  from { opacity: .65; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: no-preference) {
  .gentle-entry { animation: gentle-entry .48s ease both; }
}

@media (max-width: 950px) {
  /* Without JavaScript, all navigation links remain accessible. */
  body > header { flex-wrap: wrap; }
  body > header nav { display: flex; width: 100%; order: 3; gap: 12px 20px; }
  body.enhancements-ready > header { flex-wrap: nowrap; }
  body.enhancements-ready > header > .nav-cta { display: none; }
  body.enhancements-ready > header > .site-menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    position: relative; flex-shrink: 0; width: 46px; height: 46px;
    margin-left: auto; padding: 11px; border: 0;
    background: transparent; color: var(--ink); cursor: pointer;
  }
  .site-menu-toggle span {
    width: 24px; height: 2px; background: currentColor;
    position: absolute; left: 11px; top: 22px;
    transition: transform .2s ease;
  }
  .site-menu-toggle span:first-child { transform: translateY(-4px); }
  .site-menu-toggle span:last-child { transform: translateY(4px); }
  .site-menu-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
  .site-menu-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }
  body.enhancements-ready > header > nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    width: 100%; margin: 0; padding: 10px 20px 22px;
    max-height: calc(100vh - var(--site-header-height, 85px));
    max-height: calc(100dvh - var(--site-header-height, 85px));
    overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: stretch; flex-wrap: nowrap;
    justify-content: flex-start; gap: 0; order: initial;
    background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  body.enhancements-ready > header.menu-open > nav { display: flex; }
  body.enhancements-ready > header > nav > a { padding: 13px 6px; min-height: 48px; white-space: normal; }
  body.enhancements-ready > header > nav > a + a { border-top: 1px solid var(--line); }
  body.enhancements-ready > header > nav > .mobile-contact-link {
    display: inline-flex; margin: 16px 0 0; max-width: none; padding: 13px 16px;
    border: 1px solid var(--ink); font-size: 16px;
  }
  html.menu-is-open { overflow: hidden; }
}
@media (max-width: 800px) {
  body.enhancements-ready > header.is-compact { min-height: 72px; padding-top: 10px; padding-bottom: 10px; }
  .back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.enhancements-ready > header, .site-menu-toggle span, .back-to-top { transition: none; }
  .gentle-entry { animation: none; }
  .portrait-photo-viewport > img { transform: none !important; will-change: auto !important; }
}
