/* =========================================
   NAOYA TSUJI — Portfolio
   Design System
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;1,300&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-bg:        #ffffff;
  --color-text:      #111111;
  --color-muted:     #888888;
  --color-border:    #e4e4e4;
  --color-hover:     #555555;
  --font-primary:    'Open Sans', Helvetica, Arial, sans-serif;
  --nav-height:      64px;
  --max-width:       1200px;
  --transition:      0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-primary);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition), opacity var(--transition);
}

a:hover {
  color: var(--color-hover);
}

img {
  display: block;
  max-width: 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.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.nav--transparent {
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.nav--transparent .nav__logo,
.nav--transparent .nav__links a,
.nav--transparent .lang-toggle {
  color: #ffffff;
}

.nav__logo {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav__links a {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}


/* ---------- Hamburger button ---------- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 201;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Mobile menu overlay ---------- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.98);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.active {
  display: flex;
  opacity: 1;
}

.mobile-menu__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.mobile-menu__links a {
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition);
}

.mobile-menu__links a:hover,
.mobile-menu__links a.active {
  color: var(--color-muted);
}

/* ヒーロー内モバイルナビ（トップページ専用） */
.hero__mobile-nav {
  display: none;
  position: absolute;
  bottom: 80px;
  left: 0;
  right: 0;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  z-index: 10;
}

.hero__mobile-nav a {
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__mobile-nav a:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .nav__hamburger {
    display: flex;
  }

  /* トップページ：ハンバーガー非表示、ヒーロー内ナビを表示 */
  .hero .nav__hamburger,
  body:has(.hero) .nav__hamburger {
    display: none;
  }

  .hero__mobile-nav {
    display: flex;
  }
}

/* =========================================
   HERO (video)
   ========================================= */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: #111;
}

.hero__video-wrap {
  position: absolute;
  inset: 0;
}

.hero__video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

/* Slideshow overlay for multiple videos */
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero__slide.active {
  opacity: 1;
}

.hero__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.08) 60%,
    rgba(0,0,0,0.35) 100%
  );
}

.hero__copy {
  position: absolute;
  bottom: 80px;
  left: 40px;
  color: #fff;
}

.hero__name {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 6px;
}

.hero__tagline {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  right: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,0.4);
}

/* =========================================
   SECTION
   ========================================= */

.section {
  padding: 100px 40px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--full {
  max-width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}

.section__label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 48px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.section__label::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--color-border);
}

/* =========================================
   WORKS GRID
   ========================================= */

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.work-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #f0f0f0;
  cursor: pointer;
}

.work-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.work-card__placeholder {
  width: 100%;
  height: 100%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.work-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 24px;
  transition: background var(--transition);
}

.work-card:hover .work-card__overlay {
  background: rgba(0,0,0,0.45);
}

.work-card:hover .work-card__img {
  transform: scale(1.03);
}

.work-card__title {
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}

.work-card__tags {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition) 0.05s, transform var(--transition) 0.05s;
}

.work-card:hover .work-card__title,
.work-card:hover .work-card__tags {
  opacity: 1;
  transform: translateY(0);
}

.tag {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.5);
  padding: 3px 8px;
}

/* =========================================
   WORK DETAIL PAGE
   ========================================= */

.work-detail {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
  max-width: 960px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

.work-detail__back {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 48px;
}

.work-detail__back:hover {
  color: var(--color-text);
}

.work-detail__back::before {
  content: '←';
}

.work-detail__header {
  margin-bottom: 48px;
}

.work-detail__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.work-detail__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.work-detail__video {
  margin-bottom: 48px;
  aspect-ratio: 16/9;
}

.work-detail__video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.work-detail__photos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-bottom: 48px;
}

.work-detail__photos .photo {
  aspect-ratio: 4/3;
  background: #e8e8e8;
  overflow: hidden;
}

.work-detail__photos .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-detail__photos .photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.work-detail__desc {
  font-size: 14px;
  line-height: 2;
  color: var(--color-muted);
  max-width: 640px;
}

/* =========================================
   SHOWCASE — password gate
   ========================================= */

.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
}

