/* ══════════════════════════════════════════
   TeamPlus 公式サイト — v4 案B
   淡いグラデーション×抽象図形のテック調
   ══════════════════════════════════════════ */

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button { cursor: pointer; }

/* ── Tokens ─────────────────────────────── */
:root {
  --white:       #ffffff;
  --off:         #f7f8fc;
  --line:        #e9ecf4;
  --muted:       #6d7486;
  --body:        #262c3d;
  --black:       #1c2130;

  --blue:        #2f6bff;
  --violet:      #7a5cff;
  --grad:        linear-gradient(135deg, #2f6bff 0%, #7a5cff 100%);
  --tint-blue:   #eef3ff;
  --tint-violet: #f3efff;
  --soft-text:   #4a5268;

  /* 文字が載る場所用の一段濃いトークン（コントラスト基準AA対応・実測済み） */
  --grad-deep:   linear-gradient(135deg, #2456e8 0%, #6a45e6 100%);
  --blue-text:   #1c56e8;
  --violet-text: #6a45e6;

  --f-en: 'Inter', sans-serif;
  --f-ja: 'Noto Sans JP', sans-serif;

  --wrap:    1080px;
  --gutter:  48px;
  --section: 110px;
}

/* ── Base ───────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: var(--f-ja);
  font-size: 15px;
  line-height: 1.8;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(122, 92, 255, .18); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--blue-text);
  outline-offset: 2px;
}

/* ── Container ──────────────────────────── */
.container {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Header ─────────────────────────────── */
.header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 64px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 99;
  transition: box-shadow .3s;
}

.header.scrolled {
  box-shadow: 0 4px 24px rgba(28, 33, 48, .07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-family: var(--f-en);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--body);
  text-decoration: none;
  transition: color .2s;
}

.nav-links a:hover { color: var(--blue); }

/* hamburger — hidden on desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 10px;
}

.hamburger span {
  display: block;
  height: 1px;
  background: var(--black);
  transition: transform .3s, opacity .3s;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 86vh;
  min-height: 86svh;
  display: flex;
  align-items: center;
  padding-block-start: 64px;
}

/* 飾り：右上のぼかしグラデーション */
.hero::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -140px;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 32%, rgba(47, 107, 255, .16), transparent 62%),
    radial-gradient(circle at 68% 68%, rgba(122, 92, 255, .15), transparent 62%);
  pointer-events: none;
}

/* 飾り：左下のぼかしグラデーション */
.hero::after {
  content: "";
  position: absolute;
  bottom: -200px;
  left: -160px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(122, 92, 255, .12), transparent 64%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

/* 社名上の小さなグラデーションバー */
.hero-content::before {
  content: "";
  width: 52px;
  height: 5px;
  border-radius: 999px;
  background: var(--grad);
  margin-bottom: 30px;
}

.hero-ja {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: .05em;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 22px;
  word-break: keep-all;
}

.hero-copy {
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 2;
  color: var(--body);
  margin-bottom: 26px;
}

/* タグラインを意味の切れ目で折り返すための語句単位スパン */
.u-phrase { display: inline-block; }

.hero-services {
  font-family: var(--f-ja);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--muted);
}

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

.section--grey { background: var(--off); }

.section--flow {
  background: linear-gradient(180deg, #f5f7ff 0%, #faf8ff 100%);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 56px;
}

/* リード文が続く見出しは、リード文を見出しグループへ引き寄せる */
.section-head:has(+ .section-lead) { margin-bottom: 22px; }

.section-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--tint-blue);
  color: var(--blue-text);
  font-family: var(--f-en);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.section--flow .section-label {
  background: var(--tint-violet);
  color: var(--violet-text);
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--black);
}

.section-lead {
  font-size: 15px;
  font-weight: 400;
  color: var(--soft-text);
  line-height: 1.9;
  margin-bottom: 48px;
  max-width: 40em;
}

/* ── Services ───────────────────────────── */
.grid-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.service-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 34px 32px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(28, 33, 48, .05);
  transition: box-shadow .25s, transform .25s, opacity .65s ease;
}

.service-card:hover {
  box-shadow: 0 16px 44px rgba(28, 33, 48, .1);
  transform: translateY(-3px);
}

.icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  color: var(--blue);
  background: var(--tint-blue);
  border-radius: 12px;
  margin-bottom: 8px;
}

/* AI導入支援カードだけ紫アクセント */
.service-card:nth-child(2) .icon {
  color: var(--violet);
  background: var(--tint-violet);
}

.icon svg { width: 22px; height: 22px; }

.service-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--black);
}

.service-card p {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.9;
}

.card-link {
  margin-top: auto;
  padding-top: 8px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--violet-text);
  text-decoration: none;
  transition: opacity .2s;
}

.card-link:hover { opacity: .65; }

/* カード内の「できること」箇条書き */
.card-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 2px;
}

.card-list li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.7;
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tint-blue);
  border: 1.5px solid var(--blue);
}

