* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Yu Gothic", sans-serif;
  color: #06145f;
  background: #fbfaf8;
  line-height: 1.9;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.header {
  padding: 32px 0 20px;
}

.header-inner,
.footer-inner {
  width: min(86%, 1120px);
  margin: 0 auto;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  width: 160px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 56px;
  font-size: 14px;
}

.nav-button {
  padding: 12px 32px;
  color: #fff;
  background: #213bc4;
  border-radius: 999px;
}

/* hero */
.page-hero {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  width: min(86%, 1120px);
  margin: 0 auto 80px;
  min-height: 250px;
}

.page-hero-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 64px;
  background: #273bc4;
  color: #fff;
}

.page-hero-title span,
.section-heading span {
  font-size: 12px;
  font-weight: 700;
  color: #1e90ff;
}

.page-hero-title h1,
.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: 0.14em;
}

.page-hero-bg {
  background:
    linear-gradient(135deg, rgba(49, 201, 255, 0.25), rgba(112, 117, 255, 0.35)),
    url("images/02recruit.jpg") center / cover no-repeat;
}

/* common */
.section {
  width: min(86%, 1120px);
  margin: 0 auto 96px;
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

/* merits */
.merit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 56px;
  text-align: center;
}

.merit-item img {
  width: 170px;
  margin: 0 auto 28px;
  border-radius: 50%;
}

.merit-item h2 {
  margin: 0 0 16px;
  font-size: 24px;
  line-height: 1.55;
  letter-spacing: 0.08em;
  color: #213bc4;
}

.merit-item p {
  margin: 0;
  font-size: 13px;
}

/* job */
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}

.section-heading span {
  display: block;
  margin-bottom: 8px;
}

.section-heading h2 {
  color: #213bc4;
}

.job-card {
  padding: 64px 72px;
  background: #fff;
  border-radius: 24px;
}

.job-card dl {
  margin: 0;
}

.job-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid #d8d8d8;
}

.job-row:first-child {
  padding-top: 0;
}

.job-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.job-row dt {
  font-weight: 700;
  font-size: 16px;
}

.job-row dd {
  margin: 0;
  font-size: 14px;
}

/* message */
.message-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.message-box {
  padding: 40px 48px;
  background: #fff;
  border: 3px solid #213bc4;
  border-radius: 18px;
}

.message-box h3 {
  display: inline-block;
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid #213bc4;
  color: #213bc4;
  font-size: 20px;
}

.message-box ul {
  margin: 0;
  padding-left: 1.2em;
  color: #213bc4;
  font-size: 14px;
}

.message-box p {
  margin: 0;
  color: #213bc4;
  font-size: 14px;
}

/* entry */
.entry-button-wrap {
  text-align: center;
  margin: 0 0 100px;
}

