/*!
 * Siam Works — ページ内ブロック
 *
 * ヒーロー、セクション見出し、カード、記事本文、空の状態、
 * ページネーション、絞り込み。theme.css（シェル）の続き。
 */

/* =========================================================
   ヒーロー
   ========================================================= */

.sw-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: clamp(140px, 20vh, 220px) 0 clamp(60px, 10vh, 110px);
}

.sw-hero__inner { position: relative; z-index: 2; }
.sw-hero__inner h1 { margin: 0; }

.sw-hero__title {
  display: block;
  font-family: var(--font-family-grotesk);
  font-weight: 700;
  font-size: clamp(2.75rem, 10.2vw, 13rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
  color: var(--blue-500);
  margin: 0;
}

/* 日本語のメインコピー。視覚上は英字が主役だが、
   見出しとしての正本はこちら（SEO・支援技術向け）。 */
.sw-hero__jp {
  display: block;
  font-family: var(--type-display-family);
  font-weight: 900;
  font-size: var(--type-statement-size);
  letter-spacing: 0.02em;
  color: var(--blue-600);
  margin: 0 0 clamp(16px, 3vw, 28px);
}

.sw-hero__eyebrow {
  position: relative;
  z-index: 2;
  margin-top: clamp(24px, 5vw, 48px);
  font-family: var(--type-display-family);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

/* 装飾図形。カンプの heroMorph を簡略化したもの。 */
.sw-hero__shapes { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.sw-hero__shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}
.sw-hero__shape--a { width: 42vmin; height: 42vmin; right: -10vmin; top: 8vh; background: var(--blue-100); }
.sw-hero__shape--b { width: 26vmin; height: 26vmin; right: 22vmin; bottom: 4vh; background: var(--surface-band); }
.sw-hero__shape--c { width: 14vmin; height: 14vmin; left: -4vmin; bottom: 18vh; background: var(--blue-50); }

@media (prefers-reduced-motion: no-preference) {
  .sw-hero__shape--a { animation: sw-drift 16s ease-in-out infinite; }
  .sw-hero__shape--c { animation: sw-drift 22s ease-in-out infinite reverse; }
}

@keyframes sw-drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-22px); }
}

/* =========================================================
   セクション見出し
   ========================================================= */

