/* ===========================
   Component Library
   =========================== */

/* === Buttons === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 40px;
  font-family: var(--font-gothic);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  min-width: 200px;
  text-align: center;
}
.btn--primary {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}
.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}
.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}
.btn-text {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-theme);
  text-decoration: none;
  letter-spacing: var(--ls-body);
}
.btn-text span {
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.2s;
}

/* Benchmark: "View More" is a wide black block button, not an inline link */
.btn--view-more {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 40px auto 0;
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 18px 40px;
}
.btn--view-more span {
  margin-left: 8px;
  display: inline-block;
  transition: transform 0.2s;
}

@media (any-hover: hover) {
  .btn--primary:hover {
    background: var(--color-primary-mid);
    border-color: var(--color-primary-mid);
  }
  .btn--outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
  }
  .btn--white:hover {
    background: transparent;
    color: var(--color-white);
  }
  .btn-text:hover { text-decoration: underline; }
  .btn-text:hover span { transform: translateX(4px); }
  .btn--view-more:hover {
    background: var(--color-primary-mid);
    border-color: var(--color-primary-mid);
  }
  .btn--view-more:hover span { transform: translateX(4px); }
}

/* === CTA Banner === */

.cta-banner {
  position: relative;
  padding: clamp(60px, 8vw, 100px) 0;
  text-align: center;
  overflow: hidden;
}
.cta-banner__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cta-banner__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.cta-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 26, 46, 0.8);
}
.cta-banner__content {
  position: relative;
  z-index: 1;
}
.cta-banner__copy {
  font-family: var(--font-mincho);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-h2);
  color: var(--color-white);
  letter-spacing: var(--ls-heading);
  margin-bottom: 12px;
}
.cta-banner__sub {
  font-size: var(--fs-small);
  color: var(--color-on-dark-sub);
  margin-bottom: 32px;
}

/* === Project Card === */

.project-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  padding: 28px 24px;
  transition: border-color 0.2s;
}
/* Photo bleeds to card edges */
.project-card__photo {
  margin: -28px -24px 20px;
  overflow: hidden;
}
.project-card__photo .photo-placeholder,
.project-card__photo img {
  aspect-ratio: 3 / 2;
  width: 100%;
  object-fit: cover;
  display: block;
}
.project-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.project-card__badge {
  font-size: var(--fs-caption);
  padding: 2px 10px;
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-body);
}
/* Monochrome badges — benchmark: no colored tags */
.project-card__badge--secured     { background: var(--color-bg-alt); color: var(--color-text); }
.project-card__badge--construction { background: var(--color-primary); color: var(--color-white); }
.project-card__badge--operating   { background: var(--color-bg-block); color: var(--color-text-sub); }
.project-card__tag {
  font-size: var(--fs-caption);
  color: var(--color-text-light);
}
.project-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 16px;
}
.project-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: var(--fs-small);
}
.project-card__meta-item { display: contents; }
.project-card__meta dt { color: var(--color-text-light); }
.project-card__meta dd { color: var(--color-text); }
.project-card__meta strong {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
}

@media (any-hover: hover) {
  .project-card:hover { border-color: var(--color-theme); }
}

/* === News Item === */

.news-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s;
}
.news-item:first-child { border-top: 1px solid var(--color-border-light); }
.news-item__date {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  flex-shrink: 0;
  min-width: 90px;
}
.news-item__cat {
  font-size: 0.625rem;
  padding: 2px 10px;
  flex-shrink: 0;
  letter-spacing: var(--ls-body);
}
/* Benchmark: monochrome badges, no color-coding */
.cat-notice  { background: var(--color-black); color: var(--color-white); }
.cat-press   { background: var(--color-black); color: var(--color-white); }
.cat-report  { background: var(--color-black); color: var(--color-white); }
.news-item__title {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  line-height: var(--lh-compact);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (any-hover: hover) {
  .news-item:hover { color: var(--color-theme); }
  .news-item:hover .news-item__title { text-decoration: underline; }
}

/* === Business Link Card === */

.biz-card {
  display: block;
  padding: 40px 32px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.2s;
}
/* Photo bleeds to card edges */
.biz-card__photo {
  margin: -40px -32px 24px;
  overflow: hidden;
}
.biz-card__photo .photo-placeholder,
.biz-card__photo img {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  display: block;
}
.biz-card__icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--color-theme);
  display: flex;
  align-items: center;
  justify-content: center;
}
.biz-card__icon svg { width: 100%; height: 100%; }
.biz-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 12px;
}
.biz-card__desc {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  margin-bottom: 20px;
}
.biz-card__link {
  font-size: var(--fs-small);
  color: var(--color-theme);
  font-weight: var(--fw-medium);
}

