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

:root {
  --ink: #1a1a1a;
  --paper: #faf8f5;
  --paper-warm: #f3efe9;
  --rule: #d4cdc3;
  --rule-light: #e5dfd7;
  --accent: #7a3b1e;
  --accent-muted: #9c6b4a;
  --text: #3a3632;
  --text-light: #6b6560;
  --caption: #8a8480;
  --serif-jp: 'Noto Serif JP', 'YuMincho', '游明朝', serif;
  --serif-en: 'EB Garamond', 'Cormorant Garamond', serif;
  --display: 'Cormorant Garamond', serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--serif-jp);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.9;
  overflow-x: hidden;
}

::selection { background: rgba(122, 59, 30, 0.12); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--rule-light);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.nav-links { display: flex; gap: 2rem; list-style: none; }

.nav-links a {
  font-family: var(--serif-en);
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--text-light);
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 6rem;
  position: relative;
}

.hero-frame {
  max-width: 720px;
  width: 100%;
  text-align: center;
}

.hero-rule-top { border-top: 2.5px solid var(--ink); margin-bottom: 0.35rem; }
.hero-rule-thin { border-top: 0.5px solid var(--rule); margin-bottom: 3.5rem; }

.hero-journal {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--caption);
  margin-bottom: 3rem;
}

.hero-title-jp {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  color: var(--ink);
  letter-spacing: 0.18em;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.hero-title-en {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  color: var(--accent-muted);
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
}

.hero-subtitle {
  font-family: var(--serif-jp);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 2.1;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto 3rem;
}

.hero-meta {
  font-family: var(--serif-en);
  font-size: 1rem;
  color: var(--caption);
}

.hero-meta span { color: var(--text); font-weight: 500; }

.hero-rule-bottom { border-top: 0.5px solid var(--rule); margin-top: 3.5rem; margin-bottom: 0.35rem; }
.hero-rule-bottom-thick { border-top: 2.5px solid var(--ink); }

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.5s;
}

.hero-scroll span {
  font-family: var(--serif-en);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--caption);
}

.scroll-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--rule), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.8; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== ARTICLE BODY ===== */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== SECTION HEADERS ===== */
.sec-header {
  margin-top: 6rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.sec-number {
  font-family: var(--serif-en);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

.sec-title {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 1.55rem;
  letter-spacing: 0.06em;
  line-height: 1.6;
  color: var(--ink);
}

.sec-title-en {
  font-family: var(--serif-en);
  font-weight: 400;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--accent-muted);
  margin-top: 0.3rem;
}

/* ===== PROSE ===== */
.prose {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 1.02rem;
  line-height: 2.15;
  color: var(--text);
}

.prose p + p { margin-top: 1.6rem; }
.prose em { font-style: normal; color: var(--accent); font-weight: 500; }
.prose strong { font-weight: 600; color: var(--ink); }

/* ===== LINE BREAK CONTROL ===== */
.br-all br { display: inline; }
.br-desktop br { display: inline; }

/* ===== KEY STATEMENT ===== */
.key-statement {
  margin: 5rem 0;
  padding: 2.5rem 0;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  text-align: center;
}

.key-statement p {
  font-family: var(--serif-jp);
  font-weight: 300;
  font-size: 1.15rem;
  line-height: 2.3;
  color: var(--ink);
}

.key-statement p em { font-style: normal; color: var(--accent); font-weight: 500; }

/* ===== TABLES ===== */
.layers-table,
.compare-table {
  width: 100%;
  margin: 2rem 0 2.5rem;
  border-collapse: collapse;
}

.layers-table thead th,
.compare-table thead th {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 0.95rem;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
}

.layers-table tbody td,
.compare-table tbody td {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.95;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid var(--rule-light);
  color: var(--text);
  vertical-align: top;
}

.layers-table tbody td:first-child,
.compare-table tbody td:first-child {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.layers-table tbody td:first-child { width: 130px; }
.compare-table tbody td:first-child { width: 100px; }

.layer-en {
  display: block;
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--accent-muted);
  margin-top: 0.1rem;
}

/* ===== GRAVITY ===== */
.gravity-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem 0;
  gap: 3rem;
}

