/* ============================================
   KEITOの著書 - Editorial Magazine Style
   Static CSS (mirrors React/Tailwind version)
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: #FAFAF8;
  color: #1A1A1A;
  overflow-x: hidden;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

/* ============================================
   Typography
   ============================================ */
.font-editorial,
.hero-title,
.section-num,
.book-title,
.author-name,
.header-logo,
.footer-logo {
  font-family: "Noto Serif JP", "Cormorant Garamond", serif;
}

.font-body,
.hero-overline,
.hero-subtitle,
.book-description,
.book-feature span,
.book-label-text,
.author-overline,
.author-bio,
.scroll-text,
.shelf-book-label,
.header-sub,
.footer-copy {
  font-family: "Noto Sans JP", sans-serif;
}

/* ============================================
   Header
   ============================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.5s ease;
  background: transparent;
}

#site-header.scrolled {
  background: rgba(250, 250, 248, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #E8E4DC;
}

.header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.05em;
}

.header-sub {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #888;
  text-transform: uppercase;
}

@media (max-width: 639px) {
  .header-sub { display: none; }
}

@media (min-width: 640px) {
  .header-inner { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .header-inner { padding: 0 3rem; }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(250,250,248,0.3),
    rgba(250,250,248,0.6) 50%,
    rgba(250,250,248,1));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
  will-change: transform, opacity;
}

.hero-overline {
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: #888;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero-title-accent {
  position: relative;
  display: inline-block;
}

.hero-title-underline {
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #2563EB, #B8860B);
  border-radius: 9999px;
}

.hero-subtitle {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.7;
  max-width: 32rem;
  margin: 0 auto;
}

.hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .hero-title { font-size: 3rem; }
  .hero-subtitle { font-size: 1rem; }
  .hide-mobile { display: block; }
}

@media (min-width: 768px) {
  .hero-title { font-size: 3.75rem; }
}

@media (min-width: 1024px) {
  .hero-title { font-size: 4.5rem; }
}

/* ============================================
   Bookshelf Preview
   ============================================ */
.bookshelf {
  margin-top: 3.5rem;
  margin-bottom: 1rem;
}

.bookshelf-inner {
  position: relative;
  max-width: 32rem;
  margin: 0 auto;
}

.bookshelf-books {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  padding-bottom: 0.75rem;
}

.shelf-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease;
}

.shelf-book:hover {
  transform: translateY(-8px);
}

.shelf-book-cover {
  position: relative;
}

.shelf-book-cover img {
  width: 5rem;
  height: auto;
  border-radius: 2px;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
}

.shelf-book:hover .shelf-book-cover img {
  box-shadow: 4px 8px 24px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.15);
}

.shelf-book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.4), rgba(255,255,255,0.2), transparent);
  border-radius: 2px 0 0 2px;
}

.shelf-book-hover-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.shelf-book:hover .shelf-book-hover-overlay {
  background: rgba(0,0,0,0.05);
}

.shelf-book-label {
  margin-top: 0.625rem;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #AAA;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.shelf-book:hover .shelf-book-label {
  color: #555;
}

@media (min-width: 640px) {
  .bookshelf-books { gap: 1.5rem; }
  .shelf-book-cover img { width: 6rem; }
}

@media (min-width: 768px) {
  .bookshelf-books { gap: 2rem; }
  .shelf-book-cover img { width: 7rem; }
}

/* Shelf surface */
.bookshelf-surface {
  position: relative;
}