@media (any-hover: hover) {
  .biz-card:hover { border-color: var(--color-theme); }
  .biz-card:hover .biz-card__link { text-decoration: underline; }
}

/* === Stat Highlight === */

.stat-highlight { text-align: center; }
.stat-highlight__number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.stat-highlight__value {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-hero);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.stat-highlight__unit {
  font-family: var(--font-gothic);
  font-size: var(--fs-h2);
  font-weight: var(--fw-light);
  color: var(--color-text-sub);
}
.stat-highlight__label {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  margin-top: 8px;
  letter-spacing: var(--ls-body);
}
.stat-highlight__note {
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  margin-top: 4px;
}
.section--dark .stat-highlight__value { color: var(--color-white); }
.section--dark .stat-highlight__unit  { color: var(--color-on-dark-sub); }
.section--dark .stat-highlight__label { color: var(--color-on-dark-sub); }

/* === Feature Grid / Item === */

.feature-item {
  text-align: center;
  padding: 32px 16px;
}
.feature-item__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--color-theme);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-item__icon svg { width: 100%; height: 100%; }
.feature-item__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 12px;
  line-height: var(--lh-heading);
}
.feature-item__desc {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
}
.feature-item--left { text-align: left; }
.feature-item--left .feature-item__icon { margin: 0 0 16px; }

/* === Step Flow === */

.step-flow {
  display: flex;
  align-items: flex-start;
}
.step-flow__item {
  flex: 1;
  text-align: center;
  position: relative;
}
.step-flow__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-family: "Roboto", var(--font-gothic);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-small);
}
.step-flow__connector {
  width: 40px;
  height: 2px;
  background: var(--color-border);
  margin-top: 24px;
  flex-shrink: 0;
  position: relative;
}
.step-flow__connector::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  border: 5px solid transparent;
  border-left-color: var(--color-border);
}
.step-flow__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}
.step-flow__desc {
  font-size: var(--fs-caption);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
}
.step-flow__doc {
  font-size: var(--fs-caption);
  color: var(--color-theme);
  margin-top: 4px;
  padding: 4px 8px;
  background: var(--color-theme-pale);
  display: inline-block;
}

/* === Accordion === */

.accordion__item {
  border-bottom: 1px solid var(--color-border-light);
}
.accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
}
.accordion__title {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-compact);
  padding-right: 40px;
}
.accordion__icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex-shrink: 0;
}
.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  background: var(--color-text-light);
  transition: transform 0.3s, opacity 0.3s;
}
.accordion__icon::before {
  width: 20px; height: 1px;
  top: 50%; left: 0;
}
.accordion__icon::after {
  width: 1px; height: 20px;
  left: 50%; top: 0;
}
.accordion__header[aria-expanded="true"] .accordion__icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.accordion__header[aria-expanded="true"] .accordion__icon::before {
  transform: rotate(180deg);
}
.accordion__body {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  overflow: hidden;
  max-height: 0;
  padding: 0;
  opacity: 0;
  transition: max-height 0.4s ease, padding-bottom 0.4s ease, opacity 0.3s ease;
}

/* === Info Table === */

