/* ============================================================
   top.css — TOPページ固有スタイル
   対象: .hero / .problem / .services / .reason
============================================================ */

/* ======== fv-block ======== */
.fv-block {
  position: relative;
}

/* sticky動画レイヤー: margin-bottom: -100svh で後続コンテンツを引き上げ、動画は背面に固定 */
.fv-block__bg {
  position: sticky;
  top: 0;
  height: 100svh;
  z-index: 0;
  margin-bottom: -100svh;
  overflow: hidden;
  background: var(--bg);
}

/* スクロールコンテンツ（動画の前面） */
.fv-block__scroll {
  position: relative;
  z-index: 1;
}

/* ---- Video background ---- */
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

/* CSS animated fallback */
.hero__video-fallback {
  position: absolute;
  inset: 0;
  background: var(--bg);
}
.hero__video-fallback::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: clamp(60px, 8vw, 120px) clamp(60px, 8vw, 120px);
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero__blob--a {
  width: 65%; height: 65%;
  top: -15%; right: -10%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.045) 0%, transparent 68%);
  animation: blobA 11s ease-in-out infinite alternate;
}
.hero__blob--b {
  width: 50%; height: 55%;
  bottom: -15%; left: -5%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.03) 0%, transparent 65%);
  animation: blobB 15s ease-in-out infinite alternate;
}
.hero__blob--c {
  width: 40%; height: 40%;
  top: 30%; left: 30%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.02) 0%, transparent 65%);
  animation: blobC 9s ease-in-out infinite alternate;
}
@keyframes blobA {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(-6%, 10%) scale(1.12); }
}
@keyframes blobB {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(8%, -8%) scale(1.18); }
}
@keyframes blobC {
  from { transform: translate(0,0) scale(1); opacity: 0.7; }
  to   { transform: translate(5%, 6%) scale(0.9); opacity: 1; }
}

/* Dark overlay */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,15,30,0.2);
  z-index: 1;
}

/* ======== hero ======== */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 122px var(--pad) clamp(56px, 8vw, 112px);
  position: relative;
}

.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: #ffffff;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: #ffffff;
}

.hero__title {
  font-family: var(--font-head);
  font-size: clamp(54px, 11.5vw, 176px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
  color: #ffffff;
  margin-bottom: 28px;
}

.hero__rule {
  width: clamp(40px, 7vw, 96px);
  height: 2px;
  background: #ffffff;
  margin-bottom: 24px;
}

.hero__subtitle {
  font-family: var(--font-head);
  font-size: clamp(22px, 3.2vw, 44px);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-sub);
  margin-bottom: 48px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.hero__scroll {
  position: absolute;
  bottom: clamp(28px, 5vw, 56px);
  right: var(--pad);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: lineFlow 2.2s ease-in-out infinite;
}
@keyframes lineFlow {
  0%   { transform: scaleY(0); transform-origin: top;    opacity: 0; }
  20%  { opacity: 1; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0.3; }
}
@media (prefers-reduced-motion: reduce) { .hero__scroll-line { animation: none; } }

@media (min-width: 768px) {
  .hero { padding-bottom: clamp(56px, 8vw, 112px); }
}

/* 画面高さが低い端末（MacBook Air / MacBook Pro / 外部モニター等）での調整 */
@media (max-height: 1100px) and (min-width: 768px) {
  .hero {
    padding-bottom: clamp(48px, 7vh, 96px);
  }
  .hero__title {
    font-size: clamp(50px, 11vw, 165px);
    margin-bottom: 24px;
  }
  .hero__subtitle {
    font-size: clamp(18px, 2.4vw, 34px);
    margin-bottom: 28px;
  }
  .hero__eyebrow {
    margin-bottom: 20px;
  }
  .hero__rule {
    margin-bottom: 14px;
  }
}


/* ======== sticky scroll: hero以降のセクションをheroの上に重ねる ======== */
.top-mission,
.services,
.reason,
.join,
.cta {
  position: relative;
  z-index: 1;
}

/* ======== top-mission ======== */
.top-mission {
  background: transparent;
  padding: clamp(96px, 14vw, 200px) 0 clamp(120px, 16vw, 240px);
}

.fv-scroll-overlay {
  position: absolute;
  inset: 0;
  background: rgb(0, 15, 30);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  will-change: opacity;
}
.top-mission__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.top-mission__title {
  font-family: var(--font-head);
  font-size: clamp(28px, 4.5vw, 64px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 16px 0 40px;
}

.top-mission__sub {
  font-size: clamp(13px, 1.2vw, 16px);
  color: #ffffff;
  line-height: 1.85;
  max-width: 680px;
  margin-bottom: 40px;
}

.top-mission__readmore {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border: 1px solid rgba(255,255,255,0.5);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.top-mission__readmore-arrow {
  font-size: 10px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(.215,.61,.355,1);
}
.top-mission__readmore:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--bg);
}
.top-mission__readmore:hover .top-mission__readmore-arrow {
  transform: translateX(3px);
}

/* ======== services ======== */
.services {
  padding: clamp(80px, 11vw, 160px) 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.services__inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.services__header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: 56px;
}
.services__title {
  color: #ffffff;
  font-family: var(--font-head);
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 700;
  flex-shrink: 0;
}
.services__subtitle {
  font-size: 15px;
  color: var(--text-sub);
  width: clamp(200px, 30vw, 360px);
  flex-shrink: 1;
  line-height: 1.75;
  padding-bottom: 0.2em;
}
@media (max-width: 767px) {
  .services__header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .services__subtitle { width: 100%; }
}

.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--bg);
  overflow: hidden;
}

