/* =========================================
   BOOK LIFE — Corporate Landing Page
   Design: Editorial / Typographic
   ========================================= */

/* ---------- CSS Variables ---------- */
:root {
  --color-bg: #FAF8F5;
  --color-bg-warm: #F5F0EA;
  --color-text: #1A1A1A;
  --color-text-sub: #4A4A4A;
  --color-text-muted: #8A8A8A;
  --color-accent: #8B6914;
  --color-accent-light: #B8941F;
  --color-dark: #111111;
  --color-dark-text: #F0EDE8;
  --color-border: #D6D0C7;

  --font-display-ja: 'Shippori Mincho', 'Georgia', serif;
  --font-display-en: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Noto Sans JP', 'Helvetica Neue', sans-serif;

  --header-height: 72px;
  --container-width: 1080px;
  --container-padding: 24px;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.8;
  overflow-x: hidden;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ---------- Grain Overlay ---------- */
.grain-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.grain-overlay--dark {
  opacity: 0.2;
}

/* ---------- Reveal Animations ---------- */
.reveal-line {
  display: block;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out-expo),
              transform 0.9s var(--ease-out-expo);
}

.reveal-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
}

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

/* Stagger children */
.reveal-up:nth-child(2) { transition-delay: 0.12s; }
.reveal-up:nth-child(3) { transition-delay: 0.24s; }
.reveal-up:nth-child(4) { transition-delay: 0.36s; }

/* =========================================
   HEADER
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s ease, background 0.4s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--color-border);
}

.header-logo {
  font-family: var(--font-display-en);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.18em;
}

.header-nav {
  display: flex;
  gap: 36px;
}

.header-nav a {
  font-family: var(--font-display-en);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--color-text-sub);
  position: relative;
  transition: color 0.3s ease;
}

.header-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.4s var(--ease-out-expo);
}

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

.header-nav a:hover::after {
  width: 100%;
}

/* Mobile menu button */
.header-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 28px;
  padding: 4px 0;
}

.header-menu-btn span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transition: transform 0.4s var(--ease-out-expo),
              opacity 0.3s ease;
}

.header-menu-btn.is-open span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.header-menu-btn.is-open span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(250, 248, 245, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}

.mobile-nav-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-nav a {
  font-family: var(--font-display-en);
  font-size: 1.4rem;
  letter-spacing: 0.15em;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out-expo),
              transform 0.5s var(--ease-out-expo);
}

.mobile-nav-overlay.is-open .mobile-nav a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-overlay.is-open .mobile-nav a:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-overlay.is-open .mobile-nav a:nth-child(2) { transition-delay: 0.17s; }
.mobile-nav-overlay.is-open .mobile-nav a:nth-child(3) { transition-delay: 0.24s; }
.mobile-nav-overlay.is-open .mobile-nav a:nth-child(4) { transition-delay: 0.31s; }
.mobile-nav-overlay.is-open .mobile-nav a:nth-child(5) { transition-delay: 0.38s; }

/* =========================================
   HERO
   ========================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  padding: 0 var(--container-padding);
}

/* Hero Logo Block — book spine motif */
.hero-logo-block {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 56px;
  position: relative;
}

.hero-logo-spine {
  width: 4px;
  background: var(--color-accent);
  border-radius: 2px 0 0 2px;
  flex-shrink: 0;
}

.hero-logo-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 32px 18px;
  border: 1px solid var(--color-border);
  border-left: none;
  position: relative;
}

.hero-logo-main {
  font-family: var(--font-display-en);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--color-text);
}

.hero-logo-sub {
  font-family: var(--font-display-en);
  font-weight: 300;
  font-size: clamp(0.65rem, 1vw, 0.8rem);
  letter-spacing: 0.22em;
  color: var(--color-accent);
  margin-top: 8px;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display-ja);
  font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.8;
  letter-spacing: 0.12em;
  color: var(--color-text);
}

.hero-line:nth-child(2) {
  transition-delay: 0.25s;
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-label {
  font-family: var(--font-display-en);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-accent);
  animation: scrollLine 2s var(--ease-out-expo) infinite;
}

@keyframes scrollLine {
  0%   { top: -100%; }
  50%  { top: 0; }
  100% { top: 100%; }
}

/* =========================================
   SECTION: PROBLEM
   ========================================= */
.section {
  position: relative;
}

