/* ─── COMPANY.CSS — Shared styles for all company sub-pages ─── */

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

:root {
  --color-bg: #f8f8f8;
  --color-white: #ffffff;
  --color-black: #1a1a1a;
  --color-gray: #888888;
  --color-gray-light: #e8e4de;
  --color-gray-mid: #c8c2b8;
  --color-accent: #3bc4e0;
  --color-accent-light: #7dd8ec;
  --color-beige: #f8f8f8;
  --color-border: #ddd8d0;
  --font-sans: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --font-serif: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  /* スクロールに応じてゾーン色がゆっくり移ろう（shared.jsが--dyn-bgを更新） */
  background-color: var(--dyn-bg, var(--color-bg));
  color: var(--color-black);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── GRAIN CANVAS ─── */
#heroGrain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ─── HEADER ─── */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  border-bottom: 1px solid transparent;
  height: 80px;
  display: flex;
  align-items: center;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  flex-shrink: 0;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 54px;
  width: auto;
  display: block;
}

.logo-fallback {
  display: none;
  flex-direction: column;
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--color-black);
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.logo-sub {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: var(--color-gray);
  display: block;
  margin-top: 2px;
  font-weight: 300;
}

/* ─── NAV ─── */
nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 400;
  color: var(--color-black);
  text-decoration: none;
  letter-spacing: 0.03em;
  border-radius: 4px;
  transition: background 0.2s;
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover {
  background: var(--color-beige);
}

.nav-link .arrow {
  font-size: 8px;
  opacity: 0.5;
  transition: transform 0.2s;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* ─── DROPDOWN ─── */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 0;
  margin-top: 8px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  transform: translateX(-50%) translateY(-4px);
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* ギャップを透明エリアで埋める */
.dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 12px;
  background: transparent;
}

/* 矢印装飾 */
.dropdown::after {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: var(--color-white);
  border-left: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  rotate: 45deg;
}

.dropdown a {
  display: block;
  padding: 9px 20px;
  font-size: 12px;
  color: var(--color-black);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  letter-spacing: 0.02em;
}

.dropdown a:hover {
  background: var(--color-beige);
  color: var(--color-accent);
}

/* ─── CTA BUTTONS ─── */
.nav-cta-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.btn-recruit {
  padding: 10px 22px;
  background: var(--color-black);
  color: var(--color-white);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s, opacity 0.2s;
  white-space: nowrap;
}

.btn-recruit:hover {
  opacity: 0.75;
}

.btn-casual {
  padding: 10px 22px;
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.btn-casual:hover {
  opacity: 0.75;
}

/* ─── PAGE HERO ─── */
.page-hero {
  margin-top: 80px;
  padding: 60px 0 40px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-gray);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--color-gray);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--color-accent);
}

.breadcrumb-sep {
  opacity: 0.4;
}

.breadcrumb-current {
  color: var(--color-black);
}

.page-hero-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.page-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-black);
}

.page-hero-divider {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 20px;
}

/* ─── SECTION COMMON ─── */
section {
  padding: 72px 0;
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-header {
  margin-bottom: 48px;
}

.section-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-black);
}

.section-divider {
  width: 40px;
  height: 2px;
  background: var(--color-accent);
  margin-top: 20px;
}

/* ─── COMPANY GRID (2-col) ─── */
.company-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

/* ─── COMPANY IMAGE PLACEHOLDER ─── */
.company-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: #e8e8e8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.3);
  font-size: 13px;
  letter-spacing: 0.1em;
  overflow: hidden;
}

.company-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── COMPANY TEXT ─── */
.company-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-black);
  margin-bottom: 28px;
}

.company-text p {
  font-size: 17px;
  color: #444;
  line-height: 2.2;
  margin-bottom: 20px;
}

.company-text p:last-child {
  margin-bottom: 0;
}

/* ─── INFO TABLE (dl/dt/dd) ─── */
.info-table {
  width: 100%;
}

.info-table dl {
  display: grid;
  grid-template-columns: 140px 1fr;
}

