@import url('https://fonts.googleapis.com/css2?family=Syne:wght@200;300;400&family=DM+Sans:wght@300;400;700;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root { --blur: 70px; }

html, body {
  width: 100%;
  background: #141415;
}

/* ── Page fade overlay ── */
#page-overlay {
  position: fixed;
  inset: 0;
  background: #141415;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#overlay-jp {
  width: 65vw;
  height: auto;
  fill: #6c718a;
  transform: scale(0);
  opacity: 0;
  filter: blur(52px);
}

/* ── Nav scroll gradient ── */
#nav-gradient {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to bottom, rgba(20,20,21,0.9) 0%, transparent 100%);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
#nav-gradient.visible { opacity: 1; }

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 50px;
  height: 72px;
}

/* ── Hamburger ── */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 6px;
  z-index: 10001;
  position: relative;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 1px;
  background: #fff;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.2s;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Full-screen menu ── */
#full-menu {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(20,20,21,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
#full-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.full-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 49vh;
  width: 100%;
  padding: 0;
}
.full-menu-socials {
  position: absolute;
  bottom: 52px;
}
.full-menu-links a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}
.full-menu-links a:hover { opacity: 0.4; }

/* Mobile submenu */
.full-menu-sub {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.7, 0, 0.3, 1), opacity 0.35s cubic-bezier(0.7, 0, 0.3, 1);
  margin-top: 0;
}
.full-menu-links li.sub-open .full-menu-sub {
  max-height: 300px;
  opacity: 1;
  margin-top: 16px;
}
.full-menu-sub a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  cursor: pointer;
}
.full-menu-sub a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: rgba(255,255,255,0.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}
.full-menu-sub a:hover::after,
.full-menu-sub a:focus::after { transform: scaleX(1); }
.full-menu-socials {
  list-style: none;
  display: flex;
  gap: 28px;
  align-items: center;
}
.full-menu-socials a { display: flex; }
.full-menu-socials svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: rgba(255,255,255,0.72);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s;
}
.full-menu-socials a:hover svg { opacity: 0.5; }

@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-right  { display: none !important; }
  .nav-sub    { display: none !important; }
  .nav        { padding: 0 28px; }
}
html.is-touch .hamburger { display: flex; }
html.is-touch .nav-right  { display: none !important; }
html.is-touch .nav-sub    { display: none !important; }
html.is-touch .nav        { padding: 0 28px; }
html.is-touch .h-cat      { min-height: 0; height: auto; padding: 72px 24px 60px; }

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
.nav-ver { display: none; }

/* ── Global bottom-right meta bar (injected by bg.js) ── */
#site-meta {
  position: fixed;
  bottom: 26px;
  right: 50px;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  gap: 14px;
  pointer-events: none;
  user-select: none;
}
.sm-logo {
  height: 16px;
  width: auto;
  display: block;
  flex-shrink: 0;
  color: rgba(255,255,255,0.3);
}
.sm-ver {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.25);
  line-height: 1;
  white-space: nowrap;
}

/* ── (legacy — now replaced by #site-meta) ── */
.nav-ver--legacy {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.25);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
.nav-logo svg {
  height: 42px;
  width: auto;
  fill: #fff;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 3vw;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 55px;
  align-items: stretch;
}

.nav-links li {
  position: relative;
  display: flex;
  align-items: center;
  height: 72px;
}

.nav-links a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  cursor: pointer;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav-links a:hover::after,
.nav-links li:hover > a::after,
.nav-links li.sub-open > a::after { transform: scaleX(1); }

/* ── Nav submenu ── */
.nav-sub {
  list-style: none;
  position: absolute;
  top: calc(50% + 5px);
  left: 0;
  display: flex;
  gap: 28px;
  white-space: nowrap;
  padding-top: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.7, 0, 0.3, 1);
}
.nav-links li:hover .nav-sub,
.nav-links li.sub-open .nav-sub {
  opacity: 1;
  pointer-events: auto;
}
.nav-sub a {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  cursor: pointer;
}
.nav-sub a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 1px;
  background: rgba(255,255,255,0.55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.76, 0, 0.24, 1);
}
.nav-sub a:hover::after { transform: scaleX(1); }

