/* ========================================
   top.css — 採用トップページ専用
   :root等の共通トークンは common.css が正本。
======================================== */

/* ========================================
   SITE MAIN
======================================== */
.site-main {
  background-image: url('../images/top/bg_01.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
}

/* ========================================
   SCROLL PROGRESS
======================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  width: 3px;
  height: 0%;
  background: var(--accent);
  z-index: 9998;
  transition: height 0.05s linear;
  border-radius: 0 0 var(--radius-pill) var(--radius-pill);
}

/* ========================================
   HERO
======================================== */
.hero-deco-rect {
  position: absolute;
  left: 0;
  top: 0;
  width: 42%;
  height: 100%;
  z-index: 0;
  transform-origin: left center;
}

.hero {
  position: relative;
  height: 695px;
  min-height: 640px;
  display: flex;
  align-items: stretch;
  padding-top: 72px;
  overflow: hidden;
  background: var(--bg);
}

.hero-content {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 48px 40px;
  position: relative;
  z-index: 2;
}

.hero-photo-side {
  position: absolute;
  top: var(--header-h);
  right: calc(max(0px, (100% - 1440px) / 2) + 40px);
  bottom: 0;
  margin-top: auto;
  margin-bottom: auto;
  width: 52%;
  max-width: 790px;
  max-height: 503px;
  z-index: 1;
  clip-path: inset(0 round var(--radius-xl) var(--radius-xl) calc(var(--radius-xl) * 2.5) var(--radius-xl));
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.hero-photo.is-active {
  opacity: 1;
}

/* 画像スライドの経過表示（ドットではなくシークバー） */
.hero-seekbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  height: 3px;
  background: var(--border);
}

.hero-seekbar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.hero-seekbar-fill.is-running {
  animation: hero-seekbar-progress 7s linear forwards;
}

@keyframes hero-seekbar-progress {
  from { width: 0%; }
  to   { width: 100%; }
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-title-line {
  display: block;
  line-height: 1.1;
}

.hero-title-large {
  font-size: clamp(40px, 5.5vw, 80px);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 1px 4px rgba(0, 0, 0, 0.8);
}

.char {
  display: inline-block;
}

.char--accent {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(0.875rem, 1.1vw, 1rem);
  font-weight: 500;
  line-height: 1.9;
  color: #fff;
  margin-bottom: 32px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 2px 16px rgba(0,0,0,0.6);
}

/* ========================================
   NEWS
======================================== */
.news {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.news-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 40px;
}

.news-label {
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
  background: var(--red);
  padding: 6px 18px;
  border-radius: var(--radius-pill);
}

.news-dot {
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
}

.news-content {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.news-date {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
}

.news-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.news-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s;
}
.news-inner:hover .news-link { color: var(--red); }

.news-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 500;
  transition: transform 0.2s;
}
.news-inner:hover .news-arrow { transform: translateY(3px); }
.news.is-open .news-arrow,
.news.is-open .news-inner:hover .news-arrow { transform: rotate(180deg); }

/* accordion */
.news-detail {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease;
}

.news.is-open .news-detail { grid-template-rows: 1fr; }

.news-detail-inner {
  overflow: hidden;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
}

.news-detail-text {
  padding: 4px 40px 26px;
  line-height: 1.9;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* ========================================
   ABOUT SECTION
======================================== */
.about-section {
  position: relative;
  width: 100%;
  min-height: 60vh;
  overflow: hidden;
  border-bottom: 1px solid #2A2A2A;
  background: var(--blue);
}

/* 写真: 常に画面右端まで */
.about-photo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  clip-path: polygon(10% 0%, 100% 0%, 100% 100%, 0% 100%);
}
.about-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.3) brightness(0.55);
  mix-blend-mode: luminosity;
}
.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--blue) 72%, transparent) 0%,
    color-mix(in srgb, var(--blue) 45%, transparent) 100%);
  pointer-events: none;
}

/* コンテンツ: max-width 内に収める */
.about-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.about-content {
  width: 58%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(48px, 8vw, 120px) clamp(32px, 5vw, 80px) clamp(48px, 8vw, 120px) clamp(48px, 8vw, 120px);
}

.about-heading {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 28px;
}

