/*
 * Yamabuki Lab Front Page v3
 * DADSの情報設計・アクセシビリティ原則を参考にした独自CSS。
 * DADSのコードスニペットは複製していません。
 */

:root {
  --yl-yellow: #F8B500;
  --yl-yellow-soft: #FFF6D8;
  --yl-blue: #A0D8EF;
  --yl-blue-soft: #EAF7FC;
  --yl-ink: #1A1A1A;
  --yl-ink-2: #3F4650;
  --yl-muted: #65707D;
  --yl-line: #D9DEE5;
  --yl-surface: #FFFFFF;
  --yl-surface-soft: #F7F9FB;
  --yl-focus: #005FCC;
  --yl-radius-sm: 10px;
  --yl-radius-md: 16px;
  --yl-radius-lg: 24px;
  --yl-shadow: 0 14px 38px rgba(23, 33, 44, 0.08);
  --yl-container: 1180px;
}

.page-template-template-yamabuki-home #header-container,
.page-template-template-yamabuki-home .header-container,
.page-template-template-yamabuki-home #footer,
.page-template-template-yamabuki-home .footer {
  display: none !important;
}

.page-template-template-yamabuki-home body,
.page-template-template-yamabuki-home {
  background: var(--yl-surface-soft);
}

.page-template-template-yamabuki-home .content-in,
.page-template-template-yamabuki-home .main,
.page-template-template-yamabuki-home #main {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.yl-home-v3,
.yl-home-v3 * {
  box-sizing: border-box;
}

.yl-home-v3 {
  color: var(--yl-ink);
  background: var(--yl-surface);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
}

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

.yl-home-v3 a:focus-visible,
.yl-home-v3 button:focus-visible {
  outline: 3px solid var(--yl-focus);
  outline-offset: 3px;
}

.yl-container {
  width: min(calc(100% - 40px), var(--yl-container));
  margin-inline: auto;
}

.yl-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--yl-line);
  backdrop-filter: blur(10px);
}

.admin-bar .yl-site-header {
  top: 32px;
}

.yl-site-header__inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.yl-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.yl-brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--yl-ink);
  background: var(--yl-yellow);
  font-weight: 900;
  line-height: 1;
}

.yl-brand__name {
  font-size: 1.15rem;
}

.yl-global-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.94rem;
  font-weight: 700;
}

.yl-global-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.yl-global-nav a:hover {
  border-bottom-color: var(--yl-yellow);
}

.yl-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 22%, rgba(160, 216, 239, 0.58) 0 10%, transparent 10.5%),
    radial-gradient(circle at 74% 70%, rgba(248, 181, 0, 0.20) 0 13%, transparent 13.5%),
    linear-gradient(112deg, #FFFDF7 0%, #FFF8E6 46%, #EFF9FD 100%);
  border-bottom: 1px solid #E8ECF1;
}

.yl-hero__grid {
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 72px;
  align-items: center;
  padding-block: 72px;
}