.sw-sectionhead { margin-bottom: clamp(28px, 5vw, 52px); }
.sw-sectionhead__jp {
  font-family: var(--type-display-family);
  font-size: var(--type-statement-size);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin: 0 0 12px;
}
.sw-sectionhead__latin {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  font-weight: 600;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sw-sectionhead__lead {
  margin: 0;
  max-width: 44em;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}
.sw-band--blue .sw-sectionhead__jp,
.sw-band--blue .sw-sectionhead__lead { color: #fff; }
.sw-band--blue .sw-sectionhead__latin { color: rgba(255, 255, 255, 0.82); }

/* サイトのスタンス */
.sw-stance { max-width: 52em; }
.sw-stance__label {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.sw-stance__title {
  font-family: var(--type-display-family);
  font-weight: 900;
  font-size: var(--type-statement-size);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0 0 28px;
}
.sw-stance__body {
  margin: 0;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}

/* =========================================================
   リンク・ボタン
   ========================================================= */

.sw-textlink {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-family-grotesk);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--blue-600);
  transition: color 0.2s cubic-bezier(0.2, 0, 0.2, 1);
}
.sw-textlink:hover { color: var(--blue-700); }
.sw-textlink svg { transition: transform 0.22s cubic-bezier(0.2, 0, 0.2, 1); }
.sw-textlink:hover svg { transform: translateX(4px); }
.sw-band--blue .sw-textlink { color: #fff; }

.sw-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-full);
  text-decoration: none;
  font-family: var(--font-family-grotesk);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sw-btn--primary { background: var(--blue-500); color: #fff; }
.sw-btn--primary:hover { background: var(--blue-700); color: #fff; }
.sw-btn--outline { background: transparent; color: var(--blue-600); border-color: var(--border-hairline); }
.sw-btn--outline:hover { background: var(--blue-500); color: #fff; border-color: var(--blue-500); }
.sw-band--blue .sw-btn--outline { color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.sw-band--blue .sw-btn--outline:hover { background: #fff; color: var(--blue-600); }

.sw-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(24px, 4vw, 40px); }

/* =========================================================
   カード共通
   ========================================================= */

.sw-grid { display: grid; gap: clamp(20px, 3vw, 32px); }
@media (min-width: 700px) { .sw-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .sw-grid--3 { grid-template-columns: repeat(3, 1fr); } }

.sw-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 28px);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.24s cubic-bezier(0.2, 0, 0.2, 1), transform 0.24s cubic-bezier(0.2, 0, 0.2, 1);
}
.sw-card:hover { box-shadow: var(--shadow-card); color: inherit; }
.sw-card:hover .sw-card__title { color: var(--blue-700); }

.sw-card__thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-band);
  display: grid;
  place-items: center;
  margin: calc(clamp(20px, 2.4vw, 28px) * -1) calc(clamp(20px, 2.4vw, 28px) * -1) 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.sw-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.42s cubic-bezier(0.2, 0, 0.2, 1); }
.sw-card:hover .sw-card__thumb img { transform: scale(1.03); }
.sw-card__thumb-placeholder {
  font-family: var(--font-family-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

.sw-card__cat {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: var(--surface-blue-subtle, var(--blue-50));
  color: var(--blue-700);
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  font-weight: 700;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
}

.sw-card__latin {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
}

.sw-card__title {
  font-family: var(--type-display-family);
  font-size: var(--text-lg);
  font-weight: 900;
  line-height: 1.5;
  margin: 0;
  transition: color 0.2s;
}

.sw-card__excerpt {
  margin: 0;
  font-size: var(--type-ui-size);
  line-height: var(--leading-ui);
  color: var(--text-secondary);
}

.sw-card__foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding-top: 6px;
}

.sw-meta {
  font-family: var(--font-family-mono);
  font-size: var(--type-meta-size);
  color: var(--text-muted);
}

.sw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sw-tag {
  font-family: var(--font-family-mono);
  font-size: var(--type-meta-size);
  color: var(--text-muted);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
}

/* 注目記事 */
.sw-featured {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  margin-bottom: clamp(28px, 4vw, 48px);
}
@media (min-width: 860px) { .sw-featured { grid-template-columns: 1.1fr 0.9fr; } }
.sw-featured__title {
  font-family: var(--type-display-family);
  font-size: var(--type-heading-size);
  font-weight: 900;
  line-height: 1.4;
  margin: 0 0 18px;
}
.sw-featured__pick {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  font-weight: 700;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 14px;
}

/* 制作物カード */
.sw-product__type {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  font-weight: 700;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--blue-600);
}
.sw-band--blue .sw-product__type { color: rgba(255, 255, 255, 0.9); }
.sw-product__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 10px; }

/* =========================================================
   記事本文
   ========================================================= */

.sw-article { padding-block: clamp(40px, 6vw, 72px); }
.sw-article__layout { display: grid; gap: clamp(28px, 4vw, 56px); }
@media (min-width: 1024px) { .sw-article__layout { grid-template-columns: 200px minmax(0, 1fr); } }

.sw-toc { align-self: start; position: sticky; top: 110px; font-size: var(--type-ui-size); }
.sw-toc__title {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.sw-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sw-toc a { text-decoration: none; color: var(--text-secondary); }
.sw-toc a:hover { color: var(--blue-600); }
@media (max-width: 1023px) { .sw-toc { position: static; } }

.sw-prose { max-width: 40rem; font-size: var(--type-body-size); line-height: var(--leading-body); color: var(--text-primary); }
.sw-prose > * + * { margin-top: 1.6em; }
.sw-prose h2 {
  font-family: var(--type-display-family);
  font-size: var(--type-heading-size);
  font-weight: 900;
  line-height: 1.4;
  margin-top: 2.4em;
  scroll-margin-top: 110px;
}
.sw-prose h3 { font-family: var(--type-display-family); font-size: var(--text-lg); font-weight: 700; margin-top: 2em; }
.sw-prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
.sw-prose pre {
  background: var(--ink-900);
  color: #fff;
  padding: 20px;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  font-family: var(--font-family-mono);
  font-size: var(--type-ui-size);
}
.sw-prose code { font-family: var(--font-family-mono); font-size: 0.92em; }
.sw-prose :not(pre) > code {
  background: var(--surface-band);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}
.sw-prose blockquote {
  margin-inline: 0;
  padding-left: 20px;
  border-left: 3px solid var(--blue-300);
  color: var(--text-secondary);
}
.sw-prose table { width: 100%; border-collapse: collapse; font-size: var(--type-ui-size); }
.sw-prose th, .sw-prose td { border: 1px solid var(--border-hairline); padding: 10px 12px; text-align: left; }

.sw-article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-bottom: 20px;
}
.sw-article__title {
  font-family: var(--type-display-family);
  font-size: var(--type-statement-size);
  font-weight: 900;
  line-height: 1.35;
  margin: 0 0 20px;
}
.sw-article__lead {
  margin: 0 0 28px;
  max-width: 40rem;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}

