/* ============================================
   TETSUYA HARA - hara.studio
   Main Stylesheet
   ============================================ */

/* --- RESET & BASE --- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: #fff;
  color: #000;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  opacity: 0;
  transition: opacity 0.4s ease-in;
}

body.ready {
  opacity: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- NO-SELECT (prevent text highlight on rapid click) --- */
.sidebar, .sidebar a,
.mobile-header, .mobile-header a,
.mobile-nav, .mobile-nav a {
  -webkit-user-select: none;
  user-select: none;
}

/* --- SIDEBAR (PC) --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: #fff;
  padding: 20px 0 0 42px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  z-index: 9999;
  border-right: 1px solid #e0e0e0;
}

.sidebar-title {
  text-decoration: none;
  display: block;
  margin-bottom: 28px;
}

.sidebar-title span {
  display: block;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 4px;
  line-height: 1.3em;
  color: #000;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sidebar-nav a {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: #777;
  letter-spacing: 0;
  line-height: 1.8em;
  display: block;
  transition: color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  color: #000;
}

/* --- MOBILE HEADER --- */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  z-index: 9999;
  border-bottom: 1px solid #e0e0e0;
}

.mobile-title {
  text-decoration: none;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #000;
  white-space: nowrap;
}

.menu-btn {
  cursor: pointer;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: #000;
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(180, 180, 180, 0.95);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav-close {
  position: absolute;
  top: 18px;
  right: 20px;
  cursor: pointer;
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #fff;
  background: transparent;
  border: none;
}

.mobile-nav a {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #fff;
  padding: 12px 0;
  display: block;
  text-align: center;
}

/* --- MAIN (PC: offset by sidebar width) --- */
main {
  padding-left: 260px;
}

/* --- SLIDESHOW (PC) --- */
.slideshow {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  overflow: hidden;
}

.slide-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide-img {
  max-width: 100%;
  max-height: calc(100vh - 40px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

/* 書「流」だけ画面いっぱいに近く表示 */
.slide-img.is-cover {
  max-width: 92%;
  max-height: 96vh;
}

.slide-caption {
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-style: italic;
  color: #777;
  margin-top: 14px;
  text-align: center;
  min-height: 20px;
}

/* --- STATEMENT --- */
.statement-page {
  width: 100%;
}

.statement-hero {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 60px;
}

.statement-hero span {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #000;
  text-align: center;
  display: inline-block;
  line-height: 1.6em;
}

/* PC: モバイル用brを無効化 (スペースに変換) */
.mobile-only-br {
  display: none;
}
.mobile-only-br::before {
  content: " ";
}

.statement-body {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 60px 120px;
}

.statement-text {
  max-width: 640px;
  font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  font-weight: 400;
  color: #333;
  line-height: 1.9em;
}

.statement-text p {
  margin: 0 0 1.6em 0;
}

.statement-text p.quote {
  margin: 1.2em 0;
  padding: 0.8em 0;
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-style: italic;
  letter-spacing: 0.5px;
  line-height: 2em;
}

.statement-text p.emphasized {
  margin: 0 0 2em 0;
  font-weight: 500;
}

.statement-text p.tight-above {
  margin: 0 0 0.6em 0;
}

.statement-text p.spacious-above {
  margin: 1em 0 0 0;
}

/* --- ABOUT --- */
.about-page {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 80px 60px 120px;
}

.about-inner {
  display: flex;
  gap: 60px;
  max-width: 960px;
  width: 100%;
  align-items: flex-start;
}

.about-photo {
  flex: 0 0 320px;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.about-text {
  flex: 1;
}

.about-name {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #000;
  margin-bottom: 6px;
}

.about-birth {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 15px;
  font-weight: 400;
  color: #777;
  margin-bottom: 32px;
  font-style: italic;
}

.about-bio {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 400;
  color: #333;
  line-height: 1.8em;
  margin: 0 0 1.2em 0;
}

/* --- CONTACT --- */
.contact-page {
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-email {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 1px;
  color: #777;
  transition: color 0.2s;
}

.contact-email:hover {
  color: #000;
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 767px) {
  .sidebar {
    display: none;
  }

  .mobile-header {
    display: flex;
  }

  main {
    padding-left: 0;
    padding-top: 52px;
  }

  /* COVER on mobile (removed as separate page - now integrated into slideshow) */

  /* SLIDESHOW on mobile: scrollable */
  .slideshow {
    height: auto;
    min-height: calc(100vh - 52px);
    padding: 0;
    overflow: visible;
    justify-content: flex-start;
  }

  .slide-item {
    width: 100%;
    padding: 12px 16px;
  }

  .slide-item.first {
    height: calc(100vh - 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  /* 書「流」を1枚目として大きく表示 */
  .slide-item.cover-item.first {
    padding: 10px;
  }
  .slide-item.cover-item.first img {
    max-width: 96%;
    max-height: 96%;
    width: auto;
    height: auto;
  }

  .slide-item.first:not(.cover-item) img {
    max-width: 70%;
    max-height: 70%;
    width: auto;
    height: auto;
  }

  .slide-item:not(.first) img {
    width: 100%;
    height: auto;
    display: block;
  }

  .slide-item.last {
    padding-bottom: 0;
  }

  .slide-item .caption {
    font-family: 'Source Sans 3', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-style: italic;
    color: #777;
    margin-top: 8px;
  }

  /* STATEMENT on mobile */
  .statement-hero {
    padding: 0 24px;
    align-items: flex-start;
    padding-top: 35vh;
  }

  .statement-hero span {
    font-size: 22px;
    text-align: left;
  }

  /* モバイル時: brを有効化 */
  .mobile-only-br {
    display: inline;
  }
  .mobile-only-br::before {
    content: none;
  }

  .statement-body {
    padding: 0 24px 80px;
  }

  .statement-text p.quote {
    font-size: 16px;
  }

  /* ABOUT on mobile */
  .about-page {
    padding: 30px 20px 80px;
  }

  .about-inner {
    flex-direction: column;
    gap: 30px;
    align-items: center;
  }

  .about-photo {
    flex: none;
    width: 240px;
  }
}

/* --- UTILS --- */
.no-scroll {
  overflow: hidden;
}
