/* ==========================================================================
   base.css — 全案件共通の土台（shared/components からコピーされたファイル）
   案件のデザインは css/style.css の :root（デザイントークン）で上書きする。
   ========================================================================== */

/* ---------- 既定のデザイントークン（style.css で上書き） ---------- */
:root {
  --color-primary: #1f4e79;
  --color-on-primary: #ffffff;
  --color-accent: #c0392b;
  --color-on-accent: #ffffff;
  --color-text: #222222;
  --color-muted: #5f6368;
  --color-bg: #ffffff;
  --color-bg-alt: #f4f6f8;
  --color-border: #d9dde1;
  --color-placeholder: #e3e7eb;

  --font-base: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  --font-heading: var(--font-base);

  --container: 1120px;
  --gutter: 20px;
  --radius: 8px;
  --section-space: 64px;
  --header-height: 64px;
}

@media (min-width: 768px) {
  :root {
    --gutter: 32px;
    --section-space: 96px;
  }
}

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

body,
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

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

input,
button,
textarea,
select {
  font: inherit;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------- 基本 ---------- */
body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-wrap: anywhere;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.4;
}

a {
  color: var(--color-primary);
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 1000;
  padding: 8px 16px;
  background: var(--color-bg);
  color: var(--color-text);
}

.skip-link:focus {
  top: 8px;
}

/* ---------- ヘッダー・ナビゲーション ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
}

.site-logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
  text-decoration: none;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}

.nav-toggle__bar {
  position: relative;
}

.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.site-nav.is-open {
  display: block;
}

/* JavaScript が動かない環境ではメニューを常に表示 */
.no-js .site-nav {
  display: block;
  position: static;
}

.no-js .nav-toggle {
  display: none;
}

.site-nav__list {
  padding: 8px var(--gutter) 16px;
}

.site-nav__list a {
  display: block;
  padding: 12px 0;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__list a[aria-current="page"] {
  color: var(--color-primary);
  font-weight: 700;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
  .site-nav,
  .no-js .site-nav {
    display: block;
    position: static;
    border: 0;
  }
  .site-nav__list {
    display: flex;
    gap: 28px;
    padding: 0;
  }
  .site-nav__list a {
    padding: 8px 0;
  }
}

/* ---------- セクション ---------- */
.section {
  padding-block: var(--section-space);
}

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

.section__header {
  margin-bottom: 40px;
  text-align: center;
}

.section__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.section__lead {
  margin-top: 12px;
  color: var(--color-muted);
}

.page-header {
  padding-block: 48px;
  background: var(--color-bg-alt);
}

.page-header__title {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
}

/* ---------- ヒーロー ---------- */
.hero {
  padding-block: 72px;
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.hero__title {
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3rem);
}

.hero__text {
  margin-top: 16px;
  max-width: 40em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* ---------- ボタン ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 28px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button--outline {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

/* ---------- グリッド・カード ---------- */
.grid {
  display: grid;
  gap: 24px;
}

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

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
}

.card__title {
  font-size: 1.125rem;
}

.card__text {
  color: var(--color-muted);
}

/* ---------- 画像の仮枠（素材が届くまで使う） ---------- */
.img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--color-placeholder);
  color: var(--color-muted);
  font-size: 0.875rem;
  text-align: center;
}

.img-placeholder--square { aspect-ratio: 1 / 1; }
.img-placeholder--portrait { aspect-ratio: 3 / 4; }

/* ---------- 定義テーブル（会社概要・募集要項など） ---------- */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table th,
.info-table td {
  display: block;
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
}

.info-table th {
  padding-bottom: 0;
  font-weight: 700;
}

.info-table tr {
  display: block;
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .info-table tr { display: table-row; }
  .info-table th,
  .info-table td {
    display: table-cell;
    padding: 16px;
  }
  .info-table th {
    width: 28%;
    background: var(--color-bg-alt);
  }
}

/* ---------- FAQ（details 要素） ---------- */
.faq {
  max-width: 800px;
  margin-inline: auto;
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__question {
  padding: 16px 32px 16px 0;
  font-weight: 700;
  cursor: pointer;
}

.faq__answer {
  padding-bottom: 16px;
}

/* ---------- フォーム ---------- */
.form {
  display: grid;
  gap: 20px;
  max-width: 720px;
  margin-inline: auto;
}

.form__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.form__required {
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 0.75rem;
}

.form__input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--color-muted);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
}

textarea.form__input {
  min-height: 160px;
}

/* ---------- 未実装・要差し替えの表示 ---------- */
.notice {
  padding: 12px 16px;
  border-left: 4px solid var(--color-accent);
  background: var(--color-bg-alt);
  font-size: 0.875rem;
}

/* ---------- フッター ---------- */
.site-footer {
  padding-block: 40px;
  background: var(--color-text);
  color: var(--color-bg);
  font-size: 0.875rem;
}

.site-footer a {
  color: inherit;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 24px;
}
