/* =========================================================
   namkel Agent（架空） デモサイト スタイルシート
   深紅とクリーム白と明朝体。余白で語る、静かな高級感。
   ========================================================= */

:root {
  --red: #9E1030;
  --red-deep: #7E0C25;
  --cream: #F6F0E4;
  --paper: #FBF8F1;
  --sumi: #1F1B1C;
  --sub: #6A6060;
  --yellow: #E8B923;
  --hair: rgba(31, 27, 28, .14);
  --hair-on-red: rgba(246, 240, 228, .28);

  /* 映像ごとの表示位置（本番差し替え時に調整） */
  --pos1: 50% 50%;
  --pos2: 50% 50%;
  --pos3: 50% 50%;
  --pos4: 50% 50%;

  --header-h: 64px;
  --max-w: 1120px;
  --gutter: 16px;
  --section-pad: 160px;
}

@media (max-width: 767px) {
  :root {
    --section-pad: 96px;
  }
}

/* ---------- リセット・基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--sumi);
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.95;
  letter-spacing: .04em;
  overflow-x: hidden; /* body だけに書く（html には書かない） */
}

img, svg, video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 700;
  margin: 0;
  color: var(--sumi);
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--sumi);
  color: var(--cream);
  padding: 8px 16px;
  z-index: 999;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
}

/* 数字は tabular-nums */
.tabular, .story-income, .position-salary {
  font-variant-numeric: tabular-nums;
}

/* eyebrow（章番号型見出し） */
.eyebrow {
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--red);
  margin: 0 0 16px;
}

h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.4;
  font-feature-settings: "palt";
  margin: 0 0 28px;
}

.note {
  color: var(--sub);
  font-size: 14px;
  margin-top: 8px;
}

/* :focus-visible のみリング表示。個別 :focus{outline:none} は書かない */
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 2px;
  font-size: 15px;
  letter-spacing: .06em;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
  border: 1px solid transparent;
}

.btn-cta {
  background: var(--sumi);
  color: var(--cream);
}
.btn-cta:hover { background: var(--red); }

.btn-primary {
  background: var(--red);
  color: var(--cream);
}
.btn-primary:hover { background: var(--red-deep); }

.btn-invert {
  background: var(--cream);
  color: var(--red);
}
.btn-invert:hover { background: var(--paper); }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease;
}

.site-header.is-scrolled {
  background: var(--cream);
  border-bottom-color: var(--hair);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}

@media (max-width: 480px) {
  .header-inner { gap: 10px; }
  .logo { font-size: 14px; gap: 6px; }
  .logo-mark { width: 26px; height: 16px; }
  .btn-cta {
    padding: 9px 14px;
    font-size: 12px;
    letter-spacing: .02em;
    white-space: nowrap;
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--cream);
  white-space: nowrap;
  transition: color .3s ease;
}
.site-header.is-scrolled .logo { color: var(--sumi); }

.logo-mark circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.logo-mark { width: 32px; height: 20px; color: inherit; }

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--cream);
  transition: color .3s ease;
}
.site-header.is-scrolled .site-nav { color: var(--sumi); }

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

/* =========================================================
   5.1 ファーストビュー（ヒーロー）
   ========================================================= */
.hero {
  position: relative;
  height: 700vh;
}

@media (prefers-reduced-motion: reduce) {
  .hero { height: 100vh; }
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--sumi);
}

.hero-videos {
  position: absolute;
  inset: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos);
  opacity: 0;
  transition: opacity .2s linear;
}
.hero-video.is-active { opacity: 1; }
/* 表示は canvas（.hero-canvas）が担当。元の video は再生・シーク専用で見せない */
.hero-video.hero-video--source,
.hero-video.hero-video--source.is-active { opacity: 0; }

.curtain {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  background: var(--red);
  z-index: 5;
  will-change: transform;
}
.curtain-top {
  top: 0;
  transform: translateY(calc(var(--open, 0) * -100%));
  box-shadow: inset 0 -1px 0 var(--red-deep);
}
.curtain-bottom {
  bottom: 0;
  transform: translateY(calc(var(--open, 0) * 100%));
  box-shadow: inset 0 1px 0 var(--red-deep);
}

@media (prefers-reduced-motion: reduce) {
  .curtain-top, .curtain-bottom { --open: 1; }
}

