/* ===========================
   Page-specific Styles
   =========================== */

/* === TOP — Hero (top 50vh white text + image flows below fold) === */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: var(--header-height);
}

/* Top half — white, exactly 50% of first view */
.hero__text-area {
  position: relative;
  height: calc(50svh - var(--header-height) / 2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  padding: 0 var(--content-padding);
}
.hero__content {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(32px, 4vw, 64px);
}
.hero__left {
  flex: 1;
}
.hero__right {
  flex-shrink: 0;
}
.hero__en {
  font-family: var(--font-gothic);
  font-size: 0.8125rem;
  font-weight: var(--fw-regular);
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-mincho);
  font-weight: var(--fw-semibold);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--color-text);
  line-height: 1.7;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.hero__br-sp { display: none; }
.hero__br-pc { display: inline; }
.hero__sub {
  font-family: var(--font-gothic);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  color: var(--color-text);
  line-height: var(--lh-body);
  letter-spacing: 0.1em;
  max-width: 680px;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Bottom — full-width photo, natural aspect ratio, flows below fold */
.hero__visual {
  width: 100%;
}
.hero__visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* Dark button (benchmark: bg #333, white text) */
.btn--dark {
  background: var(--color-text);
  color: var(--color-white);
  border: 1px solid var(--color-text);
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
  font-family: var(--font-gothic);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn--dark:hover { opacity: 0.8; }

/* Outline button for dark-on-light */
.btn--outline-dark {
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  padding: calc(0.667em + 2px) calc(1.333em + 2px);
  font-family: var(--font-gothic);
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn--outline-dark:hover {
  border-color: var(--color-text);
  background: var(--color-bg-alt);
}

/* Floating Scroll Guide (fixed, bottom-center, fades out on Section 2) */
.scroll-guide {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 50;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.scroll-guide.is-hidden { opacity: 0; }
.scroll-guide__text {
  font-family: var(--font-english);
  font-size: 0.625rem;
  font-weight: var(--fw-regular);
  letter-spacing: 0.2em;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.scroll-guide__line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-border), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 0.8; }
}

/* === TOP — Why Now === */
/*
  Benchmark: no infographic. Numbers presented editorially.
  Layout: horizontal item = large number left + text right, separated by border.
*/

.section--why-now { padding-bottom: var(--section-padding-sm); }

.why-now-list {
  border-top: 1px solid var(--color-border-light);
}
.why-now-item {
  display: flex;
  align-items: baseline;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(24px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--color-border-light);
}
.why-now-item__number {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  min-width: 160px;
}
.why-now-item__value {
  font-family: "Roboto", var(--font-gothic);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--fw-thin);
  line-height: 1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}
.why-now-item__unit {
  font-family: var(--font-gothic);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  color: var(--color-text-light);
}
.why-now-item__text {
  flex: 1;
}
.why-now-item__label {
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  color: var(--color-text);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.why-now-item__note {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
}

/* === TOP — 3 Reasons (benchmark ABOUT overlap pattern) === */
/*
  Benchmark: large photo (60%) with white text box overlapping from the opposite side.
  Zigzag: odd = photo left / text overlaps from right
          even = photo right / text overlaps from left
*/

.reasons-list {
  max-width: var(--max-width-wide);
  margin: 0 auto;
}
.reasons-item {
  display: grid;
  grid-template-columns: 3fr 2fr;
  align-items: end;
  margin-bottom: clamp(60px, 8vw, 100px);
}
.reasons-item:last-child { margin-bottom: 0; }

/* Photo spans full grid row */
.reasons-item__photo {
  grid-row: 1;
  grid-column: 1;
}
.reasons-item__photo .photo-placeholder,
.reasons-item__photo img {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text box overlaps onto the photo */
.reasons-item__text {
  grid-row: 1;
  grid-column: 2;
  background: var(--color-bg);
  padding: clamp(30px, 4vw, 48px);
  margin-left: clamp(-100px, -8vw, -60px);
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

/* Zigzag: even items flip */
.reasons-item:nth-child(even) {
  grid-template-columns: 2fr 3fr;
}
.reasons-item:nth-child(even) .reasons-item__photo {
  grid-column: 2;
}
.reasons-item:nth-child(even) .reasons-item__text {
  grid-column: 1;
  margin-left: 0;
  margin-right: clamp(-100px, -8vw, -60px);
}

.reasons-item__num {
  display: block;
  font-family: var(--font-english);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--fw-regular);
  line-height: 1;
  color: var(--color-border);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.reasons-item__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  line-height: var(--lh-heading);
}
.reasons-item__desc {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  letter-spacing: 0.1em;
}

/* === TOP — Partners === */

.section--partners {
  padding: var(--section-padding-sm) 0;
  background: var(--color-bg-alt);
}

/* === TOP — News Preview === */

.section--news-preview .section__header {
  text-align: left;
}

/* === TOP — Hero Actions === */

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 32px;
}

/* === Mission Quote (about / recruit) === */

.mission-quote { margin: 0; padding: 0; }
.mission-quote p {
  font-family: var(--font-mincho);
  font-weight: var(--fw-semibold);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: 0.1em;
  line-height: 1.6;
  color: var(--color-text);
}

/* === Business Page — biz-detail component === */

.section--biz-lead .section__lead {
  max-width: 650px;
  margin: 20px auto 0;
}
.biz-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 5vw, 60px);
}
.biz-detail__main {
  max-width: 700px;
}
.biz-detail__desc {
  font-size: var(--fs-body);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  margin: 20px 0 32px;
}
.biz-detail__sub-title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}
.feature-item--compact {
  padding: 16px 8px;
}
.feature-item--compact .feature-item__icon {
  width: 40px; height: 40px;
  margin-bottom: 12px;
}
.feature-item--compact .feature-item__desc {
  font-size: var(--fs-caption);
}
.feature-item--left {
  text-align: left;
}
.section--energy-lead .section__lead {
  max-width: 650px;
  margin: 20px auto 0;
}
.stat-highlight--placeholder .stat-highlight__value {
  color: var(--color-border);
}