.section-problem {
  padding: 160px 0 140px;
  background: var(--color-bg);
}

.problem-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.problem-lead {
  font-family: var(--font-display-ja);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.em-dot {
  font-style: normal;
  color: var(--color-accent);
  font-weight: 600;
}

/* Fragments */
.problem-fragments {
  margin-top: 80px;
  text-align: center;
}

.fragment-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.fragment-item {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--color-text-sub);
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
}

.fragment-dot {
  width: 4px;
  height: 4px;
  background: var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
}

.fragment-line-wrapper {
  display: flex;
  justify-content: center;
  margin: 32px 0;
}

.fragment-line {
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 1.2s var(--ease-out-expo) 0.3s;
}

.fragment-line.is-animated {
  width: 280px;
}

.fragment-after {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--color-text-sub);
  margin-top: 8px;
}

/* Solution */
.problem-solution {
  max-width: 640px;
  margin: 80px auto 0;
  text-align: center;
}

.problem-solution p {
  font-family: var(--font-display-ja);
  font-weight: 400;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 2.2;
  letter-spacing: 0.04em;
  color: var(--color-text);
}

.problem-solution strong {
  color: var(--color-accent);
  font-weight: 600;
}

/* =========================================
   SECTION: MISSION
   ========================================= */
.section-mission {
  position: relative;
  padding: 160px 0;
  background: var(--color-bg-warm);
}

.mission-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 60px;
  align-items: start;
}

.section-label {
  font-family: var(--font-display-en);
  font-weight: 300;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  letter-spacing: 0.2em;
  color: var(--color-accent);
  text-transform: uppercase;
  display: block;
}

.mission-headline {
  font-family: var(--font-display-ja);
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.8;
  letter-spacing: 0.06em;
  color: var(--color-text);
}

.mission-divider {
  width: 48px;
  height: 1px;
  background: var(--color-accent);
  margin: 40px 0;
}

.mission-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.95rem;
  line-height: 2.2;
  color: var(--color-text-sub);
  max-width: 560px;
}

/* =========================================
   SECTION: APPROACH
   ========================================= */
.section-approach {
  padding: 160px 0;
  background: var(--color-bg);
}

.approach-title {
  font-family: var(--font-display-ja);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-top: 16px;
  margin-bottom: 80px;
}

.approach-steps {
  max-width: 720px;
  margin: 0 auto;
}

.approach-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  align-items: start;
}

.step-number {
  font-family: var(--font-display-en);
  font-weight: 300;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  padding-top: 4px;
}

.step-title {
  font-family: var(--font-display-ja);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  color: var(--color-text);
}

.step-body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 2;
  color: var(--color-text-sub);
}

.step-divider {
  width: 1px;
  height: 48px;
  background: var(--color-border);
  margin: 32px 0 32px 38px;
}

/* =========================================
   SECTION: WORKS
   ========================================= */
.section-works {
  padding: 160px 0;
  background: var(--color-bg-warm);
}

.works-title {
  font-family: var(--font-display-ja);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-top: 16px;
  margin-bottom: 60px;
}

.works-coming-soon {
  max-width: 560px;
  margin: 0 auto;
}

.works-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 64px 40px;
  border: 1px dashed var(--color-border);
  border-radius: 4px;
}

/* CSS-only book icon */
.works-book-icon {
  position: relative;
  width: 56px;
  height: 72px;
}

.book-cover {
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  border: 1.5px solid var(--color-accent);
  border-radius: 0 3px 3px 0;
}

.book-pages {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: -3px;
  width: 5px;
  background: linear-gradient(
    to right,
    var(--color-border) 0%,
    var(--color-bg) 40%,
    var(--color-border) 60%,
    var(--color-bg) 100%
  );
  border-radius: 2px 0 0 2px;
}

.works-placeholder-text {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.88rem;
  line-height: 2;
  color: var(--color-text-muted);
  text-align: center;
}

.sp-only {
  display: none;
}

/* =========================================
   SECTION: PHILOSOPHY
   ========================================= */
.section-philosophy {
  position: relative;
  padding: 200px 0;
  background: var(--color-dark);
  overflow: hidden;
}