.hero-copy {
  /* top と bottom を両方指定して height:auto の縮小適合バグ
     （vertical-rl + 絶対配置で高さが半分に丸められる問題）を避け、
     align-items:center で各列を縦方向センタリングする */
  position: absolute;
  top: 0;
  bottom: 0;
  right: 12%;
  display: flex;
  flex-direction: column; /* vertical-rl では column が block 軸(右→左)になり2行が横に並ぶ */
  align-items: center;
  gap: 18px;
  writing-mode: vertical-rl;
  z-index: 6;
  color: var(--cream);
  font-family: "Shippori Mincho", serif;
  font-size: clamp(28px, 4.2vw, 56px);
  line-height: 1.3;
  letter-spacing: .18em;
  transition: opacity .3s ease;
  pointer-events: none;
}
.hero-copy.is-hidden { opacity: 0; }

.hero-copy-line {
  overflow: hidden;
}
.hero-copy-line > span {
  display: inline-block;
  transform: translateY(0);
  transition: transform .8s cubic-bezier(0.16, 1, 0.3, 1);
}
/* 隠し状態は body.armed（= document.fonts.ready 到達後に JS が付与）の間だけ。
   JS が動かない/フォント待ちが終わらない環境でも文字が永久に消えないように、
   素の CSS には隠し状態を焼き込まない。 */
body.armed .hero-copy-line > span { transform: translateY(110%); }
body.armed .hero-copy-line[data-line="2"] > span { transition-delay: .15s; }
body.armed .hero-copy-line.is-in > span { transform: translateY(0); }

.hero-chapter {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 6;
  color: var(--cream);
  font-family: "Shippori Mincho", serif;
  font-size: 13px;
  letter-spacing: .1em;
  opacity: 0;
  transition: opacity .3s ease;
}
.hero-chapter.is-visible { opacity: 1; }

.hero-controls {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-play-btn {
  background: rgba(246, 240, 228, .1);
  border: 1px solid rgba(246, 240, 228, .5);
  color: var(--cream);
  padding: 10px 20px;
  border-radius: 2px;
  font-size: 13px;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: background-color .25s ease, border-color .25s ease;
}
.hero-play-btn:hover {
  background: var(--red);
  border-color: var(--red);
}

.hero-progress {
  display: flex;
  gap: 4px;
  width: 160px;
}
.hero-progress-seg {
  flex-grow: var(--w);
  flex-basis: 0;
  height: 2px;
  background: rgba(246, 240, 228, .28);
  position: relative;
  overflow: hidden;
}
.hero-progress-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--cream);
}

.hero-scrollcue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--cream);
  font-size: 11px;
  letter-spacing: .2em;
  opacity: 1;
  transition: opacity .4s ease;
}
.hero-scrollcue.is-hidden { opacity: 0; }
.hero-scrollcue { pointer-events: none; }
.hero-scrollcue-line {
  width: 1px;
  height: 32px;
  background: rgba(246, 240, 228, .5);
}

/* スマホ縦長: 16:9 映像を全面トリミングすると人物が切れるため、
   画面中央の帯（高さ62svh）に映像を置き、上下はフレームの地色へなじませる */
