/* =========================================================
   株式会社アシスト 公式サイト（企業サイト版 v2）
   ベース: ネイビー／グレー、アクセント1色（ブラス、罫線等の装飾にのみ使用）
   ========================================================= */

:root {
  --navy-900: #121d2f;
  --navy-800: #1b2a41;
  --navy-700: #26395a;
  --gray-700: #3d4552;
  --gray-600: #555e6c;
  --gray-300: #d5dae1;
  --gray-200: #e4e8ed;
  --gray-100: #f4f6f8;
  --white: #ffffff;
  --accent: #8a6a2f;
  --text: #1f2633;
  --text-sub: var(--gray-600);
  --focus: #2f6fd6;

  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", YuGothic, Meiryo, system-ui, -apple-system,
    "Segoe UI", sans-serif;

  --container: 1040px;
  --narrow: 800px;
  --gutter: clamp(1.25rem, 4vw, 2rem);
  --section-y: clamp(3rem, 7vw, 4.5rem);
  --header-h: 64px;
}

/* ---------- Reset / Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.02em;
  color: var(--text);
  background: var(--white);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy-900);
}

p, ul, ol, dl, dd, blockquote, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
}

a {
  color: var(--navy-700);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent);
}

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

[tabindex="-1"]:focus {
  outline: none;
}

address {
  font-style: normal;
}

.break {
  overflow-wrap: anywhere;
}

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

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--navy-900);
  color: var(--white);
  transform: translateY(-120%);
}

.skip-link:focus {
  transform: translateY(0);
  color: var(--white);
}

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

.container-narrow {
  max-width: calc(var(--narrow) + var(--gutter) * 2);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--navy-900);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--navy-700);
}

/* ロゴマーク（326×310 を高さ基準で縮小表示） */
.brand-mark {
  display: block;
  flex-shrink: 0;
  height: 34px;
  width: auto;
}

@media (max-width: 480px) {
  .brand {
    font-size: 1rem;
  }

  .brand-mark {
    height: 28px;
  }
}

.global-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem 1.75rem;
}

.global-nav a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--gray-700);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.global-nav a:hover {
  color: var(--navy-900);
  border-bottom-color: var(--gray-300);
}

.global-nav a[aria-current="page"] {
  color: var(--navy-900);
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.4rem 0.75rem;
    font: inherit;
    font-size: 0.875rem;
    color: var(--navy-900);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
  }

  .nav-toggle-bar,
  .nav-toggle-bar::before,
  .nav-toggle-bar::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
  }

  .nav-toggle-bar {
    position: relative;
  }

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

  .nav-toggle-bar::before {
    top: -5px;
  }

  .nav-toggle-bar::after {
    top: 5px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar {
    background: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
    top: 0;
    transform: rotate(-45deg);
  }

  /* JSなし: ナビをヘッダー下に折り返して常時表示 */
  .header-inner {
    flex-wrap: wrap;
  }

  .global-nav {
    width: 100%;
  }

  .global-nav ul {
    flex-wrap: wrap;
    gap: 0 1.25rem;
    padding-bottom: 0.5rem;
  }

  /* JSあり: 開閉式のドロップダウン */
  .js .header-inner {
    flex-wrap: nowrap;
  }

  .js .global-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 8px 16px rgba(18, 29, 47, 0.06);
  }

  .js .global-nav.is-open {
    display: block;
  }

  .js .global-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.25rem var(--gutter) 0.75rem;
  }

  .js .global-nav li + li {
    border-top: 1px solid var(--gray-200);
  }

  .js .global-nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0;
    border-bottom: 0;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
  }

  .js .global-nav a[aria-current="page"] {
    border-left-color: var(--accent);
  }
}