.info-table--dl .info-table__row {
  display: flex;
  border-bottom: 1px solid var(--color-border-light);
  padding: 16px 0;
}
.info-table__label {
  width: 180px;
  flex-shrink: 0;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-text);
}
.info-table__value {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
}

.info-table--compare { border-radius: 4px; overflow: hidden; border: 1px solid var(--color-border-light); }
.info-table--compare table { width: 100%; border-collapse: collapse; }
.info-table--compare th,
.info-table--compare td {
  padding: 18px 24px;
  font-size: var(--fs-small);
  text-align: left;
  letter-spacing: 0.05em;
  line-height: var(--lh-compact);
}
.info-table--compare thead th {
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: var(--fw-medium);
  border-bottom: none;
}
.info-table--compare thead th:first-child {
  background: var(--color-primary-mid);
}
.info-table--compare tbody tr {
  border-bottom: 1px solid var(--color-border-light);
}
.info-table--compare tbody tr:last-child { border-bottom: none; }
.info-table--compare tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}
.info-table--compare tbody th {
  font-weight: var(--fw-medium);
  color: var(--color-text);
  width: 160px;
  white-space: nowrap;
  background: var(--color-bg-block);
  border-right: 1px solid var(--color-border-light);
}
.info-table--compare tbody td {
  color: var(--color-text-sub);
}
.info-table--compare tbody td:last-child {
  color: var(--color-text);
  font-weight: var(--fw-medium);
}

/* === Partner Logos === */

.partner-logos { text-align: center; }
.partner-logos__label {
  font-family: var(--font-english);
  font-size: var(--fs-caption);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 24px;
}
.partner-logos__list {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 48px);
}
/* ============================================
   Partner Logos - 光学的均衡 (3-tier)
   ------------------------------------------------
   Tier 1 (square-ish 1.5-2.2:1): Sigenergy, HOBE → 最大
   Tier 2 (moderate 2.2-3:1):     SMBC, Mizuho   → 中
   Tier 3 (very wide 3+:1):       PowerX, Bluestorage → 最小
   ============================================ */
.partner-logos__item {
  /* Tier 2 デフォルト（中） */
  height: 68px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}
.partner-logos__item[src*="sigenergy"],
.partner-logos__item[src*="hobe"] {
  /* Tier 1: 正方形系は大きく */
  height: 96px;
  max-width: 200px;
}
.partner-logos__item[src*="powerx"],
.partner-logos__item[src*="bluestorage"] {
  /* Tier 3: 超横長は小さく */
  height: 52px;
  max-width: 260px;
}

/* Top page: Trusted Partners — 1行で全社表示 */
.section--partners .partner-logos__list {
  flex-wrap: nowrap;
  gap: clamp(12px, 2vw, 32px);
}
.section--partners .partner-logos__item {
  /* Tier 2 デフォルト */
  height: clamp(40px, 5vw, 52px);
  max-width: none;
  min-width: 0;
  flex: 1 1 0;
}
.section--partners .partner-logos__item[src*="sigenergy"],
.section--partners .partner-logos__item[src*="hobe"] {
  /* Tier 1 */
  height: clamp(56px, 7vw, 74px);
}
.section--partners .partner-logos__item[src*="powerx"],
.section--partners .partner-logos__item[src*="bluestorage"] {
  /* Tier 3 */
  height: clamp(30px, 3.5vw, 40px);
}
@media (max-width: 768px) {
  .partner-logos__list {
    flex-direction: column;
    gap: 28px;
  }
  .section--partners .partner-logos__list {
    /* TOPページは横1行を維持（overrideで上書き） */
    flex-direction: row;
    gap: 12px;
  }
  .partner-logos__item {
    /* Tier 2: 中（SMBC / Mizuho） */
    height: 52px;
    max-width: 180px;
  }
  .partner-logos__item[src*="sigenergy"],
  .partner-logos__item[src*="hobe"] {
    /* Tier 1: 大（正方形系） */
    height: 72px;
    max-width: 160px;
  }
  .partner-logos__item[src*="powerx"],
  .partner-logos__item[src*="bluestorage"] {
    /* Tier 3: 小（超横長） */
    height: 40px;
    max-width: 200px;
  }
}