.about-body {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  line-height: 1.9;
  color: var(--white);
  margin-bottom: 48px;
}

/* WORKPLACE バリアント — ティール系 */
.about-section--workplace {
  background: var(--teal);
}
.about-section--workplace .about-photo {
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 10% 100%);
}
.about-section--workplace .about-photo::after {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--teal) 72%, transparent) 0%,
    color-mix(in srgb, var(--teal) 45%, transparent) 100%);
}
.about-section--workplace .about-photo img {
  filter: saturate(0.4) brightness(0.55) hue-rotate(120deg);
}
.about-section .btn-white            { color: var(--blue); }
.about-section--workplace .btn-white { color: var(--teal); }

/* ========================================
   INTERVIEW（トップの3×3グリッド。下層一覧の .person-grid とは別物）
======================================== */
.interview {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.interview-bg-panel {
  position: absolute;
  inset: 0;
  background: var(--purple);
  clip-path: polygon(62.2% 0%, 100% 0%, 100% 100%, 25% 100%);
  transform: scaleX(0);
  transform-origin: 100% 50%;
}

.interview-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 100px) 40px;
}

.interview-header {
  padding-bottom: clamp(32px, 4vw, 56px);
}

.interview-heading {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 24px;
}

.interview-sub {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--text);
}

/* 3×3グリッド */
.interview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 1;
}

.interview-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.interview-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.interview-photo-wrap {
  position: absolute;
  inset: 0;
}

.interview-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}

.interview-card:hover .interview-photo-wrap img {
  transform: scale(1.05);
}

.interview-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 55%,
    rgba(0,0,0,0.75) 100%
  );
  pointer-events: none;
}