.philosophy-inner {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.philosophy-quote-mark {
  font-family: var(--font-display-en);
  font-weight: 300;
  font-size: clamp(4rem, 10vw, 8rem);
  color: var(--color-accent);
  line-height: 1;
  opacity: 0.4;
  display: block;
  user-select: none;
}

.philosophy-quote-mark--close {
  margin-top: 24px;
}

.philosophy-text {
  font-family: var(--font-display-ja);
  font-weight: 400;
  font-size: clamp(1.15rem, 2.8vw, 1.7rem);
  line-height: 2.2;
  letter-spacing: 0.1em;
  color: var(--color-dark-text);
}

/* =========================================
   SECTION: COMPANY
   ========================================= */
.section-company {
  padding: 160px 0;
  background: var(--color-bg);
}

.company-table {
  max-width: 600px;
  margin-top: 60px;
}

.company-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
}

.company-row:first-child {
  border-top: 1px solid var(--color-border);
}

.company-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.company-value {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--color-text);
}

/* =========================================
   SECTION: CONTACT
   ========================================= */
.section-contact {
  position: relative;
  padding: 160px 0;
  background: var(--color-bg-warm);
  overflow: hidden;
}

.contact-inner {
  text-align: center;
}

.contact-lead {
  font-family: var(--font-display-ja);
  font-weight: 500;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  line-height: 2;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: 56px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 48px;
  border: 1px solid var(--color-text);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  transition: background 0.5s var(--ease-out-expo),
              color 0.5s var(--ease-out-expo),
              border-color 0.5s var(--ease-out-expo);
}

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

.contact-btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.4s var(--ease-out-expo);
}

.contact-btn:hover .contact-btn-arrow {
  transform: translateX(6px);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
  padding: 40px 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-display-en);
  font-weight: 400;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--color-text);
}

.footer-copy {
  font-family: var(--font-display-en);
  font-weight: 300;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

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

/* Tablet */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --container-padding: 20px;
  }

  .header {
    padding: 0 20px;
  }

  .header-nav {
    display: none;
  }

  .header-menu-btn {
    display: flex;
  }

  /* Hero */
  .hero-title {
    line-height: 1.9;
  }

  .hero-logo-block {
    margin-bottom: 40px;
  }

  .hero-logo-content {
    padding: 16px 24px 14px;
  }

  /* Works */
  .section-works {
    padding: 120px 0;
  }

  .works-placeholder {
    padding: 48px 24px;
  }

  .sp-only {
    display: inline;
  }

  /* Problem */
  .section-problem {
    padding: 120px 0 100px;
  }

  .problem-lead {
    line-height: 2.2;
  }

  .problem-fragments {
    margin-top: 60px;
  }

  .fragment-items {
    gap: 10px;
  }

  .fragment-item {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  .problem-solution {
    margin-top: 60px;
  }

  /* Mission */
  .section-mission {
    padding: 120px 0;
  }

  .mission-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .mission-body {
    max-width: 100%;
  }

  /* Approach */
  .section-approach {
    padding: 120px 0;
  }

  .approach-title {
    margin-bottom: 60px;
  }

  .approach-step {
    grid-template-columns: 56px 1fr;
    gap: 20px;
  }

  .step-number {
    font-size: 1.8rem;
  }

  .step-divider {
    margin: 24px 0 24px 26px;
    height: 36px;
  }

  /* Philosophy */
  .section-philosophy {
    padding: 140px 0;
  }

  /* Company */
  .section-company {
    padding: 120px 0;
  }

  .company-row {
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 20px 0;
  }

  /* Contact */
  .section-contact {
    padding: 120px 0;
  }

  .contact-btn {
    padding: 16px 40px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* Mobile Small */
@media (max-width: 480px) {
  .hero-logo-main {
    font-size: 1.7rem;
  }

  .hero-logo-content {
    padding: 12px 20px 10px;
  }

  .hero-title {
    font-size: 1.35rem;
    line-height: 2;
  }

  .problem-lead {
    font-size: 1.1rem;
  }

  .fragment-items {
    gap: 8px;
  }

  .fragment-dot {
    display: none;
  }

  .fragment-item {
    font-size: 0.75rem;
    padding: 5px 12px;
  }

  .philosophy-text {
    font-size: 1.05rem;
    line-height: 2.4;
  }

  .philosophy-quote-mark {
    font-size: 3.5rem;
  }

  .mission-headline {
    font-size: 1.25rem;
  }

  .contact-lead {
    font-size: 1.2rem;
  }

  .company-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .company-label {
    font-size: 0.78rem;
  }
}
