/* japan.je site logo — the 和 seal, "Japan●je" with the red sun as its dot, and the museum tagline.
   One file for every page. Fonts are tiny self-hosted subsets (SIL Open Font License):
   Shippori Mincho 700 for the letters J-a-p-n-e only, Yuji Syuku for the 和 glyph only. */
@font-face { font-family: "JJ Logo Serif"; src: url("fonts/shippori-mincho-700-logo.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "JJ Logo Brush"; src: url("fonts/yuji-syuku-wa.woff2") format("woff2"); font-display: swap; }

.site-logo { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; color: #2c2c2c; white-space: nowrap; line-height: 1; }
.site-logo:focus-visible { outline: 2px solid #d4af37; outline-offset: 4px; border-radius: 4px; }

.site-seal { position: relative; overflow: hidden; width: 40px; height: 40px; flex: none; display: grid; place-items: center;
             background: #c41e3a; color: #fff; border-radius: 4px; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
             font-family: "JJ Logo Brush", "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: 25px; line-height: 1; }
.site-seal-meaning { position: absolute; inset: 0; display: grid; place-items: center; background: #c41e3a;
                     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 8px; letter-spacing: 0.08em;
                     text-transform: uppercase; opacity: 0; transition: opacity .25s ease; }
.site-logo:hover .site-seal-meaning, .site-logo:focus-visible .site-seal-meaning { opacity: 1; }

.site-logo-text { display: flex; flex-direction: column; gap: 3px; }
.site-logo-word { font-family: "JJ Logo Serif", "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
                  font-weight: 700; font-size: 23px; letter-spacing: 0.03em; color: #2c2c2c; line-height: 1.1; }
.site-sun { display: inline-block; width: 0.36em; height: 0.36em; margin: 0 0.06em; border-radius: 50%; background: #c41e3a; transform: translateY(-0.02em); }
.site-logo-tagline { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif; font-size: 10px; font-weight: 500;
                     letter-spacing: 0.22em; text-transform: uppercase; color: #8a817e; }

@media (max-width: 768px) {
  .site-seal { width: 34px; height: 34px; font-size: 21px; }
  .site-logo-word { font-size: 19px; }
  .site-logo-tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) { .site-seal-meaning { transition: none; } }

/* ---- the shared site menu (site_nav.py) ---- */
.nav-container { position: relative; }
.nav-container .site-nav { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-container .site-nav a { color: #2c2c2c; text-decoration: none; font-size: 15px; font-weight: 400; letter-spacing: 0.02em; transition: color .2s ease; }
.nav-container .site-nav a:hover, .nav-container .site-nav a:focus-visible { color: #c41e3a; }
.nav-container .site-nav a[aria-current="page"] { color: #c41e3a; }
.menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; padding: 10px; border-radius: 4px; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 22px; height: 2px; background: #2c2c2c; position: relative; content: ""; transition: transform .2s ease, background .2s ease; }
.menu-toggle span::before { position: absolute; top: -7px; } .menu-toggle span::after { position: absolute; top: 7px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.menu-toggle:focus-visible { outline: 2px solid #d4af37; outline-offset: 2px; }
@media (max-width: 1080px) {
  .menu-toggle { display: block; }
  .nav-container .site-nav { display: none; position: absolute; top: calc(100% + 14px); right: 0; left: 0; flex-direction: column; align-items: stretch;
                             gap: 0; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,0.12); border-radius: 0 0 6px 6px; padding: 8px 0; z-index: 1001; }
  .nav-container .site-nav.open { display: flex; }
  .nav-container .site-nav a { display: block; padding: 13px 22px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { transition: none; } }
/* dropdown submenus (site_nav.py MENU entries with a submenu) */
.nav-container .site-nav .has-sub { position: relative; }
.nav-container .site-nav .has-sub > a { white-space: nowrap; }
.nav-container .site-nav .has-sub .caret { font-size: 11px; margin-left: 5px; }
.nav-container .site-nav .subnav { display: none; position: absolute; top: 100%; left: -18px; z-index: 1000; min-width: 230px;
  list-style: none; margin: 0; padding: 14px 0 8px; background: #fff; border-top: 2px solid #c41e3a; box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.nav-container .site-nav .has-sub:hover > .subnav, .nav-container .site-nav .has-sub:focus-within > .subnav { display: block; }
.nav-container .site-nav .subnav a { display: block; padding: 9px 18px; white-space: nowrap; font-size: 14.5px; }
@media (max-width: 1080px) {
  .nav-container .site-nav .has-sub .caret { display: none; }
  .nav-container .site-nav .subnav { display: block; position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .nav-container .site-nav .subnav a { padding: 9px 22px 9px 42px; font-size: 15px; color: #555; }
}
/* images carry width/height (site_images.py) so pages don't jump while loading; these zero-specificity
   rules keep the real size responsive — any page's own image rule still wins. */
:where(img[width][height]) { height: auto; max-width: 100%; }
.image-caption { font-size: 13px; color: #777; font-style: italic; margin: 6px 0 18px; }
.image-caption a { color: #9a7b1f; }