/* 参照リスト */
.sw-sources { margin-top: clamp(36px, 5vw, 60px); padding-top: 28px; border-top: 1px solid var(--border-hairline); }
.sw-sources__title {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.sw-sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sw-sources a { font-size: var(--type-ui-size); word-break: break-all; }

/* 記事末尾の関連 */
.sw-related { margin-top: clamp(40px, 6vw, 72px); }

/* =========================================================
   絞り込み
   ========================================================= */

.sw-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: clamp(24px, 4vw, 40px); }
.sw-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--surface-raised);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--type-ui-size);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.sw-filter:hover { border-color: var(--blue-400); color: var(--blue-700); }
.sw-filter[aria-current="page"] { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.sw-filter__count { font-family: var(--font-family-mono); font-size: var(--type-meta-size); opacity: 0.8; }

/* =========================================================
   ページネーション
   ========================================================= */

.sw-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(36px, 5vw, 64px);
  font-family: var(--font-family-grotesk);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-index);
}
.sw-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  text-decoration: none;
  color: var(--text-secondary);
}
.sw-pagination .page-numbers.current { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.sw-pagination .page-numbers:hover:not(.current) { border-color: var(--blue-400); color: var(--blue-700); }

/* =========================================================
   空の状態
   仕様書 9 章：空の枠やダミーを並べてサイトを大きく見せない。
   ========================================================= */

.sw-empty {
  border: 1px dashed var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  background: var(--surface-raised);
}
.sw-empty__title {
  font-family: var(--type-display-family);
  font-size: var(--text-xl);
  font-weight: 900;
  margin: 0 0 14px;
}
.sw-empty__body {
  margin: 0 auto;
  max-width: 36em;
  font-size: var(--text-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
}
.sw-empty .sw-actions { justify-content: center; }

/* =========================================================
   検索フォーム
   ========================================================= */

.sw-searchform { display: flex; gap: 10px; max-width: 520px; }
.sw-searchform input[type="search"] {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-hairline);
  background: var(--surface-raised);
  font: inherit;
  font-size: var(--type-ui-size);
  color: var(--text-primary);
}
.sw-searchform input[type="search"]:focus-visible { border-color: var(--blue-400); }
.sw-searchform button {
  border: 0;
  cursor: pointer;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  background: var(--blue-500);
  color: #fff;
  font-family: var(--font-family-grotesk);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sw-searchform button:hover { background: var(--blue-700); }

/* =========================================================
   About
   ========================================================= */

.sw-about__figure {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: var(--surface-band);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.sw-about__figure svg { width: 58%; height: auto; }
.sw-about__figure img { width: 100%; height: 100%; object-fit: cover; }

.sw-doing { display: grid; gap: clamp(20px, 3vw, 32px); }
@media (min-width: 860px) { .sw-doing { grid-template-columns: repeat(3, 1fr); } }
.sw-doing__item { display: flex; flex-direction: column; gap: 12px; }
.sw-doing__latin {
  font-family: var(--font-family-grotesk);
  font-size: var(--type-index-size);
  font-weight: 700;
  letter-spacing: var(--tracking-index);
  text-transform: uppercase;
  color: var(--blue-600);
}
.sw-doing__title { font-family: var(--type-display-family); font-size: var(--text-lg); font-weight: 900; margin: 0; }
.sw-doing__body { margin: 0; font-size: var(--type-ui-size); line-height: var(--leading-ui); color: var(--text-secondary); }

/* =========================================================
   補助
   ========================================================= */

/* 直前のバンドと続けて見せるとき（見出しバンドの直後など） */
.sw-band--tight { padding-top: 0; }

/* 記事のアイキャッチ */
.sw-article__hero {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: clamp(24px, 4vw, 44px);
}
.sw-article__hero img { display: block; width: 100%; height: auto; }

/* About の 2 カラム */
.sw-about__split { align-items: center; }

/* フォロー節の補足文 */
.sw-follow__note { margin-top: 24px; }

/* 検索結果の件数 */
.sw-search__count { display: block; margin-bottom: 20px; }

/* WordPress 標準のスクリーンリーダー用テキスト */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 添付画像のキャプションなど */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: var(--type-meta-size); color: var(--text-muted); }
.alignleft { float: left; margin-right: 1.5em; }
.alignright { float: right; margin-left: 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