.entry-button {
  display: inline-block;
  min-width: 330px;
  padding: 22px 56px;
  color: #fff;
  background: linear-gradient(135deg, #168bff, #fa2a27);
  border-radius: 999px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.6;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.entry-button:hover {
  transform: translateY(4px);
  box-shadow: inset 0 6px 14px rgba(0,0,0,0.18);
}

/* footer */
.footer {
  padding: 60px 0 32px;
  background: #050d62;
  color: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  width: 170px;
}

.footer-nav {
  display: flex;
  align-items: center;
  gap: 64px;
  font-size: 14px;
}

.footer-button {
  padding: 12px 36px;
  border: 1px solid #fff;
  border-radius: 999px;
}

.copyright {
  width: min(86%, 1120px);
  margin: 36px auto 0;
  text-align: right;
  font-size: 11px;
}

/* hamburger */
.hamburger {
  display: none;
}

/* hover */
.nav-button,
.footer-button {
  display: inline-block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.nav-button:hover,
.footer-button:hover {
  transform: translateY(3px);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.18);
  opacity: 0.9;
}

.nav a:not(.nav-button),
.footer-nav a:not(.footer-button) {
  transition: opacity 0.18s ease;
}

.nav a:not(.nav-button):hover,
.footer-nav a:not(.footer-button):hover {
  opacity: 0.6;
}

/* responsive */
@media (max-width: 768px) {
  .header {
    padding: 20px 0;
  }

  .header-inner {
    width: 90%;
  }

  .logo img {
    width: 130px;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: none;
    background: #213bc4;
    border-radius: 50%;
    cursor: pointer;
  }

  .hamburger span {
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 999px;
    transition: all 0.3s ease;
  }

  .hamburger.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.is-open span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav {
    position: absolute;
    top: 90px;
    right: 5%;
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: 20px;
    min-width: 180px;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  }

  .nav.is-open {
    display: flex;
  }

  .page-hero {
    grid-template-columns: 1fr;
    width: 100%;
    min-height: auto;
    margin-bottom: 64px;
  }

  .page-hero-title {
    padding: 56px 8%;
  }

  .page-hero-bg {
    min-height: 160px;
  }

  .section {
    width: 90%;
    margin-bottom: 72px;
  }

  .merit-grid {
    grid-template-columns: 1fr 1fr;
    gap: 42px 24px;
  }

  .merit-item img {
    width: 130px;
  }

  .merit-item h2 {
    font-size: 18px;
  }

  .job-card {
    padding: 40px 24px;
  }

  .job-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .message-grid {
    grid-template-columns: 1fr;
  }

  .message-box {
    padding: 32px 24px;
  }

  .entry-button {
    min-width: auto;
    width: 80%;
    padding: 18px 32px;
    font-size: 18px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 40px;
  }

  .footer-nav {
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .copyright {
    text-align: center;
  }
}

@media (max-width: 768px) {
  .page-hero {
    width: 90%;
    min-height: auto;
    margin: 0 auto 56px;
    display: block;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(39, 59, 196, 0.92) 0%, rgba(39, 59, 196, 0.72) 45%, rgba(39, 59, 196, 0.15) 100%),
      url("images/02recruit.jpg") center / cover no-repeat;
  }

  .page-hero-title {
    position: relative;
    z-index: 2;
    padding: 44px 28px;
    min-height: 170px;
    background: transparent;
  }

  .page-hero-title span {
    font-size: 12px;
  }

  .page-hero-title h1 {
    margin-top: 10px;
    font-size: 32px;
    line-height: 1.4;
  }

  .page-hero-bg {
    display: none;
  }
}

body {
  position: relative;
  overflow-x: hidden;
}

.deco-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2500px;
  pointer-events: none;
  z-index: 1;
  overflow: visible; /* ← hiddenをやめる */
}

.deco {
  position: absolute;
  width: 220px;
  opacity: 0.5;
}

.deco1 { top: 220px; left: -60px; }
.deco2 { top: 760px; right: -80px; }
.deco3 { top: 1400px; left: -70px; }
.deco4 { top: 2100px; right: -60px; }

main,
header,
footer {
  position: relative;
  z-index: 2;
}

.deco {
  animation: decoFloat 12s ease-in-out infinite;
}

@media (max-width: 768px) {
  .deco-layer {
    height: 3000px; /* ←スマホはさらに長く */
  }

  .deco {
    width: 140px;
    opacity: 0.5;
  }

  .deco1 { top: 180px; left: -40px; }
  .deco2 { top: 600px; right: -50px; }
  .deco3 { top: 1200px; left: -50px; }
  .deco4 { top: 1800px; right: -40px; }
}

@media (max-width: 768px) {
  .header {
    position: relative;
    z-index: 9999;
  }

  .header-inner {
    position: relative;
    z-index: 10000;
  }

  .hamburger {
    position: relative;
    z-index: 10002;
  }

  .nav {
    z-index: 10001;
  }

  .nav.is-open {
    display: flex;
  }
}

/* ヘッダー固定のタグ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fbfaf8;
}

body {
  padding-top: 150px; /* ヘッダー高さ分 */
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  background: transparent; /* ← 最初は透明 */
  transition: all 0.8s ease;
}

/* スクロール後 */
.header.is-scrolled {
  background: rgba(251, 250, 248, 0.6);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.header.is-scrolled .logo img {
  width: 100px; /* 少し縮小 */
}

#toTop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: #213bc4;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 999;
}

#toTop.show {
  opacity: 1;
  pointer-events: auto;
}

#toTop:hover {
  transform: translateY(4px);
}