@charset "UTF-8";

/* 固定トップページ専用。記事本文の装飾とは独立した誌面にする。 */
html:has(body.home .home-layout) {
  scroll-padding-top: var(--wp-admin--admin-bar--height, 0px);
}

body.home #content {
  margin: 0;
}

body.home #content-in {
  width: 100%;
  max-width: none;
}

body.home #main {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

body.home #sidebar {
  display: none;
}

body.home .sidebar-menu-button {
  display: none;
}

.home-layout {
  color: #2d3d4c;
  font-family: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  line-break: strict;
}

.home-layout a {
  color: inherit;
  text-decoration: none;
}

.home-layout a:focus-visible {
  outline: 3px solid #668aab;
  outline-offset: 5px;
}

.home-layout .home-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  font-size: 0;
  line-height: 1;
  vertical-align: middle;
}

/* 方向ごとのSVGを等倍で表示し、CSSの回転や拡大は使わない。 */
.home-arrow svg {
  display: block;
  width: 14px;
  height: 14px;
}

body.home #main .front-page-hero {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  isolation: isolate;
  background: #142133;
  box-shadow: none;
  margin: 0;
  display: grid;
  align-items: center;
  min-height: clamp(390px, 33vw, 480px);
}

body.home #main .front-page-hero__background {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: linear-gradient(115deg, #1d2e40 0%, #2b435a 52%, #425c75 100%);
}

body.home #main .front-page-hero__background::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0.7px, transparent 0.9px);
  background-size: 7px 7px;
  pointer-events: none;
}

body.home #main .front-page-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  inset: auto;
  min-height: inherit;
  box-sizing: border-box;
  justify-content: center;
  padding: clamp(48px, 4vw, 64px) 24px;
  color: #f7f9fc;
  text-shadow: 0 2px 18px rgba(5, 10, 20, 0.2);
}

.home-hero-inner {
  box-sizing: border-box;
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-left: 0;
}

.home-brand {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 26px;
}

.home-brand img {
  display: block;
  width: clamp(190px, 18vw, 230px);
  height: auto;
}

.home-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.7;
  color: #506b85;
}

.home-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  flex-shrink: 0;
  background: #68869f;
}

body.home #main .front-page-hero__title {
  margin: 0 0 18px;
  max-width: 19em;
  font-size: clamp(22px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.65;
  color: #fff;
  white-space: normal;
  overflow-wrap: normal;
  line-break: strict;
}

body.home #main .front-page-hero__tagline {
  margin: 0;
  max-width: 34em;
  font-size: clamp(14px, 1.3vw, 16px);
  line-height: 2;
  letter-spacing: 0.03em;
  color: #d5dfea;
}

.home-jump {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(169, 191, 210, 0.18);
  background: linear-gradient(115deg, var(--cocoon-child-header-color, #172536), color-mix(in srgb, var(--cocoon-child-header-color, #172536) 80%, #6895b3));
  font-size: 13px;
  font-weight: 700;
}

.home-jump a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  color: #e2ebf2;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0.06em;
}

.home-jump a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.home-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.home-section {
  padding-block: clamp(44px, 5vw, 68px);
  scroll-margin-top: 28px;
}

.home-section-heading {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 30px;
  margin-bottom: 28px;
  padding: 0 0 20px;
}

.home-section-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  border-radius: 2px;
  background: #506b85;
}

.home-layout h2 {
  margin: 0;
  padding: 0;
  color: #2d3d4c;
  background: none;
  border: 0;
  font-size: clamp(23px, 2.1vw, 28px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.home-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 28px;
}

.home-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cocoon-child-card-border);
  border-radius: var(--cocoon-child-card-radius);
  background: #fff;
  box-shadow: var(--cocoon-child-card-shadow);
  transition: box-shadow 0.2s ease;
}

.home-card:focus-within {
  outline: 3px solid #668aab;
  outline-offset: 4px;
}

.home-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.home-card__image {
  flex-shrink: 0;
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e4ebf0;
  overflow: hidden;
}

.home-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.home-card__rank {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  box-sizing: border-box;
  min-width: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: #506b85;
  border-radius: 4px;
  line-height: 1;
  font-weight: 700;
}

