/* ============================================
   MIYAMOTO MUSASHI — Japanese Monochrome
   Design: Noir Editorial × Ink & Parchment
   ============================================ */

:root {
  --ink:        #0d0d0d;
  --ink-soft:   #1a1a1a;
  --ink-mid:    #2e2e2e;
  --ash:        #5a5a5a;
  --mist:       #9a9a9a;
  --paper:      #f0ece4;
  --paper-warm: #e8e2d8;
  --paper-deep: #d4cdc0;
  --white:      #fafaf8;

  --font-display: 'Cormorant Garamond', serif;
  --font-jp:      'Noto Serif JP', serif;
  --font-mono:    'Space Mono', monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-display);
  overflow-x: hidden;
  cursor: none;
}

/* ---- Custom Cursor ---- */
.cursor {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.1s var(--ease-out), width 0.3s, height 0.3s, background 0.3s;
  mix-blend-mode: multiply;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid var(--ink-mid);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-out), width 0.3s, height 0.3s, opacity 0.3s;
  opacity: 0.5;
}
.cursor.hover { width: 6px; height: 6px; }
.cursor-ring.hover { width: 52px; height: 52px; opacity: 0.2; }

/* ---- Noise Texture ---- */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: 0.035;
  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)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ---- Vertical Decorative Text ---- */
.vertical-text-left,
.vertical-text-right {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-size: 0.65rem;
  font-weight: 200;
  letter-spacing: 0.4em;
  color: var(--mist);
  opacity: 0.35;
  pointer-events: none;
  z-index: 10;
}
.vertical-text-left  { left: 1.2rem; text-orientation: mixed; }
.vertical-text-right { right: 1.2rem; text-orientation: mixed; transform: translateY(-50%) rotate(180deg); }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 4rem;
  mix-blend-mode: multiply;
}
.nav-logo {
  font-family: var(--font-jp);
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--ink); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0 10vw;
  overflow: hidden;
}

.hero-bg-kanji {
  position: absolute;
  right: -2vw;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-jp);
  font-size: clamp(18rem, 38vw, 52rem);
  font-weight: 200;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,0,0,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  color: var(--ash);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.hero-title {
  margin-bottom: 1.5rem;
  line-height: 1;
}
.hero-title .jp {
  display: block;
  font-family: var(--font-jp);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 200;
  letter-spacing: 0.3em;
  color: var(--ash);
  margin-bottom: 0.4rem;
}
.hero-title .en {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 9rem);
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--ink);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 2rem;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: var(--ink-mid);
  margin-bottom: 2rem;
}

.hero-quote {
  font-size: 1rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ash);
  max-width: 480px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 10vw;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--mist);
}
.scroll-line {
  width: 60px;
  height: 1px;
  background: var(--mist);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  left: -100%;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--ink);
  animation: scrollSlide 2s var(--ease-out) infinite;
}
@keyframes scrollSlide {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ---- Sections ---- */
.section {
  padding: 8rem 10vw;
  position: relative;
}
.section-dark {
  background-color: var(--ink-soft);
  color: var(--paper);
}
.section-dark .section-label { color: var(--ash); }
.section-dark .body-text { color: var(--paper-deep); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 3rem;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 6rem;
  align-items: start;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 5.5rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: inherit;
}
.section-title.centered { text-align: center; margin-bottom: 1rem; }

.subtitle-en {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-style: normal;
  letter-spacing: 0.2em;
  color: var(--ash);
}

.body-text {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--ink-mid);
  margin-bottom: 1.5rem;
}

.centered-body {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--paper-deep);
  max-width: 640px;
  margin: 0 auto 4rem;
  text-align: center;
}

/* ---- Stats ---- */
.stat-row {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--paper-deep);
}
.stat { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--ink);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ---- Brush Divider ---- */
.brush-divider {
  padding: 0 10vw;
  opacity: 0.5;
}
.brush-divider svg { width: 100%; height: 40px; }

/* ---- Philosophy Cards ---- */
.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 4rem;
  border: 1px solid rgba(255,255,255,0.08);
}
.philosophy-card {
  padding: 3rem 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: background 0.4s;
}
.philosophy-card:last-child { border-right: none; }
.philosophy-card:hover { background: rgba(255,255,255,0.03); }

.card-kanji {
  font-family: var(--font-jp);
  font-size: 3.5rem;
  font-weight: 200;
  color: rgba(255,255,255,0.15);
  margin-bottom: 1.5rem;
  line-height: 1;
}
.philosophy-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--paper);
  margin-bottom: 1rem;
}
.philosophy-card p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--mist);
}

/* ---- Duels ---- */
.duel-list { display: flex; flex-direction: column; gap: 0; }
.duel-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--paper-deep);
  align-items: start;
}
.duel-item:first-child { border-top: 1px solid var(--paper-deep); }
.duel-year {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--mist);
  padding-top: 0.3rem;
}
.duel-content h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.duel-content p {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--ash);
}

/* ---- Five Rings ---- */
.rings-grid {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-top: 3rem;
}
.ring-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 2.5rem;
  flex: 1;
  min-width: 140px;
  border-right: 1px solid rgba(255,255,255,0.07);
  transition: background 0.4s;
}
.ring-item:last-child { border-right: none; }
.ring-item:hover { background: rgba(255,255,255,0.03); }
.ring-symbol {
  font-family: var(--font-jp);
  font-size: 3rem;
  font-weight: 200;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
  line-height: 1;
}
.ring-item span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.8rem;
}
.ring-item p {
  font-size: 0.85rem;
  font-weight: 300;
  line-height: 1.7;
  color: rgba(255,255,255,0.3);
}

/* ---- Closing ---- */
.closing {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.closing-kanji {
  position: absolute;
  font-family: var(--font-jp);
  font-size: clamp(20rem, 50vw, 60rem);
  font-weight: 200;
  color: transparent;
  -webkit-text-stroke: 1px rgba(0,0,0,0.05);
  pointer-events: none;
  user-select: none;
  line-height: 1;
}
.closing-quote {
  position: relative;
  z-index: 2;
  max-width: 640px;
}
.closing-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.closing-quote cite {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
  font-style: normal;
}

/* ---- Footer ---- */
.footer {
  padding: 3rem 10vw;
  border-top: 1px solid var(--paper-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-jp {
  font-family: var(--font-jp);
  font-size: 0.85rem;
  font-weight: 200;
  letter-spacing: 0.3em;
  color: var(--mist);
}
.footer-en {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mist);
}

/* ---- Reveal Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .philosophy-grid { grid-template-columns: repeat(2, 1fr); }
  .rings-grid .ring-item { min-width: 120px; }
}

@media (max-width: 768px) {
  .nav { padding: 1.2rem 2rem; }
  .nav-links { display: none; }
  .hero { padding: 0 6vw; }
  .section { padding: 5rem 6vw; }
  .section-grid { grid-template-columns: 1fr; gap: 3rem; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .rings-grid { flex-direction: column; }
  .ring-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .footer { flex-direction: column; gap: 1rem; text-align: center; }
  .vertical-text-left, .vertical-text-right { display: none; }
  .stat-row { gap: 2rem; }
  body { cursor: auto; }
  .cursor, .cursor-ring { display: none; }
}