/* ============================================================
   R.GENE 採用ページ 専用CSS
   github.com/rgene/RGENE-HOMEPAGE の recruit.html から抽出し、
   WordPress固定ページへの埋め込み用に全セレクタを .rg-recruit で
   スコープしてあります。既存テーマのCSSとは干渉しません。
   ============================================================ */

.rg-recruit {
  /* カラーパレット (オリジナル準拠) */
  --bg: #fcfaf6;
  --bg2: #f5f0e8;
  --bg3: #fffcf7;
  --dark: #1a1a2e;
  --accent: #5b6abf;
  --accent-light: #7c8ae0;
  --warm: #d4793a;
  --warm-light: #e89a5e;
  --sage: #6b8f71;
  --text: #1a1a2e;
  --text-light: #4a4a5a;
  --text-lighter: #6b6b7b;
  --border: #e8e0d4;
  --border-light: #f0ebe3;
  --card: #ffffff;

  /* タイポグラフィ */
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

/* リセット (このコンテナ内のみ) */
.rg-recruit *,
.rg-recruit *::before,
.rg-recruit *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* WordPressテーマで段落タグに余計なmarginが付くケースを上書き */
.rg-recruit p { margin: 0 0 1em; }
.rg-recruit h1,
.rg-recruit h2,
.rg-recruit h3,
.rg-recruit h4 { margin: 0; font-weight: inherit; }

/* ===== HERO ===== */
.rg-recruit .hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  background: var(--bg);
}

.rg-recruit .hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
  transition: transform 0.1s linear;
}
.rg-recruit .hero-shape-1 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(91,106,191,0.12), transparent 70%);
  top: 5%; left: 8%;
}
.rg-recruit .hero-shape-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(212,121,58,0.1), transparent 70%);
  bottom: 10%; right: 5%;
}
.rg-recruit .hero-shape-3 {
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(107,143,113,0.1), transparent 70%);
  top: 50%; left: 60%;
}

.rg-recruit .hero-dots {
  position: absolute;
  width: 140px; height: 140px;
  background-image: radial-gradient(circle, var(--border) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
  opacity: 0.4;
}
.rg-recruit .hero-dots-1 { top: 12%; right: 10%; }
.rg-recruit .hero-dots-2 { bottom: 18%; left: 6%; }

.rg-recruit .hero-inner {
  position: relative;
  z-index: 1;
  padding: 40px;
  max-width: 820px;
}

.rg-recruit .hero-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  padding: 8px 20px;
  border: 1px solid rgba(91,106,191,0.25);
  border-radius: 50px;
  margin-bottom: 40px;
}

/* Hero text line-by-line animation */
.rg-recruit .hero h1 {
  font-size: clamp(30px, 5.5vw, 52px);
  font-weight: 900;
  line-height: 1.5;
  color: var(--dark);
  margin-bottom: 32px;
}

.rg-recruit .hero-line {
  display: block;
  overflow: hidden;
}

.rg-recruit .hero-line-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-recruit .hero-line-inner.show {
  transform: translateY(0);
}

.rg-recruit .hero h1 em {
  font-style: normal;
  color: var(--warm);
}

.rg-recruit .hero-sub {
  font-size: 17px;
  line-height: 2.2;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s ease 0.6s;
}

.rg-recruit .hero-sub.show {
  opacity: 1;
  transform: translateY(0);
}

.rg-recruit .hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease forwards 1.5s;
}

