/*
  Inunote Sample Recruitment Site - Design System
*/

:root {
  --primary-color: #1C3A6E; /* Navy */
  --secondary-color: #E8A020; /* Gold */
  --bg-color: #FFFFFF;
  --surface-color: #F4F5F7;
  --dark-color: #1A1A1A;
  --text-primary: #222222;
  --text-secondary: #666666;
  --border-color: #D8D8D8;
  --metallic-color: #8A9BAE;

  --font-main: 'Noto Sans JP', sans-serif;
  --font-accent: 'Inter', sans-serif;
  --max-width: 1200px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Cocoon親テーマのスタイル干渉をリセット */
main h1, main h2, main h3, main h4, main h5, main h6 {
  border: none;
  box-shadow: none;
  background: transparent;
  padding: 0;
}
main table {
  border: none !important;
  box-shadow: none !important;
}
main td, main th {
  border: none;
}
main p { margin: 0; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .accent-font {
  font-family: var(--font-main);
  font-weight: 700;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
}

.section {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }
}

.section-alt {
  background-color: var(--surface-color);
}

.section-dark {
  background-color: var(--dark-color);
  color: #FFFFFF;
}

/* Typography */
.h1-title { font-size: 48px; line-height: 1.3; margin-bottom: 24px; }
.h2-title { font-size: 36px; line-height: 1.4; margin-bottom: 40px; text-align: center; }
.h3-title { font-size: 24px; line-height: 1.5; margin-bottom: 20px; }

@media (max-width: 768px) {
  .h1-title { font-size: 32px; }
  .h2-title { font-size: 28px; }
}

.en-title {
  font-family: var(--font-accent);
  text-transform: uppercase;
  font-size: 80px;
  opacity: 0.05;
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font-weight: 900;
}

@media (max-width: 768px) {
  .en-title { font-size: 40px; top: -20px; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease;
  border: none;
  text-align: center;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

.btn-secondary {
  border: 2px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #FFFFFF;
}

/* Header */
header {
  position: sticky;
  top: 0;
  width: 100%;
  height: 90px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  transition: height 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  height: 70px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-color);
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  gap: 28px;
}

@media (max-width: 1200px) {
  .main-nav { gap: 18px; }
  .logo { font-size: 18px; }
}

@media (max-width: 1100px) {
  .main-nav { gap: 12px; }
  .logo { font-size: 16px; white-space: nowrap; }
}

@media (max-width: 1024px) {
  .main-nav { display: none; }
}

.nav-item {
  position: relative;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 0;
}

.nav-item > a {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-item > a::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--primary-color);
  opacity: 0.5;
  transition: transform 0.3s ease;
}

.nav-item:hover > a::after {
  transform: rotate(180deg);
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #FFFFFF;
  width: 320px;
  padding: 15px 0;
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 4px solid var(--secondary-color);
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 12px 24px;
  font-size: 14px;
  color: var(--text-primary);
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-link:hover {
  background-color: var(--surface-color);
  color: var(--primary-color);
  opacity: 1;
}

/* Grid/Cards */
.grid {
  display: grid;
  gap: 30px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

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

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

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-up {
  animation: fadeInUp 0.8s ease forwards;
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: #FFFFFF;
  padding: 100px 0 60px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  margin-bottom: 80px;
}

@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 60px;
  }
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 24px;
  color: #FFFFFF;
}

.footer-tagline {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 32px;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-info {
  font-size: 14px;
  line-height: 2;
  color: var(--metallic-color);
}

.footer-sitemap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

@media (max-width: 768px) {
  .footer-sitemap {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .footer-sitemap {
    grid-template-columns: 1fr;
  }
}

.sitemap-col h4 {
  font-size: 15px;
  font-weight: 900;
  color: var(--secondary-color);
  margin-bottom: 24px;
  letter-spacing: 0.1em;
}

.sitemap-list {
  list-style: none;
}

.sitemap-list li {
  margin-bottom: 12px;
}

.sitemap-list a {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  transition: color 0.2s ease;
}

.sitemap-list a:hover {
  color: #FFFFFF;
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--metallic-color);
}

.footer-legal {
  display: flex;
  gap: 30px;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column-reverse;
    gap: 20px;
    align-items: flex-start;
  }
  .footer-legal {
    flex-direction: column;
    gap: 10px;
  }
}

/* Hero Section */
.hero {
  height: 90vh;
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--primary-color);
  color: #FFFFFF;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(28,58,110,0.90) 0%, rgba(28,58,110,0.88) 38%, rgba(28,58,110,0.50) 65%, rgba(28,58,110,0.15) 100%);
  z-index: 1;
}