@media (max-width: 767px) {
  :root { --pos1: 50% 50%; --pos2: 56% 50%; --pos3: 64% 50%; --pos4: 53% 50%; }
  .hero-stage { background: linear-gradient(#E8E4D9 0 50%, #DED8CD 50% 100%); }
  .hero-video {
    top: 50%;
    bottom: auto;
    height: 62svh;
    transform: translateY(-50%);
    -webkit-mask-image: linear-gradient(transparent 0, #000 9%, #000 91%, transparent 100%);
            mask-image: linear-gradient(transparent 0, #000 9%, #000 91%, transparent 100%);
  }
}

/* 幕が開いてクリーム色の映像が見えている間は、文字とコントロールを墨色にする */
body.hero-on-video .site-header:not(.is-scrolled) .logo,
body.hero-on-video .site-header:not(.is-scrolled) .site-nav,
body.hero-on-video .hero-chapter,
body.hero-on-video .hero-scrollcue { color: var(--sumi); }
/* 映像の上ではヘッダーに半透明の地を敷き、黒いスーツと文字が重なっても読めるようにする */
body.hero-on-video .site-header:not(.is-scrolled) {
  background: rgba(246, 240, 228, .82);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
body.hero-on-video .hero-scrollcue-line { background: rgba(31, 27, 28, .4); }
body.hero-on-video .hero-play-btn {
  background: rgba(251, 248, 241, .72);
  border-color: rgba(31, 27, 28, .45);
  color: var(--sumi);
}
body.hero-on-video .hero-play-btn:hover { background: var(--red); border-color: var(--red); color: var(--cream); }
body.hero-on-video .hero-progress-seg { background: rgba(31, 27, 28, .18); }
body.hero-on-video .hero-progress-fill { background: var(--sumi); }

@media (max-width: 767px) {
  .hero-controls { right: 16px; bottom: 16px; gap: 10px; }
  .hero-progress { width: 96px; }
  .hero-chapter { left: 16px; bottom: 16px; }
}

/* =========================================================
   5.2 縁（理念）
   ========================================================= */
.en {
  padding: var(--section-pad) 0;
  background: var(--cream);
}

.en-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

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

.en-figure {
  display: flex;
  justify-content: center;
}

.en-circles {
  width: min(56vw, 420px);
  height: auto;
}

.en-fill { fill: var(--yellow); opacity: 0; transition: opacity 1.2s ease .3s; }
.en-circles.is-in .en-fill { opacity: .35; }

.en-stroke {
  fill: none;
  stroke: var(--red);
  stroke-width: 1.2;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  transition: stroke-dashoffset 1.68s cubic-bezier(0.77, 0, 0.175, 1);
}
.en-circles.is-in .en-stroke { stroke-dashoffset: 0; }

.en-copy .lead {
  margin-top: 20px;
  max-width: 46ch;
}

/* =========================================================
   共通: セクション見出しブロック
   ========================================================= */
.service, .positions, .stories, .companies, .faq, .contact {
  padding: var(--section-pad) 0;
}
.positions, .stories, .faq, .contact { border-top: 1px solid var(--hair); }

/* =========================================================
   5.3 支援サービス
   ========================================================= */
.step-list { border-top: 1px solid var(--hair); }

.step-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 32px 0;
  border-bottom: 1px solid var(--hair);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .56s cubic-bezier(0.23, 1, 0.32, 1), transform .56s cubic-bezier(0.23, 1, 0.32, 1);
  transition-delay: calc(var(--i) * .17s);
}
.step-row.is-in { opacity: 1; transform: translateY(0); }

.step-no {
  font-family: "Shippori Mincho", serif;
  font-size: 32px;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.step-body h3 {
  font-size: 20px;
  margin-bottom: 6px;
}
.step-body p { color: var(--sub); }

.step-meta {
  font-size: 13px;
  color: var(--sub);
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 599px) {
  .step-row {
    grid-template-columns: 48px 1fr;
    row-gap: 8px;
  }
  .step-meta {
    grid-column: 2;
    text-align: left;
  }
}

/* =========================================================
   5.4 求人
   ========================================================= */
.position-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
  margin-top: 32px;
}
@media (max-width: 767px) {
  .position-list { grid-template-columns: 1fr; }
}

.position-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--hair);
}

.position-salary {
  font-family: "Shippori Mincho", serif;
  font-size: 24px;
  color: var(--red);
  margin-bottom: 6px;
}

.position-title {
  font-size: 19px;
  margin-bottom: 8px;
}

.position-desc, .position-loc {
  color: var(--sub);
  font-size: 14px;
}
.position-loc { margin-top: 2px; }

.position-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  border: 1px solid var(--hair);
  border-radius: 2px;
  padding: 3px 10px;
  font-size: 12px;
  color: var(--sub);
}

.position-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--red);
  border-bottom: 1px solid var(--red);
}
.position-link:hover { color: var(--red-deep); border-color: var(--red-deep); }

/* =========================================================
   5.5 転職事例
   ========================================================= */
.story-feature {
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 40px 0;
}

.story-person {
  font-size: 14px;
  color: var(--sub);
}

.story-path {
  margin-top: 8px;
  font-size: 18px;
}