.rg-recruit .hero-scroll-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(12px); opacity: 1; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* ===== SCROLL REVEAL BASE ===== */
.rg-recruit .rv {
  opacity: 0;
  transform: translateY(56px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.rg-recruit .rv.show { opacity: 1; transform: translateY(0); }
.rg-recruit .rv-d1 { transition-delay: 0.1s; }
.rg-recruit .rv-d2 { transition-delay: 0.2s; }
.rg-recruit .rv-d3 { transition-delay: 0.3s; }
.rg-recruit .rv-d4 { transition-delay: 0.4s; }
.rg-recruit .rv-d5 { transition-delay: 0.5s; }

/* Slide from left */
.rg-recruit .rv-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.rg-recruit .rv-left.show { opacity: 1; transform: translateX(0); }

/* Slide from right */
.rg-recruit .rv-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.rg-recruit .rv-right.show { opacity: 1; transform: translateX(0); }

/* Scale up */
.rg-recruit .rv-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.rg-recruit .rv-scale.show { opacity: 1; transform: scale(1); }

/* ===== SECTION TAG ===== */
.rg-recruit .stag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ===== MINDSET ===== */
.rg-recruit .mindset {
  position: relative;
  padding: 160px 48px;
  background: var(--bg3);
  overflow: hidden;
}

.rg-recruit .mindset-deco {
  position: absolute;
  width: 500px; height: 500px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  top: -150px; right: -150px;
  opacity: 0.3;
}

.rg-recruit .mindset-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.rg-recruit .mindset h2 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 40px;
  color: var(--dark);
}

.rg-recruit .mindset h2 .hl { color: var(--accent); }

/* Typing cursor effect on heading */
.rg-recruit .mindset-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.rg-recruit .mindset-body {
  font-size: 17px;
  line-height: 2.2;
  color: var(--text-light);
  margin-bottom: 52px;
}

.rg-recruit .mindset-pills {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.rg-recruit .m-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  transition: all 0.4s;
}

.rg-recruit .m-pill:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.07);
  border-color: var(--accent-light);
}

/* ===== WAY ===== */
.rg-recruit .way {
  position: relative;
  padding: 160px 48px;
  background: var(--bg);
  overflow: hidden;
}

.rg-recruit .way-inner { max-width: 1040px; margin: 0 auto; }

.rg-recruit .way-header {
  text-align: center;
  margin-bottom: 72px;
}

.rg-recruit .way-header h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--dark);
}

.rg-recruit .way-header p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 2;
  max-width: 520px;
  margin: 0 auto;
}

.rg-recruit .way-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.rg-recruit .way-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-recruit .way-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  transform: scaleX(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.rg-recruit .way-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.08);
}

.rg-recruit .way-card:hover::after { transform: scaleX(1); }

.rg-recruit .way-num {
  font-size: 44px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.12;
  line-height: 1;
  margin-bottom: 16px;
}

.rg-recruit .way-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.6;
  color: var(--dark);
}

.rg-recruit .way-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.9;
}

.rg-recruit .way-note {
  text-align: center;
  margin-top: 44px;
  padding: 20px 28px;
  background: var(--bg2);
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.9;
}
.rg-recruit .way-note strong { color: var(--warm); font-weight: 600; }

/* ===== FIELDS ===== */
.rg-recruit .fields {
  position: relative;
  padding: 160px 48px;
  background: var(--bg3);
  overflow: hidden;
}

.rg-recruit .fields-deco {
  position: absolute;
  width: 360px; height: 360px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  bottom: -100px; left: -100px;
  opacity: 0.3;
}

.rg-recruit .fields-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 72px;
  position: relative;
  z-index: 1;
}

.rg-recruit .fields-header h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  margin-bottom: 16px;
  color: var(--dark);
}

.rg-recruit .fields-header p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 2;
}

.rg-recruit .f-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.rg-recruit .f-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-recruit .f-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.08);
}

.rg-recruit .f-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 20px 20px 0 0;
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: left;
}

.rg-recruit .f-card.show .f-bar { transform: scaleX(1); }

.rg-recruit .fc1 .f-bar { background: var(--accent); }
.rg-recruit .fc2 .f-bar { background: var(--sage); }
.rg-recruit .fc3 .f-bar { background: var(--warm); }

.rg-recruit .f-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.rg-recruit .fc1 .f-icon { background: rgba(91,106,191,0.15); color: var(--accent); }
.rg-recruit .fc2 .f-icon { background: rgba(107,143,113,0.15); color: var(--sage); }
.rg-recruit .fc3 .f-icon { background: rgba(212,121,58,0.15); color: var(--warm); }

.rg-recruit .f-card h3 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 14px;
  line-height: 1.6;
  color: var(--dark);
}

.rg-recruit .f-card p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 2;
  margin-bottom: 20px;
}

.rg-recruit .f-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rg-recruit .f-tag {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg2);
  color: var(--text-light);
}

/* ===== CEO ===== */
.rg-recruit .ceo {
  padding: 140px 48px;
  background: var(--bg);
}

.rg-recruit .ceo-inner {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 48px;
  align-items: start;
}

.rg-recruit .ceo-photo {
  width: 180px; height: 220px;
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 100px;
  overflow: hidden;
}

.rg-recruit .ceo-content h2 {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 36px;
  color: var(--dark);
}

