/**
 * components.css — Pattern E inabe
 * 再利用コンポーネント: ボタン / カード / タブ / アコーディオン / バッジ等
 */

/* ================================================================
   DEMO BANNER
================================================================ */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
}

/* ================================================================
   HEADER
================================================================ */
.site-header {
  position: sticky;
  top: 33px; /* demo banner height */
  z-index: 900;
  background: rgba(250, 250, 250, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow var(--dur-normal) var(--ease-out);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(26,39,64,.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 18px;
}

.site-header__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
  flex-shrink: 0;
  line-height: 1;
}

.site-header__logo span {
  color: var(--blue-500);
}

.global-nav {
  display: flex;
  margin-inline-start: auto;
}

.global-nav ul {
  display: flex;
  gap: 4px;
  align-items: center;
}

.global-nav a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--dur-normal), background var(--dur-normal);
}

.global-nav a:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.site-header__tel a {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* ================================================================
   BUTTONS
================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out),
              background var(--dur-normal);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--cta-dark);
  color: #fff;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(26,39,64,.22);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}

.btn--outline:hover {
  background: var(--ink);
  color: #fff;
  transform: translateY(-2px);
}

.btn--blue {
  background: var(--blue-500);
  color: #fff;
}

.btn--blue:hover {
  background: var(--blue-700);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(83,150,184,.30);
}

/* セクション 詳しく見る リンク */
.section__more-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}

.section__more-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(26, 39, 64, 0.20);
}

.section__more-link--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.section__more-link--ghost:hover {
  background: var(--bg-soft);
}

/* ================================================================
   HAMBURGER
================================================================ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  transition: background var(--dur-normal);
}

.hamburger:hover {
  background: var(--bg-soft);
}

.hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

@media (max-width: 1024px) {
  .global-nav     { display: none; }
  .site-header__tel { display: none; }
  .hamburger      { display: flex; }
}

/* ================================================================
   DRAWER
================================================================ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 950;
  visibility: hidden;
  pointer-events: none;
}

.drawer.is-open {
  visibility: visible;
  pointer-events: all;
}

.drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,39,64,.48);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
}

.drawer.is-open .drawer__overlay {
  opacity: 1;
}

.drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--bg);
  padding: 80px 32px 40px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  box-shadow: -4px 0 32px rgba(26,39,64,.12);
}

.drawer.is-open .drawer__panel {
  transform: translateX(0);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-nav__item a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  transition: color var(--dur-normal), padding-inline-start var(--dur-normal);
}

.drawer-nav__item a:hover {
  color: var(--blue-500);
  padding-inline-start: 8px;
}

.drawer-nav__cta {
  margin-block-start: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ================================================================
   BLOB 装飾
================================================================ */
.blob {
  position: absolute;
  pointer-events: none;
  user-select: none;
}

.blob img,
.blob svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ================================================================
   WAVE MASK (下端波)
================================================================ */
.wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  bottom: -1px;
  height: clamp(40px, 5vw, 72px);
  background: var(--bg);
  -webkit-mask-image: url("../images/wave-mask.svg");
  mask-image: url("../images/wave-mask.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  pointer-events: none;
}

.wave-bottom--soft {
  background: var(--bg-soft);
}

.wave-bottom--blue-tint {
  background: var(--bg-blue-tint);
}

/* ================================================================
   TABS
================================================================ */
.tab-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-block-end: 40px;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
}

.tab-btn.is-active,
.tab-btn[aria-selected="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.tab-btn:hover:not(.is-active) {
  border-color: var(--line);
  background: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

/* ================================================================
   ACCORDION (FAQ)
================================================================ */
.accordion__item {
  border-bottom: 1px solid var(--line-soft);
}

.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--dur-normal);
}

.accordion__trigger:hover {
  color: var(--blue-500);
}

.accordion__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-normal), transform var(--dur-normal);
}

.accordion__icon::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--dur-normal);
}

.accordion__trigger[aria-expanded="true"] .accordion__icon {
  background: var(--ink);
}

.accordion__trigger[aria-expanded="true"] .accordion__icon::after {
  border-color: #fff;
  transform: rotate(-135deg) translate(-2px, -2px);
}

.accordion__body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-out);
}

.accordion__body.is-open {
  max-height: 480px;
}

.accordion__body-inner {
  padding: 0 0 22px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink-soft);
}

/* ================================================================
   HERO TRUST BADGES
================================================================ */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-trust__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.9);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(4px);
}

.hero-trust__badge .badge-icon {
  color: var(--blue-500);
  font-size: 14px;
}

/* ================================================================
   GATEWAY CARDS (4 カード)
================================================================ */
.gateway-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gateway-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-card);
  text-align: center;
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out);
  text-decoration: none;
  display: block;
}

.gateway-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gateway-card__icon {
  width: 52px;
  height: 52px;
  background: var(--bg-blue-tint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 22px;
  color: var(--blue-500);
  transition: background var(--dur-normal);
}

.gateway-card:hover .gateway-card__icon {
  background: var(--blue-100);
}

.gateway-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-block-end: 8px;
}

.gateway-card__desc {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.7;
}

@media (max-width: 1024px) {
  .gateway-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .gateway-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ================================================================
   PROBLEM CARDS
================================================================ */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.problem-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 28px 28px 24px;
  border-left: 4px solid var(--blue-200);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.problem-card__num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue-200);
  text-transform: uppercase;
  margin-block-end: 10px;
}

