/*
Theme Name: Sato SEO Consulting
Theme URI: https://sato-seo.com
Author: Takashi Sato
Author URI: https://sato-seo.com
Description: SEO × Analytics Consulting - オリジナルテーマ
Version: 1.0.0
License: Private
Text Domain: sato-seo
*/

/* ── CSS Variables ── */
:root {
  --ink: #0e0e10;
  --paper: #f5f3ee;
  --navy: #0f1f3d;
  --accent: #1a6b4a;
  --accent-light: #2d9e6e;
  --muted: #6b6b72;
  --border: #d8d4cc;
  --highlight: #e8f5ef;
  --mono: 'DM Mono', monospace;
  --serif: 'Shippori Mincho', serif;
  --sans: 'Noto Sans JP', sans-serif;
  --header-height: 72px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;600;700&family=DM+Mono:wght@400;500&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

/* ── HEADER ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 4vw;
  background: rgba(245,243,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}
.site-logo {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.site-nav { display: flex; gap: 2rem; align-items: center; }
.site-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  padding: 0.55rem 1.4rem;
  border-radius: 2px;
  font-size: 0.75rem !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--accent-light) !important; }

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

/* ── PAGE HERO ── */
.page-hero {
  background: var(--navy);
  padding: 5rem 6vw 4rem;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}
.page-hero * { position: relative; z-index: 1; }
.page-hero-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent-light);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.page-hero-tag::before {
  content: '';
  display: inline-block;
  width: 2rem; height: 1px;
  background: var(--accent-light);
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  color: white;
  font-weight: 700;
  line-height: 1.3;
}

/* ── SECTION COMMON ── */
.section-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.section-tag::before {
  content: '';
  display: inline-block;
  width: 2rem; height: 1px;
  background: var(--accent);
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 2.5rem;
  line-height: 1.4;
}

/* ── BLOG ARCHIVE ── */
.blog-section {
  padding: 5rem 6vw;
  background: var(--paper);
}
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: white;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
}
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.post-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(26,107,74,0.08);
  transform: translateY(-2px);
}
.post-card:hover::before { transform: scaleX(1); }
.post-card-thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--navy);
}
.post-card-thumb-placeholder {
  width: 100%;
  height: 200px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}
.post-card-body { padding: 1.8rem; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.8rem;
}
.post-card-cat {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--highlight);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  border: 1px solid rgba(26,107,74,0.15);
  text-transform: uppercase;
}
.post-card-date {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.post-card-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-excerpt {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.2rem;
}
.post-card-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.post-card-link::after { content: '→'; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
}
.pagination a, .pagination span {
  font-family: var(--mono);
  font-size: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.2s;
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* ── SINGLE POST ── */
.single-section {
  padding: 4rem 6vw;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}
.single-article {}
.post-header { margin-bottom: 2.5rem; }
.post-header-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.post-header-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 1.5rem;
}
.post-eyecatch {
  width: 100%;
  height: auto;
  margin-bottom: 2.5rem;
  border-radius: 2px;
}

/* ── ARTICLE CONTENT ── */
.entry-content {
  font-size: 0.95rem;
  line-height: 1.9;
  color: var(--ink);
}
.entry-content h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  margin: 3rem 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
}
.entry-content h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 2rem 0 0.8rem;
  padding-left: 0.8rem;
  border-left: 3px solid var(--accent);
}
.entry-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.5rem 0 0.6rem;
}
.entry-content p { margin-bottom: 1.4rem; }
.entry-content ul, .entry-content ol {
  margin: 1rem 0 1.4rem 1.5rem;
}
.entry-content li { margin-bottom: 0.5rem; }
.entry-content strong { color: var(--navy); font-weight: 700; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content a:hover { color: var(--accent-light); }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--highlight);
  font-size: 0.9rem;
  color: var(--muted);
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}
.entry-content th {
  background: var(--navy);
  color: white;
  padding: 0.7rem 1rem;
  text-align: left;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}
.entry-content td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.entry-content tr:hover td { background: var(--highlight); }
.entry-content code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: #f0ede8;
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  color: var(--accent);
}
.entry-content pre {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.6;
}
.entry-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.entry-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
}

