/*
  全ページ共通のスタイル(色・文字・ボタン・アイコン・ヘッダー・メニュー・フッター)。
  ページごとの組み方は home.css(TOP)と subpage.css(下層ページ)に書く。

  - 変数の名前は Figma の変数の Code Syntax(documents/04-style-guide/color.md)に合わせる。
  - 色は Figma の Workspace のフレーム「【決定】カラー3(ブルー)」(node 765:7024)の色(背景 #0D1520・差し色 #2778BE・暗い地のアクセントの文字 #329AF3)。
  - 幅 1440px のデザインをもとにしたリキッドレイアウト。中身は最大 1440px(ヘッダー・フッターは 1280px)で中央に置く。
  - 幅 1279px 以下:ナビの代わりにメニューボタンを出す / 幅 767px 以下:スマホの組み方(Figma の page/{ページ名}/mobile、幅 390px)。
*/
:root {
  /* primitive */
  --white: #ffffff;
  --navy-100: #d3d9e2;
  --navy-200: #b0bac8;
  --navy-300: #8a97aa;
  --navy-400: #66758c;
  --navy-500: #4a5a73;
  --navy-600: #33425a;
  --navy-700: #222f43;
  --navy-800: #1a2638;
  --navy-850: #141e2c;
  --navy-900: #0d1520;
  --navy-950: #080d14;

  /*
    color(暗い地)。カラー3(ブルー)の値。背景はカラー1 と同じ紺なので、面・沈んだ地・仮置きの色もカラー1 のまま。
    カラー1 に戻すときは、アクセントを次の値にする(カラー1 のアクセントはピンク 3 段階)。
      text/accent #F2669E・accent/default #E93D82・button/primary-bg #D42F70、subpage.css の --panel-accent #D42F70
    以前の緑(モックのカラー3)に戻すときは、次の値にする。
      bg/base #2C2F4B・bg/sunken #27273F・bg/surface rgba(51, 56, 87, 0.72)・bg/placeholder rgba(57, 64, 99, 0.9)
      アクセント 3 つ #009D59、--menu-bg rgba(44, 47, 75, 0.9)、subpage.css の --header-scrolled-bg rgba(44, 47, 75, 0.9)
      各 HTML の theme-color #2C2F4B、ロゴ・ファビコンのグラデーション #00C0CA → #009D59
    (どちらに戻すときも、text/accent はほかのアクセントと同じ色にする)
  */
  --color-bg-base: var(--navy-900);
  --color-bg-sunken: var(--navy-950);
  --color-bg-surface: rgba(20, 30, 44, 0.72);    /* navy-850 の 72% */
  --color-bg-placeholder: rgba(26, 38, 56, 0.9); /* navy-800 の 90% */
  --color-text-primary: var(--white);
  --color-text-secondary: var(--navy-100);
  --color-text-tertiary: var(--navy-200);
  --color-text-muted: var(--navy-300);
  --color-text-subtle: var(--navy-400);
  --color-border-subtle: var(--navy-700);
  --color-border-default: var(--navy-600);
  --color-border-strong: var(--navy-500);
  --color-border-emphasis: var(--navy-400);
  /*
    アクセントは差し色(ロゴの青 #2778BE)。アクセントバー・塗りのボタン・線・アイコンに使う。ボタンの文字は白。
    暗い地に置くアクセントの文字(英字のラベル・図の見出し・KV の「AX」)だけは、差し色より明るい #329AF3(Figma の「アクセントテキスト」)。
    差し色の文字は背景とのコントラスト比が 3.9:1 で、#329AF3 なら 6.2:1。白い地のアクセントの文字は、差し色のまま(subpage.css の --panel-accent)
  */
  --color-text-accent: #329af3;
  --color-accent-default: #2778be;
  --color-button-primary-bg: #2778be;

  /* スクロール中のヘッダーの地・メニューの地(下層ページは subpage.css で上書きする)。メニューの地は背景色(bg/base)の 90% */
  --header-scrolled-bg: var(--color-bg-surface);
  --menu-bg: rgba(13, 21, 32, 0.9);

  /* 余白 */
  --container-margin-x: 80px;
  --section-padding-y: 160px;
  --header-h: 96px;

  /* 書体。英字の書体で書く見出しに和文が混ざったときは、Noto Sans JP で出す */
  --font-en: "Roboto Condensed", "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
  --font-ja: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-bg-base);
  color: var(--color-text-primary);
  font-family: var(--font-ja);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* キーボードで操作するとき用の「本文へスキップ」。ふだんは隠し、フォーカスが来たら左上に出す */
