/*
Theme Name: AI Haru
Theme URI: https://ai-haru.com
Author: Takayuki Sato
Description: おはなしAI ハル - AIとの会話から生まれる、あたらしい見守りのかたち。
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: ai-haru
*/

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

:root {
  --green:       #4E7D6B;
  --dark-green:  #1A3329;
  --light-green: #F4F9F7;
  --beige:       #FFF8E7;
  --border:      #EDE5D8;
  --text:        #2C1810;
  --text-sub:    #7A6A5A;
  --text-muted:  #9A8A7A;
  --white:       #ffffff;
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   24px;
  --shadow:      0 2px 12px rgba(0,0,0,.07);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 20px;
}

.site-logo img { height: 36px; width: auto; }
.logo-text {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--dark-green);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-sub);
  transition: color .2s;
}
.header-nav a:hover { color: var(--dark-green); }

.btn-trial {
  background: var(--green) !important;
  color: var(--white) !important;
  font-size: .9rem !important;
  font-weight: 900 !important;
  padding: 10px 20px;
  border-radius: 999px;
  transition: opacity .2s !important;
}
.btn-trial:hover { opacity: .85; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(160deg, var(--dark-green) 0%, var(--green) 100%);
  padding: 72px 20px 80px;
  text-align: center;
  color: var(--white);
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  padding: 5px 16px;
  margin-bottom: 20px;
  letter-spacing: .05em;
}

.hero h1 {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  display: inline-block;
  background: var(--white);
  color: var(--dark-green);
  font-size: 1.1rem;
  font-weight: 900;
  padding: 18px 40px;
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}

.hero-note {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
}

/* ─── Section 共通 ─── */
.section { padding: 72px 20px; }
.section-alt { background: var(--light-green); }
.section-beige { background: var(--beige); }

.section-label {
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.section-title {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  font-weight: 900;
  color: var(--dark-green);
  line-height: 1.4;
  text-align: center;
  margin-bottom: 12px;
}

.section-desc {
  text-align: center;
  color: var(--text-sub);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 48px;
}

/* ─── 共感セクション ─── */
.empathy-list {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}

.empathy-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow);
}

.empathy-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.empathy-text {
  font-size: .95rem;
  color: var(--text);
  line-height: 1.65;
  font-weight: 700;
}

/* ─── 仕組みセクション ─── */
.how-steps {
  display: grid;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.how-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-body h3 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark-green);
  margin-bottom: 4px;
}

.how-body p {
  font-size: .9rem;
  color: var(--text-sub);
  line-height: 1.7;
}

.how-connector {
  width: 2px;
  height: 24px;
  background: var(--border);
  margin: 4px 0 4px 21px;
}

/* ─── 安心ポイント ─── */
.points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}

.point-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

.point-icon { font-size: 2.2rem; margin-bottom: 14px; }

.point-card h3 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark-green);
  margin-bottom: 8px;
}

.point-card p {
  font-size: .88rem;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ─── 開発者 ─── */
.developer {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  max-width: 640px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
}

.developer-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--light-green);
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--border);
}

.developer-avatar img { width: 100%; height: 100%; object-fit: cover; }

.developer-name {
  font-size: 1rem;
  font-weight: 900;
  color: var(--dark-green);
  margin-bottom: 4px;
}

.developer-title {
  font-size: .8rem;
  color: var(--green);
  font-weight: 700;
  margin-bottom: 12px;
}

.developer-text {
  font-size: .92rem;
  color: var(--text-sub);
  line-height: 1.8;
}

/* ─── CTA セクション ─── */
.cta-section {
  background: linear-gradient(160deg, var(--dark-green) 0%, var(--green) 100%);
  padding: 72px 20px;
  text-align: center;
  color: var(--white);
}

.cta-section h2 {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 900;
  margin-bottom: 12px;
  line-height: 1.4;
}

.cta-section p {
  font-size: .95rem;
  color: rgba(255,255,255,.8);
  margin-bottom: 36px;
  line-height: 1.8;
}

.cta-note {
  margin-top: 14px;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
}

/* ─── FAQ ─── */
.faq-list {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  text-align: left;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: var(--dark-green);
}

.faq-q-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: .85rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.faq-q-text { flex: 1; }

.faq-arrow {
  font-size: .9rem;
  color: var(--text-muted);
  transition: transform .2s;
}

.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 20px 18px 62px;
  font-size: .9rem;
  color: var(--text-sub);
  line-height: 1.8;
}

.faq-item.open .faq-a { display: block; }