.home-card__rank-number {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.home-card__rank-unit {
  font-size: 11px;
}

.home-card__rank[data-rank="1"] {
  color: #55452b;
  background: #e7d8b4;
}

.home-card__rank[data-rank="2"] {
  color: #3e505e;
  background: #d8e0e6;
}

.home-card__rank[data-rank="3"] {
  color: #624936;
  background: #dcc3af;
}

.home-card__body {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex: 0 0 252px;
  height: 252px;
  min-height: 0;
  padding: 18px 20px;
}

.home-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  color: #637585;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.home-layout .home-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  margin: 8px 0 10px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.home-card__excerpt {
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: #5d6f7e;
  font-size: 14px;
  line-height: 1.85;
}

.home-card__read {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #e9eef2;
  color: #506b85;
  font-size: 13px;
  font-weight: 500;
}

.home-popular {
  background: rgba(163, 183, 201, 0.18);
  border-block: 1px solid rgba(184, 201, 215, 0.3);
}

.home-ranking-note {
  margin: 22px 0 0;
  color: #637585;
  font-size: 12px;
  text-align: right;
}

.home-more {
  margin-top: 32px;
  text-align: center;
}

.home-more a {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  min-width: 208px;
  max-width: 100%;
  min-height: 52px;
  padding: 12px 28px;
  border: 1px solid #a9bccb;
  border-radius: 6px;
  background: #fff;
  color: #344f63;
  font-size: 15px;
  font-weight: 500;
  transition: background-color 200ms ease, border-color 200ms ease;
}

.home-more a:hover {
  border-color: #506b85;
  background: #e2ebf1;
}

.home-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 32px;
  font-size: 14px;
  color: #627586;
}

.home-article-list h1 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.5;
}

.home-list-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 28px;
  margin-top: 40px;
  font-size: 13px;
}

.home-list-pagination a {
  background: #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 20px;
  font-size: 14px;
  border: 1px solid #a9bccb;
  border-radius: 5px;
}

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

.home-topic {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid #d4dfe7;
  border-radius: 8px;
  background: #fff;
  transition: background-color 0.2s ease;
}

.home-topic:hover {
  background: #f1f5f8;
}

.home-topic strong,
.home-topic small {
  display: block;
}

.home-topic strong {
  font-size: 17px;
  font-weight: 500;
}

.home-topic small {
  margin-top: 5px;
  font-size: 12px;
  color: #637585;
}

.home-empty {
  padding: 24px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  font-size: 14px;
}

@media screen and (min-width: 1024px) {
  /* 3列を保ちながら記事エリアを中央に絞り、カードの横幅を抑える。 */
  #home-latest.home-shell,
  .home-popular > .home-shell,
  .home-article-list.home-shell {
    max-width: 1120px;
  }

  .home-card__body {
    flex: 1 0 auto;
    height: auto;
    padding: 12px 16px;
  }

  .home-layout .home-card__title {
    -webkit-line-clamp: 2;
    margin-block: 6px 8px;
    font-size: 16px;
    line-height: 1.55;
  }

  .home-card__read {
    margin-top: auto;
    padding-top: 8px;
  }

  .home-card__excerpt {
    -webkit-line-clamp: 2;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.7;
  }

  body.home #main .front-page-hero {
    min-height: clamp(340px, 28vw, 410px);
  }

  body.home #main .front-page-hero__content {
    padding-block: clamp(32px, 3vw, 48px);
  }
}

@media screen and (max-width: 1000px) {
  .home-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .home-topic {
    padding: 20px 18px;
  }
}