.hero-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-lead {
  font-size: 64px;
  font-weight: 900;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 20px;
  margin-bottom: 40px;
}

/* Job Cards */
.job-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-primary);
  text-decoration: none;
}

.job-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
  opacity: 1;
}

.job-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 10px;
  display: block;
}

.job-title {
  font-size: 20px;
  margin-bottom: 15px;
}

.job-copy {
  font-size: 14px;
  color: var(--text-secondary);
}

/* =========================================
   Additional Classes for page-recruit-top 
   and sub-pages (about, culture, etc.)
   ========================================= */

:root {
  --color-bg-surface: var(--surface-color);
  --color-secondary: var(--secondary-color);
  --color-primary: var(--primary-color);
  --color-text-secondary: var(--text-secondary);
}

.section-padding {
  padding: 120px 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 60px 0;
  }
}

.title-bg-wrap {
  position: relative;
  text-align: center;
  margin-bottom: 40px;
}

.title-bg {
  font-family: var(--font-accent);
  text-transform: uppercase;
  font-size: 80px;
  opacity: 0.05;
  position: absolute;
  top: -40px;
  left: 0;
  width: 100%;
  text-align: center;
  pointer-events: none;
  font-weight: 900;
}

@media (max-width: 768px) {
  .title-bg { font-size: 40px; top: -20px; }
}

.title-main {
  font-size: 36px; 
  line-height: 1.4; 
  margin-bottom: 40px; 
  text-align: center;
  font-family: var(--font-main);
  font-weight: 700;
}

@media (max-width: 768px) {
  .title-main { font-size: 28px; }
}

.card-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .card-grid { grid-template-columns: 1fr; }
}

.card {
  background: #FFFFFF;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.3s ease;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
}

.card-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 10px;
  display: block;
}

.card-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--color-primary);
  font-weight: 700;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   Header polish / scrolled state
   ========================================= */
header {
  transition: height 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
  height: 70px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* =========================================
   Mobile navigation (hamburger + drawer)
   ========================================= */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open { opacity: 1; }

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 85vw);
  background: #FFFFFF;
  z-index: 1200;
  padding: 90px 28px 48px;
  overflow-y: auto;
  box-shadow: -10px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open { transform: translateX(0); }

.mobile-nav-group {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.mobile-nav-head {
  display: block;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
}

.mobile-nav-links a {
  padding: 9px 0 9px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-left: 2px solid var(--border-color);
}

.mobile-nav-links a:hover {
  color: var(--primary-color);
  border-left-color: var(--secondary-color);
  opacity: 1;
}

.mobile-nav-entry {
  display: block;
  text-align: center;
  margin-top: 28px;
}

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
}

@media (max-width: 600px) {
  .entry-btn { display: none; }
  .logo { font-size: 17px; }
}

/* =========================================
   Hero responsive
   ========================================= */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 78vh;
    padding: 80px 0;
  }
  .hero-image { width: 100%; }
  .hero-overlay {
    background: linear-gradient(135deg, rgba(28,58,110,0.94) 0%, rgba(28,58,110,0.78) 100%);
  }
  .hero-lead { font-size: 34px; }
  .hero-sub { font-size: 16px; margin-bottom: 32px; }
}

/* =========================================
   Grid helpers / responsive tables
   ========================================= */
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.role-groups {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 80px;
  text-align: left;
}

@media (max-width: 768px) {
  .role-groups { gap: 40px; }
  .match-grid,
  .rule-grid { grid-template-columns: 1fr !important; }
}

/* Tables: drop fixed column widths on small screens so cells wrap
   instead of overflowing (body has overflow-x:hidden) */
@media (max-width: 600px) {
  main table { table-layout: auto; }
  main table th,
  main table td {
    width: auto !important;
    padding: 12px 10px !important;
    font-size: 13px;
  }
}

/* =========================================
   Link cards (section hub pages)
   ========================================= */
.link-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  padding: 32px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  color: var(--text-primary);
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.1);
  opacity: 1;
}

.link-card h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 12px;
}

.link-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
  flex-grow: 1;
}

.link-card .more {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 14px;
}

/* Timeline (story) */
.timeline {
  border-left: 3px solid var(--primary-color);
  padding-left: 28px;
}

.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--secondary-color);
  border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1px var(--border-color);
}

.timeline-year {
  font-weight: 900;
  color: var(--primary-color);
  font-size: 18px;
  margin-bottom: 8px;
}