.gate__title {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.gate__subtitle {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.gate__desc {
  font-size: 12px;
  color: var(--color-muted);
  line-height: 2;
  max-width: 480px;
  text-align: center;
  margin-bottom: 40px;
}

.gate__desc a {
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: border-color var(--transition);
}

.gate__desc a:hover {
  border-color: var(--color-text);
}

.gate__form {
  display: flex;
  gap: 0;
  max-width: 280px;
  width: 100%;
}

.gate__input {
  flex: 1;
  border: 1px solid var(--color-border);
  border-right: none;
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-size: 13px;
  letter-spacing: 0.2em;
  outline: none;
  background: var(--color-bg);
  text-align: center;
}

.gate__input:focus {
  border-color: var(--color-text);
}

.gate__btn {
  border: 1px solid var(--color-text);
  background: var(--color-text);
  color: var(--color-bg);
  padding: 12px 20px;
  font-family: var(--font-primary);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.gate__btn:hover {
  background: var(--color-hover);
  border-color: var(--color-hover);
}

.gate__error {
  margin-top: 16px;
  font-size: 11px;
  color: #c0392b;
  letter-spacing: 0.08em;
  opacity: 0;
  transition: opacity var(--transition);
}

.gate__error.visible {
  opacity: 1;
}

.showcase-content {
  display: none;
  padding-top: var(--nav-height);
}

.showcase-content.visible {
  display: block;
}

/* =========================================
   ABOUT
   ========================================= */

.about-wrap {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 100px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about__photo {
  aspect-ratio: 4/3;
  background: #e8e8e8;
  overflow: hidden;
}

.about__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about__photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.about__info {}

.about__name-en {
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.about__name-jp {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-bottom: 40px;
}

.about__body {
  font-size: 14px;
  line-height: 2;
  margin-bottom: 40px;
}

.about__body p + p {
  margin-top: 16px;
}

.about__meta {
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.06em;
  line-height: 2;
}

.about__timeline {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  align-items: baseline;
  font-size: 13px;
  line-height: 1.6;
}

.about__timeline-year {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  white-space: nowrap;
}

.about__timeline-desc {
  color: var(--color-text);
}

.about__sns {
  margin-top: 40px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.about__sns a {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  transition: color var(--transition);
}

.about__sns a:hover {
  color: var(--color-text);
}

.about__sns-sep {
  color: var(--color-border);
  font-size: 13px;
}

.about__tagline {
  margin-bottom: 32px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #444;
  font-style: italic;
}

/* =========================================
   CONTACT
   ========================================= */

.contact-wrap {
  min-height: calc(100vh - var(--nav-height));
  padding-top: calc(var(--nav-height) + 100px);
  padding-bottom: 100px;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
}

.contact__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 300;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
}

.contact__email {
  display: inline-block;
  font-size: 16px;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  margin-bottom: 64px;
  transition: color var(--transition), border-color var(--transition);
}

.contact__email:hover {
  color: var(--color-muted);
  border-color: var(--color-muted);
}

.contact__sns-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.sns-icons {
  display: flex;
  gap: 24px;
}

.sns-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: color var(--transition);
}

.sns-icon:hover {
  color: var(--color-muted);
}

.sns-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* =========================================
   PROFONDE SECTION (homepage teaser)
   ========================================= */

.profonde-section {
  background: #f0ece5;
  color: var(--color-text);
  padding: 100px 40px;
  text-align: center;
}

/* Behold.so Instagram feed wrapper */
.profonde-section .behold-wrap {
  max-width: 900px;
  margin: 40px auto 0;
}

.profonde-section .section__label {
  color: var(--color-muted);
  justify-content: center;
  max-width: 200px;
  margin: 0 auto 40px;
}

.profonde-section .section__label::after {
  display: none;
}

.profonde-title {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.btn-outline {
  display: inline-block;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  padding: 12px 32px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-outline:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
  padding: 32px 40px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 11px;
  color: var(--color-muted);
  letter-spacing: 0.08em;
}

.footer__top {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.footer__top:hover {
  color: var(--color-text);
}

.works-client__genre {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #444;
  margin-bottom: 16px;
  margin-top: -8px;
}

.works-client__credit {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #444;
  margin-top: 10px;
}

/* =========================================
   LIGHTBOX
   ========================================= */

/* 写真にカーソル＋ホバー効果（CSSはここだけ、残りはJS管理） */
.still-masonry__item {
  cursor: pointer;
  transition: opacity var(--transition);
}

.still-masonry__item:hover {
  opacity: 0.82;
}

/* =========================================
   PAGE TRANSITION
   ========================================= */

.page-fade {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  .nav {
    padding: 0 20px;
  }

  .nav__links {
    display: none;
  }

  .hero__copy {
    left: 20px;
    bottom: 60px;
  }

  .section {
    padding: 64px 20px;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .about-wrap {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
    gap: 40px;
  }

  .work-detail {
    padding-left: 20px;
    padding-right: 20px;
  }

  .work-detail__photos {
    grid-template-columns: 1fr;
  }

  .contact-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .footer {
    padding: 24px 20px;
  }

  .profonde-section {
    padding: 64px 20px;
  }
}
