/* 株式会社あすまちラボ 静的サイト
   CSP（style-src 'self'）に合わせ、HTML 側に style 属性・<style> を置かない。 */

:root {
  --accent: #1e73be;
  --accent-dark: #175c98;
  --text: #333;
  --muted: #666;
  --line: #e5e5e5;
  --bg: #fff;
  --footer-bg: #2b2b2b;
  --footer-text: #fff;
  --container: 1100px;
  --slim: 760px;
  --gutter: 16px;
  --font: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "BIZ UDPGothic", Meiryo, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  /* 日本語の改行: 文節単位（Chromium。非対応は通常の折り返し）・強い禁則・末尾1文字の孤立を避ける。
     keep-all／overflow-wrap:anywhere は語の途中で折れるので使わない */
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: pretty;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

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

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

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--bg);
  border: 2px solid var(--accent);
}

/* ヘッダ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.site-logo img {
  width: 180px;
}

.global-nav ul {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.global-nav a {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.global-nav a:hover,
.global-nav a:focus-visible,
.global-nav a[aria-current="page"] {
  color: var(--accent);
}

main {
  flex: 1 0 auto;
}

/* トップのメインビジュアル（背景写真に白50%のマスク） */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  padding: 64px var(--gutter);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
}

.hero__logo {
  position: relative;
  z-index: 1;
  width: min(652px, 80%);
  margin: 0;
}

/* セクション */
.section {
  padding: 64px 0;
}

.section--center {
  text-align: center;
}

.section__title {
  margin: 0 0 32px;
  font-size: 26px;
  line-height: 1.5;
}

.section__title::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 16px auto 0;
  background: var(--accent);
}

.section p {
  margin: 0 0 24px;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent-dark);
}

/* 下層ページ */
.breadcrumbs {
  margin: 0;
  padding: 16px 0 0;
  font-size: 12px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--muted);
}

.breadcrumbs a {
  color: var(--text);
}

.page-title {
  margin: 32px 0 0;
  font-size: 26px;
}

/* 会社概要の表 */
.info {
  margin: 0;
  border: 1px solid var(--accent);
}

.info__row {
  display: grid;
  grid-template-columns: 1fr;
}

.info__row + .info__row {
  border-top: 1px solid var(--accent);
}

.info dt,
.info dd {
  margin: 0;
  padding: 12px 16px;
}

.info dt {
  font-weight: 600;
  text-align: center;
  background: #f5f8fc;
}

.info dd {
  text-align: center;
}

.info dd.left {
  text-align: left;
}

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

  .info dt {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* フッタ */
.site-footer {
  flex-shrink: 0;
  margin-top: 64px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0;
  padding: 24px var(--gutter);
  list-style: none;
  font-size: 14px;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--accent);
}

.copyright {
  padding: 16px 0;
  background: var(--footer-bg);
  color: var(--footer-text);
  font-size: 12px;
  text-align: center;
}

/* 個人情報の取り扱い（/privacy/） */
.policy h2 {
  margin: 40px 0 12px;
  padding-left: 10px;
  border-left: 4px solid var(--accent);
  font-size: 18px;
  line-height: 1.5;
}

.policy ul {
  margin: 0 0 24px;
  padding-left: 1.4em;
}

.policy__date {
  margin-top: 40px;
  color: var(--muted);
  text-align: right;
}

/* お問い合わせフォーム（/contact/） */
.form__row {
  margin: 0 0 24px;
}

.form__row label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
}

.form__req,
.form__opt {
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 400;
}

.form__req {
  background: #fbe9e7;
  color: #b3261e;
}

.form__opt {
  background: #eee;
  color: var(--muted);
}

.form input,
.form textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 16px; /* 16px 未満だと iOS が入力時に画面を拡大する */
  line-height: 1.6;
}

.form input:focus-visible,
.form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.form [aria-invalid="true"] {
  border-color: #b3261e;
}

/* ボット用の見張り欄。人の目に触れない位置へ置く（display:none だと読まないボットがいる） */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.alert {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid;
  border-radius: 4px;
}

.alert p,
.alert ul {
  margin: 0;
}

.alert ul {
  padding-left: 1.2em;
}

.alert--error {
  border-color: #b3261e;
  background: #fdf3f2;
  color: #8c1d18;
}

.alert--ok {
  border-color: #2e7d32;
  background: #f1f8f1;
  color: #1b5e20;
}

@media (max-width: 480px) {
  /* ナビが3項目になり1行に収まらないので、ロゴの下へ回す */
  .site-header .container {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 4px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .site-logo img {
    width: 140px;
  }

  .global-nav ul {
    gap: 20px;
  }

  .section {
    padding: 48px 0;
  }

  .section__title,
  .page-title {
    font-size: 22px;
  }
}
