/* ============================================================
   STUDIO MEY — Stylesheet
   Aesthetic: Japanese minimalism. Silent. Precise. Pure white.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400&display=swap');

/* --- TOKENS --- */
:root {
  --white: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --ink-faint: #aaaaaa;
  --nav-height: 64px;
  --font: 'Inter', sans-serif;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --overlay-transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background-color: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 300;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul { list-style: none; }

/* --- BACKGROUND LAYER --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.04;
  filter: grayscale(100%);
}

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.nav-logo {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink);
  transition: opacity var(--transition);
  z-index: 110;
}
.nav-logo:hover { opacity: 0.4; }
.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color var(--transition);
}
.nav-link:hover,
.nav-link.active { color: var(--ink); }

/* --- HAMBURGER BUTTON (mobile only) --- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* --- MOBILE MENU --- */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 40px;
}
.nav-mobile.open { display: flex; }
.nav-mobile-link {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color var(--transition);
}
.nav-mobile-link:hover,
.nav-mobile-link.active { color: var(--ink); }

/* --- GALLERY --- */
.gallery {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 100px;
  max-width: 820px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  columns: 2;
  column-gap: 10px;
}

/* --- SINGLE COLUMN GALLERY (Events & Archive) --- */
.gallery--single {
  columns: 1;
  max-width: 600px;
}

/* Project cards */
.project-card {
  break-inside: avoid;
  margin-bottom: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.card-img-wrap {
  position: relative;
  overflow: hidden;
}
.card-img-wrap img {
  height: auto;
  display: block;
  transition: opacity 0.5s ease;
  opacity: 1;
}
.project-card:hover .card-img-wrap img { opacity: 0.7; }
.card-hover-label { display: none; }

/* Staggered fade-in */
.project-card {
  opacity: 0;
  animation: fadeIn 0.8s forwards;
}
.project-card:nth-child(1)  { animation-delay: 0.04s; }
.project-card:nth-child(2)  { animation-delay: 0.10s; }
.project-card:nth-child(3)  { animation-delay: 0.16s; }
.project-card:nth-child(4)  { animation-delay: 0.22s; }
.project-card:nth-child(5)  { animation-delay: 0.28s; }
.project-card:nth-child(6)  { animation-delay: 0.34s; }
.project-card:nth-child(7)  { animation-delay: 0.40s; }
.project-card:nth-child(8)  { animation-delay: 0.46s; }
.project-card:nth-child(9)  { animation-delay: 0.52s; }
.project-card:nth-child(10) { animation-delay: 0.58s; }

@keyframes fadeIn { to { opacity: 1; } }

/* --- OVERLAY --- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--overlay-transition);
  overflow-y: auto;
}
.overlay.open {
  opacity: 1;
  pointer-events: all;
}
.overlay-close {
  position: fixed;
  top: 24px;
  right: 36px;
  z-index: 210;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px;
  opacity: 0.35;
  transition: opacity var(--transition);
}
.overlay-close:hover { opacity: 1; }
.overlay-close span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--ink);
  transform-origin: center;
}
.overlay-close span:first-child { transform: translateY(0.5px) rotate(45deg); }
.overlay-close span:last-child  { transform: translateY(-0.5px) rotate(-45deg); }
.overlay-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 100vh;
}
.overlay-images {
  padding: 72px 40px 80px 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-right: 1px solid #ebebeb;
}
.overlay-images img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 85vh;
}
.overlay-info {
  padding: 72px 32px 80px 32px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
}
.overlay-number {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 20px;
}
.overlay-title {
  font-size: 0.82rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 28px;
  text-transform: uppercase;
}
.overlay-description {
  font-size: 0.75rem;
  font-weight: 300;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}
.overlay-credits {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 2.1;
  color: var(--ink-faint);
  white-space: pre-line;
  text-transform: uppercase;
}

/* --- FOOTER --- */
.site-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-top: 1px solid #ebebeb;
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.footer-instagram a {
  color: var(--ink-faint);
  transition: color var(--transition);
}
.footer-instagram a:hover { color: var(--ink); }

/* --- INFO PAGE --- */
.info-page {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  padding-left: 80px;
  padding-right: 80px;
  min-height: calc(100vh - var(--nav-height));
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  align-items: start;
  max-width: 1000px;
}
.info-portrait {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: top;
  filter: grayscale(20%);
}
.info-name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 200;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 10px;
}
.info-role {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 48px;
}
.info-bio {
  font-size: 0.82rem;
  font-weight: 300;
  line-height: 2.1;
  color: var(--ink-soft);
  margin-bottom: 48px;
  max-width: 460px;
  letter-spacing: 0.02em;
}
.info-services { margin-bottom: 48px; }
.info-services-label {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.info-services ul { display: flex; flex-direction: column; gap: 8px; }
.info-services li {
  font-size: 0.75rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.info-contact { display: flex; flex-direction: column; gap: 10px; }
.info-email,
.info-instagram {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  transition: color var(--transition);
}
.info-email:hover,
.info-instagram:hover { color: var(--ink); }

/* --- CONTACT PAGE --- */
.contact-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 40px 80px;
}
.contact-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-name {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.contact-link {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
}
.contact-link:hover { color: var(--ink); }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {

  /* Hide desktop nav links, show hamburger */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav { padding: 0 24px; }

  .gallery {
    max-width: 100%;
    columns: 2;
    padding-left: 12px;
    padding-right: 12px;
    column-gap: 8px;
  }
  .gallery--single {
    columns: 1;
    max-width: 100%;
    margin: 0 auto;
  }
  .project-card { margin-bottom: 8px; }

  .overlay-inner { grid-template-columns: 1fr; }
  .overlay-images {
    padding: 72px 16px 32px;
    border-right: none;
    border-bottom: 1px solid #ebebeb;
  }
  .overlay-info {
    position: static;
    max-height: none;
    padding: 32px 16px 80px;
  }
  .overlay-close { right: 16px; }

  .info-page { padding: 100px 24px 60px; }
  .info-grid { grid-template-columns: 1fr; gap: 40px; }
  .info-portrait { height: 400px; }

  .site-footer { flex-direction: column; gap: 8px; text-align: center; padding: 20px 24px; }
}

@media (max-width: 400px) {
  .gallery { columns: 1; }
}