.shelf-line {
  height: 3px;
  background: linear-gradient(to right, transparent, #D4CFC5, transparent);
  border-radius: 9999px;
}

.shelf-shadow {
  height: 6px;
  background: linear-gradient(to right, transparent, rgba(232,228,220,0.6), transparent);
  border-radius: 9999px;
  margin-top: 1px;
}

/* ============================================
   Scroll Indicator
   ============================================ */
.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.scroll-text {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #AAA;
}

.scroll-arrow {
  color: #AAA;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ============================================
   Book Sections
   ============================================ */
.book-section {
  position: relative;
  padding: 6rem 0;
}

.section-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .book-section { padding: 8rem 0; }
  .section-inner { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .book-section { padding: 10rem 0; }
  .section-inner { padding: 0 3rem; }
}

/* Section Number */
.section-number {
  margin-bottom: 4rem;
}

.section-number-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-num {
  font-size: 6rem;
  font-weight: 700;
  color: #F0EDE6;
  user-select: none;
  line-height: 1;
}

@media (min-width: 640px) {
  .section-num { font-size: 8rem; }
}

/* Editorial Rule */
.editorial-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, #1a1a1a 20%, #1a1a1a 80%, transparent);
}

.editorial-rule-short {
  width: 4rem;
  height: 1px;
  background: linear-gradient(to right, transparent, #1a1a1a 20%, #1a1a1a 80%, transparent);
}

/* ============================================
   Book Card
   ============================================ */
.book-card {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  scroll-margin-top: 6rem;
}

@media (min-width: 1024px) {
  .book-card {
    flex-direction: row;
    gap: 4rem;
  }
  .book-card.reversed {
    flex-direction: row-reverse;
  }
}

@media (min-width: 1280px) {
  .book-card { gap: 6rem; }
}

/* Book Image */
.book-card-image {
  width: 100%;
  display: flex;
  justify-content: center;
}

@media (min-width: 1024px) {
  .book-card-image { width: 41.666%; }
}

.book-image-wrapper {
  position: relative;
}

.book-glow {
  position: absolute;
  inset: -2rem;
  border-radius: 1.5rem;
  opacity: 0;
  filter: blur(40px);
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.book-image-wrapper:hover .book-glow {
  opacity: 0.2;
}

.book-3d {
  transition: transform 0.5s ease;
  perspective: 1000px;
}

.book-image-wrapper:hover .book-3d {
  transform: rotateY(5deg) scale(1.02);
}

.book-cover-img {
  width: 16rem;
  border-radius: 2px;
  box-shadow:
    0 25px 50px -12px rgba(0,0,0,0.25),
    0 12px 24px -8px rgba(0,0,0,0.15),
    -4px 4px 12px rgba(0,0,0,0.1);
  transition: box-shadow 0.5s ease;
}

.book-image-wrapper:hover .book-cover-img {
  box-shadow:
    0 35px 60px -15px rgba(0,0,0,0.3),
    0 18px 36px -10px rgba(0,0,0,0.2),
    -6px 6px 18px rgba(0,0,0,0.12);
}

@media (min-width: 640px) {
  .book-cover-img { width: 18rem; }
}

@media (min-width: 768px) {
  .book-cover-img { width: 20rem; }
}

@media (min-width: 1024px) {
  .book-cover-img { width: 24rem; }
}

/* Book Info */
.book-card-info {
  width: 100%;
}

@media (min-width: 1024px) {
  .book-card-info { width: 58.333%; }
}

.book-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.book-label-line {
  display: inline-block;
  width: 2rem;
  height: 2px;
}

.book-label-text {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.book-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1A1A1A;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .book-title { font-size: 1.875rem; }
}

@media (min-width: 768px) {
  .book-title { font-size: 2.25rem; }
}

@media (min-width: 1024px) {
  .book-title { font-size: 2.75rem; }
}

.book-subtitle {
  font-family: "Noto Serif JP", serif;
  font-size: 1rem;
  color: #555;
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .book-subtitle { font-size: 1.125rem; }
}

.book-description {
  font-size: 0.875rem;
  line-height: 1.9;
  color: #3A3A3A;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .book-description { font-size: 0.9375rem; }
}

/* Features */
.book-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.book-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.feature-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.book-feature span {
  font-size: 0.875rem;
  color: #444;
  line-height: 1.6;
}

/* CTA Button */
.book-cta {
  padding-top: 1rem;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.cta-button:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

.cta-external {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.cta-button:hover .cta-external {
  opacity: 1;
}

/* ============================================
   Dividers
   ============================================ */
.divider {
  padding: 2rem 0;
}

.divider-inner {
  max-width: 20rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.divider-line-left,
.divider-line-right {
  flex: 1;
  height: 1px;
}

.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================
   Author Section
   ============================================ */
.author-section {
  position: relative;
  padding: 6rem 0;
  overflow: hidden;
}

@media (min-width: 640px) {
  .author-section { padding: 8rem 0; }
}

.author-bg {
  position: absolute;
  inset: 0;
}

.author-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.author-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(250,250,248,1),
    rgba(250,250,248,0.8) 50%,
    rgba(250,250,248,0.9));
}

.author-content {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .author-content { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .author-content { padding: 0 3rem; }
}

.author-overline {
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #888;
  display: block;
  margin-bottom: 1.5rem;
}

.author-name {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .author-name { font-size: 2.25rem; }
}

@media (min-width: 768px) {
  .author-name { font-size: 3rem; }
}

.author-bio {
  font-size: 0.875rem;
  line-height: 1.9;
  color: #555;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

@media (min-width: 640px) {
  .author-bio { font-size: 0.9375rem; }
}

.author-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (min-width: 640px) {
  .author-buttons { gap: 1.5rem; }
}

.author-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.author-btn:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  padding: 3rem 0;
  border-top: 1px solid #E8E4DC;
}

.footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .footer-inner { padding: 0 3rem; }
}

.footer-logo {
  font-size: 0.875rem;
  color: #AAA;
}

.footer-copy {
  font-size: 0.75rem;
  color: #BBB;
  letter-spacing: 0.05em;
}

/* ============================================
   Animations
   ============================================ */

/* Fade-up animation for hero elements */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fade-in-section for scroll-triggered animations */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   SNS Buttons
   ============================================ */
.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
}

.sns-btn:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: rgba(26, 26, 26, 0.85);
  color: white;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}

@media (max-width: 639px) {
  .back-to-top span {
    display: none;
  }
  .back-to-top {
    padding: 0.75rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
}