.nav-socials {
  list-style: none;
  display: flex;
  gap: 25px;
  align-items: center;
}
.nav-socials a {
  display: flex;
  transition: opacity 0.2s;
}
.nav-socials a:hover { opacity: 0.5; }
.nav-socials svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: rgba(255,255,255,0.72);
  stroke-width: 0.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Background blobs ── */
.bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #141415;
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  pointer-events: none;
  filter: blur(var(--blur));
}

.b2 {
  width: 90vw; height: 75vh;
  top: -15vh; right: -20vw;
  background: radial-gradient(ellipse at center, #6c718a 0%, transparent 70%);
  opacity: 0.5;
  animation: drift2 24s ease-in-out infinite alternate;
}

.b3 {
  width: 80vw; height: 65vh;
  bottom: calc(-15vh - 250px); right: calc(-15vw - 250px);
  background: radial-gradient(ellipse at center, #f36e21 0%, transparent 70%);
  opacity: 0.5;
  animation: drift3 28s ease-in-out infinite alternate;
}

.b5 {
  width: 65vw; height: auto;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  opacity: 0.616;
}
.b5 svg { width: 100%; height: auto; display: block; }

.b6 {
  width: 60vw; height: 50vh;
  top: 40vh; left: -5vw;
  background: radial-gradient(ellipse at center, #034e78 0%, transparent 65%);
  opacity: 0.5;
  animation: drift6 21s ease-in-out infinite alternate;
}

@keyframes drift2 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-8vw,10vh) scale(0.93); }
}
@keyframes drift3 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-10vw,-8vh) scale(1.12); }
}
@keyframes drift6 {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(9vw,-9vh) scale(1.08); }
}

/* ── Shared section intro — used on identity, page, print ── */
.section-index {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: 2.5vh;
}
.section-intro h1 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 900;
  font-size: clamp(60px, 12.1vw, 170px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  color: #fff;
}
.section-sub {
  display: block;
  margin-top: 2.8vh;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Category content sections (global — used on any page with .h-cat) ── */
.h-cat {
  justify-content: center;
  padding: 72px 50px 60px;
  position: relative;
  border-top: 1px solid rgba(255,255,255,0.08);
  height: 500px;
}
/* Title-only variant — shrinks to content so the next section peeks below */
.h-cat--title {
  height: auto;
  padding-bottom: 40px;
}
.h-cat__inner {
  max-width: 860px;
}
.h-cat__title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 900;
  font-size: clamp(45px, 7.5vw, 105px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  color: #fff;
  margin: 2vh 0 4vh;
}
.h-cat__body {
  max-width: 560px;
  color: rgba(255,255,255,0.45);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.85;
}
.h-cat__body p { margin-bottom: 1.4em; }

/* ── Global lightbox ── */
#lb {
  position: fixed;
  inset: 0;
  z-index: 50000;
  background: rgba(20,20,21,0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s cubic-bezier(0.7, 0, 0.3, 1);
  touch-action: none;
  overflow: hidden;
}
#lb.open { opacity: 1; pointer-events: auto; }
#lb-img {
  display: block;
  width: auto;
  height: auto;
  max-width: calc(100vw - 220px);
  max-height: calc(100vh - 60px);
  object-fit: contain;
  transition: opacity 0.6s cubic-bezier(0.7, 0, 0.3, 1);
}
.lb-arr {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.lb-arr:hover { opacity: 1; }
.lb-arr svg { width: 48px; height: 48px; stroke: #fff; fill: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
#lb-prev { left: 50px; }
#lb-next { right: 50px; }
#lb-x {
  position: fixed;
  top: 30px; right: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}
#lb-x:hover { opacity: 1; }
#lb-x svg { width: 32px; height: 32px; stroke: #fff; fill: none; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
#lb-caption {
  position: fixed;
  bottom: 28px;
  left: 0; right: 0;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.7);
  pointer-events: none;
  margin: 0;
}

@media (max-width: 768px) {
  #lb-img {
    max-width: 100vw;
    max-height: calc(100vh - 130px);
  }
  .lb-arr {
    top: auto;
    bottom: 36px;
    transform: none;
  }
  .lb-arr svg { width: 40px; height: 40px; }
  #lb-prev { left: calc(50% - 64px); right: auto; }
  #lb-next { right: auto; left: calc(50% + 24px); }
}