.info-table dt {
  padding: 16px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-gray);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.info-table dd {
  padding: 16px 0 16px 20px;
  font-size: 16px;
  color: var(--color-black);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

.info-table dt:first-of-type,
.info-table dd:first-of-type {
  border-top: 1px solid var(--color-border);
}

/* ─── OFFICER GRID ─── */
.officer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.officer-card {
  text-align: center;
}

.officer-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: #e8e8e8;
  border-radius: 4px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.3);
  font-size: 12px;
  letter-spacing: 0.05em;
  overflow: hidden;
}

.officer-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.officer-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: 4px;
}

.officer-title {
  font-size: 12px;
  color: var(--color-gray);
  letter-spacing: 0.03em;
}

/* ─── HISTORY TIMELINE ─── */
.history-list {
  list-style: none;
  border-left: 2px solid var(--color-border);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.history-item {
  position: relative;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  align-items: baseline;
}

.history-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 26px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
}

.history-year {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.history-content {
  font-size: 16px;
  color: var(--color-black);
  line-height: 1.8;
}

/* ─── TOPIC CARDS ─── */
.topic-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.topic-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 28px;
}

.topic-card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 20px;
}

.topic-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-black);
  margin-bottom: 12px;
}

.topic-card-text {
  font-size: 16px;
  color: #555;
  line-height: 1.9;
}

/* ─── PAGE NAV (index cards) ─── */
.page-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.page-nav-item {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px 24px;
  text-decoration: none;
  text-align: center;
  transition: box-shadow 0.25s, transform 0.25s;
}

.page-nav-item:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.page-nav-icon {
  width: 56px;
  height: 56px;
  background: var(--color-gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 16px;
}

.page-nav-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-black);
  letter-spacing: 0.03em;
}

/* ─── PORTRAIT (message page) ─── */
.message-portrait {
  position: sticky;
  top: 100px;
}

.portrait-img {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 4px;
  overflow: hidden;
  background: #e8e8e8;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portrait-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-name {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-black);
  margin-bottom: 4px;
}

.portrait-title {
  font-size: 12px;
  color: var(--color-gray);
}

.message-body h3 {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-black);
  margin-bottom: 32px;
}

.message-body p {
  font-size: 15px;
  color: #444;
  line-height: 2.1;
  margin-bottom: 24px;
}

.message-body p:last-child {
  margin-bottom: 0;
}

/* ─── HEALTH SECTIONS ─── */
.health-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 48px 40px;
  margin-bottom: 32px;
}

.health-section:last-child {
  margin-bottom: 0;
}

