/* =========================================
   株式会社MAXIS コーポレートサイト 共通スタイル
   方針: 白・グレー基調／青メイン＋赤ポイント／フッターは黒
   ========================================= */

:root {
  /* 色の定義（ここを変えるとサイト全体の色が変わる） */
  --blue: #1b5fd9;        /* メインカラー：ボタン・リンク */
  --blue-dark: #134aad;   /* ボタンのホバー時 */
  --blue-soft: #eef3fd;   /* 薄い青の背景 */
  --red: #e0353b;         /* ポイントカラー：見出しの小さな線など */
  --ink: #1d2128;         /* 本文の文字色 */
  --muted: #5f6873;       /* 補足テキスト */
  --line: #c9ced5;        /* 線画イラストの線色 */
  --border: #e6e9ed;      /* カードの枠線 */
  --bg: #ffffff;
  --bg-gray: #f6f7f9;
  --footer: #111317;

  --radius: 12px;
  --shadow: 0 4px 18px rgba(20, 30, 50, 0.07);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

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

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.logo img {
  height: 40px;
  width: auto;
  /* 白背景のロゴ画像の白部分を消す */
  mix-blend-mode: multiply;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

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

/* お問い合わせボタン自体が現在ページのときも、文字は白のままにする */
.nav a.btn[aria-current="page"] {
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 2px solid var(--blue);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.btn-outline {
  background: #fff;
  color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue-soft);
}

.nav .btn {
  color: #fff;
  padding: 8px 20px;
}

/* ---------- 見出し ---------- */
.section {
  padding: 96px 0;
}

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

.section-head {
  text-align: center;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

/* 赤のポイント：見出し上の小さな線 */
.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: var(--red);
  margin: 0 auto 12px;
  border-radius: 2px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.5;
  margin: 8px 0 16px;
}

.section-lead {
  color: var(--muted);
  max-width: 680px;
  margin: 0 auto;
}

/* ---------- トップ：ヒーロー ---------- */
.hero {
  position: relative;
  padding: 88px 0 0;
  background: linear-gradient(#fff 0%, #fff 55%, var(--bg-gray) 100%);
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.45;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: 0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--blue);
}

.hero p {
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-illust {
  margin: 48px auto 0;
  max-width: 1200px;
}

/* ---------- カード ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 28px;
}

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

.card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.card h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- 事例（建設業） ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.flow-step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  height: 100%;
}

.flow-step .label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 12px;
}

.flow-step.is-goal .label {
  background: var(--blue);
}

.flow-step h3 {
  font-size: 17px;
  margin: 0 0 8px;
}

.flow-step p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.flow-arrow {
  color: var(--red);
  font-size: 22px;
  font-weight: 700;
}

/* ---------- サービス ---------- */
.service-card {
  display: flex;
  flex-direction: column;
  padding: 40px 36px;
}

.service-card .tag {
  align-self: flex-start;
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 14px;
  font-weight: 700;
}

.service-card h3 {
  font-size: 24px;
  margin: 0 0 4px;
}

.service-card .sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.service-card p {
  flex: 1;
  margin-bottom: 24px;
}

.service-card .icon {
  margin: 0 0 20px;
}

.service-card .btn {
  align-self: flex-start;
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
  padding: 96px 0 0;
  background: var(--bg-gray);
}

.cta h2 {
  font-size: 26px;
  margin: 0 0 12px;
}

.cta p {
  color: var(--muted);
  margin: 0 0 28px;
}

.cta-illust {
  max-width: 900px;
  margin: 40px auto 0;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--footer);
  color: #c4c8ce;
  padding: 64px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-logo img {
  height: 34px;
  width: auto;
  /* 黒ロゴを白く反転し、背景を消す */
  filter: invert(1);
  mix-blend-mode: screen;
}

.footer-desc {
  margin: 16px 0 0;
  line-height: 1.9;
}

.site-footer h4 {
  color: #fff;
  font-size: 14px;
  margin: 0 0 12px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

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

.site-footer a:hover {
  color: #fff;
}

.copyright {
  border-top: 1px solid #2a2e35;
  margin-top: 48px;
  padding-top: 24px;
  font-size: 12px;
  color: #80868f;
}

/* ---------- 下層ページ：見出し帯 ---------- */
.page-head {
  padding: 72px 0 56px;
  text-align: center;
  background: linear-gradient(#fff 0%, var(--bg-gray) 100%);
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  font-size: 34px;
  line-height: 1.5;
  margin: 8px 0 12px;
}

.page-head p {
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto;
}

/* ---------- 事業紹介：サービス詳細 ---------- */
.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  /* 固定ヘッダーにページ内リンクの見出しが隠れないようにする */
  scroll-margin-top: 88px;
}

.detail + .detail {
  margin-top: 96px;
  padding-top: 96px;
  border-top: 1px solid var(--border);
}

.detail .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  padding: 2px 12px;
  margin-bottom: 14px;
  font-weight: 700;
}

.detail h2 {
  font-size: 30px;
  margin: 0 0 4px;
}

.detail .sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.detail-body p {
  margin: 0 0 16px;
}

.detail-body .detail-more {
  margin-top: 28px;
}

.detail-body h3 {
  font-size: 16px;
  margin: 28px 0 10px;
}

/* 「こんな方に」のチェックリスト */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  font-size: 15px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(-45deg);
}

/* 主な機能：番号付きのカード */
.feature-list {
  display: grid;
  gap: 16px;
}

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 24px;
}

.feature .num {
  grid-row: span 2;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.3;
}

.feature h3 {
  font-size: 16px;
  margin: 0;
}

.feature p {
  margin: 0;
}

/* ---------- 会社概要 ---------- */
.mission {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.mission .statement {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.7;
  margin: 0 0 24px;
}

.mission .statement em {
  font-style: normal;
  color: var(--blue);
}

.mission p {
  color: var(--muted);
  margin: 0 0 12px;
}

.company-table {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.company-table th,
.company-table td {
  text-align: left;
  vertical-align: top;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.company-table tr:last-child th,
.company-table tr:last-child td {
  border-bottom: 0;
}

.company-table th {
  width: 28%;
  background: var(--bg-gray);
  font-weight: 700;
  white-space: nowrap;
}

.company-table ul {
  margin: 0;
  padding-left: 1.2em;
}

/* 公開前に差し替える仮置きの文言（目立たせて見落としを防ぐ） */
.tbd {
  color: var(--red);
  font-weight: 700;
}

/* ---------- お問い合わせフォーム ---------- */
.contact-form {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 24px;
}

.form-row > label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
}

.form-row .req,
.form-row .opt {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  vertical-align: 2px;
}

.form-row .req {
  background: var(--red);
  color: #fff;
}

.form-row .opt {
  background: var(--bg-gray);
  color: var(--muted);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* 16px未満だとiPhoneで入力時に拡大されてしまう */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.contact-form textarea {
  resize: vertical;
}

.form-agree label {
  font-weight: 400;
}

/* ボット対策の隠し項目（画面外に置いて人には見せない） */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  margin-top: 24px;
  text-align: center;
}

.form-actions .btn {
  min-width: 220px;
  padding: 14px 28px;
  font-size: 15px;
}

.form-actions .btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.form-status:empty {
  display: none;
}

.form-status {
  max-width: 720px;
  margin: 16px auto 0;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 15px;
}

.form-status.is-info {
  background: var(--blue-soft);
}

.form-status.is-error {
  background: #fdeeee;
  color: #b3262b;
}

.form-status.is-success {
  background: #fff;
  border: 1px solid var(--border);
  padding: 32px;
  text-align: center;
  font-weight: 700;
}

/* ---------- スマホ対応 ---------- */
@media (max-width: 860px) {
  .detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .detail + .detail {
    margin-top: 64px;
    padding-top: 64px;
  }

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .flow {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 20px;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav .btn {
    margin-top: 12px;
    text-align: center;
    border-bottom: 2px solid var(--blue);
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding-top: 56px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .section-title {
    font-size: 22px;
  }

  .service-card {
    padding: 32px 24px;
  }

  .page-head {
    padding: 48px 0 40px;
  }

  .page-head h1 {
    font-size: 24px;
  }

  .detail h2 {
    font-size: 24px;
  }

  .mission .statement {
    font-size: 20px;
  }

  /* 会社情報の表は縦積みにする */
  .company-table th,
  .company-table td {
    display: block;
    width: 100%;
    padding: 14px 20px;
  }

  .company-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .contact-form {
    padding: 28px 20px;
  }
}

/* =========================================
   動きの演出
   ========================================= */

/* ヘッダー：スクロールしたら影をつける */
.site-header {
  transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(20, 30, 50, 0.08);
}

/* ヒーロー：最初の表示でふわっと現れる */
.hero-inner > * {
  opacity: 0;
  animation: fadeUp 0.9s ease-out forwards;
}

.hero-inner > :nth-child(2) { animation-delay: 0.2s; }
.hero-inner > :nth-child(3) { animation-delay: 0.4s; }

.hero-illust {
  opacity: 0;
  animation: fadeIn 1.2s ease-out 0.6s forwards;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* スクロールで現れる要素（JSで .reveal を付与） */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  transition-delay: var(--delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* カード：マウスを乗せると少し浮く */
.card,
.flow-step {
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.8s ease-out;
}

/* スクロール表示中はカードにも順番の遅れを効かせる */
.card.reveal,
.flow-step.reveal {
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  transition-delay: var(--delay, 0s);
}

.card:hover,
.flow-step:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(20, 30, 50, 0.12);
}

/* アイコン：カードに乗せると少し揺れる */
.card:hover .icon {
  animation: wiggle 0.6s ease;
}

@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(-8deg); }
  60% { transform: rotate(6deg); }
}

/* 建設業の流れ：矢印が右へ動く */
.flow-arrow {
  animation: nudge 1.6s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { translate: 0 0; }
  50% { translate: 6px 0; }
}

@media (max-width: 860px) {
  @keyframes nudge {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 6px; }
  }
}

/* ボタン：押せる感じを出す */
.btn {
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(27, 95, 217, 0.25);
}

/* 「動きを減らす」設定のときは演出を止める */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-inner > *,
  .hero-illust,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ---------- プライバシーポリシー ---------- */
.policy {
  max-width: 820px;
  margin: 0 auto;
}

.policy h2 {
  font-size: 20px;
  margin: 48px 0 12px;
  padding-left: 12px;
  border-left: 4px solid var(--blue);
}

.policy ul {
  padding-left: 1.4em;
}

.policy-date {
  margin-top: 48px;
  text-align: right;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 404 ---------- */
.page-404 {
  padding: 120px 0;
}

.page-404 .hero-actions {
  justify-content: center;
  margin-top: 32px;
}

/* プライバシーポリシー：目次と条文内の番号付きリスト */
.policy-toc {
  margin: 32px 0 8px;
  padding: 24px 28px;
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.policy-toc-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.policy-toc ol {
  margin: 0;
  padding-left: 0;
  list-style: none;
  columns: 2;
  column-gap: 32px;
  font-size: 15px;
}

.policy ol {
  padding-left: 1.6em;
}

.policy ol.policy-sub {
  margin-top: 8px;
  padding-left: 2.6em;
}

/* 委託先の番号を（1）（2）の形で表示する */
.policy ol.policy-sub > li::marker {
  content: "（" counter(list-item) "）";
}

.policy h2 {
  scroll-margin-top: 88px; /* 目次から飛んだとき固定ヘッダーに隠れないようにする */
}

@media (max-width: 720px) {
  .policy-toc ol {
    columns: 1;
  }
}