@media (min-width: 768px)  { .services__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services__grid { grid-template-columns: repeat(3, 1fr); } }


/* ======== reason ======== */
.reason {
  padding: clamp(80px, 11vw, 160px) 0;
  background: var(--bg-light);
  border-top: 1px solid var(--border-light);
}
.reason__inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad); }
.reason__header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(24px, 4vw, 64px);
  margin-bottom: 56px;
}
.reason__title {
  color: var(--text-dark);
  font-family: var(--font-head);
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 700;
  flex-shrink: 0;
}

.reason__subtitle {
  font-size: 15px;
  color: var(--text-dark-sub);
  width: clamp(200px, 30vw, 360px);
  flex-shrink: 1;
  line-height: 1.75;
  padding-bottom: 0.2em;
}
@media (max-width: 767px) {
  .reason__header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .reason__subtitle { width: 100%; }
}

.reason__list { display: grid; grid-template-columns: 1fr; }

.reason__item {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.25s ease;
}
.reason__item:hover { background: #eeeeee; }
.reason__item:first-child { border-top: 1px solid var(--border-light); }

.reason__icon {
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.reason__icon svg {
  width: clamp(80px, 10vw, 120px);
  height: clamp(80px, 10vw, 120px);
  fill: var(--text-dark);
  opacity: 0.08;
  display: block;
}

.reason__body { padding-right: clamp(48px, 10vw, 140px); }

.reason__label {
  font-family: var(--font-head);
  font-size: clamp(16px, 2vw, 21px);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.reason__text { font-size: 14px; color: var(--text-dark-sub); line-height: 1.8; }

@media (min-width: 768px) {
  .reason__list { grid-template-columns: repeat(2, 1fr); }
  .reason__item { padding: clamp(28px, 4vw, 44px) clamp(16px, 2.5vw, 32px); }
  .reason__item:nth-child(odd)  { border-right: 1px solid var(--border-light); }
  .reason__item:first-child     { border-top: 1px solid var(--border-light); }
  .reason__item:nth-child(2)    { border-top: 1px solid var(--border-light); }
  .reason__icon { right: clamp(8px, 2vw, 16px); }
}


/* ======== join ======== */
.join {
  position: relative;
  border-top: 1px solid var(--border);
  padding: clamp(80px, 11vw, 160px) 0;
  overflow: hidden;
}

.join__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.join__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.join__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 15, 30, 0.68);
}

.join__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(32px, 5vw, 80px);
}

.join__lead {
  min-width: 0;
  flex: 0 0 100%;
}

.join__title {
  font-family: var(--font-head);
  font-size: clamp(48px, 9vw, 128px);
  font-weight: 700;
  color: #ffffff;
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 24px 0 0;
  white-space: nowrap;
}

.join__body {
  min-width: 0;
  max-width: 400px;
  padding-bottom: 0.2em;
}

.join__text {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.85;
  margin-bottom: 36px;
}

.join__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border: 1px solid rgba(255,255,255,0.5);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-decoration: none;
  background-color: transparent;
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease;
}
.join__cta:hover {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--bg);
}

.join__cta-arrow {
  font-size: 10px;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(.215,.61,.355,1);
}
.join__cta:hover .join__cta-arrow {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .join__inner { flex-direction: column; align-items: flex-start; }
  .join__title { white-space: normal; }
  .join__body { max-width: 100%; padding-bottom: 0; }
}