/* Contact Form styles → moved to css/form.css (separate file for plugin merge) */

/* === Article Detail (news-article) === */

.article-header {
  margin-bottom: clamp(32px, 4vw, 48px);
}
.article-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.article-header__date {
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-caption);
  color: var(--color-text-light);
}
.article-header__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-thin);
  letter-spacing: var(--ls-heading);
  line-height: var(--lh-heading);
}
.article-content {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-sub);
}
.article-content h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 48px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-light);
}
.article-content h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 32px 0 12px;
}
.article-content p { margin-bottom: 24px; }
.article-content ul,
.article-content ol { margin: 0 0 24px 20px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 3px solid var(--color-theme);
  padding: 16px 24px;
  margin: 24px 0;
  color: var(--color-text);
  background: var(--color-bg-alt);
}
.article-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-light);
}
.article-nav__link {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  text-decoration: none;
}
.article-nav__link:hover { color: var(--color-theme); }

/* === Recruit Values === */

.recruit-value {
  padding: 32px;
  border: 1px solid var(--color-border-light);
}
.recruit-value__num {
  font-family: var(--font-english);
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: var(--fw-regular);
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 12px;
}
.recruit-value__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 8px;
}
.recruit-value__desc {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
}

/* === Position Card (recruit page) === */

.position-card {
  padding: 32px 28px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
}
.position-card__tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.position-card__tag {
  font-size: 0.625rem;
  padding: 2px 8px;
  background: var(--color-bg-alt);
  color: var(--color-text-sub);
  letter-spacing: var(--ls-body);
}
.position-card__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  margin-bottom: 12px;
  line-height: var(--lh-heading);
}
.position-card__desc {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  margin-bottom: 20px;
}

/* === Job Detail (recruit page) === */

.job-detail__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}
.job-detail__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.job-detail__list li {
  padding-left: 16px;
  position: relative;
  margin-bottom: 4px;
  line-height: var(--lh-body);
}
.job-detail__list li::before {
  content: "・";
  position: absolute;
  left: 0;
}

/* === Privacy Policy === */

.privacy-content {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-sub);
}
.privacy-content h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 48px 0 16px;
}
.privacy-content h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin: 32px 0 12px;
}
.privacy-content p { margin-bottom: 16px; }
.privacy-content ul { margin: 0 0 16px 20px; }
.privacy-content li { margin-bottom: 6px; }

/* === Access Grid (about page) === */

.access-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 3vw, 40px);
  align-items: start;
}
.access-grid__info {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text-sub);
}
.access-grid__info address { font-style: normal; }
.access-grid__map { min-height: 300px; }
.map-embed {
  width: 100%;
  overflow: hidden;
}
.map-embed iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

