/*
 * Shared site chrome (header / nav / mobile menu / footer) for
 * Hiroshi Tanita Photography renewal pages.
 * Split out of css/gallery.css; values unchanged (tokenised via css/tokens.css).
 * Class prefix: site- (state classes: is-)
 */

/* ---- base ---- */
body {
  margin: 0;
  background: var(--c-bg);
  font-family: var(--font-display);
}

.site-page {
  min-height: 100vh;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}

/* ヒーローページ（index.html）はヘッダーがヒーロー画像に重なる設計のため、上余白補正なし */
.site-page--hero {
  padding-top: 0;
}

/* ---- header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(16px, 2.2vw, 22px) clamp(20px, 4.5vw, 48px);
  border-bottom: 1px solid rgba(var(--c-light-rgb), .16);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  min-height: var(--header-h);
  box-sizing: border-box;
  background: rgba(var(--c-bg-rgb), .55);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

/* variant: no divider hairline — used on the hero/landing page (Top),
   where the header blends into the full-bleed hero below it. Bottom edge is
   feathered (mask fade) so the translucent/blurred band dissolves into the
   hero image instead of cutting a hard line across it. */
.site-header--flush {
  border-bottom: none;
  background: rgba(var(--c-bg-rgb), .18);
  mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
}

.site-logo-link {
  display: inline-flex;
  line-height: 0;
}

.site-logo {
  height: clamp(26px, 3vw, 30px);
  width: auto;
  opacity: .95;
}

/* desktop nav (>=900px) */
.site-nav {
  display: none;
  gap: 34px;
}

.site-nav-link {
  color: rgba(var(--c-light-rgb), .75);
  font-size: 11px;
  letter-spacing: .3em;
  text-decoration: none;
  padding-bottom: 4px;
  background: linear-gradient(var(--c-white), var(--c-white)) left bottom / 0% 1px no-repeat;
  transition: color .35s, background-size .35s;
}

.site-nav-link:hover {
  color: var(--c-white);
  background-size: 100% 1px;
}

.site-nav-link.is-active {
  color: var(--c-white);
  border-bottom: 1px solid var(--c-white);
  /* active link keeps a static underline, no grow-in gradient */
  background: none;
}

/* mobile hamburger (<900px) */
.site-burger {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 24px;
  cursor: pointer;
  padding: 6px 0;
  background: none;
  border: none;
  margin: 0;
}

.site-burger span {
  height: 1px;
  background: var(--c-light);
  display: block;
}

/* ---- mobile overlay menu ---- */
.site-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(var(--c-bg-rgb), .72);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px;
}

.site-mobile-menu.is-open {
  display: flex;
}

.site-mobile-close {
  position: absolute;
  top: clamp(16px, 2.2vw, 22px);
  right: clamp(20px, 4.5vw, 48px);
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-light);
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

.site-mobile-link {
  color: rgba(var(--c-light-rgb), .85);
  font-size: 13px;
  letter-spacing: .3em;
  text-decoration: none;
  padding-bottom: 4px;
  transition: color .35s;
}

.site-mobile-link:hover,
.site-mobile-link.is-active {
  color: var(--c-white);
}

/* ---- footer ---- */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 4.5vw, 48px);
  border-top: 1px solid rgba(var(--c-light-rgb), .18);
  margin-top: auto;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer-logo {
  height: 22px;
  width: auto;
  opacity: .55;
}

.site-footer-copy {
  color: rgba(var(--c-light-rgb), .45);
  font-size: 10px;
  letter-spacing: .16em;
}

/* ---- responsive: >=900px is the desktop layout ---- */
@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }

  .site-burger {
    display: none;
  }
}

/* ---- reduced motion: JS also disables entrance/FLIP animations ---- */
@media (prefers-reduced-motion: reduce) {
  .site-nav-link {
    transition: none;
  }
}
