/* 007 久遠精工 ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #f3f4f6;
  --c-ink: #0e1013;
  --c-accent: #ff5b1f;
  --c-accent-text: #c2410c;
  --c-text: #374151;
  --c-sub: #4b5563;
  --c-line: #d6d9de;
  --font: "Zen Kaku Gothic New", sans-serif;
  --font-big: "Anton", sans-serif;
  --font-en: "Inter Tight", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.9; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; transition: background-color .8s; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, li { word-break: auto-phrase; }

.label { font-family: var(--font-en); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; color: var(--c-accent-text); margin-bottom: 12px; }
.h2 { font-weight: 900; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.45; color: var(--c-ink); margin-bottom: 20px; }
.sec-head { padding: 0 20px; margin-bottom: 48px; }
.sec-head__en { font-family: var(--font-big); font-size: clamp(64px, 12vw, 180px); line-height: .9; color: var(--c-ink); letter-spacing: .01em; }
.sec-head__ja { font-weight: 900; font-size: 20px; color: var(--c-ink); margin-top: 12px; display: flex; align-items: center; gap: 12px; }
.sec-head__ja::before { content: ""; width: 32px; height: 4px; background: var(--c-accent); }
.sec-head--light .sec-head__en, .sec-head--light .sec-head__ja { color: #fff; }
@media (min-width: 1080px) { .sec-head { padding: 0 6vw; margin-bottom: 72px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .3s, color .3s; }
.btn--ink { background: var(--c-ink); color: #fff; }
.btn--ink:hover { background: var(--c-accent); color: var(--c-ink); }

/* ヘッダー */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; mix-blend-mode: normal; }
.header__inner { display: flex; align-items: center; gap: 24px; height: 68px; padding: 0 20px; background: rgba(243, 244, 246, .92); backdrop-filter: blur(8px); }
.logo { display: flex; align-items: center; gap: 6px; min-height: 48px; font-family: var(--font-big); font-size: 24px; letter-spacing: .04em; color: var(--c-ink); text-decoration: none; }
.logo span:last-child { color: var(--c-accent-text); }
.logo__mark { width: 14px; height: 14px; background: var(--c-accent); margin-right: 4px; }
.gnav { display: none; }
.header__btn { margin-left: auto; flex: none; min-height: 44px; font-size: 15px; padding: 0 16px; }
@media (min-width: 1080px) {
  .header__inner { height: 80px; padding: 0 6vw; }
  .gnav { display: flex; gap: 32px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-family: var(--font-en); font-weight: 700; font-size: 15px; letter-spacing: .08em; text-decoration: none; color: var(--c-ink); }
  .gnav a:hover { color: var(--c-accent-text); }
  .header__btn { margin-left: 0; padding: 0 24px; }
}
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--c-ink); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 22px; height: 3px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-ink); padding: 8px 20px 24px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 56px; color: #fff; text-decoration: none; font-weight: 700; font-size: 17px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* ===== 演出①：巨大な文字＋重なる部品 ===== */
.hero { position: relative; min-height: 100vh; padding: 110px 20px 40px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hero__word { font-family: var(--font-big); font-size: 25vw; line-height: .85; color: var(--c-ink); letter-spacing: -.01em; white-space: nowrap; text-align: center; margin: 0 -20px; }
.hero__word span { display: inline-block; }
.hero__part { position: absolute; z-index: 2; left: 50%; top: 22%; width: min(62vw, 560px); transform: translateX(-50%); filter: drop-shadow(0 30px 40px rgba(14, 16, 19, .35)); }
.hero__copy { position: relative; z-index: 3; margin-top: 18vw; }
.hero__title { font-weight: 900; font-size: clamp(30px, 6vw, 64px); line-height: 1.3; color: var(--c-ink); }
.hero__lead { margin-top: 16px; font-size: clamp(15px, 1.6vw, 18px); max-width: 30em; }
@media (max-width: 1079px) {
  .hero { min-height: 0; padding-bottom: 56px; }
  .hero__part { top: 96px; width: 46vw; left: auto; right: 4vw; transform: none; }
  .hero__word { margin-top: 24vw; }
  .hero__copy { margin-top: 10vw; }
}
.hero__meta { display: flex; justify-content: space-between; margin-top: 32px; font-family: var(--font-en); font-weight: 700; font-size: 15px; letter-spacing: .08em; color: var(--c-ink); border-top: 2px solid var(--c-ink); padding-top: 12px; }
@media (min-width: 1080px) {
  .hero { padding: 104px 6vw 48px; justify-content: flex-start; }
  .hero__word { font-size: 22vw; margin: 0 -6vw; }
  .hero__part { top: 8%; width: min(32vw, 520px); }
  .hero__copy { margin-top: 0; position: absolute; left: 6vw; bottom: 104px; }
  .hero__meta { margin-top: auto; position: absolute; left: 6vw; right: 6vw; bottom: 40px; }
}

/* ===== 演出②：流れる文字の帯 ===== */
.marquee { background: var(--c-ink); color: #fff; overflow: hidden; padding: 18px 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span { font-family: var(--font-big); font-size: clamp(28px, 4vw, 52px); letter-spacing: .02em; padding: 0 28px; display: flex; align-items: center; gap: 56px; }
.marquee__track span::after { content: ""; width: 14px; height: 14px; background: var(--c-accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===== 会社について（写真に文字の板が重なる） ===== */
.about { position: relative; padding: 96px 20px; overflow: hidden; }
.about__since { position: absolute; right: -2vw; top: 40px; font-family: var(--font-big); font-size: 18vw; line-height: 1; color: #e3e6ea; white-space: nowrap; pointer-events: none; }
.about__inner { position: relative; max-width: 1200px; margin: 0 auto; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__card { position: relative; background: #fff; padding: 36px 24px; margin: -96px 12px 0; box-shadow: 0 30px 60px rgba(14, 16, 19, .1); border-top: 6px solid var(--c-accent); }
.about__card p + p { margin-top: 16px; }
@media (min-width: 900px) {
  .about { padding: 160px 6vw; }
  .about__inner { display: grid; grid-template-columns: 5fr 7fr; align-items: center; }
  .about__photo img { aspect-ratio: 3 / 4; }
  .about__card { margin: 0 0 0 -15%; padding: 56px 56px; }
}

/* ===== 演出③：できること ===== */
.caps { padding: 96px 0; }
.caps__inner { padding: 0 20px; }
.caps__visual { display: none; }
.cap { padding: 32px 0; border-top: 2px solid var(--c-ink); }
.cap__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 20px; }
.cap__no { font-family: var(--font-big); font-size: 48px; line-height: 1; color: var(--c-accent-text); }
.cap h3 { font-weight: 900; font-size: 24px; color: var(--c-ink); margin: 8px 0; }
@media (min-width: 1080px) {
  .caps { padding: 160px 0; }
  .caps__inner { padding: 0 6vw; }
}
/* 動く版（PC）：左の写真を固定し、右の項目に合わせて切り替える */
.is-motion-pc .caps__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 6vw; align-items: start; }
.is-motion-pc .caps__visual { display: block; position: sticky; top: 120px; height: calc(100vh - 200px); overflow: hidden; }
.is-motion-pc .caps__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .6s, transform 1.2s; }
.is-motion-pc .caps__visual img.is-on { opacity: 1; transform: none; }
.is-motion-pc .cap { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; }
.is-motion-pc .cap__img { display: none; }
.is-motion-pc .cap { opacity: .35; transition: opacity .5s; }
.is-motion-pc .cap.is-on { opacity: 1; }

/* ===== 演出④：数字（黒） ===== */
.numbers { background: var(--c-ink); color: #e5e7eb; padding: 112px 0; transition: background-color .8s; }
.nums { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 20px; padding: 0 20px; }
.nums li { border-top: 1px solid rgba(255, 255, 255, .25); padding-top: 16px; }
.nums__value { font-family: var(--font-big); font-size: clamp(48px, 9vw, 120px); line-height: 1; color: #fff; }
.nums__value small { font-family: var(--font); font-weight: 700; font-size: 18px; margin-left: 6px; color: var(--c-accent); }
.nums__note { padding: 32px 20px 0; font-size: 15px; color: #d1d5db; }
@media (min-width: 1080px) { .numbers { padding: 160px 0; } .nums { grid-template-columns: repeat(4, 1fr); padding: 0 6vw; gap: 32px; } .nums__note { padding: 40px 6vw 0; } }
/* 動く版：数字の区切りに入ると、ページ全体が黒に */

body.is-dark { background: var(--c-ink); }
/* 黒くなっている間、前後の区切りの文字も白に（はみ出して見える部分が読めるように） */
body.is-dark .caps, body.is-dark .craft { --c-ink: #f3f4f6; --c-text: #e5e7eb; --c-accent-text: #ff8a5c; }

/* ===== 演出⑤：文字の形にくり抜いた写真 ===== */
.craft { padding: 96px 20px; text-align: center; overflow: hidden; }
.craft__word { font-family: var(--font-big); font-size: 34vw; line-height: .9; color: var(--c-ink); }
@supports (-webkit-background-clip: text) or (background-clip: text) {
  .craft__word { background: url("images/surface.webp") center / cover; -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.craft__text { max-width: 36em; margin: 32px auto 0; font-weight: 700; font-size: clamp(16px, 1.8vw, 20px); color: var(--c-ink); }

/* ===== ご相談・採用 ===== */
.doors { display: grid; }
.door { position: relative; display: block; padding: 56px 20px; text-decoration: none; color: #fff; background: var(--c-ink); overflow: hidden; isolation: isolate; }
.door + .door { border-top: 1px solid rgba(255, 255, 255, .15); }
.door::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c-accent); transform: scaleY(0); transform-origin: bottom; transition: transform .5s cubic-bezier(.65, 0, .35, 1); }
.door:hover::before, .door:focus-visible::before { transform: none; }
.door:hover, .door:focus-visible { color: var(--c-ink); }
.door__en { font-family: var(--font-big); font-size: clamp(56px, 8vw, 110px); line-height: 1; }
.door__ja { font-weight: 900; font-size: 20px; margin: 8px 0; }
.door__text { max-width: 26em; }
.door__arrow { position: absolute; right: 24px; top: 56px; font-size: 40px; transition: transform .4s; }
.door:hover .door__arrow { transform: translateX(8px); }
@media (min-width: 900px) { .doors { grid-template-columns: 1fr 1fr; } .door { padding: 96px 6vw; } .door + .door { border-top: 0; border-left: 1px solid rgba(255, 255, 255, .15); } }

/* ===== フッター ===== */
.footer { background: var(--c-bg); padding: 64px 20px 32px; font-size: 15px; }
.footer__inner { display: grid; gap: 24px; }
.footer__logo { font-family: var(--font-big); font-size: 40px; color: var(--c-ink); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 700; color: var(--c-ink); }
.footer__fiction { margin-top: 32px; text-align: center; }
@media (min-width: 900px) { .footer { padding: 80px 6vw 32px; } .footer__inner { grid-template-columns: auto 1fr auto; align-items: end; gap: 48px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}
