/* =========================================================
   あさひほうむ 特定技能サポート — Design System
   オリジナルデザイン / モバイルファースト / スマホ対応
   配色: 朝日(あさひ)をイメージした信頼のネイビー + 温かみのアンバー
   ========================================================= */

:root {
  /* Brand colors */
  --navy: #1b3a5b;
  --navy-dark: #122843;
  --navy-light: #2f5680;
  --amber: #f5a623;
  --amber-dark: #e08e0b;
  --sky: #eaf2fb;
  --sky-2: #f4f8fd;

  /* Neutrals */
  --ink: #20303f;
  --text: #3a4856;
  --muted: #6b7785;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;

  /* Feedback */
  --ok: #2e9e6b;
  --err: #d64545;

  /* Layout */
  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(27, 58, 91, 0.08);
  --shadow-lg: 0 14px 40px rgba(27, 58, 91, 0.14);

  /* Type */
  --font: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--navy-light); text-decoration: none; transition: color .2s, opacity .2s; }
a:hover { color: var(--amber-dark); }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.45; font-weight: 700; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.section { padding: 64px 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #dbe6f2; }
.section--navy h2, .section--navy h3 { color: #fff; }

/* ---------- Skip link (a11y) ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--amber); color: var(--navy-dark); padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
/* ヘッダーは本文(1120)より広いコンテナでナビの折返しを防ぐ */
.site-header .container { max-width: 1320px; }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); font-size: 1.05rem; white-space: nowrap; flex-shrink: 0; line-height: 1.25; }
.brand > span { white-space: nowrap; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 50% 65%, var(--amber) 0 38%, var(--navy) 39% 100%);
  flex: 0 0 auto; box-shadow: inset 0 0 0 2px #fff;
}
.brand small { display: block; font-size: .68rem; color: var(--muted); font-weight: 600; letter-spacing: .04em; }

.nav { display: none; min-width: 0; }
.nav__list { list-style: none; display: flex; gap: 1px; margin: 0; padding: 0; align-items: center; flex-wrap: nowrap; }
.nav__list a { display: inline-block; padding: 8px 9px; color: var(--ink); font-weight: 600; font-size: .9rem; border-radius: 8px; white-space: nowrap; }
.nav__list a:hover, .nav__list a[aria-current="page"] { background: var(--sky); color: var(--navy); }

/* 2026-09-11: 後ろの .btn { display:inline-flex } に上書きされ、狭い画面でも表示されて2行に折れていた。
   詳細度を上げて「1180px 未満はメニュー内のボタンだけ」という元の設計に戻す */
.site-header .header-cta { display: none; }
/* 語の途中で改行させない（見出しの「特定技能サ／ポート」のような割れを防ぐ） */
.nowrap { white-space: nowrap; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 0 auto; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; border-top: 1px solid var(--line); background: #fff;
  padding: 12px 0 20px;
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a { display: block; padding: 13px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.mobile-menu .btn { margin-top: 16px; width: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; transition: transform .15s, box-shadow .2s, background .2s;
  text-align: center; line-height: 1.3;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--amber); color: var(--navy-dark); box-shadow: 0 6px 18px rgba(245,166,35,.35); }
/* hover も濃紺テキストを維持し WCAG AA コントラストを確保（白文字×アンバーは比率不足のため不採用） */
.btn--primary:hover { background: var(--amber-dark); color: var(--navy-dark); }
.btn--primary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn--outline { background: #fff; color: var(--navy); border-color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }
.btn--lg { padding: 16px 34px; font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(120deg, rgba(18,40,67,.92) 0%, rgba(27,58,91,.80) 55%, rgba(47,86,128,.62) 100%),
    url("../img/hero-building.jpg") center 30% / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px;
  border-radius: 50%; background: radial-gradient(circle, rgba(245,166,35,.28), transparent 70%);
}
/* 左右は .container の 20px を活かす（2026-09-11: padding の一括指定で左右が 0 に上書きされ、スマホで文字が画面端に接していた） */
.hero__inner { position: relative; padding-top: 72px; padding-bottom: 76px; max-width: 760px; }
.hero__eyebrow { display: inline-block; background: rgba(245,166,35,.18); color: #ffd98a; font-weight: 700; font-size: .85rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { color: #fff; font-size: clamp(1.7rem, 5.4vw, 2.7rem); margin: 0 0 18px; letter-spacing: .01em; }
.hero h1 .accent { color: var(--amber); }
.hero__lead { font-size: clamp(1rem, 2.6vw, 1.15rem); color: #d6e3f1; margin-bottom: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note { margin-top: 22px; font-size: .85rem; color: #aebfd2; }

/* ---------- Sections / headings ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head__tag { display: inline-block; color: var(--amber-dark); font-weight: 800; letter-spacing: .12em; font-size: .8rem; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.5rem, 4.4vw, 2.05rem); margin: 0 0 14px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr 1fr; }

/* グリッド内カードは高さを揃える（不揃い解消）。CTAリンクは下端に整列 */
.grid > .card { height: 100%; display: flex; flex-direction: column; }
.grid > .card > p:last-child:not(:only-child) { margin-top: auto; padding-top: 8px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--sky); color: var(--navy);
  display: grid; place-items: center; font-size: 1.5rem; margin-bottom: 16px;
}
.card h3 { margin: 0 0 10px; font-size: 1.15rem; }
.card p { color: var(--text); margin: 0; font-size: .96rem; }

/* numbered list cards (支援10項目 / flow) */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 22px 74px; box-shadow: var(--shadow);
}
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 18px; top: 20px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem;
}
.step h3 { margin: 0 0 6px; font-size: 1.08rem; }
.step p { margin: 0; font-size: .95rem; color: var(--text); }

/* feature list with checks */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 32px; color: var(--text); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: .8rem; display: grid; place-items: center; font-weight: 800;
}