/* === Placeholder (for pending assets) === */

.placeholder-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  background: var(--color-bg-block);
  border: 1px dashed var(--color-border);
  color: var(--color-text-light);
  font-size: var(--fs-caption);
  font-family: var(--font-english);
  letter-spacing: var(--ls-body);
}

.partner-logos__placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 48px;
  background: var(--color-white);
  border: 2px dashed var(--color-border);
  border-radius: 4px;
  color: var(--color-text-light);
  font-size: var(--fs-caption);
  font-family: var(--font-gothic);
}
.partner-logos__placeholder::after {
  content: "LOGO";
  letter-spacing: 0.1em;
}
.partner-logos__note {
  margin-top: 24px;
  font-size: var(--fs-small);
  color: var(--color-text-light);
  letter-spacing: var(--ls-body);
}

/* Benchmark: no icon circles, no decorative backgrounds.
   Icons are bare SVG with theme color, no enclosing shape. */
.placeholder-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
}

/* === Member Card (benchmark: portrait photo + role + name JP/EN) === */

.member-card {
  display: block;
  text-decoration: none;
  color: var(--color-text);
  transition: opacity 0.2s;
}
.member-card__photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--color-bg-block);
}
.member-card__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.member-card__photo .photo-placeholder {
  aspect-ratio: 3 / 4;
}
.member-card__role {
  display: block;
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  margin-bottom: 4px;
}
.member-card__name {
  font-size: var(--fs-h3);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-heading);
  margin-bottom: 2px;
}
.member-card__name-en {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  letter-spacing: 0.02em;
}
@media (any-hover: hover) {
  .member-card:hover { opacity: 0.8; }
}

/* === Business Detail Block (benchmark: full-width image + text, no card) === */

.biz-detail {
  margin-bottom: clamp(60px, 8vw, 100px);
}
.biz-detail:last-child { margin-bottom: 0; }
.biz-detail__photo {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  margin-bottom: clamp(24px, 3vw, 40px);
}
.biz-detail__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.biz-detail__photo .photo-placeholder {
  aspect-ratio: 3 / 2;
}
.biz-detail__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-thin);
  letter-spacing: var(--ls-heading);
  line-height: var(--lh-heading);
  margin-bottom: 16px;
}
.biz-detail__desc {
  font-size: var(--fs-body);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  max-width: 800px;
}

/* === News Filter Tabs === */

.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.news-filter__btn {
  padding: 8px 20px;
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.news-filter__btn.is-active,
.news-filter__btn:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* === News Card List (wrapper) === */

.news-card-list { margin-bottom: 0; }

/* === News Card (with thumbnail, for news list page) === */

.news-card {
  display: flex;
  gap: clamp(16px, 2vw, 24px);
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s;
}
.news-card:first-child { border-top: 1px solid var(--color-border-light); }
.news-card__thumb {
  width: clamp(100px, 15vw, 160px);
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--color-bg-block);
}
.news-card__thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.news-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.news-card__date {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-caption);
  color: var(--color-text-light);
}
.news-card__cat {
  font-size: 0.625rem;
  padding: 2px 10px;
  letter-spacing: var(--ls-body);
}
.news-card__body { flex: 1; min-width: 0; }
.news-card__title {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-compact);
}
@media (any-hover: hover) {
  .news-card:hover { color: var(--color-theme); }
  .news-card:hover .news-card__title { text-decoration: underline; }
}

/* === Pagination === */

.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: clamp(40px, 5vw, 60px);
}
.pagination__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  text-decoration: none;
  border: 1px solid var(--color-border-light);
  transition: background 0.2s, color 0.2s;
}
.pagination__link.is-current {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}
@media (any-hover: hover) {
  .pagination__link:hover:not(.is-current) {
    border-color: var(--color-text);
  }
}
