/* ===== リセット・ベース ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-primary:   #2563eb;
  --color-primary-d: #1d4ed8;
  --color-text:      #1e293b;
  --color-text-sub:  #64748b;
  --color-border:    #e2e8f0;
  --color-bg:        #f8fafc;
  --color-white:     #ffffff;
  --radius:          8px;
  --shadow:          0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-card:     0 2px 8px rgba(0,0,0,.06), 0 8px 32px rgba(0,0,0,.08);
  --transition:      .25s ease;
  --font:            'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== ボタン ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-d);
  border-color: var(--color-primary-d);
  box-shadow: 0 4px 16px rgba(37,99,235,.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn--sm { padding: 8px 20px; font-size: .875rem; }
.btn--lg { padding: 16px 40px; font-size: 1.05rem; }

/* ===== ヘッダー ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--color-primary);
}
.header__logo span { color: var(--color-text); }

.header__nav {
  display: flex;
  gap: 32px;
}
.header__nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text-sub);
  transition: color var(--transition);
}
.header__nav a:hover { color: var(--color-primary); }

.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.header__menu-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 50%, #f0f9ff 100%);
  z-index: -1;
}
.hero__bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

.hero__inner {
  max-width: 720px;
}

.hero__label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-primary);
  background: rgba(37,99,235,.08);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.hero__desc {
  font-size: 1.05rem;
  color: var(--color-text-sub);
  line-height: 1.85;
  margin-bottom: 36px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===== 実績バー ===== */
.stats {
  background: var(--color-text);
  color: var(--color-white);
  padding: 40px 0;
}

.stats__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}

.stats__item {
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,.15);
}
.stats__item:last-child { border-right: none; }

.stats__num {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--color-white);
}
.stats__num small {
  font-size: 1rem;
  font-weight: 500;
}

.stats__label {
  display: block;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

/* ===== セクション共通 ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header__label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-header__title {
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}

.section-header__desc {
  color: var(--color-text-sub);
  font-size: .95rem;
}

/* ===== サービス ===== */
.services {
  padding: 96px 0;
  background: var(--color-bg);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.service-card {
  position: relative;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}

.service-card--featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-card);
}

.service-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: var(--color-white);
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}

.service-card__icon {
  width: 48px;
  height: 48px;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.service-card__icon svg { width: 100%; height: 100%; }

.service-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.service-card__price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.service-card__price small {
  font-size: .9rem;
  font-weight: 500;
}

.service-card__desc {
  font-size: .875rem;
  color: var(--color-text-sub);
  line-height: 1.75;
  margin-bottom: 20px;
}

.service-card__list {
  list-style: none;
  margin-bottom: 28px;
}
.service-card__list li {
  font-size: .875rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--color-border);
  padding-left: 20px;
  position: relative;
  color: var(--color-text-sub);
}
.service-card__list li:last-child { border-bottom: none; }
.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: .5;
}

/* ===== お問い合わせ ===== */
.contact {
  padding: 96px 0;
  background: var(--color-white);
}

.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}

.required {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  color: var(--color-white);
  background: #ef4444;
  padding: 2px 7px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #ef4444;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
}

.form-group textarea { resize: vertical; min-height: 130px; }

.form-group--checkbox { margin-top: 4px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: .9rem;
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.form-error {
  font-size: .8rem;
  color: #ef4444;
  margin-top: 6px;
  min-height: 1.2em;
}

.form-submit {
  text-align: center;
  margin-top: 32px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 40px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  color: #166534;
  margin-top: 24px;
}
.form-success svg {
  width: 48px;
  height: 48px;
  color: #22c55e;
  margin: 0 auto 16px;
  stroke: #22c55e;
}
.form-success p {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
}
.form-success.visible { display: block; }

/* ===== フッター ===== */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,.6);
  padding: 32px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-white);
}
.footer__logo span { color: rgba(255,255,255,.55); }

.footer__copy { font-size: .8rem; }

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
  .header__nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }
  .header__nav.open { display: flex; }
  .header__nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }
  .header__nav a:last-child { border-bottom: none; }
  .header__menu-btn { display: flex; }
  .header__menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .header__menu-btn.active span:nth-child(2) { opacity: 0; }
  .header__menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding: 100px 0 64px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .stats__item { border-right: none; border-bottom: 1px solid rgba(255,255,255,.15); }
  .stats__item:nth-child(2n) { border-bottom: 1px solid rgba(255,255,255,.15); }
  .stats__item:nth-child(3),
  .stats__item:nth-child(4) { border-bottom: none; }

  .services__grid { grid-template-columns: 1fr; }
  .service-card--featured { order: -1; }

  .form-row { grid-template-columns: 1fr; }

  .footer__inner { flex-direction: column; gap: 12px; text-align: center; }

  .services { padding: 64px 0; }
  .contact { padding: 64px 0; }
}

/* ===== スクロールアニメーション ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-in:nth-child(2) { transition-delay: .1s; }
.fade-in:nth-child(3) { transition-delay: .2s; }