/* ── CTA BOX ── */
.cta-box {
  background: var(--accent);
  padding: 2.5rem;
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.cta-box * { position: relative; z-index: 1; }
.cta-box h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: white;
  margin-bottom: 0.6rem;
}
.cta-box p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 1.5rem;
}
.cta-box a {
  display: inline-block;
  background: white;
  color: var(--accent);
  padding: 0.75rem 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: all 0.25s;
}
.cta-box a:hover { background: var(--highlight); transform: translateY(-1px); }

/* ── SIDEBAR ── */
.sidebar { position: sticky; top: calc(var(--header-height) + 2rem); }
.sidebar-widget {
  background: white;
  border: 1px solid var(--border);
  padding: 1.8rem;
  margin-bottom: 1.5rem;
}
.sidebar-widget-title {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-profile-icon {
  width: 64px; height: 64px;
  background: var(--navy);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.sidebar-profile-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.sidebar-profile-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.8rem;
}
.sidebar-profile-bio {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.sidebar-cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: white;
  padding: 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  border-radius: 2px;
  transition: background 0.2s;
}
.sidebar-cta:hover { background: var(--accent-light); }
.sidebar-posts { list-style: none; }
.sidebar-posts li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-posts li:last-child { border-bottom: none; }
.sidebar-posts a {
  font-size: 0.82rem;
  color: var(--navy);
  line-height: 1.5;
  display: block;
  transition: color 0.2s;
}
.sidebar-posts a:hover { color: var(--accent); }
.sidebar-posts-date {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ── POST FOOTER ── */
.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.post-author-box {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: white;
  border: 1px solid var(--border);
  margin-bottom: 2rem;
}
.post-author-icon {
  width: 72px; height: 72px;
  background: var(--navy);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  flex-shrink: 0;
}
.post-author-name {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.post-author-title {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.post-author-bio { font-size: 0.82rem; color: var(--muted); line-height: 1.7; }

/* ── RELATED POSTS ── */
.related-posts { margin-top: 2rem; }
.related-posts-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.related-post-card {
  background: white;
  border: 1px solid var(--border);
  padding: 1.2rem;
  transition: all 0.2s;
}
.related-post-card:hover { border-color: var(--accent); }
.related-post-cat {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.related-post-title {
  font-family: var(--serif);
  font-size: 0.88rem;
  color: var(--navy);
  line-height: 1.5;
  font-weight: 700;
}

/* ── FIXED PAGE ── */
.page-section {
  padding: 4rem 6vw;
  max-width: 860px;
  margin: 0 auto;
}
.page-content { font-size: 0.95rem; line-height: 1.9; }

/* ── CONTACT FORM ── */
.contact-section {
  background: var(--accent);
  padding: 5rem 6vw;
  position: relative;
  overflow: hidden;
}
.contact-section::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.contact-section * { position: relative; z-index: 1; }
.contact-section h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  color: white;
  margin-bottom: 0.8rem;
}
.contact-section p { color: rgba(255,255,255,0.7); margin-bottom: 2.5rem; }
.wpcf7-form { max-width: 540px; }
.wpcf7-form p { margin-bottom: 1rem !important; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  padding: 0.85rem 1.1rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s;
}
.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder { color: rgba(255,255,255,0.4); }
.wpcf7-form input:focus,
.wpcf7-form textarea:focus { border-color: rgba(255,255,255,0.6); }
.wpcf7-form select option { color: var(--ink); background: white; }
.wpcf7-form textarea { resize: vertical; min-height: 120px; }
.wpcf7-form input[type="submit"] {
  background: white;
  color: var(--accent);
  border: none;
  padding: 0.9rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.25s;
  width: auto;
}
.wpcf7-form input[type="submit"]:hover {
  background: var(--highlight);
  transform: translateY(-1px);
}

/* ── FOOTER ── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.35);
  text-align: center;
  padding: 2rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

/* ── UTILITIES ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .single-section { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .related-posts-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .post-author-box { flex-direction: column; }
}