.gravity-visual {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
}

.gravity-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--rule);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: border-color 0.4s;
}

.gravity-ring:hover { border-color: var(--accent-muted); }
.gravity-ring-1 { width: 240px; height: 240px; }
.gravity-ring-2 { width: 160px; height: 160px; border-style: dashed; }
.gravity-ring-3 { width: 56px; height: 56px; background: var(--paper-warm); border-color: var(--accent-muted); }

.gravity-label {
  position: absolute;
  font-family: var(--serif-jp);
  font-size: 0.88rem;
  color: var(--text-light);
  white-space: nowrap;
}

.gl-core { top: 50%; left: 50%; transform: translate(-50%, -50%); font-weight: 500; color: var(--accent); }
.gl-inner { top: 50%; left: 50%; transform: translate(-50%, 55px); }
.gl-outer { top: 50%; left: 50%; transform: translate(-50%, 100px); color: var(--caption); }

.gravity-text { max-width: 360px; }

.gravity-text p {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 1rem;
  line-height: 2.1;
  color: var(--text);
}

.gravity-text p + p { margin-top: 1.4rem; }
.gravity-text em { font-style: normal; color: var(--accent); font-weight: 500; }

.fig-caption {
  font-family: var(--serif-en);
  font-size: 0.9rem;
  color: var(--caption);
  text-align: center;
  margin-top: 1.5rem;
  font-style: italic;
}

/* ===== PHASES ===== */
.phase-list { margin: 2rem 0 2.5rem; }

.phase-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--rule-light);
  align-items: baseline;
}

.phase-item:first-child { border-top: 1px solid var(--rule-light); }

.phase-num {
  font-family: var(--serif-en);
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
}

.phase-content h4 {
  font-family: var(--serif-jp);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: 0.04em;
}

.phase-content p {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 2;
  color: var(--text);
}

/* ===== CTA ===== */
.cta-section {
  margin-top: 6rem;
  padding: 4rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  text-align: center;
}

.cta-label {
  font-family: var(--serif-en);
  font-size: 1rem;
  font-style: italic;
  color: var(--accent-muted);
  margin-bottom: 1.5rem;
}

.cta-title {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 2.1;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 1.8rem;
}

.cta-desc {
  font-family: var(--serif-jp);
  font-weight: 400;
  font-size: 1rem;
  line-height: 2.1;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto 2.5rem;
}

.cta-btn {
  display: inline-block;
  font-family: var(--serif-en);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--ink);
  padding: 0.85rem 2.5rem;
  text-decoration: none;
  transition: background 0.35s ease;
}

.cta-btn:hover { background: var(--accent); }

/* ===== FOOTER ===== */
footer {
  margin-top: 5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--rule-light);
}

.footer-text {
  font-family: var(--serif-en);
  font-size: 0.92rem;
  color: var(--caption);
}

/* ===== FADE IN ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .article-body { padding: 0 1.2rem; }
  .hero { padding: 7rem 1.2rem 5rem; }
  .nav-links { display: none; }
  .nav-inner { padding: 0.8rem 1.2rem; }
  .gravity-diagram { flex-direction: column; }
  .gravity-text { margin-top: 2.5rem; max-width: 100%; }
  .phase-item { grid-template-columns: 65px 1fr; gap: 1rem; }
  .sec-header { margin-top: 4rem; }
  .layers-table thead th, .compare-table thead th { padding: 0.6rem 0.6rem; }
  .layers-table tbody td, .compare-table tbody td { padding: 0.8rem 0.6rem; }
  .br-desktop br { display: none; }
  .key-statement p { font-size: 1.05rem; }
  .hero-subtitle { font-size: 0.98rem; }
  .cta-title { font-size: 1.2rem; }
}