/* ---------- Page head（各ページ冒頭: h1＋リード文） ---------- */
.page-head {
  padding-block: clamp(2.5rem, 6vw, 4rem) clamp(2rem, 5vw, 3rem);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

/* トップページ冒頭のフルロゴ（620×436 を幅基準で縮小表示） */
.hero-logo {
  margin-bottom: 1.5rem;
}

.hero-logo img {
  display: block;
  width: 200px;
  max-width: 60%;
  height: auto;
}

.page-title {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
  letter-spacing: 0.06em;
}

.page-lead {
  margin-top: 1rem;
  max-width: 44em;
  color: var(--gray-700);
}

.page-lead + .page-lead {
  margin-top: 0.5rem;
}

/* トップページ見出しブロック内の帯状写真（ヒーロー画像にはしない） */
.page-photo {
  margin-top: 2rem;
}

.page-photo img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .page-photo img {
    height: 180px;
  }
}

/* 事業内容（開発助言・ホテル）に小さく添える写真 */
.service-photo {
  margin-top: 1.25rem;
}

.service-photo img {
  display: block;
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 4px;
}

/* ページ内目次 */
.local-nav {
  margin-top: 1.5rem;
}

.local-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  font-size: 0.9375rem;
}

.local-nav a {
  display: inline-block;
  padding: 0.25rem 0;
}

/* ---------- Section ---------- */
.section {
  padding-block: var(--section-y);
}

.section + .section {
  border-top: 1px solid var(--gray-200);
}

.section-title {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.75rem;
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  border-bottom: 1px solid var(--gray-300);
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 3rem;
  height: 2px;
  background: var(--accent);
}

.subhead {
  margin: 2.5rem 0 1rem;
  font-size: 1.125rem;
}

.section-title + .subhead {
  margin-top: 0;
}

.section p + p {
  margin-top: 1em;
}

.more-link {
  margin-top: 1.75rem;
  font-size: 0.9375rem;
}

.section .more-link {
  margin-top: 1.75rem;
}

.more-link a {
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.more-link a:hover {
  border-bottom-color: var(--accent);
}

.note {
  font-size: 0.875rem;
  color: var(--text-sub);
}

/* ---------- 企業理念 ---------- */
.philosophy-statement {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--navy-800);
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  font-weight: 700;
  line-height: 1.9;
  color: var(--navy-900);
}

.principles {
  list-style: none;
  counter-reset: principle;
  border-top: 1px solid var(--gray-300);
}

.principles > li {
  counter-increment: principle;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 0 0.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.principles > li::before {
  content: counter(principle) ".";
  font-weight: 700;
  color: var(--navy-700);
  line-height: 1.6;
}

.principles h3,
.principles h4 {
  font-size: 1.0625rem;
}

.principles p {
  grid-column: 2;
  margin-top: 0.25rem;
  color: var(--gray-700);
}

/* ---------- 定義リスト型の一覧（事業要約・会社情報要約） ---------- */
.summary-list {
  list-style: none;
  border-top: 1px solid var(--gray-300);
}

.summary-list > li {
  display: grid;
  grid-template-columns: 15rem 1fr;
  gap: 0.25rem 2rem;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.summary-list h3 {
  font-size: 1rem;
}

.summary-list p {
  color: var(--gray-700);
}

.info-list {
  border-top: 1px solid var(--gray-300);
}

.info-list > div {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0.25rem 2rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.info-list dt {
  font-weight: 700;
  color: var(--navy-900);
}

@media (max-width: 640px) {
  .summary-list > li,
  .info-list > div {
    grid-template-columns: 1fr;
  }
}

/* ---------- 表 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--gray-300);
}

.data-table th,
.data-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--gray-300);
}

.data-table th {
  width: 12rem;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gray-100);
}

.data-table thead th {
  width: auto;
  font-size: 0.9375rem;
}

p + .data-table {
  margin-top: 1.5rem;
}

.data-table ul {
  list-style: none;
}

.data-table caption {
  text-align: left;
}

@media (max-width: 640px) {
  .data-table,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
    width: 100%;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .data-table th {
    padding: 0.625rem 1rem;
    border-bottom: 0;
  }

  .data-table td {
    padding: 0.75rem 1rem 1rem;
  }

  .data-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-sub);
  }
}

/* ---------- 箇条書き ---------- */
.plain-list {
  list-style: none;
}

.plain-list > li {
  position: relative;
  padding-left: 1.125rem;
}

.plain-list > li + li {
  margin-top: 0.375rem;
}

.plain-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 6px;
  height: 6px;
  background: var(--navy-700);
}

/* ---------- 代表プロフィール ---------- */
.profile-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-900);
}