.skip-link {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  padding: 12px 20px;
  background: var(--color-bg-base); color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
  font-size: 14px; font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---- 背景の粒子(three.js)。画面に固定し、一番奥に置く ---- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.site-header, main, .site-footer { position: relative; z-index: 1; }

/* ロゴ(311.8 × 29.4px)。高さは画像の比率に合わせる。スマホでは幅 208px(PC の 2/3) */
.site-header__logo img, .global-menu__logo img, .site-footer__main > a img { width: 311.8px; height: auto; }

/* ---- 共通の文字 ---- */
/*
  大きな見出しは、画面の幅に合わせて縮める(リキッドレイアウト)。幅 1440px でデザインの大きさになり、それより狭いと同じ割合で小さくする。
  下限はスマホの大きさ(幅 767px 以下は、このファイルの最後のスマホの指定で固定する)
*/
.display-l { font-family: var(--font-en); font-weight: 800; font-size: clamp(48px, 120 / 1440 * 100vw, 120px); line-height: 1; letter-spacing: -0.01em; }
.heading-l { font-family: var(--font-en); font-weight: 800; font-size: clamp(32px, 64 / 1440 * 100vw, 64px); line-height: 1; }
.heading-m { font-family: var(--font-en); font-weight: 800; font-size: clamp(32px, 56 / 1440 * 100vw, 56px); line-height: 1; }
.heading-ja-l { font-weight: 700; font-size: clamp(28px, 44 / 1440 * 100vw, 44px); line-height: 1.4; letter-spacing: 0.06em; }
.heading-ja-m { font-weight: 700; font-size: clamp(22px, 32 / 1440 * 100vw, 32px); line-height: 1.4; letter-spacing: 0.04em; }
.body-l { font-size: 16px; line-height: 2.1; letter-spacing: 0.04em; color: var(--color-text-secondary); }
.body { font-size: 16px; line-height: 1.7; letter-spacing: 0.04em; color: var(--color-text-secondary); }
.en-label { font-family: var(--font-en); font-weight: 600; font-size: 14px; line-height: 1.2; letter-spacing: 0.16em; color: var(--color-text-accent); }
.label-ja { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 16px; line-height: 1.5; letter-spacing: 0.08em; color: var(--color-text-tertiary); }
.label-ja i { width: 24px; height: 1px; background: var(--color-border-emphasis); }
.accent-bar { width: 56px; height: 3px; background: var(--color-accent-default); }
.is-accent { color: var(--color-text-accent); }
/* 画面には出さず、読み上げにだけ使う文字 */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/*
  ---- アイコン ----
  Figma の Component の「アイコン」と同じ Material Symbols Outlined(太さ 200・塗りなし・grade 0)。
  SVG の形だけを使い、色は文字の色(currentColor)で塗る。大きさは 24px(--icon-size で変える)。
  <span class="icon icon--arrow-right" aria-hidden="true"></span>
*/
.icon {
  display: inline-block; flex: 0 0 var(--icon-size, 24px);
  width: var(--icon-size, 24px); height: var(--icon-size, 24px);
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.icon--20 { --icon-size: 20px; }
.icon--16 { --icon-size: 16px; }
/* 詳細ページへのリンク */
.icon--arrow-right { --icon: url(../images/icons/arrow-right-alt.svg); }
/* 前へ */
.icon--arrow-left { --icon: url(../images/icons/arrow-left-alt.svg); }
/* ページ内リンク */
.icon--arrow-down { --icon: url(../images/icons/arrow-cool-down.svg); }
/* 外部へのリンク(別のタブで開く) */
.icon--open-in-new { --icon: url(../images/icons/open-in-new.svg); }
/* モーダルで開く */
.icon--open-in-full { --icon: url(../images/icons/open-in-full.svg); }
/* ページの一番上へ(PAGE TOP) */
.icon--arrow-up { --icon: url(../images/icons/back-to-top.svg); }
.icon--close { --icon: url(../images/icons/close.svg); }
.icon--menu { --icon: url(../images/icons/menu.svg); }

/*
  ---- ui/Button ----
  幅は文字に合わせて伸び縮みする。アイコンは前にも後ろにも置ける。
  Theme=Dark(紺の地):.button--primary(塗り)・.button--outline(線)/ Theme=Light(白い地):.button--light
*/
.button {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 24px 32px;
  font-weight: 700; font-size: 16px; line-height: 1.7; letter-spacing: 0.04em;
  color: var(--color-text-primary);
}
/*
  プライマリのボタンは、hover 中に塗りを外して(後ろを透かす)、枠をアクセントの色(text/accent)にする。文字は白のまま。
  いまいるページの印(aria-current)が付いたボタンは、塗りを外して枠だけにしたまま。
  枠は、ボタンの大きさが変わらないよう、内側の影で描く
*/
.button--primary { background: var(--color-button-primary-bg); transition: background-color .2s, box-shadow .2s; }
.button--primary:not([aria-current]):hover { background-color: transparent; box-shadow: inset 0 0 0 1px var(--color-accent-default); }
.button--primary[aria-current] { background: none; box-shadow: inset 0 0 0 1px var(--color-accent-default); }
/* 線のボタンは、hover 中に線をアクセントの色(text/accent)にする */
.button--outline { border: 1px solid var(--color-border-strong); transition: border-color .2s; }
.button--outline:hover { border-color: var(--color-accent-default); }
/* 白い地の線のボタンも、TOP の線のボタンと同じく、hover 中に線をアクセントの色(text/accent)にする。文字とアイコンの色は変えない */
.button--light { color: var(--navy-900); border: 1px solid var(--navy-900); transition: border-color .2s; }
.button--light:hover { border-color: var(--color-accent-default); }
/* 白い地のボタンの、別のタブで開くアイコン(Open In New)はアクセントの色で塗る */
.button--light .icon--open-in-new { color: var(--color-accent-default); }
/*
  戻るボタン(.button--back。「TOP PAGEに戻る」「ニュースリリース一覧に戻る」)の左向きの矢印(Arrow Left Alt)。
  アクセントの色で塗り、ふだんは 4px 右に置き、hover 中(キーボードで選んだときも)は 0.4 秒で左へ動いて元の位置に来る
  (TOP の募集職種の大分類の右向きの矢印と、逆向きの同じ動き)。動きを減らす設定の画面では動かさない
*/
.button--back .icon--arrow-left { color: var(--color-accent-default); transform: translateX(4px); transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
.button--back:is(:hover, :focus-visible) .icon--arrow-left { transform: none; }
@media (prefers-reduced-motion: reduce) { .button--back .icon--arrow-left { transition: none; } }

/*
  ---- layout/site-header ----
  sticky で上に残る。ページの一番上では地は透明。スクロール中は地とブラーを付けて、本文と重なって見えないようにする。
  地を画面の幅いっぱいに敷くため、ヘッダー自体は全幅にし、中身は 1280px の幅に収める。
  ナビの行き先は「その話題の本体」。TOP では 4 つとも TOP の各見出しへ。下層ページでは、専用のページがある NEWS はそのページへ、ほかの 3 つは TOP の各見出しへ。
  右端の「募集職種一覧」のボタンは募集職種一覧のページへ。
*/
.site-header {
  position: sticky; top: 0; z-index: 10;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding-inline: max(var(--container-margin-x), calc((100% - 1280px) / 2));
  transition: background-color .3s, backdrop-filter .3s, -webkit-backdrop-filter .3s;
}
.site-header.is-scrolled {
  background: var(--header-scrolled-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.global-nav { display: flex; align-items: center; gap: 48px; }
.global-nav a, .footer-nav a { font-family: var(--font-en); font-weight: 500; font-size: 16px; line-height: 1.2; letter-spacing: 0.12em; }
/*
  ナビの文字の下線。hover 中(キーボードで選んだときも)と、いまいるページの印で、文字の下にアクセントの色で 2px の下線を引く(TOP の募集職種の大分類と同じ動き)。
  左から右へ 0.4 秒で引き、hover を外すと右端から縮んで消える。動きを減らす設定の画面では、動かさずに出し入れする。
  - ヘッダー・フッターのナビ(「募集職種一覧」のボタンを除く):<a> に引く。文字の並ぶ線(リンクの上端から 15px)から 10px 下(16px の文字で上端から 25px = 1.5625em)
  - メニューの項目・外部リンク:<a> の中の文字を <span class="link-line"> で囲み、その下に引く(アイコンの下には引かない)
*/
.global-nav a:not(.button), .footer-nav a, .link-line { position: relative; }
.global-nav a:not(.button)::after, .footer-nav a::after, .link-line::after {
  content: ""; position: absolute; left: 0; right: 0; top: 1.5625em; height: 2px;
  background: linear-gradient(var(--color-accent-default), var(--color-accent-default)) left / 0% 100% no-repeat;
  transition: background-size .4s cubic-bezier(.4, 0, .2, 1);
}
.link-line::after { top: auto; bottom: -4px; }
:is(.global-nav a:not(.button), .footer-nav a):is(:hover, :focus-visible)::after,
a:is(:hover, :focus-visible) > .link-line::after { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) { .global-nav a:not(.button)::after, .footer-nav a::after, .link-line::after { transition: none; } }
/* ヘッダーの「募集職種一覧」のボタン。ui/Button の上下の余白と文字を小さくして、高さ 48px にしている */
.global-nav .site-header__cta { padding: 12px 24px; font-family: var(--font-ja); font-weight: 700; font-size: 14px; line-height: 1.7; letter-spacing: 0.04em; }
/*
  いまいるページ(またはその親)の印(カレント)。HTML の aria-current で付ける。
    NEWS 一覧:NEWS(aria-current="page")/ NEWS 詳細:親の NEWS(aria-current="true")/ 募集職種一覧:「募集職種一覧」のボタン(aria-current="page")
  ナビの文字は hover 中の下線を引いたまま、ボタンは塗りを外して枠だけにする(上の .button--primary[aria-current])
*/
.global-nav a[aria-current]:not(.button)::after, a[aria-current] > .link-line::after { background-size: 100% 100%; }
/* button/open-menu。幅 1279px 以下で出す */
.menu-button { display: none; }

/*
  ---- layout/global-menu(メニューを開いた状態)----
  Figma の page/home/mobile/menu。開閉の動きは common.js。
  画面全体を覆う。地は --menu-bg(TOP は背景色 90%+背景ぼかし 16px。下層ページは subpage.css で透かさない紺にする)。
  ロゴと × は、その幅のヘッダーと同じ位置にそろえる
*/
html.is-menu-open { overflow: hidden; }
.global-menu {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--menu-bg);
  color: var(--color-text-primary);
  overflow: auto;
}
.global-menu::backdrop { background: transparent; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.global-menu[open] { display: flex; flex-direction: column; animation: menu-fade .3s ease; }
@keyframes menu-fade { from { opacity: 0; } }
.global-menu__header { flex: 0 0 var(--header-h); display: flex; align-items: center; justify-content: space-between; padding-inline: var(--container-margin-x); }
.global-menu__body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 24px var(--container-margin-x) 40px; }
.global-menu__nav { display: flex; flex-direction: column; border-top: 1px solid var(--color-border-subtle); }
.global-menu__nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border-subtle);
  font-family: var(--font-en); font-weight: 800; font-size: 32px; line-height: 1;
}
/* 項目の右向きの矢印。ふだんは 4px 左に置き、hover 中(キーボードで選んだときも)は 0.4 秒で右へ動いて元の位置に来る(TOP の募集職種の大分類と同じ動き) */
.global-menu__nav .icon { color: var(--color-accent-default); transform: translateX(-4px); transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
.global-menu__nav a:is(:hover, :focus-visible) .icon { transform: none; }
@media (prefers-reduced-motion: reduce) { .global-menu__nav .icon { transition: none; } }
.global-menu__footer { display: flex; flex-direction: column; gap: 32px; }
.global-menu__footer .button { justify-content: center; }
.global-menu__copyright { font-family: var(--font-en); font-size: 12px; line-height: 1.2; letter-spacing: 0.08em; color: var(--color-text-subtle); }

/* ---- layout/site-footer ---- */
.site-footer { background: var(--color-bg-sunken); padding: 96px var(--container-margin-x) 40px; }
.site-footer__main, .site-footer__bottom { max-width: 1280px; margin-inline: auto; }
.site-footer__main { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 48px; }
.site-footer__links { display: flex; gap: 96px; }
/* 下線を文字の幅だけに引くため、リンクは文字の幅にする(並べた幅いっぱいに伸ばさない) */
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.footer-nav a { color: var(--color-text-secondary); }
.external-links { display: flex; flex-direction: column; gap: 16px; }
.external-links a { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 1.7; letter-spacing: 0.04em; color: var(--color-text-secondary); }
/*
  別のタブで開くリンクの印(Open In New・16px)は text/muted で塗る。
  hover 中(キーボードで選んだときも)は、文字の下に下線を引き(ナビと同じ。.link-line)、アイコンをアクセントの色にする
*/
.external-links .icon { color: var(--color-text-muted); transition: color .4s cubic-bezier(.4, 0, .2, 1); }
.external-links a:is(:hover, :focus-visible) .icon { color: var(--color-accent-default); }
@media (prefers-reduced-motion: reduce) { .external-links .icon { transition: none; } }
.site-footer__bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--color-border-subtle); }
.site-footer__bottom small { font-family: var(--font-en); font-size: 14px; line-height: 1.2; letter-spacing: 0.08em; color: var(--color-text-subtle); }
.page-top { display: flex; align-items: center; gap: 8px; font-family: var(--font-en); font-weight: 500; font-size: 14px; line-height: 1.2; letter-spacing: 0.16em; color: var(--color-text-tertiary); }
/*
  PAGE TOP の上向きの矢印(Arrow Upward Alt)。アクセントの色で塗り、ふだんは「PAGE TOP」の文字と上下の中央をそろえ、
  hover 中(キーボードで選んだときも)は 0.4 秒で 4px 上へ動く。
  ふだんを 4px 下に置いて hover で元の位置に戻す形(横向きの矢印と同じ考え方)だと、ふだんの矢印が文字より下にずれて見えるため
*/
.page-top .icon { color: var(--color-accent-default); transition: transform .4s cubic-bezier(.4, 0, .2, 1); }
.page-top:is(:hover, :focus-visible) .icon { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .page-top .icon { transition: none; } }

/*
  ---- ナビが 1 行に収まらない幅(1279px 以下)----
  ロゴ(330px)とナビ(「募集職種一覧」のボタンを含めて約 670px)を横に並べるには、左右の余白(160px)と間(48px 以上)を足して幅が約 1210px 要る。
  それより狭い画面ではナビの代わりにメニューボタンを出す。切り替える幅は、よくある画面の幅に合わせて 1280px にしている。
  【仮】幅 768〜1279px のメニューは Figma にデザインがないため、スマホと同じデザインを画面いっぱいに広げている
*/
@media (max-width: 1279px) {
  .global-nav { display: none; }
  .menu-button {
    display: grid; place-items: center;
    width: 40px; height: 40px; padding: 0;
    border: 0; background: none; color: var(--color-text-primary); cursor: pointer;
    transition: color .2s;
  }
  /* メニューを開く・閉じる(×)のボタンは枠がないので、hover 中はアイコンをアクセントの色にする */
  .menu-button:hover { color: var(--color-accent-default); }
}

/*
  ---- スマホ(幅 767px 以下)----
  文字の大きさと余白は、Figma の変数の Mobile モード(typography・layout)の値。
*/
@media (max-width: 767px) {
  :root { --container-margin-x: 24px; --section-padding-y: 80px; --header-h: 64px; }

  /* layout/site-header:右の余白はメニューボタンの押せる範囲(40px)の分だけ詰める */
  .site-header { padding-right: 16px; }
  .site-header__logo img { width: 208px; }

  /* 共通の文字・ボタン */
  .display-l { font-size: 48px; }
  .heading-l, .heading-m { font-size: 32px; }
  .heading-ja-l { font-size: 28px; }
  .heading-ja-m { font-size: 22px; }
  .body { font-size: 14px; }
  .en-label { font-size: 12px; }
  .label-ja { font-size: 14px; }
  .button { padding: 24px 20px; font-size: 14px; }

  /* layout/site-footer:ロゴとリンクを縦に並べる */
  .site-footer { padding: 48px var(--container-margin-x) 24px; }
  .site-footer__main { flex-direction: column; gap: 32px; padding-bottom: 32px; }
  .site-footer__main > a img { width: 208px; }
  .site-footer__links { gap: 48px; }
  .global-nav a, .footer-nav a { font-size: 14px; }
  .external-links a { font-size: 12px; }
  .site-footer__bottom small, .page-top { font-size: 12px; }

  /* layout/global-menu:ロゴと × をスマホのヘッダーと同じ位置にそろえる */
  .global-menu__header { padding-right: 16px; }
  .global-menu__logo img { width: 208px; }
}
