/*
Theme Name: Kotobaya
Theme URI: https://example.com/
Author: Nagawa Sakurako
Author URI: https://example.com/
Description: 言葉屋サイト用の静かな文学テーマ
Version: 1.0
Text Domain: kotobaya
*/

:root {
  --bg: #f6f4ef;
  --bg-soft: #fbfaf7;
  --paper: #f1ece2;
  --night: #22252d;
  --text: #2b2b2b;
  --muted: #6a6a6a;
  --line: rgba(0, 0, 0, 0.08);

  --font-main: "Shippori Mincho", "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif;

  --container: 1040px;
  --container-narrow: 760px;

  --header-height: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  line-height: 2.1;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

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

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0 0 1.4em;
}

.container {
  width: min(100% - 40px, var(--container));
  margin: 0 auto;
}

.container-narrow {
  width: min(100% - 40px, var(--container-narrow));
  margin: 0 auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 999;
  background: rgba(251, 250, 247, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.header-inner {
  width: min(100% - 40px, var(--container));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: var(--night);
  white-space: nowrap;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  position: relative;
  font-size: 0.88rem;
  color: rgba(34, 37, 45, 0.84);
  letter-spacing: 0.12em;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: rgba(34, 37, 45, 0.5);
  transition: width 0.35s ease;
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after,
.main-nav .current_page_item a::after {
  width: 100%;
}

/* Main */
.site-main {
  padding-top: var(--header-height);
}

/* Sections */
.door,
.corridor,
.branches,
.about-short {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12vh 0;
}

/* 扉の背景を少し深くする */
.door {
  background:
    linear-gradient(rgba(248, 246, 241, 0.86), rgba(248, 246, 241, 0.88)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80") center center / cover no-repeat;
}


.door-inner,
.corridor-inner,
.branches-inner,
.about-short-inner {
  width: min(100% - 40px, 860px);
  margin: 0 auto;
  text-align: center;
}

.door-copy {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 2;
  color: var(--night);
  letter-spacing: 0.08em;
}

.door-scroll {
  margin-top: 48px;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.25em;
  text-transform: lowercase;
}

.corridor {
  background: var(--bg-soft);
}

.corridor-2 {
  background: linear-gradient(to bottom, #faf8f4 0%, #efebe2 100%);
}

.corridor-inner {
  display: flex;
  flex-direction: column;
  gap: 16vh;
  align-items: center;
}

.corridor-line {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 2rem);
  line-height: 2.4;
  letter-spacing: 0.08em;
}

.corridor-line.small {
  font-size: clamp(1rem, 1.7vw, 1.3rem);
  color: #484848;
}

.branches {
  background: var(--night);
  color: #f6f2ea;
}

.branches-nav ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 38px;
}

.branches-nav a {
  position: relative;
  display: inline-block;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.14em;
  padding-bottom: 6px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.branches-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: rgba(246, 242, 234, 0.7);
  transition: width 0.35s ease;
}

.branches-nav a:hover {
  opacity: 0.78;
  transform: translateY(-2px);
}

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

.about-short {
  background: var(--paper);
}

.about-short-copy {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 2.5;
  letter-spacing: 0.08em;
  color: var(--night);
}

/* Fade */
.fade-section{
  opacity:0;
  transform:translateY(30px);
  transition:opacity 1.2s ease, transform 1.2s ease;
}

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

/* Common page */
.page-hero {
  padding: 140px 0 80px;
  text-align: center;
  background: var(--bg-soft);
}

.page-title {
  margin: 0 0 18px;
  font-size: clamp(1.5rem, 2.8vw, 2.4rem);
  line-height: 1.8;
  letter-spacing: 0.08em;
}

.page-lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 2.2;
}

/* Poem page */
.poem-list {
  padding: 80px 0 120px;
}

.poem-grid {
  display: grid;
  gap: 32px;
}

.poem-card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  padding: 40px 28px;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.poem-card-inner {
  max-width: 520px;
  text-align: center;
}

.poem-title {
  margin: 0 0 28px;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

.poem-body p:last-child {
  margin-bottom: 0;
}

/* Novel page */
.novel-page {
  background: #fbfaf6;
}

.novel-content {
  padding: 80px 0 120px;
}

.novel-chapter {
  max-width: 780px;
  margin: 0 auto 80px;
  padding: 0 0 40px;
  border-bottom: 1px solid var(--line);
}

.novel-chapter:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.novel-chapter-title {
  margin: 0 0 28px;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

.novel-text {
  font-size: 1rem;
  line-height: 2.4;
}

/* About page */
.about-page {
  padding: 80px 0 120px;
}

.about-block {
  max-width: 760px;
  margin: 0 auto 64px;
}

.about-block:last-child {
  margin-bottom: 0;
}

.about-heading {
  margin: 0 0 20px;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
}

.about-text {
  color: var(--text);
}

.profile-mini {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 2.2;
}

/* Default content */
.entry-default {
  padding: 80px 0 120px;
}

.entry-default .entry-content {
  max-width: 760px;
  margin: 0 auto;
}

.entry-default h1,
.entry-default h2,
.entry-default h3 {
  line-height: 1.8;
  letter-spacing: 0.06em;
}

.entry-default p {
  line-height: 2.3;
}

/* Footer */
.site-footer {
  background: var(--night);
  color: rgba(255, 255, 255, 0.82);
  padding: 56px 20px;
  text-align: center;
}

.footer-copy {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.18em;
}

.footer-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  opacity: 0.72;
}

.footer-credit {
  margin: 0;
  font-size: 0.78rem;
  opacity: 0.5;
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .header-inner {
    width: min(100% - 28px, var(--container));
  }

  .site-logo {
    font-size: 0.92rem;
  }

  .main-nav ul {
    gap: 16px;
  }

  .main-nav a {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }

  .door,
  .corridor,
  .branches,
  .about-short {
    min-height: 100svh;
    padding: 12vh 0;
  }

  .corridor-inner {
    gap: 12vh;
  }

  .poem-card {
    min-height: 56vh;
    padding: 32px 22px;
  }

  .page-hero {
    padding: 120px 0 64px;
  }
}

@media (max-width: 560px) {
  .main-nav ul {
    gap: 12px;
  }

  .main-nav a {
    font-size: 0.68rem;
  }
}

/* =========================
   ガチ文学サイト演出
========================= */

/* 1画面を呼吸させる */
.kotobaya-top section {
  position: relative;
  overflow: hidden;
}



/* 文学ブロック全体 */
.literary-block {
  opacity: 0.28;
  filter: blur(1.5px);
  transform: translateY(20px);
  transition:
    opacity 1.6s ease,
    transform 1.6s ease,
    filter 1.6s ease;
}

.literary-block.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* 行ごとの出現 */
.literary-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
}

.literary-line {
  margin: 0;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1.2s ease,
    transform 1.2s ease;
}

.literary-block.is-active .literary-line {
  opacity: 1;
  transform: translateY(0);
}

/* 行ごとの遅延 */
.literary-block.is-active .delay-1 {
  transition-delay: 0.15s;
}

.literary-block.is-active .delay-2 {
  transition-delay: 0.45s;
}

.literary-block.is-active .delay-3 {
  transition-delay: 0.8s;
}

.literary-block.is-active .delay-4 {
  transition-delay: 1.1s;
}

.literary-block.is-active .delay-5 {
  transition-delay: 1.4s;
}

/* 扉の文字は少し大きく */
.door .literary-line {
  font-size: clamp(1.6rem, 3vw, 2.7rem);
  line-height: 2;
  letter-spacing: 0.08em;
  color: var(--night);
}

/* 通路の文字 */
.corridor .literary-line {
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  line-height: 2.35;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* 第一層と第二層の余白 */
.corridor-inner {
  gap: 18vh;
}

/* 分岐は静かなUI */
.branches-nav ul {
  gap: 42px;
}

.branches-nav a {
  opacity: 0.88;
  transition:
    opacity 0.35s ease,
    transform 0.35s ease,
    letter-spacing 0.35s ease;
}

.branches-nav a:hover {
  opacity: 1;
  transform: translateY(-2px);
  letter-spacing: 0.18em;
}

/* 扉のscroll */
.door-scroll {
  margin-top: 56px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.35em;
  text-transform: lowercase;
  opacity: 0.72;
  animation: softFloat 2.8s ease-in-out infinite;
}

@keyframes softFloat {
  0% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.6; }
}

/* 余韻セクション */
.about-short {
  background:
    linear-gradient(to bottom, #f1ece2 0%, #ece6da 100%);
}

.about-short .literary-line {
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 2.5;
  letter-spacing: 0.08em;
  color: var(--night);
}

/* スクロール中にうっすら残る雰囲気 */
.corridor::before,
.about-short::before,
.branches::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0.06),
    rgba(255,255,255,0),
    rgba(0,0,0,0.03)
  );
  opacity: 0.6;
}

/* モバイル調整 */
@media (max-width: 768px) {
  .literary-block {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }

  .literary-line {
    opacity: 1;
    transform: translateY(0);
  }

  .door .literary-line {
    line-height: 1.9;
  }

  .corridor-inner {
    gap: 12vh;
  }

  .branches-nav ul {
    gap: 28px;
  }
}