/*
Theme Name: Hajime Lab Note Blog
Theme URI: https://wine.do-johodai.ac.jp/blog/
Author: Hajime Saito Laboratory
Description: 斎藤一研究室サイトと統一感を持たせた、Note風・写真重視のブログ用WordPressテーマ。
Version: 1.0.2
License: GNU General Public License v2 or later
Text Domain: hajime-lab-note-blog
*/

:root {
  --font-sans: "Inter", "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;

  --brand-50: #eef8fd;
  --brand-100: #d8f0fb;
  --brand-200: #b3e2f7;
  --brand-500: #29ABE2;
  --brand-600: #0071BC;
  --brand-700: #005f9f;
  --brand-900: #00385e;

  --accent-400: #f8c030;
  --accent-500: #ed7200;
  --accent-600: #d35f00;

  --ink: #0f273d;
  --muted: #66788a;
  --line: #e2e8f0;
  --bg: #f8fbfd;
  --paper: #fff;

  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
  --shadow-soft: 0 8px 24px rgba(21, 113, 172, .08);

  --radius: 26px;
  --max: 1280px;
  --content: 900px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0, rgba(41, 171, 226, .13), transparent 32rem),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.85;
  letter-spacing: .02em;
}

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

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

a:hover {
  color: var(--brand-700);
}

/* =========================
   Header
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(216, 240, 251, .9);
}

.header-inner {
  max-width: var(--max);
  margin: auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 22px;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* ロゴ画像用：既存のbrand-markをロゴの箱として使う */
.brand-mark {
  width: 54px;
  height: 54px;
  position: relative;
  flex: 0 0 auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

/* 旧デザインのオレンジ丸などを完全に消す */
.brand-mark::before,
.brand-mark::after {
  content: none !important;
  display: none !important;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.site-title {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.site-title span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .04em;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-size: 14px;
  font-weight: 700;
  color: #425466;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav a:hover,
.nav .current-menu-item > a {
  background: var(--brand-50);
  color: var(--brand-700);
}

.nav-cta {
  background: var(--brand-600) !important;
  color: white !important;
  box-shadow: 0 8px 18px rgba(21, 113, 172, .14);
}

/* =========================
   Hero
========================= */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 48px 22px 30px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--brand-100);
  background: rgba(255, 255, 255, .75);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--brand-700);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.14;
  margin: 18px 0 12px;
  letter-spacing: -0.04em;
}

.hero p {
  font-size: 16px;
  color: #526b80;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid var(--line);
  background: white;
}

.btn-primary {
  border-color: transparent;
  background: var(--accent-500);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-600);
  color: #fff;
}

.photo-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-tile {
  aspect-ratio: 4 / 3;
  border-radius: 24px;
  overflow: hidden;
  background: var(--brand-100);
  box-shadow: var(--shadow-soft);
}

.photo-tile:first-child {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.photo-tile:hover img {
  transform: scale(1.04);
}

/* =========================
   Layout / Cards
========================= */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 22px 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--brand-100);
}

.thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--brand-50), #fff);
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(.25px);
  transform: scale(1.01);
  transition: transform .35s ease, filter .25s ease;
}

.post-card:hover .thumb img {
  filter: blur(0);
  transform: scale(1.035);
}

.card-body {
  padding: 20px;
}

.meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}

.cat {
  color: var(--brand-700);
  background: var(--brand-50);
  border-radius: 999px;
  padding: 3px 9px;
}

.post-card h2 {
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.excerpt {
  color: #5d7082;
  font-size: 14px;
  line-height: 1.85;
}

.read-more {
  display: inline-flex;
  margin-top: 14px;
  color: var(--brand-700);
  font-weight: 800;
  font-size: 14px;
}

/* =========================
   Sidebar
========================= */

.sidebar {
  position: sticky;
  top: 86px;
}

.widget {
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.widget-title,
.widget h2 {
  font-size: 15px;
  font-weight: 900;
  margin: 0 0 12px;
  color: var(--brand-900);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  border-top: 1px solid #edf2f7;
  padding: 9px 0;
}

.widget li:first-child {
  border-top: 0;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 13px;
  background: white;
}

.search-submit {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--brand-600);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* =========================
   Article
========================= */

.article {
  max-width: var(--content);
  margin: 0 auto;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 32px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow);
}

.article-header {
  text-align: left;
  margin-bottom: 28px;
}

.article-title {
  font-size: clamp(30px, 4.8vw, 48px);
  line-height: 1.25;
  letter-spacing: -0.04em;
  margin: 14px 0;
}

.article-content {
  font-size: 17px;
  color: #24384a;
}

.article-content p {
  margin: 1.35em 0;
}

.article-content a {
  color: var(--brand-700);
  text-decoration: underline;
  text-decoration-color: var(--brand-100);
  text-underline-offset: 4px;
}

.article-content h2 {
  font-size: 1.65rem;
  line-height: 1.45;
  margin: 2.2em 0 .8em;
  padding-left: 14px;
  border-left: 5px solid var(--brand-600);
}

.article-content h3 {
  font-size: 1.25rem;
  margin: 2em 0 .6em;
}

.article-content figure,
.article-content .wp-block-image {
  margin: 28px 0;
}

.article-content img {
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .09);
}

.article-content .wp-block-gallery {
  gap: 12px;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-500);
  background: #fff8ef;
  border-radius: 0 18px 18px 0;
  margin: 28px 0;
  padding: 18px 22px;
  color: #5b4939;
}

.post-nav {
  max-width: var(--content);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.post-nav a {
  display: block;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  font-weight: 800;
  color: var(--brand-900);
}

.post-nav .next {
  text-align: right;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
}

.page-numbers {
  padding: 9px 13px;
  border-radius: 999px;
  background: white;
  border: 1px solid var(--line);
  font-weight: 800;
}

.page-numbers.current {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
}

/* =========================
   Footer
========================= */

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  font-weight: 700;
  color: var(--brand-700);
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 34px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .next {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .post-grid {
    grid-template-columns: 1fr;
  }

  .photo-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-tile:first-child {
    grid-column: span 2;
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 560px) {
  .hero {
    padding-inline: 16px;
  }

  .wrap {
    padding-inline: 16px;
  }

  .article {
    border-radius: 24px;
    padding: 22px 18px;
  }

  .article-content {
    font-size: 16px;
  }

  .nav a {
    padding: 7px 9px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }

  .site-title {
    font-size: 15px;
  }
}

.site-logo {
  height: 40px;
  width: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  flex: 0 0 auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand {
  gap: 12px;
}