.problem-card__title {
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 700;
  color: var(--ink);
  margin-block-end: 10px;
  line-height: 1.5;
}

.problem-card__text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

.problem-card__blob {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 90px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .problem-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ================================================================
   SOLUTION CARDS
================================================================ */
.solution-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-block-end: 48px;
}

.solution-card {
  background: var(--bg-blue-tint);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--blue-100);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.solution-card__check {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--blue-500);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-block-start: 2px;
}

.solution-card__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-block-end: 6px;
  line-height: 1.5;
}

.solution-card__text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.8;
}

@media (max-width: 768px) {
  .solution-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ================================================================
   SHOWCASE CARDS (大型縦スタック 3枚)
================================================================ */
.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 72px);
}

.showcase-card {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: clamp(320px, 36vw, 520px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.showcase-card--reverse {
  direction: rtl;
}

.showcase-card--reverse > * {
  direction: ltr;
}

.showcase-card__visual {
  position: relative;
  overflow: hidden;
  min-height: clamp(280px, 32vw, 480px);
  align-self: stretch;
}

.showcase-card__visual-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(60px, 8vw, 96px);
  color: rgba(255,255,255,0.55);
}

/* AI 生成画像を各カードに適用 */
.showcase-card[id="courses"] .showcase-card__visual-inner {
  background-image: url("../images/generated/showcase-courses.png");
}

.showcase-card[id="support"] .showcase-card__visual-inner {
  background-image: url("../images/generated/showcase-support.png");
}

.showcase-card[id="cases"] .showcase-card__visual-inner {
  background-image: url("../images/generated/showcase-cases.png");
}

.showcase-card__content {
  padding: clamp(32px, 4vw, 64px);
}

.showcase-card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-500);
  margin-block-end: 14px;
}

.showcase-card__title {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.32;
  margin-block-end: 16px;
}

.showcase-card__text {
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--ink-soft);
  line-height: 1.85;
  margin-block-end: 28px;
}

/* wave bottom on showcase card (medium) */
.showcase-card__wave {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  bottom: -1px;
  height: clamp(40px, 5vw, 64px);
  background: var(--bg);
  -webkit-mask-image: url("../images/wave-mask-medium.svg");
  mask-image: url("../images/wave-mask-medium.svg");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center bottom;
  mask-position: center bottom;
  pointer-events: none;
}

@media (max-width: 900px) {
  .showcase-card {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .showcase-card--reverse { direction: ltr; }
  .showcase-card__visual { min-height: 220px; }
}

/* ================================================================
   NEWS CARDS
================================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-block-end: 40px;
}

.news-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-soft);
  transition: transform var(--dur-normal) var(--ease-out),
              box-shadow var(--dur-normal) var(--ease-out);
  text-decoration: none;
  display: block;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-blue-tint) 0%, var(--blue-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--blue-200);
}

.news-card__body {
  padding: 20px;
}

.news-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: 10px;
}

.news-card__date {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 500;
}

.news-card__cat {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg-blue-tint);
  color: var(--blue-500);
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
}

.news-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* ================================================================
   FINAL CTA BAND
================================================================ */
.final-cta {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.final-cta__blob-a {
  top: -40px;
  left: -60px;
  width: 260px;
  height: 230px;
  opacity: 0.12;
}

.final-cta__blob-b {
  bottom: -40px;
  right: -60px;
  width: 220px;
  height: 200px;
  opacity: 0.10;
}

.final-cta__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-200);
  margin-block-end: 16px;
}

.final-cta__title {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 700;
  color: #fff;
  line-height: 1.32;
  margin-block-end: 16px;
}

.final-cta__sub {
  font-size: clamp(14px, 1.2vw, 16px);
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  margin-block-end: 40px;
  max-width: 520px;
  margin-inline: auto;
}

.final-cta__btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.final-cta .btn--primary {
  background: var(--blue-500);
  color: #fff;
}

.final-cta .btn--primary:hover {
  background: var(--blue-200);
  color: var(--ink);
}

.final-cta .btn--outline {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}

.final-cta .btn--outline:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* ================================================================
   FOOTER
================================================================ */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.72);
  padding-block: clamp(48px, 6vw, 80px);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-block-end: 48px;
}

.footer-brand__logo {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  margin-block-end: 16px;
}

.footer-brand__logo span {
  color: var(--blue-200);
}

.footer-brand__tagline {
  font-size: 13px;
  line-height: 1.8;
  margin-block-end: 20px;
  max-width: 240px;
}

.footer-brand__tel {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.footer-col__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--blue-200);
  margin-block-end: 16px;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nav-list a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  transition: color var(--dur-normal);
}

.footer-nav-list a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-block-start: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom__copy {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.footer-bottom__links {
  display: flex;
  gap: 20px;
}

.footer-bottom__links a {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  transition: color var(--dur-normal);
}

.footer-bottom__links a:hover {
  color: rgba(255,255,255,0.8);
}

@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ================================================================
   PAGE TOP BUTTON
================================================================ */
.pagetop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--ink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal), transform var(--dur-normal);
  z-index: 800;
  text-decoration: none;
}

.pagetop.is-visible {
  opacity: 1;
  pointer-events: all;
}

.pagetop:hover {
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .pagetop { bottom: 20px; right: 20px; }
}