/* ─── 料金 ─── */
.price-card {
  max-width: 400px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--green);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(78,125,107,.15);
}

.price-header {
  background: var(--green);
  color: var(--white);
  text-align: center;
  padding: 24px;
}

.price-header h3 {
  font-size: 1.1rem;
  font-weight: 900;
  margin-bottom: 4px;
}

.price-trial {
  font-size: .85rem;
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 4px 14px;
  display: inline-block;
  margin-top: 8px;
}

.price-body { padding: 28px 32px; }

.price-amount {
  text-align: center;
  margin-bottom: 24px;
}

.price-num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--dark-green);
  line-height: 1;
}

.price-unit {
  font-size: .9rem;
  color: var(--text-sub);
}

.price-features {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.price-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .92rem;
  color: var(--text-sub);
}

.price-check {
  color: var(--green);
  font-weight: 900;
  flex-shrink: 0;
}

.btn-price {
  display: block;
  width: 100%;
  background: var(--dark-green);
  color: var(--white);
  font-size: 1rem;
  font-weight: 900;
  padding: 16px;
  border-radius: 999px;
  text-align: center;
  transition: opacity .2s;
}
.btn-price:hover { opacity: .85; }

/* ─── ブログ一覧 ─── */
.archive-header {
  background: var(--light-green);
  padding: 48px 20px 40px;
  text-align: center;
}

.archive-header h1 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  font-weight: 900;
  color: var(--dark-green);
}

.archive-header p {
  color: var(--text-sub);
  font-size: .92rem;
  margin-top: 8px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 48px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

.post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--light-green);
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card-body { padding: 20px; }

.post-card-cat {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--green);
  background: var(--light-green);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 10px;
}

.post-card-title {
  font-size: .98rem;
  font-weight: 900;
  color: var(--dark-green);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-date {
  font-size: .8rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 24px 20px 48px;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.pagination .current {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

/* ─── 記事 single ─── */
.single-header {
  background: var(--light-green);
  padding: 48px 20px 40px;
}

.single-cat {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(78,125,107,.12);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

.single-title {
  font-size: clamp(1.3rem, 4vw, 1.9rem);
  font-weight: 900;
  color: var(--dark-green);
  line-height: 1.45;
  margin-bottom: 16px;
  max-width: 760px;
}

.single-meta {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.single-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.single-meta-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.single-thumb {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.single-thumb img {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-top: -20px;
  box-shadow: 0 4px 24px rgba(0,0,0,.1);
}

/* 記事本文 */
.entry-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 64px;
  font-size: .97rem;
  line-height: 1.9;
  color: var(--text);
}

.entry-content h2 {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dark-green);
  margin: 48px 0 16px;
  padding-left: 16px;
  border-left: 4px solid var(--green);
  line-height: 1.4;
}

.entry-content h3 {
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--dark-green);
  margin: 32px 0 12px;
}

.entry-content p { margin-bottom: 20px; }

.entry-content ul,
.entry-content ol {
  margin: 16px 0 20px 1.5em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 8px; line-height: 1.75; }

.entry-content strong { font-weight: 900; color: var(--dark-green); }

.entry-content a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content blockquote {
  background: var(--light-green);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 24px 0;
  color: var(--text-sub);
  font-style: italic;
}

.entry-content img {
  border-radius: var(--radius-md);
  margin: 24px auto;
}

/* 記事内CTA */
.entry-cta {
  background: linear-gradient(135deg, var(--dark-green), var(--green));
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  margin: 48px 0;
  color: var(--white);
}

.entry-cta p {
  margin-bottom: 20px;
  font-size: .95rem;
  color: rgba(255,255,255,.85);
}

.entry-cta .btn-primary {
  font-size: 1rem;
  padding: 14px 32px;
}

/* ─── Footer ─── */
.site-footer {
  background: var(--dark-green);
  color: rgba(255,255,255,.7);
  padding: 48px 20px 32px;
}

.footer-inner {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-desc {
  font-size: .88rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 24px;
}

.footer-nav a {
  font-size: .85rem;
  color: rgba(255,255,255,.6);
  transition: color .2s;
}
.footer-nav a:hover { color: var(--white); }

.footer-copy {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .header-nav a:not(.btn-trial) { display: none; }
  .developer { flex-direction: column; align-items: center; text-align: center; }
  .how-step { gap: 14px; }
  .price-body { padding: 24px 20px; }
  .entry-content { padding: 32px 16px 48px; }
  .single-thumb img { margin-top: 0; border-radius: 0; }
}