/* (Mobile navigation / hero responsive rules are defined once, above.) */

/* =========================================
   Grid / layout responsive helpers
   ========================================= */

.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.role-groups {
  display: flex;
  justify-content: center;
  gap: 80px;
  text-align: left;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .role-groups { gap: 40px; }
}

/* Two-column inline grids collapse on small screens */
@media (max-width: 640px) {
  .match-grid { grid-template-columns: 1fr !important; }
}

/* Tables: keep within viewport on small screens */
@media (max-width: 640px) {
  main table th,
  main table td {
    padding: 12px 10px !important;
    font-size: 13px !important;
  }
  main table th[style*="width"] {
    width: auto !important;
  }
}

/* =========================================
   Header nav: 6 items — wider breakpoint
   ========================================= */
@media (max-width: 1260px) {
  .main-nav { gap: 14px; }
  .nav-item { font-size: 13px; }
}

/* =========================================
   Prev / Next page navigation
   ========================================= */
.page-nav-wrapper {
  background: var(--surface-color);
  border-top: 3px solid var(--secondary-color);
}

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

.page-nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 32px 40px;
  text-decoration: none;
  color: var(--text-primary);
  transition: background 0.25s ease;
}

.page-nav-item:hover {
  background: #E8EBF0;
  opacity: 1;
}

.page-nav-item--prev {
  border-right: 1px solid var(--border-color);
}

.page-nav-item--next {
  flex-direction: row-reverse;
}

.page-nav-item--empty {
  display: block;
  border-right: 1px solid var(--border-color);
}

.page-nav-arrow {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.page-nav-item:hover .page-nav-arrow {
  background: var(--secondary-color);
  color: #FFFFFF;
}

.page-nav-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.page-nav-item--next .page-nav-body {
  text-align: right;
}

.page-nav-dir {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--secondary-color);
  text-transform: uppercase;
}

.page-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.4;
  transition: color 0.2s ease;
}

.page-nav-item:hover .page-nav-title { color: var(--secondary-color); }

@media (max-width: 768px) {
  .page-nav-item { padding: 24px 28px; gap: 16px; }
  .page-nav-arrow { width: 44px; height: 44px; }
  .page-nav-title { font-size: 13px; }
}

@media (max-width: 600px) {
  .page-nav { grid-template-columns: 1fr; }
  .page-nav-item--prev {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .page-nav-item--next {
    flex-direction: row;
  }
  .page-nav-item--next .page-nav-body {
    text-align: left;
  }
  .page-nav-item--empty {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    height: 0;
    padding: 0;
  }
}

/* =========================================
   Timeline: Cocoon干渉リセット
   ========================================= */
.chronicle-timeline .timeline-item::before,
.chronicle-timeline .timeline-item::after,
.onboarding-timeline .timeline-item::before,
.onboarding-timeline .timeline-item::after {
  display: none !important;
  content: none !important;
}

/* =========================================
   FAQ / Voices: Cocoon干渉リセット (クラス名を recruit- prefix で上書き)
   ========================================= */
.recruit-faq-list,
.recruit-qa-list {
  display: block;
}
.recruit-faq-item,
.recruit-qa-item {
  display: block !important;
  margin-bottom: 40px !important;
  padding: 0 0 30px 0 !important;
  border: none !important;
  border-bottom: 1px solid var(--border-color) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.recruit-qa-item {
  margin-bottom: 60px !important;
  padding-bottom: 40px !important;
}
.recruit-faq-item h3,
.recruit-qa-item h3 {
  font-size: 18px;
  color: var(--primary-color) !important;
  margin-bottom: 15px !important;
  display: flex !important;
  gap: 15px;
  border: none !important;
  border-left: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.recruit-faq-item h3::before,
.recruit-qa-item h3::before,
.recruit-faq-item h3::after,
.recruit-qa-item h3::after {
  display: none !important;
  content: none !important;
}
.recruit-qa-item h3 { font-size: 20px !important; margin-bottom: 20px !important; }

/* =========================================
   Job conditions table
   ========================================= */
.conditions-table-wrap {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}
.conditions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.conditions-table th {
  background: var(--surface-color);
  padding: 20px 24px;
  text-align: left;
  width: 180px;
  font-size: 14px;
  font-weight: 700;
  vertical-align: top;
}
.conditions-table td {
  padding: 20px 24px;
  font-size: 14px;
  vertical-align: top;
}
.conditions-table tr:not(:last-child) th,
.conditions-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