.rg-recruit .ceo-msg {
  font-size: 16px;
  line-height: 2.2;
  color: var(--text-light);
}
.rg-recruit .ceo-msg p { margin-bottom: 20px; }

.rg-recruit .ceo-name {
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-lighter);
}
.rg-recruit .ceo-name strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-top: 4px;
}

/* ===== POSITIONS ===== */
.rg-recruit .positions {
  padding: 140px 48px;
  background: var(--bg3);
}

.rg-recruit .pos-inner { max-width: 920px; margin: 0 auto; }
.rg-recruit .pos-inner h2 {
  font-size: clamp(22px, 3.5vw, 30px);
  font-weight: 900;
  margin-bottom: 48px;
  color: var(--dark);
}

.rg-recruit .tracks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 56px;
}

.rg-recruit .track {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.rg-recruit .track:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.06);
}

.rg-recruit .track-hd {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border-light);
}

.rg-recruit .track-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 8px;
}

.rg-recruit .track-hd h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; color: var(--dark); }
.rg-recruit .track-hd p { font-size: 14px; color: var(--text-lighter); }

.rg-recruit .track-bd { padding: 16px 28px 28px; }
.rg-recruit .track-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}
.rg-recruit .track-item:last-child { border-bottom: none; }
.rg-recruit .track-item span:first-child { color: var(--text-light); font-size: 14px; }
.rg-recruit .track-item span:last-child { font-weight: 500; text-align: right; }

/* Workstyle */
.rg-recruit .ws-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.rg-recruit .ws-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 22px;
  text-align: center;
  transition: all 0.4s;
}

.rg-recruit .ws-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.05); }

.rg-recruit .ws-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.rg-recruit .ws-card p { font-size: 14px; color: var(--text-light); line-height: 1.9; }

/* ===== CTA ===== */
.rg-recruit .cta {
  padding: 140px 48px;
  background: var(--dark);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.rg-recruit .cta-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}
.rg-recruit .cta-s1 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(91,106,191,0.4), transparent 70%);
  top: -100px; right: -100px;
}
.rg-recruit .cta-s2 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(212,121,58,0.3), transparent 70%);
  bottom: -80px; left: -80px;
}

.rg-recruit .cta-inner { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; }

.rg-recruit .cta h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.6;
}

.rg-recruit .cta p {
  color: rgba(255,255,255,0.55);
  margin-bottom: 44px;
  font-size: 15px;
  line-height: 2;
}

.rg-recruit .cta-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.rg-recruit .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.rg-recruit .btn-p { background: var(--accent); color: #fff; }
.rg-recruit .btn-p:hover { background: var(--accent-light); transform: translateY(-2px); }

.rg-recruit .btn-o { border: 1px solid rgba(255,255,255,0.2); color: #fff; }
.rg-recruit .btn-o:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.05); }

/* ===== FOOTER ===== */
.rg-recruit .footer {
  padding: 36px 48px;
  text-align: center;
  font-size: 12px;
  color: var(--text-lighter);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.rg-recruit .footer a { color: var(--text-lighter); text-decoration: none; margin: 0 12px; }

/* ===== PROGRESS BAR ===== */
.rg-recruit .progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
  z-index: 200;
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .rg-recruit .way-cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .rg-recruit .nav { padding: 14px 20px; }
  .rg-recruit .nav-links a:not(.nav-cta) { display: none; }
  .rg-recruit .hero-inner { padding: 40px 24px; }
  .rg-recruit .hero-dots { display: none; }
  .rg-recruit .mindset, .rg-recruit .way, .rg-recruit .fields, .rg-recruit .positions, .rg-recruit .cta { padding: 80px 24px; }
  .rg-recruit .mindset-pills { flex-direction: column; }
  .rg-recruit .way-cards { grid-template-columns: 1fr; }
  .rg-recruit .f-cards { grid-template-columns: 1fr; }
  .rg-recruit .ceo { padding: 80px 24px; }
  .rg-recruit .ceo-inner { grid-template-columns: 1fr; gap: 28px; }
  .rg-recruit .ceo-photo { width: 120px; height: 150px; position: static; }
  .rg-recruit .tracks { grid-template-columns: 1fr; }
  .rg-recruit .ws-cards { grid-template-columns: 1fr; }
  .rg-recruit .cta-btns { flex-direction: column; align-items: center; }
}