.health-section-title {
  font-family: var(--font-serif);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: var(--color-black);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.health-img-placeholder {
  width: 100%;
  aspect-ratio: 16/5;
  background: #e8e8e8;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0,0,0,0.3);
  font-size: 13px;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* ─── ROOTS SECTIONS ─── */
.roots-section {
  margin-bottom: 80px;
}

.roots-section:last-child {
  margin-bottom: 0;
}

.roots-section-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 400;
  color: var(--color-black);
  margin-bottom: 24px;
}

/* ─── FOOTER ─── */
footer {
  background: #181818;
  color: var(--color-white);
  padding: 64px 0 32px;
  margin-top: 80px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-top {
  display: grid;
  grid-template-columns: 180px 1fr 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.footer-brand-sub {
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.4);
  display: block;
}

.footer-tagline {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 16px;
  line-height: 1.8;
}

.footer-col-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.footer-nav {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  gap: 16px;
}

.footer-copy {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.05em;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.7);
}

/* ─── STICKY BUTTONS ─── */
.sticky-btns {
  position: fixed;
  right: 20px;
  bottom: 40px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sticky-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  line-height: 1.4;
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sticky-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.sticky-btn-recruit {
  background: var(--color-black);
  width: auto;
  border-radius: 26px;
  padding: 10px 16px;
  font-size: 11px;
}

.sticky-btn-casual {
  background: var(--color-accent);
  width: auto;
  border-radius: 26px;
  padding: 10px 16px;
  font-size: 11px;
}

/* ─── FADE-IN ─── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* ─── RECRUIT BANNER ─── */
.recruit-banner {
  background: var(--color-black);
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

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

.banner-card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.banner-card:hover { opacity: 0.85; }

.banner-card-img {
  width: 200px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
  background: #e8e8e8;
}

.banner-card-body {
  padding: 24px 28px;
}

.banner-card-en {
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.banner-card-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 400;
  color: var(--color-black);
  margin-bottom: 8px;
}

.banner-card-desc {
  font-size: 12px;
  color: var(--color-gray);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .company-grid,
  .recruit-banner-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .topic-cards,
  .page-nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner { padding: 0 16px; }
  .section-inner { padding: 0 20px; }
  section { padding: 48px 0; }
  .footer-top { grid-template-columns: 1fr; }
  .officer-grid { grid-template-columns: repeat(2, 1fr); }
  .page-nav { grid-template-columns: 1fr; }
  .topic-cards { grid-template-columns: 1fr; }
}

/* フッター採用サイト 2列：項目内で改行・分割させない */
ul.footer-nav[style*="column-count"] > li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  white-space: nowrap;
}

/* ─── モバイルナビ（ハンバーガー）＆レスポンシブ共通 ─── */
.nav-toggle { display:none; width:44px; height:44px; border:none; background:transparent; cursor:pointer; flex-direction:column; justify-content:center; align-items:center; gap:5px; padding:0; flex-shrink:0; }
.nav-toggle span { display:block; width:24px; height:2px; background:#1a1a1a; transition:transform .2s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity:0; }
.nav-toggle.is-open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
.nav-cta-clone { display:none; }

@media (max-width: 820px) {
  .nav-toggle { display:flex; }
  header nav {
    position:fixed; top:80px; left:0; right:0;
    background:#fff; border-top:1px solid #eee;
    flex-direction:column; align-items:stretch; gap:0;
    margin:0; padding:6px 0 20px;
    max-height:calc(100vh - 80px); overflow-y:auto;
    box-shadow:0 12px 24px rgba(0,0,0,.08);
    display:none; z-index:1000;
  }
  header nav.open { display:flex; }
  header nav .nav-item { position:static; border-bottom:1px solid #f2f0ea; }
  header nav .nav-link { justify-content:space-between; padding:14px 22px; width:100%; box-sizing:border-box; border-radius:0; }
  header nav .nav-link .arrow { opacity:.6; transition:transform .2s; }
  header nav .nav-item.open > .nav-link .arrow { transform:rotate(180deg); }
  header nav .dropdown {
    position:static; transform:none; opacity:1; visibility:visible; pointer-events:auto;
    box-shadow:none; border:none; border-radius:0; margin:0; padding:0; min-width:0;
    background:#faf9f6; max-height:0; overflow:hidden; transition:max-height .3s ease;
  }
  header nav .dropdown::before, header nav .dropdown::after { display:none; }
  header nav .nav-item.open .dropdown { max-height:1200px; }
  header nav .dropdown a { display:block; padding:12px 34px; font-size:14px; }
  .nav-cta-group { display:none; }
  header nav .nav-cta-clone { display:flex; gap:12px; padding:16px 22px; }
  header nav .nav-cta-clone > * { flex:1; text-align:center; }
}

/* はみ出し・崩れ対策 */
img, svg, video, iframe { max-width:100%; }
@media (max-width: 640px) {
  html, body { overflow-x:hidden; }
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns:1fr !important;
  }
  .form-grid { grid-template-columns:1fr !important; }
}

/* 会社概要 info-table：モバイルで横並びのまま折り返す（見切れ防止） */
@media (max-width: 640px) {
  .info-table dl { grid-template-columns: 92px minmax(0, 1fr); }
  .info-table dt { font-size: 12px; }
  .info-table dd { padding-left: 14px; font-size: 14px; word-break: break-word; }
}