/* ── AI Flow ────────────────────────────── */
.flow-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.step {
  padding: 30px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(28, 33, 48, .05);
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--grad-deep);
  color: var(--white);
  font-family: var(--f-en);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .02em;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--black);
  margin-bottom: 8px;
}

.step p {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.9;
}

.flow-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-top: 48px;
}

.flow-cta p {
  font-size: 13.5px;
  color: var(--soft-text);
}

/* ── Info table ─────────────────────────── */
.info-table {
  width: 100%;
  max-width: 720px;
  border-collapse: collapse;
}

.info-table tr { border-bottom: 1px solid var(--line); }
.info-table tr:first-child { border-top: 1px solid var(--line); }

.info-table th,
.info-table td {
  padding: 20px 0;
  font-size: 14px;
  line-height: 1.9;
  vertical-align: top;
}

.info-table th {
  width: 140px;
  font-weight: 500;
  color: var(--soft-text);
  padding-right: 32px;
  white-space: nowrap;
  letter-spacing: .03em;
}

.info-table td {
  font-weight: 400;
  color: var(--body);
}

.info-table a {
  color: var(--blue-text);
  text-decoration: none;
  transition: opacity .2s;
}

.info-table a:hover { opacity: .65; }

/* ── Contact ────────────────────────────── */
.contact-form {
  max-width: 540px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .05em;
  color: var(--body);
}

.req-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #cc0000;
  border: 1px solid #f0c8c8;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.6;
}

.form-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}

.optional {
  display: inline-block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1.6;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--f-ja);
  font-size: 14px;
  font-weight: 400;
  color: var(--body);
  background: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .12);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.7;
}

.btn-send {
  align-self: flex-start;
  display: inline-block;
  padding: 14px 46px;
  background: var(--grad-deep);
  color: var(--white);
  border: none;
  border-radius: 999px;
  font-family: var(--f-ja);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .12em;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 18px rgba(47, 107, 255, .16);
  transition: box-shadow .25s, transform .25s, filter .25s;
}

.btn-send:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(47, 107, 255, .22);
  transform: translateY(-1px);
}

.btn-send:disabled {
  opacity: .6;
  cursor: default;
  transform: none;
}

/* ── Footer ─────────────────────────────── */
.footer {
  padding-block: 40px;
  border-top: 1px solid var(--line);
}

.footer-name {
  font-family: var(--f-ja);
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}

.footer-addr {
  font-family: var(--f-ja);
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.copyright {
  font-family: var(--f-ja);
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  letter-spacing: .04em;
}

/* ── Thanks page ────────────────────────── */
/* サンクスページはバー飾りを消してチップだけ残す（飾りの二重を避ける） */
.hero--thanks .hero-content::before { display: none; }

.hero-content .section-label { margin-bottom: 20px; }

.thanks-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--soft-text);
  line-height: 1.9;
  margin-bottom: 40px;
}

.btn-back {
  align-self: center;
  display: inline-block;
  text-decoration: none;
}

/* ── Fade-in animation ──────────────────── */
/* 初期非表示はJSが動いた時（html.js）だけ。JSがブロックされる環境でも内容は見える */
.js .fade-in {
  opacity: 0;
  transform: translateY(18px);
}

.fade-in {
  transition: opacity .65s ease, transform .65s ease;
}

/* カードはホバー用transitionと共存させる */
.service-card.fade-in {
  transition: opacity .65s ease, transform .65s ease,
              box-shadow .25s;
}

.fade-in.is-visible,
.js .fade-in.is-visible {
  opacity: 1;
  transform: none;
}

.service-card.fade-in.is-visible:hover { transform: translateY(-3px); }

/* 動きを減らす設定のユーザーにはアニメーションを出さない */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in,
  .js .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 1000px) {
  .flow-steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root {
    --gutter:  24px;
    --section: 76px;
  }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    inset-block-start: 64px;
    inset-inline: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    display: none;
    z-index: 98;
  }

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

  .nav-links li { border-bottom: 1px solid var(--line); }

  .nav-links a {
    display: block;
    padding: 18px var(--gutter);
    font-size: 14px;
  }

  .hamburger { display: flex; }

  /* Hero */
  .hero::before { width: 380px; height: 380px; top: -140px; right: -160px; }
  .hero::after { display: none; }
  .hero-ja {
    font-size: clamp(26px, 7.6vw, 38px);
    letter-spacing: .03em;
    margin-bottom: 18px;
  }
  .hero-copy { font-size: 15.5px; }

  /* Services: 1 col */
  .grid-services {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Table */
  .info-table th {
    width: 90px;
    padding-right: 16px;
  }

  /* Contact */
  .contact-form { max-width: 100%; }

  /* iOSはフォームの文字が16px未満だとフォーカス時に画面を自動ズームするため防ぐ */
  .field input,
  .field textarea { font-size: 16px; }

  .btn-send {
    width: 100%;
    text-align: center;
    align-self: stretch;
  }

  .flow-cta .btn-send { width: 100%; }
}

@media (max-width: 560px) {
  .flow-steps { grid-template-columns: 1fr; }
}