.yl-eyebrow {
  margin: 0 0 10px;
  color: #8A6500;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.yl-hero h1,
.yl-section-heading h2,
.yl-policy-panel h2 {
  margin: 0;
  color: var(--yl-ink);
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.yl-hero h1 {
  font-size: clamp(2.65rem, 5vw, 4.9rem);
  font-weight: 900;
}

.yl-hero__lead {
  max-width: 690px;
  margin: 26px 0 0;
  color: var(--yl-ink-2);
  font-size: 1.08rem;
}

.yl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.yl-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.yl-button:hover {
  transform: translateY(-1px);
}

.yl-button--primary {
  background: var(--yl-yellow);
  color: var(--yl-ink);
  box-shadow: 0 8px 22px rgba(248, 181, 0, 0.22);
}

.yl-button--primary:hover {
  background: #E9AA00;
}

.yl-button--secondary {
  background: #FFF;
  border-color: #B7C0CA;
  color: var(--yl-ink);
}

.yl-button--secondary:hover {
  background: #F3F6F8;
}

.yl-trust-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  color: var(--yl-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.yl-trust-list li::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--yl-yellow-soft);
  color: #805E00;
  font-weight: 900;
}

.yl-hero__visual {
  display: grid;
  place-items: center;
}

.yl-compare-visual {
  position: relative;
  width: min(100%, 430px);
  aspect-ratio: 1.05;
}

.yl-compare-card {
  position: absolute;
  top: 15%;
  width: 58%;
  height: 66%;
  padding: 26px;
  border: 1px solid rgba(26, 26, 26, 0.11);
  border-radius: 26px;
  box-shadow: var(--yl-shadow);
}

.yl-compare-card--left {
  left: 0;
  background: #FFF6D8;
  transform: rotate(-4deg);
}

.yl-compare-card--right {
  right: 0;
  background: #E6F5FB;
  transform: rotate(4deg);
}

.yl-compare-card__label {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #FFF;
  font-size: 1.35rem;
  font-weight: 900;
}

.yl-compare-card__line {
  display: block;
  width: 78%;
  height: 10px;
  margin-top: 28px;
  border-radius: 99px;
  background: rgba(26, 26, 26, 0.13);
}

.yl-compare-card__line--short {
  width: 54%;
  margin-top: 14px;
}

.yl-compare-vs {
  position: absolute;
  z-index: 5;
  top: 39%;
  left: 50%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 7px solid #FFF;
  border-radius: 50%;
  background: var(--yl-ink);
  color: #FFF;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}

.yl-compare-check {
  position: absolute;
  z-index: 6;
  right: 9%;
  bottom: 4%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 6px solid #FFF;
  border-radius: 50%;
  background: var(--yl-yellow);
  color: var(--yl-ink);
  font-size: 2rem;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}

.yl-section {
  padding-block: 88px;
  background: #FFF;
}

.yl-section--soft {
  background: var(--yl-surface-soft);
}

.yl-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 32px;
}

.yl-section-heading h2,
.yl-policy-panel h2 {
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 900;
}

.yl-section-heading p:not(.yl-eyebrow),
.yl-policy-panel__copy > p:not(.yl-eyebrow) {
  margin: 12px 0 0;
  color: var(--yl-muted);
}

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

.yl-article-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--yl-line);
  border-radius: var(--yl-radius-md);
  background: #FFF;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.yl-article-card:hover {
  transform: translateY(-3px);
  border-color: #BEC7D1;
  box-shadow: var(--yl-shadow);
}

.yl-article-card__thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--yl-yellow-soft), var(--yl-blue-soft));
}

.yl-article-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s ease;
}

.yl-article-card:hover .yl-article-card__thumb img {
  transform: scale(1.02);
}

.yl-article-card__placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(26,26,26,.22);
  font-size: 3rem;
  font-weight: 900;
}

.yl-article-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.yl-article-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--yl-muted);
  font-size: 0.8rem;
}

.yl-tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--yl-blue-soft);
  color: #155E75;
  font-weight: 800;
}

.yl-article-card__title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.5;
  font-weight: 900;
}

.yl-article-card__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.yl-article-card__excerpt {
  margin: 12px 0 18px;
  color: var(--yl-muted);
  font-size: 0.9rem;
}

.yl-text-link {
  margin-top: auto;
  color: #005FCC !important;
  font-weight: 800;
}

.yl-text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yl-policy-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
  padding: 50px;
  border-top: 4px solid var(--yl-yellow);
  border-radius: 0 0 var(--yl-radius-lg) var(--yl-radius-lg);
  background: #FFF;
  box-shadow: var(--yl-shadow);
}

.yl-policy-panel__copy .yl-button {
  margin-top: 22px;
}

.yl-policy-points {
  display: grid;
  gap: 14px;
}

.yl-policy-point {
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--yl-line);
  border-radius: 14px;
  background: var(--yl-surface-soft);
}

.yl-policy-point > span {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yl-yellow-soft);
  color: #7B5900;
  font-weight: 900;
}

.yl-policy-point strong {
  font-size: 1rem;
}

.yl-policy-point p {
  margin: 2px 0 0;
  color: var(--yl-muted);
  font-size: 0.88rem;
}

.yl-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.yl-category-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--yl-line);
  border-radius: 14px;
  background: #FFF;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.yl-category-card:hover {
  transform: translateY(-2px);
  border-color: #B9C3CE;
  box-shadow: 0 10px 24px rgba(23,33,44,.07);
}

.yl-category-card__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--yl-blue-soft);
  color: #155E75;
  font-weight: 900;
}

.yl-category-card__copy {
  min-width: 0;
  display: grid;
}

.yl-category-card__copy strong {
  font-size: .95rem;
}

.yl-category-card__copy span {
  color: var(--yl-muted);
  font-size: .8rem;
}

.yl-category-card__arrow {
  color: #5A6571;
  font-size: 1.2rem;
}