@media screen and (max-width: 640px) {
  body.home #main .front-page-hero {
    min-height: 336px;
  }

  body.home #main .front-page-hero__content {
    padding: 28px 20px 32px;
  }

  .home-brand {
    margin-bottom: 28px;
  }

  .home-brand img {
    width: 190px;
    max-width: 100%;
  }

  body.home #main .front-page-hero__title {
    margin-bottom: 12px;
    font-size: clamp(25px, 6.5vw, 32px);
    line-height: 1.5;
    letter-spacing: 0.01em;
    text-wrap: balance;
  }

  body.home #main .front-page-hero__tagline {
    max-width: 25em;
    font-size: 14px;
    line-height: 1.9;
    letter-spacing: 0;
  }

  .home-shell {
    padding-inline: 20px;
  }

  .home-jump {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 16px 20px;
    text-align: center;
    font-size: 13px;
  }

  .home-jump a {
    min-height: 46px;
    padding: 10px 6px;
  }

  .home-section {
    padding-block: 36px;
  }

  .home-section-heading {
    margin-bottom: 20px;
    padding: 0 0 16px;
  }

  .home-eyebrow {
    margin-bottom: 6px;
  }

  .home-layout h2 {
    font-size: 22px;
    letter-spacing: 0.02em;
  }

  .home-card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  /* 1列ではタイトルを全文表示し、内容に合わせた高さにする。 */
  .home-card__body {
    flex: 1 0 auto;
    height: auto;
    padding: 16px 18px;
  }

  .home-layout .home-card__title {
    display: block;
    overflow: visible;
    block-size: auto;
    margin-block: 8px;
    font-size: 17px;
    line-height: 1.7;
  }

  .home-card__meta {
    display: block;
    block-size: 1.8em;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.8;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .home-card__meta time {
    display: block;
  }

  .home-card__meta > span {
    display: none;
  }

  .home-card__excerpt {
    display: none;
  }

  .home-card__rank {
    top: 8px;
    left: 8px;
    min-width: 36px;
    padding: 6px;
  }

  .home-card__rank-number {
    font-size: 16px;
  }

  .home-card__read {
    margin-top: 12px;
    padding-top: 10px;
    font-size: 12px;
  }

  .home-more {
    margin-top: 24px;
  }

  .home-topic-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .home-topic {
    padding: 18px;
    overflow-wrap: anywhere;
  }

  .home-topic > span:first-child {
    min-width: 0;
  }

  .home-ranking-note {
    text-align: left;
  }

}

@media (prefers-reduced-motion: reduce) {
  .home-layout a,
  .home-card {
    transition: none;
  }
}

/* 背景を先に見せ、文字と各セクションを短い浮き上がりで際立たせる。 */
@media (prefers-reduced-motion: no-preference) {
  .front-page-hero__background {
    animation: home-soft-appear 500ms ease-out both;
  }

  .home-hero-inner > * {
    animation: home-rise-in 650ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .home-hero-inner > :nth-child(2) { animation-delay: 150ms; }
  .home-hero-inner > :nth-child(3) { animation-delay: 300ms; }

  body.home .home-reveal {
    opacity: 0;
    translate: 0 24px;
    transition:
      opacity 400ms ease-out var(--home-reveal-delay, 0ms),
      translate 650ms cubic-bezier(.22, 1, .36, 1) var(--home-reveal-delay, 0ms),
      transform 220ms ease,
      box-shadow 220ms ease,
      border-color 220ms ease;
  }

  body.home .home-reveal.is-visible,
  body.home .home-reveal:focus-within {
    opacity: 1;
    translate: 0 0;
  }

  body.home .home-reveal:focus-within {
    transition-delay: 0ms;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .home-card__read > span,
  .home-topic > span:last-child {
    display: inline-block;
    transition: transform 220ms ease;
  }

  .home-card:hover .home-card__read > span,
  .home-topic:hover > span:last-child {
    transform: translateX(3px);
  }

  .home-jump a {
    background-image: linear-gradient(#e2ebf2, #e2ebf2);
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0 1px;
    transition: background-size 250ms ease, color 200ms ease;
  }

  .home-jump a:hover {
    background-size: 100% 1px;
    text-decoration: none;
  }
}

@keyframes home-soft-appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes home-rise-in {
  from { opacity: 0; translate: 0 20px; }
  to { opacity: 1; translate: 0 0; }
}

/* カテゴリーも同じ一覧幅・カード・ページ送りを使い、サイドバーを外す。 */
body.category #content {
  margin: 0;
}

body.category #content #content-in {
  width: 100%;
  max-width: none;
}

body.category #main {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.category #sidebar,
body.category .sidebar-menu-button {
  display: none;
}

body.category .home-article-list h1 {
  color: #2d3d4c;
  background: none;
  border: 0;
  padding: 0;
}