/* === Scheme Diagram (storage-battery — HTML/CSS) === */

.scheme__lead {
  max-width: none;
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 48px);
}

/* === Scheme Zoomable (tap-to-zoom on SP) === */

@media (max-width: 767px) {
  .scheme-zoomable { cursor: zoom-in; }
}
.scheme-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
}
.scheme-lightbox.is-open {
  display: flex;
}
.scheme-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: #fff;
  font-size: 32px;
  cursor: pointer;
  z-index: 1;
  line-height: 1;
}
.scheme-lightbox__body {
  width: 100%;
  height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 16px;
}
.scheme-lightbox__body img {
  max-width: none;
  width: 200%;
  height: auto;
}

/* === TOC (Table of Contents — storage-battery page) === */

.toc {
  background: var(--color-bg-alt);
  padding: 32px;
  border: 1px solid var(--color-border-light);
}
.toc__title {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  margin-bottom: 16px;
}
.toc__list { counter-reset: toc; }
.toc__list li {
  counter-increment: toc;
  margin-bottom: 8px;
}
.toc__list li::before {
  content: counter(toc) ". ";
  color: var(--color-text-light);
}
.toc__list a {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  text-decoration: none;
}
.toc__list a:hover { color: var(--color-theme); text-decoration: underline; }

/* === Background Points (storage-battery) === */

.background-points {
  list-style: none;
  padding: 0;
  margin: 0;
}
.background-points li {
  font-size: var(--fs-body);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  padding-left: 20px;
  margin-bottom: 16px;
  position: relative;
}
.background-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-theme);
  position: absolute;
  left: 0;
  top: 0.65em;
}

/* === Contact Page Grid (form + sidebar) === */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: clamp(32px, 4vw, 48px);
  align-items: start;
}
.contact-aside {
  position: sticky;
  top: calc(var(--header-height) + 24px);
}
.contact-aside__card {
  background: var(--color-bg-alt);
  padding: 32px 24px;
}
.contact-aside__title {
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  margin-bottom: 16px;
  color: var(--color-text);
}
.contact-aside__card address {
  font-style: normal;
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  margin-bottom: 16px;
}
.contact-aside__email {
  display: block;
  color: var(--color-theme);
  font-size: var(--fs-small);
  text-decoration: none;
  margin-bottom: 16px;
}
.contact-aside__email:hover { text-decoration: underline; }
.contact-aside__note {
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  line-height: var(--lh-body);
}

/* === Filter Bar (projects page — dual filter groups) === */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 48px);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-light);
}
.filter-bar__group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-bar__label {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text-light);
  flex-shrink: 0;
  min-width: 56px;
}
.filter-bar__buttons {
  display: flex;
  gap: 4px;
}
.filter-bar__btn {
  padding: 6px 16px;
  font-size: var(--fs-caption);
  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;
}
.filter-bar__btn.is-active,
.filter-bar__btn:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* === Team Profile (about page — alternating photo/text) === */

.team-profile {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.team-profile:last-child { margin-bottom: 0; }
.team-profile:nth-child(even) {
  direction: rtl;
}
.team-profile:nth-child(even) > * {
  direction: ltr;
}
.team-profile__photo {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--color-bg-block);
}
.team-profile__photo img,
.team-profile__photo .photo-placeholder {
  width: 100%; height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 5;
}
.team-profile__position {
  font-size: var(--fs-caption);
  color: var(--color-text-light);
  margin-bottom: 4px;
}
.team-profile__name {
  font-size: var(--fs-h2);
  font-weight: var(--fw-regular);
  letter-spacing: var(--ls-heading);
  margin-bottom: 4px;
}
.team-profile__name-en {
  display: block;
  font-family: "Roboto", var(--font-gothic);
  font-size: var(--fs-small);
  font-weight: var(--fw-thin);
  color: var(--color-text-light);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.team-profile__bio {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  line-height: var(--lh-body);
  margin-bottom: 16px;
}
.team-profile__role-heading {
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-text);
  margin-bottom: 8px;
}
.team-profile__role-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.team-profile__role-list li {
  font-size: var(--fs-small);
  color: var(--color-text-sub);
  padding-left: 20px;
  position: relative;
  margin-bottom: 4px;
}
.team-profile__role-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-theme);
}
