/* Shared mobile site navigation for the static portfolio surfaces.
   The Next.js routes render the same structure through GlobalHeader. */
.static-mobile-header,
.static-mobile-drawer {
  display: none;
}

.static-mobile-drawer[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .static-mobile-header {
    --mobile-ground: #ede1c6;
    --mobile-ink: #173b4d;
    --mobile-mark-ground: #173b4d;
    --mobile-action-ink: #ede1c6;
    position: sticky;
    top: 0;
    z-index: 400;
    display: grid;
    width: calc(100% + var(--static-body-pad-left, 0px) + var(--static-body-pad-right, 0px));
    margin-left: calc(-1 * var(--static-body-pad-left, 0px));
    grid-template-columns: 56px minmax(0, 1fr) auto 52px 52px;
    min-height: 60px;
    border-bottom: 4px solid var(--mobile-ink);
    background: var(--mobile-ground);
    color: var(--mobile-ink);
    font: 700 13px/1 "Afacad Flux", Afacad, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  :root[data-theme="dark"] .static-mobile-header,
  :root[data-theme="dark"] .static-mobile-drawer {
    --mobile-ground: #173b4d;
    --mobile-ink: #ede1c6;
    --mobile-mark-ground: #ede1c6;
    --mobile-action-ink: #173b4d;
  }

  .static-mobile-home {
    display: block;
    width: 56px;
    height: 56px;
    overflow: hidden;
    background-color: var(--mobile-mark-ground);
    color: transparent;
    text-decoration: none;
  }

  .static-mobile-mark {
    display: block;
    width: 56px;
    height: 56px;
    background: url("/brand/gg-mark-transparent-light.svg") left center / 56px 56px no-repeat;
  }

  :root[data-theme="dark"] .static-mobile-mark {
    background-image: url("/brand/gg-mark-transparent-dark.svg");
  }

  .static-mobile-a11y {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .static-mobile-spacer {
    min-width: 0;
  }

  .static-mobile-contact,
  .static-mobile-theme,
  .static-mobile-menu {
    min-height: 56px;
    border: 0;
    border-left: 1px solid var(--mobile-ink);
    border-radius: 0;
    font: inherit;
  }

  .static-mobile-contact {
    display: grid;
    min-width: 108px;
    padding: 0 22px;
    place-items: center;
    background: var(--mobile-ground);
    color: var(--mobile-ink);
    letter-spacing: 0.07em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .static-mobile-theme,
  .static-mobile-menu {
    width: 52px;
    background: var(--mobile-ground);
    color: var(--mobile-ink);
    cursor: pointer;
  }

  .static-mobile-theme {
    font-size: 20px;
  }

  .static-mobile-menu {
    padding: 10px 14px;
  }

  .static-mobile-menu span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: currentColor;
  }

  .static-mobile-home:focus-visible,
  .static-mobile-contact:focus-visible,
  .static-mobile-theme:focus-visible,
  .static-mobile-menu:focus-visible,
  .static-mobile-drawer a:focus-visible,
  .static-mobile-drawer button:focus-visible {
    outline: 3px solid #d4a82e;
    outline-offset: -3px;
  }

  .static-mobile-nav-ready body > .sitebar,
  .static-mobile-nav-ready body > .nav,
  .static-mobile-nav-ready body > .case-sitebar {
    display: none !important;
  }

  .static-mobile-drawer {
    --mobile-ground: #ede1c6;
    --mobile-ink: #173b4d;
    --mobile-mark-ground: #173b4d;
    --mobile-action-ink: #ede1c6;
    position: fixed;
    inset: 0;
    z-index: 500;
    display: block;
    overflow-y: auto;
    background: var(--mobile-ground);
    color: var(--mobile-ink);
    font: 700 16px/1.25 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  .static-mobile-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 2px solid var(--mobile-ink);
    padding: 18px 20px;
  }

  .static-mobile-drawer-top p {
    margin: 0;
    font-family: Truculenta, "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
    font-size: 26px;
    font-weight: 500;
    line-height: 1.1;
  }

  .static-mobile-close {
    border: 2px solid var(--mobile-ink);
    background: var(--mobile-ground);
    color: var(--mobile-ink);
    padding: 8px 16px;
    font: inherit;
    cursor: pointer;
  }

  .static-mobile-drawer-links {
    display: grid;
  }

  .static-mobile-drawer-links a {
    display: block;
    border-bottom: 1px solid var(--mobile-ink);
    padding: 18px 20px;
    color: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-decoration: none;
    text-transform: uppercase;
  }

  .static-mobile-drawer-links a[aria-current="page"] {
    background: #d4a82e;
    color: #173b4d;
  }

  .static-mobile-drawer-cta {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 20px;
    border: 2px solid var(--mobile-mark-ground);
    background: var(--mobile-mark-ground);
    color: var(--mobile-action-ink);
    padding: 12px 20px;
    font-size: 15px;
    text-decoration: none;
  }

  body.static-mobile-nav-open {
    overflow: hidden !important;
  }
}

@media print {
  .static-mobile-header,
  .static-mobile-drawer {
    display: none !important;
  }
}
