/*
Theme Name: こもれびノート
Description: 木漏れ日をモチーフにした、明るくやさしい雑記ブログ用テーマ。カテゴリーごとに色付きのタグが自動で表示されます。
Author: mayu
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: komorebi-note
*/

:root{
  --cream: #FBF8EE;
  --cream-card: #FFFEF9;
  --moss: #3A4A33;
  --moss-soft: #68785D;
  --gold: #E3B44A;
  --gold-deep: #BC8F2F;
  --sage: #8CAF74;
  --line: #EBE3CB;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--cream);
  color: var(--moss);
  font-family: "Zen Maru Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.wrap{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
header.site{
  padding: 26px 0 20px;
  border-bottom: 1px solid var(--line);
}
.site-header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.logo{
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.logo .mark{
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(227,180,74,0.22);
}
nav.site-nav ul{
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 14px;
  color: var(--moss-soft);
}
nav.site-nav a{ position: relative; padding-bottom: 4px; }
nav.site-nav a:hover{ color: var(--gold-deep); }

/* ---------- Hero (komorebi) ---------- */
.hero{
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  isolation: isolate;
  background: linear-gradient(180deg, #F2F6E0 0%, #FBF8EE 60%);
}
.komorebi{
  position: absolute;
  inset: 0;
  z-index: -2;
}
.komorebi .leaves{
  position: absolute;
  inset: -10% -5%;
  animation: sway 26s ease-in-out infinite alternate;
  transform-origin: 30% 0%;
}
@keyframes sway{
  0%   { transform: rotate(0deg) translateY(0); }
  100% { transform: rotate(1.2deg) translateY(8px); }
}
.komorebi .rays{
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    112deg,
    rgba(255,248,220,0.75) 0px,
    rgba(255,248,220,0.75) 44px,
    rgba(255,248,220,0) 44px,
    rgba(255,248,220,0) 130px
  );
  mix-blend-mode: screen;
  filter: blur(6px);
  animation: raydrift 18s ease-in-out infinite alternate;
}
@keyframes raydrift{
  0%   { transform: translateX(0) translateY(0); opacity: 0.9; }
  100% { transform: translateX(-30px) translateY(14px); opacity: 1; }
}
.komorebi::after{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.6), transparent 65%);
}
@media (prefers-reduced-motion: reduce){
  .komorebi .leaves, .komorebi .rays{ animation: none; }
}

.hero-inner{
  max-width: 640px;
}
.eyebrow{
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gold-deep);
  margin-bottom: 18px;
  display: inline-block;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 4px;
}
h1.hero-title{
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.5;
  margin: 0 0 22px;
  color: var(--moss);
}
p.hero-lead{
  font-size: 16px;
  line-height: 2;
  color: var(--moss-soft);
  margin: 0;
}

/* ---------- Category tags ---------- */
.categories{
  padding: 6px 0 10px;
}
.cat-list{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cat-tag{
  position: relative;
  display: inline-block;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13px;
  color: var(--moss);
  background: var(--cream-card);
  border: 1px solid var(--line);
  padding: 8px 16px 8px 24px;
  border-radius: 3px 12px 12px 3px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.cat-tag::before{
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--sage));
}
.cat-tag:hover{
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(227,180,74,0.18);
}

/* ---------- Section heading ---------- */
.section-heading{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 64px 0 28px;
}
.section-heading h2{
  font-family: "Shippori Mincho", serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.04em;
}
.section-heading .more{
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13px;
  color: var(--moss-soft);
  border-bottom: 1px solid var(--moss-soft);
  padding-bottom: 2px;
}

/* ---------- Post grid ---------- */
.post-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 20px;
}
@media (max-width: 860px){
  .post-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .post-grid{ grid-template-columns: 1fr; }
}

.post-card{
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -18px rgba(58,74,51,0.3);
}
.post-tag{
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--moss-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.post-tag::before{
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, var(--sage));
  flex-shrink: 0;
}
.post-card h3{
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}
.post-card h3 a:hover{ color: var(--gold-deep); }
.post-excerpt{
  font-size: 13.5px;
  line-height: 1.9;
  color: var(--moss-soft);
  margin: 0;
  flex-grow: 1;
}
.post-meta{
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 12px;
  color: #ABA37F;
}
.no-posts{
  grid-column: 1 / -1;
  text-align: center;
  color: var(--moss-soft);
  font-size: 14px;
  padding: 30px 0;
}