.story-income {
  margin-top: 20px;
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: "Shippori Mincho", serif;
}
.story-feature .story-income {
  font-size: clamp(28px, 4.5vw, 48px);
}
.story-before { color: var(--sub); }
.story-arrow { color: var(--red); }
.story-after { color: var(--red); }

.story-voice, .story-consultant {
  margin-top: 16px;
  max-width: 60ch;
}
.story-consultant { color: var(--sub); font-size: 14px; }

.story-band {
  display: flex;
  gap: 48px;
  margin-top: 8px;
}
@media (max-width: 767px) {
  .story-band { flex-direction: column; gap: 0; }
}

.story-mini {
  flex: 1;
  padding: 28px 0;
  border-bottom: 1px solid var(--hair);
}
.story-mini .story-income { font-size: 26px; margin-top: 12px; }
.story-mini .story-voice, .story-mini .story-consultant {
  margin-top: 10px;
  font-size: 14px;
}

/* =========================================================
   5.6 企業の方へ
   ========================================================= */
.companies {
  background: var(--red);
  color: var(--cream);
}
.companies .eyebrow { color: var(--cream); }
.companies h2 { color: var(--cream); }

.promise-list { border-top: 1px solid var(--hair-on-red); margin-top: 8px; }
.promise-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hair-on-red);
  align-items: baseline;
}
.promise-no {
  font-family: "Shippori Mincho", serif;
  font-size: 26px;
}

.companies .btn-invert { margin-top: 40px; }

/* =========================================================
   5.7 FAQ
   ========================================================= */
.faq-item {
  border-bottom: 1px solid var(--hair);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  font-size: 17px;
}
.faq-item summary::-webkit-details-marker { display: none; }

.faq-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: none;
}
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--red);
  transition: opacity .2s ease;
}
.faq-icon::before {
  left: 0; top: 50%;
  width: 16px; height: 1.4px;
  transform: translateY(-50%);
}
.faq-icon::after {
  top: 0; left: 50%;
  width: 1.4px; height: 16px;
  transform: translateX(-50%);
}
.faq-item[open] .faq-icon::after { opacity: 0; }

.faq-a {
  color: var(--sub);
  padding-bottom: 24px;
  max-width: 60ch;
}

/* =========================================================
   5.8 相談フォーム
   ========================================================= */
.contact-demo-note {
  color: var(--sub);
  font-size: 14px;
  margin-bottom: 32px;
  padding: 12px 16px;
  border: 1px solid var(--hair);
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
}
/* hidden 属性は [hidden]{display:none} という低詳細度のUAルールなので、
   #contactForm{display:flex} に負けないよう明示しておく */
#contactForm[hidden] {
  display: none;
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label, .field legend {
  font-size: 14px;
  color: var(--sumi);
}
.field legend { padding: 0; margin-bottom: 4px; }

.req { color: var(--red); font-size: 12px; }

.field input[type="text"],
.field input[type="email"],
.field select,
.field textarea {
  border: 1px solid var(--hair);
  background: var(--paper);
  color: var(--sumi);
  padding: 12px 14px;
  border-radius: 2px;
  font-family: inherit;
  accent-color: var(--red);
}
.field textarea { resize: vertical; min-height: 120px; }

.field-radio { border: none; padding: 0; display: flex; gap: 24px; flex-direction: row; align-items: center; }
.radio-label, .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.field input[type="radio"],
.field input[type="checkbox"] { accent-color: var(--red); }

.field-error {
  color: var(--red);
  font-size: 12px;
  min-height: 1em;
}

.contact-done {
  max-width: 560px;
  border: 1px solid var(--hair);
  padding: 32px;
  margin-top: 24px;
}
.contact-done p { margin-bottom: 20px; }

/* =========================================================
   フッター
   ========================================================= */
.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--hair);
  padding: 64px 0 40px;
}
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-logo { color: var(--sumi); }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 13px;
  color: var(--sub);
}
.footer-copy, .footer-disclaimer {
  font-size: 12px;
  color: var(--sub);
}

/* ---------- prefers-reduced-motion: 装飾アニメの尺を短縮 ---------- */
@media (prefers-reduced-motion: reduce) {
  .step-row,
  .en-stroke,
  .en-fill,
  body.armed .hero-copy-line > span,
  .faq-icon::after,
  .btn {
    transition-duration: .01s;
    transition-delay: 0s;
  }
}