.profile-role {
  margin-right: 0.75em;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-sub);
}

/* 代表プロフィール：名前の横の補足（出身・生年、v17） */
.profile-origin {
  margin-left: 1em;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-sub);
  white-space: nowrap; /* 幅が足りない場合は語句の途中で割らず、補足全体を次の行へ送る */
}

.profile-summary {
  margin-top: 0.75rem;
}

/* ---------- 代表メッセージ（代表写真＋本文） ---------- */
.message-body {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}

.message-photo {
  flex-shrink: 0;
}

.message-photo img {
  display: block;
  width: 280px;
  max-width: 100%;
  height: auto;
}

.message-text {
  flex: 1 1 auto;
  min-width: 0;
}

/* 代表メッセージ末尾の署名行の余白（本文との間隔） */
#message .profile-name {
  margin-top: 1.25rem;
}

@media (max-width: 640px) {
  .message-body {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .message-photo img {
    width: min(280px, 100%);
  }

  .message-text {
    align-self: stretch;
  }

  /* 代表プロフィールの名前の行：補足を横並びのまま収めるため詰める（v17） */
  #profile .profile-role {
    margin-right: 0.5em;
  }

  .profile-origin {
    margin-left: 0.75em;
    font-size: 0.8125rem;
  }
}

.history {
  list-style: none;
  border-top: 1px solid var(--gray-300);
}

.history > li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.25rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.history-year {
  font-weight: 700;
  color: var(--navy-700);
  font-variant-numeric: tabular-nums;
}

.history h4 {
  font-size: 1rem;
}

.history-body p {
  margin-top: 0.25rem;
  color: var(--gray-700);
}

@media (max-width: 640px) {
  .history > li {
    grid-template-columns: 1fr;
  }
}

/* ---------- 事業内容 ---------- */
.service-block + .service-block {
  margin-top: 3.5rem;
}

.service-block .section-title {
  margin-bottom: 1.25rem;
}

.service-meta {
  margin-bottom: 1.25rem;
  border-top: 1px solid var(--gray-300);
}

.service-meta > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.25rem 1.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-300);
}

.service-meta dt {
  font-weight: 700;
  color: var(--navy-900);
}

@media (max-width: 480px) {
  .service-meta > div {
    grid-template-columns: 1fr;
  }
}

.section-end-note {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.ext-icon {
  display: inline-block;
  margin-left: 0.25em;
  font-size: 0.875em;
}

/* ---------- お問い合わせ ---------- */
.contact-mail {
  margin: 0.5rem 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

/* ---------- プライバシーポリシー等の文書ページ ---------- */
.legal h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.125rem;
}

.legal ul {
  margin-top: 0.5rem;
  padding-left: 1.5em;
}

.legal-contact {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--gray-100);
}

.legal-contact dt {
  font-weight: 700;
}

@media (max-width: 480px) {
  .legal-contact {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .legal-contact dd + dt {
    margin-top: 0.5rem;
  }
}

.back-link {
  margin-top: 3rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: 2.5rem 1.5rem;
  background: var(--navy-900);
  color: #d7dde6;
  font-size: 0.875rem;
  line-height: 1.8;
}

.site-footer a {
  color: #d7dde6;
}

.site-footer a:hover {
  color: var(--white);
}

.site-footer :focus-visible {
  outline-color: #8fb4ff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.footer-name {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--white);
}

.footer-nav ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.25rem 2rem;
}

.footer-nav a {
  display: inline-block;
  padding: 0.25rem 0;
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a[aria-current="page"] {
  text-decoration: underline;
}

.copyright {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: #aab4c3;
}

@media (max-width: 480px) {
  .footer-nav ul {
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
  }
}