/* ---------- Today's note ---------- */
.today-note{
  margin: 78px 0;
  background: #45573D;
  color: var(--cream);
  border-radius: 14px;
  padding: 40px 44px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.today-note::before{
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -60px;
  top: -70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227,180,74,0.5), transparent 70%);
}
.today-note .label{
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 10px;
  display: block;
}
.today-note p{
  font-family: "Shippori Mincho", serif;
  font-size: clamp(18px, 2.4vw, 23px);
  line-height: 1.9;
  margin: 0;
  max-width: 560px;
  position: relative;
  z-index: 1;
}

/* ---------- About ---------- */
.about{
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  margin: 20px 0 80px;
  align-items: start;
}
@media (max-width: 720px){
  .about{ grid-template-columns: 1fr; }
}
.about h2{
  font-family: "Shippori Mincho", serif;
  font-size: 20px;
  margin: 0 0 14px;
}
.about p{
  font-size: 14.5px;
  line-height: 2;
  color: var(--moss-soft);
  margin: 0 0 12px;
}

/* ---------- Listing pages (記事一覧・カテゴリー) ---------- */
.listing{ min-height: 50vh; padding-bottom: 60px; }
.listing .section-heading{ margin-top: 48px; }

.pagination, .nav-links{
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 60px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 14px;
}
.nav-links .page-numbers{
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream-card);
  color: var(--moss-soft);
}
.nav-links .page-numbers.current{
  background: var(--moss);
  color: var(--cream);
  border-color: var(--moss);
}
.nav-links a.page-numbers:hover{ border-color: var(--gold); }

/* ---------- Single post / Page ---------- */
.single-wrap{
  max-width: 760px;
  padding-bottom: 60px;
}
.entry-header{
  margin: 56px 0 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.entry-title{
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.6;
  margin: 12px 0 14px;
}
.entry-content{
  font-size: 15.5px;
  line-height: 2.1;
  color: var(--moss);
}
.entry-content p{ margin: 0 0 1.6em; }
.entry-content h2{
  font-family: "Shippori Mincho", serif;
  font-size: 22px;
  margin: 2.2em 0 0.9em;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
  line-height: 1.6;
}
.entry-content h3{
  font-family: "Shippori Mincho", serif;
  font-size: 18px;
  margin: 2em 0 0.8em;
}
.entry-content img{
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.entry-content blockquote{
  margin: 1.6em 0;
  padding: 18px 22px;
  background: var(--cream-card);
  border-left: 4px solid var(--sage);
  border-radius: 0 10px 10px 0;
  color: var(--moss-soft);
}
.entry-content a{
  color: var(--gold-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.entry-content ul, .entry-content ol{ padding-left: 1.6em; margin: 0 0 1.6em; }
.entry-content li{ margin-bottom: 0.5em; }

.wp-block-image figcaption{
  font-size: 12.5px;
  color: #ABA37F;
  text-align: center;
}

.post-nav{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 48px 0 20px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13.5px;
  color: var(--moss-soft);
}
.post-nav a:hover{ color: var(--gold-deep); }

/* ---------- Comments (最低限) ---------- */
.comments-area{
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
.comments-area input[type="text"],
.comments-area input[type="email"],
.comments-area input[type="url"],
.comments-area textarea{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream-card);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
}
.comments-area input[type="submit"]{
  background: var(--moss);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  padding: 10px 26px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.comments-area input[type="submit"]:hover{ background: #45573D; }
.comment-list{ list-style: none; padding: 0; }
.comment-list .comment{
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

/* ---------- Footer ---------- */
footer.site-footer{
  border-top: 1px solid var(--line);
  padding: 30px 0 40px;
}
.footer-inner{
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 12.5px;
  color: #ABA37F;
}

/* WordPress標準クラス */
.alignleft{ float: left; margin: 0 20px 12px 0; }
.alignright{ float: right; margin: 0 0 12px 20px; }
.aligncenter{ display: block; margin: 0 auto; }
.screen-reader-text{
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}