.interview-role-badge {
  position: absolute;
  bottom: calc(20px + clamp(1rem, 2vw, 1.5rem) * 2.8);
  left: 20px;
  z-index: 2;
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #fff;
  background: rgba(30,30,30,0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.interview-comment {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
  z-index: 2;
  text-align: left;
}

.interview-footer {
  padding-top: 32px;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

.interview-more-btn {
  color: var(--purple);
}

/* ========================================
   RECRUIT LINKS
======================================== */
.recruit {
  padding: 120px 0;
  overflow: hidden;
}

.recruit-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.recruit-panel {
  border-radius: var(--radius-xl);
  overflow: hidden;
  min-height: 400px;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease, background-size 0.6s ease;
}

.recruit-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  border: 3px solid transparent;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.recruit-panel--yellow::after {
  background:
    linear-gradient(135deg,
      rgba(255,255,255,0.4) 0%,
      rgba(0,0,0,0.5) 50%,
      rgba(255,255,255,0.4) 100%
    ) border-box;
}

.recruit-panel--blue::after {
  background:
    linear-gradient(225deg,
      rgba(255,255,255,0.4) 0%,
      rgba(0,0,0,0.5) 50%,
      rgba(255,255,255,0.4) 100%
    ) border-box;
}

.recruit-panel:hover {
  transform: translateY(-8px);
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}

.recruit-panel--yellow {
  background: url('../images/common/recruit_new_grad.jpg') center/105% no-repeat;
  color: #fff;
}
.recruit-panel--yellow:hover { background-size: 118%; }

.recruit-panel--yellow::before,
.recruit-panel--blue::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle, rgba(0,0,0,0.4) 1px, transparent 1px),
    rgba(30, 29, 26, 0.35);
  background-size: 4px 4px;
  z-index: 0;
}

.recruit-panel--blue {
  background: url('../images/common/recruit_career.jpg') center/105% no-repeat;
  color: #fff;
}
.recruit-panel--blue:hover { background-size: 118%; }

.recruit-panel-inner {
  padding: 56px 48px;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.recruit-panel:hover .btn-arrow {
  transform: translateX(4px);
}

.recruit-panel-label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  opacity: 0.5;
  margin-bottom: 16px;
}

.recruit-panel-title {
  font-size: clamp(40px, 4vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.recruit-panel-body {
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  margin-bottom: 40px;
}

.recruit-btn {
  align-self: flex-start;
}

/* ========================================
   RESPONSIVE（トップ専用要素のみ）
======================================== */
@media (max-width: 1024px) {
  .interview-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 300px;
    grid-auto-flow: row;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero {
    height: calc(var(--header-h) + var(--hero-photo-gap) * 2 + min(52vw, 790px) / var(--hero-photo-ratio));
    min-height: unset;
  }
  .hero-photo-side {
    top: calc(var(--header-h) + var(--hero-photo-gap));
    bottom: auto;
    margin-top: 0;
    transform: none;
    height: auto;
    max-height: none;
    aspect-ratio: var(--hero-photo-ratio);
  }

  .about-section {
    height: auto;
    min-height: 35vh;
  }
  .about-inner {
    min-height: 35vh;
  }
  .about-content {
    padding-top: 4vw;
    padding-bottom: 4vw;
  }

  .interview-grid {
    grid-auto-rows: auto;
  }
  .interview-card {
    aspect-ratio: 1 / 1;
  }

  .interview-inner {
    padding-top: 6vw;
    padding-bottom: 6vw;
  }
  .recruit {
    padding: 8vw 0;
  }
  .recruit-panel--yellow,
  .recruit-panel--blue {
    background-size: cover;
  }
  .recruit-panel--yellow:hover,
  .recruit-panel--blue:hover {
    background-size: cover;
  }
}

/* --- mobile (≤768px) --- */
@media (max-width: 768px) {
  /* hero */
  .hero {
    height: auto;
    min-height: unset;
    flex-direction: column;
  }
  .hero-content {
    width: 100%;
    max-width: 100%;
    padding: 6vw 6vw 8vw;
    justify-content: flex-start;
  }
  .hero-photo-side {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    aspect-ratio: var(--hero-photo-ratio);
    margin: 0;
    order: -1;
    clip-path: none;
  }

  /* news */
  .news-inner {
    flex-wrap: wrap;
    align-items: center;
    padding: 16px 24px;
    gap: 10px;
    max-width: 100%;
    position: relative;
    transition: padding-bottom 0.4s ease;
  }
  .news-link {
    margin-left: auto;
  }
  .news-dot {
    display: none;
  }
  .news-content {
    order: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    flex: 1 0 100%;
    width: 100%;
    min-width: 0;
  }
  .news-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    width: 100%;
  }
  .news-detail-text {
    padding-top: 0;
    padding-left: 24px;
    padding-right: 24px;
  }
  .news.is-open .news-inner {
    padding-bottom: 4px;
  }

  /* about section */
  .about-section {
    height: auto;
    min-height: 45vh;
  }
  .about-inner {
    min-height: 45vh;
  }
  .about-content {
    width: 100%;
  }
  .about-body {
    max-width: none;
    width: 100%;
  }
  .about-photo {
    width: 55%;
  }
  .interview-bg-panel {
    clip-path: polygon(50.5% 0%, 100% 0%, 100% 100%, 25% 100%);
  }
  .hero-deco-rect {
    width: 55%;
  }

  /* interview */
  .interview-inner {
    padding: 8vw 0;
  }
  .interview-header {
    padding: 0 6vw 5vw;
  }
  .interview-grid {
    padding: 0 6vw;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    grid-auto-rows: auto;
  }
  .interview-card {
    aspect-ratio: 1 / 1;
    border-radius: calc(var(--radius-xl) / 2);
  }
  .interview-role-badge {
    font-size: 9px;
    bottom: calc(8px + clamp(0.8rem, 3vw, 1rem) * 2.8);
    left: 12px;
    padding: 3px 8px;
  }
  .interview-comment {
    font-size: clamp(11px, 3vw, 14px);
    bottom: 8px;
    left: 12px;
    right: 12px;
  }

  /* recruit */
  .recruit {
    padding: 8vw 0;
  }
  .recruit-inner {
    grid-template-columns: 1fr;
    padding: 0 6vw;
  }
  .recruit-panel--yellow,
  .recruit-panel--blue {
    background-size: cover;
  }
  .recruit-panel--yellow:hover,
  .recruit-panel--blue:hover {
    background-size: cover;
  }
}

/* --- small mobile (≤480px) --- */
@media (max-width: 480px) {
  .hero-title-large {
    font-size: clamp(36px, 10vw, 60px);
  }
  .interview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .interview-card:nth-child(n+9) {
    display: none;
  }
}
