/* ================= ベース ================= */
:root {
  --primary: #007aff;
  --primary-rgb: 0, 122, 255; /* rgba()用 */
  --gray-bg: #f5f7fa;
  --text: #1a1a1a;
  --text-muted: #4f4f4f;
  --border: #e0e0e0;
  --error: #e00;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    /* なめらかスクロール */
    scroll-behavior: smooth;
  }
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI",
    Meiryo, "Noto Sans JP", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
}
img {
  max-width: 100%;
  display: block;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========== ヘッダー ========== */

/* 横幅いっぱい＋左右パディング */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 100;
  display: flex;
  align-items: center;
}

/* フル幅 */
.header-inner {
  width: 100%;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* ← 左基準 */
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  margin-right: 1rem;
}
.logo span:last-child {
  color: var(--primary);
}
.logo-spin {
  display: inline-block; /* transformを効かせるため */
}

/* ================= セクション ================= */
.section {
  padding: 7rem 1rem;
  scroll-margin-top: 80px; /* 固定ヘッダーの被り防止 */
}
.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  font-weight: 700;
}
.bg-light {
  background: var(--gray-bg);
}

/* ================= ヒーロー ================= */
.hero {
  height: calc(100vh - 64px);
  padding-top: 64px;
  background: #fff url("images/hero.webp") center / cover no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ==== 疑似動画オーバーレイ ==== */
.hero::before {
  content: "";
  position: absolute;
  inset: -40%; /* 余白を広げ斜めでも全域カバー */
  background: linear-gradient(
    110deg,
    rgba(var(--primary-rgb), 0.85) 0%,
    rgba(var(--primary-rgb), 0.15) 40%,
    transparent 55%
  );
  background-size: 200% 100%;
  background-repeat: repeat;
  animation: fadeIn 2s ease-out forwards,
    bgSlide 20s linear 0s infinite alternate;
  transform: rotate(20deg); /* 斜め */
  z-index: 0;
  pointer-events: none;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes bgSlide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ヒーロー内テキストを前面に */
.hero-inner {
  position: relative;
  z-index: 1;
}
.hero-inner h2 {
  font-size: 2.8rem;
  line-height: 1.3;
  font-weight: 700;
}
.hero-inner p {
  margin: 0.75rem 0 1.5rem;
  font-size: 1.125rem;
}

/* ================= ボタン ================= */
.btn-cta,
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn-cta {
  padding: 0.9rem 2.5rem;
}
.btn-primary {
  padding: 0.75rem 2.5rem;
}
.btn-cta:hover,
.btn-primary:hover {
  opacity: 0.9;
}

/* ================= カード ================= */
.cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  max-width: 320px;
  text-align: center;
  flex: 1 1 300px;
}
/* アイコンサイズ統一 */
.card img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin: 0 auto;
}
.card h3 {
  margin-top: 1rem;
  font-size: 1.25rem;
}
.card p {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ================= お知らせ ================= */
.news-list {
  list-style: none;
  max-width: 720px;
  margin: 0 auto;
}
.news-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: center;
}
.news-date {
  font-size: 0.875rem;
  color: var(--primary);
  min-width: 6rem;
}
.news-list a {
  color: var(--text);
  text-decoration: none;
}
.news-list a:hover {
  text-decoration: underline;
  color: var(--primary);
}
.disabled-link {
  pointer-events: none;
  color: gray;
  text-decoration: none;
  cursor: default;
}

/* ================= 会社概要 ================= */
.company-info {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}
.company-info::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary),
    rgba(var(--primary-rgb), 0.25)
  );
}
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table tr + tr th,
.company-table tr + tr td {
  border-top: 1px solid #eef1f5;
}
.company-table th {
  text-align: left;
  vertical-align: top;
  width: 30%;
  padding: 1.25rem 1rem 1.25rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6b7280;
  white-space: nowrap;
}
.company-table td {
  padding: 1.25rem 2rem 1.25rem 0;
  text-align: left;
}

/* ================= お問い合わせ ================= */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.form-row {
  margin-bottom: 1.5rem;
}
label {
  display: block;
  font-weight: 500;
}
label span {
  color: var(--error);
  margin-left: 0.25rem;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}
textarea {
  resize: vertical;
}
.form-actions {
  text-align: right;
}

/* ================= トースト通知 ================= */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: calc(100% - 2rem);
  padding: 0.875rem 1.25rem;
  background: #fff;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: perspective(400px) translateX(-50%) translateY(0.75rem) rotateX(-35deg);
  transform-origin: center bottom;
  transition: opacity 0.35s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.35s;
  z-index: 200;
}
.toast::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.toast.error::before {
  content: "!";
  background: var(--error);
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: perspective(400px) translateX(-50%) translateY(0) rotateX(0);
}

/* ================= モーション抑制 ================= */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }
  .toast {
    transition: none;
  }
}

/* ================= フッター ================= */
.footer {
  padding: 2rem 1rem;
  text-align: center;
  background: var(--gray-bg);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ================= レスポンシブ ================= */
@media (max-width: 768px) {
  .hero-inner {
    padding: 0 1.5rem;
  }
  .hero-inner h2 {
    font-size: 2.2rem;
  }
  /* 会社概要: 項目名と値を縦積みに */
  .company-table th,
  .company-table td {
    display: block;
    width: auto;
  }
  .company-table th {
    padding: 1rem 1.5rem 0.125rem;
  }
  .company-table td {
    padding: 0 1.5rem 1rem;
  }
  .company-table tr + tr td {
    border-top: none;
  }
}