.yl-popular-wrap {
  padding: 28px;
  border: 1px solid var(--yl-line);
  border-radius: var(--yl-radius-md);
  background: #FFF;
}

.yl-popular-wrap .popular-entry-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.yl-popular-wrap .popular-entry-card-link,
.yl-popular-wrap .popular-entry-card {
  border-radius: 12px;
}

.yl-empty-state {
  padding: 34px;
  border: 1px dashed #BEC6CF;
  border-radius: var(--yl-radius-md);
  background: #FFF;
  color: var(--yl-muted);
  text-align: center;
}

.yl-empty-state strong {
  color: var(--yl-ink);
}

.yl-empty-state p {
  margin: 6px 0 0;
}

.yl-custom-footer {
  padding-top: 52px;
  background: #20262D;
  color: #F5F7F9;
}

.yl-custom-footer__grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 36px;
  align-items: start;
}

.yl-custom-footer__brand {
  font-size: 1.25rem;
  font-weight: 900;
}

.yl-custom-footer p {
  margin: 8px 0 0;
  color: #BFC8D2;
}

.yl-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
  font-size: .9rem;
}

.yl-footer-nav a {
  color: #F5F7F9;
}

.yl-footer-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.yl-custom-footer__bottom {
  margin-top: 36px;
  padding-block: 18px;
  border-top: 1px solid #3A434D;
  color: #AEB8C2;
  font-size: .82rem;
}

@media (max-width: 980px) {
  .yl-global-nav {
    gap: 16px;
    font-size: .86rem;
  }

  .yl-hero__grid {
    grid-template-columns: 1fr;
    gap: 38px;
    min-height: auto;
    padding-block: 56px;
  }

  .yl-hero__visual {
    display: none;
  }

  .yl-card-grid,
  .yl-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yl-policy-panel {
    grid-template-columns: 1fr;
  }

  .yl-popular-wrap .popular-entry-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-bar .yl-site-header {
    top: 46px;
  }

  .yl-container {
    width: min(calc(100% - 28px), var(--yl-container));
  }

  .yl-site-header__inner {
    min-height: 64px;
  }

  .yl-brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .yl-global-nav {
    max-width: 55vw;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 14px;
    scrollbar-width: none;
  }

  .yl-global-nav::-webkit-scrollbar {
    display: none;
  }

  .yl-global-nav a {
    white-space: nowrap;
  }

  .yl-hero__grid {
    padding-block: 48px;
  }

  .yl-hero__lead {
    font-size: 1rem;
  }

  .yl-desktop-only {
    display: none;
  }

  .yl-hero__visual {
    display: none;
  }

  .yl-section {
    padding-block: 62px;
  }

  .yl-section-heading {
    margin-bottom: 24px;
  }

  .yl-card-grid,
  .yl-category-grid,
  .yl-popular-wrap .popular-entry-cards {
    grid-template-columns: 1fr;
  }

  .yl-article-card {
    display: grid;
    grid-template-columns: 132px 1fr;
  }

  .yl-article-card__thumb {
    height: 100%;
    aspect-ratio: auto;
  }

  .yl-article-card__body {
    padding: 16px;
  }

  .yl-article-card__excerpt {
    display: none;
  }

  .yl-article-card__meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .yl-policy-panel {
    gap: 28px;
    padding: 28px 22px;
  }

  .yl-custom-footer__grid {
    grid-template-columns: 1fr;
  }

  .yl-footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .yl-brand__name {
    font-size: 1rem;
  }

  .yl-global-nav {
    max-width: 47vw;
  }

  .yl-hero h1 {
    font-size: 2.65rem;
  }

  .yl-hero__actions {
    display: grid;
  }

  .yl-button {
    width: 100%;
  }

  .yl-trust-list {
    display: grid;
  }

  .yl-article-card {
    grid-template-columns: 112px 1fr;
  }

  .yl-article-card__title {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yl-home-v3 *,
  .yl-home-v3 *::before,
  .yl-home-v3 *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}


/* v3.1: トップページではCocoon標準サイドバーを表示しない */
body.home #sidebar,
body.home .sidebar,
body.home .sidebar-scroll,
body.page-template-template-yamabuki-home #sidebar,
body.page-template-template-yamabuki-home .sidebar,
body.page-template-template-yamabuki-home .sidebar-scroll {
  display: none !important;
}

/* サイドバー非表示時もトップページ領域を1カラムで使う */
body.home .content-in,
body.page-template-template-yamabuki-home .content-in {
  display: block !important;
}