/* ---------- Stat / highlight band ---------- */
.band { background: var(--sky-2); border-radius: var(--radius); padding: 30px; display: grid; gap: 20px; grid-template-columns: 1fr; text-align: center; }
.stat__num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.stat__num .amber { color: var(--amber-dark); }
.stat__label { color: var(--muted); font-size: .9rem; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--navy) 0%, var(--navy-light) 100%); color: #fff; text-align: center; border-radius: var(--radius); padding: 48px 24px; }
.cta-band h2 { color: #fff; margin: 0 0 12px; }
.cta-band p { color: #d6e3f1; margin: 0 0 26px; }
.cta-band .hero__actions { justify-content: center; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* 表がはみ出す幅（スマホ）では、横スクロールできることを明示する */
.table-wrap::after { content: "← 横にスクロールできます →"; display: none; margin-top: 8px; font-size: .8rem; color: var(--muted); text-align: center; }
@media (max-width: 620px) { .table-wrap::after { display: block; } }
table.tbl { width: 100%; border-collapse: collapse; min-width: 520px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.tbl th, table.tbl td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
table.tbl thead th { background: var(--navy); color: #fff; font-weight: 700; }
table.tbl tbody tr:nth-child(even) { background: var(--bg-soft); }
table.tbl .hl { color: var(--amber-dark); font-weight: 800; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 22px; grid-template-columns: 1fr; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.plan--feature { border: 2px solid var(--amber); position: relative; }
.plan__ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--amber); color: var(--navy-dark); font-weight: 800; font-size: .8rem; padding: 5px 16px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 1.25rem; margin: 0 0 4px; }
.plan__sub { color: var(--muted); font-size: .88rem; margin-bottom: 14px; min-height: 2.6em; }
.plan__price { font-size: 2rem; font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.plan__price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.plan .checklist { margin: 18px 0 24px; }
.plan .btn { margin-top: auto; }

/* ---------- FAQ accordion ---------- */
.faq { display: grid; gap: 12px; }
.faq__item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq__q { width: 100%; text-align: left; background: #fff; border: 0; cursor: pointer; padding: 18px 52px 18px 20px; font-weight: 700; color: var(--ink); font-size: 1rem; position: relative; }
.faq__q::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--amber-dark); transition: transform .2s; }
.faq__q[aria-expanded="true"]::after { content: "−"; }
.faq__a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; color: var(--text); }
.faq__a.is-open { padding: 0 20px 20px; max-height: 600px; }

/* ---------- Jobs ---------- */
.job-card { display: flex; flex-direction: column; gap: 8px; }
.job-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { background: var(--sky); color: var(--navy); font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.tag--field { background: #fdf0d8; color: var(--amber-dark); }
.job-card dl { display: grid; grid-template-columns: 5em 1fr; gap: 6px 12px; margin: 6px 0 0; font-size: .9rem; }
.job-card dt { color: var(--muted); font-weight: 700; }
.job-card dd { margin: 0; }

/* ---------- Blog list ---------- */
.post { display: flex; flex-direction: column; gap: 6px; }
.post__meta { font-size: .82rem; color: var(--muted); }
.post h3 { font-size: 1.08rem; margin: 0; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; max-width: 680px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; color: var(--ink); font-size: .95rem; }
.field .req { color: var(--err); font-size: .8rem; margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--navy-light); border-color: var(--navy-light); }
.field textarea { min-height: 140px; resize: vertical; }
.field__error { color: var(--err); font-size: .9rem; font-weight: 700; display: none; align-items: center; gap: 6px; }
.field__error::before { content: "⚠"; font-size: 1rem; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--err); background: #fff7f7; }
.field.is-invalid .field__error { display: flex; }
.form__note { font-size: .85rem; color: var(--muted); }
.form-status { padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 700; display: none; }
.form-status.is-ok { display: block; background: #e7f6ee; color: var(--ok); }
.form-status.is-err { display: block; background: #fdecec; color: var(--err); }
.checkbox-row { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-row input { width: auto; margin-top: 5px; }
/* ハニーポット: 画面外に飛ばして人間には見せない（display:none だと一部botに見抜かれる） */
.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Members (mock) ---------- */
.notice { background: #fff7e6; border: 1px solid #f3d999; border-radius: var(--radius-sm); padding: 14px 18px; color: #8a6116; font-size: .9rem; }
.dl-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }

/* ---------- Breadcrumb / page hero ---------- */
.page-hero { background: var(--sky); padding: 40px 0; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); margin: 0 0 8px; }
.page-hero p { color: var(--muted); margin: 0; }
.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--navy-light); }
.breadcrumb span { margin: 0 6px; }

/* ---------- Prose ---------- */
.prose h2 { font-size: 1.4rem; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--sky); }
.prose h3 { font-size: 1.15rem; margin: 26px 0 10px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #aebfd2; padding: 52px 0 24px; font-size: .92rem; }
.site-footer a { color: #cdd9e8; }
.site-footer a:hover { color: var(--amber); }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1fr; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 1rem; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #91a4ba; font-size: .88rem; margin-top: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; text-align: center; color: #b3c2d4; font-size: .82rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.1rem; color: var(--text); }
.muted { color: var(--muted); }
.placeholder-note { background: #fff7e6; border: 1px dashed #e0b760; border-radius: 8px; padding: 8px 12px; font-size: .8rem; color: #8a6116; display: inline-block; }

/* ---------- Responsive ---------- */
@media (min-width: 720px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .band { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .section { padding: 80px 0; }
}

@media (min-width: 1180px) {
  .nav { display: block; }
  .site-header .header-cta { display: inline-flex; }
  .nav-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* ---------- フォーカス可視化（a11y・全インタラクティブ要素） ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .faq__q:focus-visible, .nav-toggle:focus-visible {
  outline: 3px solid var(--amber-dark); outline-offset: 2px; border-radius: 4px;
}
.section--navy a:focus-visible, .hero a:focus-visible, .cta-band a:focus-visible { outline-color: #ffd98a; }
/* カードのhover/focusフィードバック強化 */
.card:focus-within { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.nav__list a:focus-visible { background: var(--sky); }

/* ---------- 写真・図版 ---------- */
.media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.figure-split { display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr; }
.rep-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); max-width: 420px; margin: 0 auto; }
.rep-photo img { width: 100%; display: block; }

/* 写真を背景に使うCTA（握手など） */
.cta-band--photo {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(18,40,67,.90), rgba(27,58,91,.78)),
    url("../img/handshake.jpg") center/cover no-repeat;
}

@media (min-width: 820px) {
  .figure-split { grid-template-columns: 1.1fr .9fr; }
  .figure-split--rev { grid-template-columns: .9fr 1.1fr; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* 動画ページの目次（videos.html）。YouTube ID を設定した本にだけ出る */
.chapter-list { list-style: none; padding: 0; margin: 8px 0 0; }
.chapter-list li { padding: 4px 0; border-bottom: 1px solid #eef1f5; font-size: .92rem; }
.chapter-list__t { display: inline-block; min-width: 4.2em; color: #1b3a5b; font-variant-numeric: tabular-nums; }
