/* ===== 基本設定 ===== */
:root {
  --navy: #0f2a47;
  --navy-deep: #0a1d33;
  --blue: #1f6feb;
  --cyan: #2bb3c0;
  --text: #1e2a36;
  --muted: #5b6b7b;
  --line: #dfe5ec;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --radius: 12px;
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  /* システムフォント：Mac・iPhone（Safari など）はヒラギノ、Windows は BIZ UDPゴシック（なければメイリオ） */
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", Meiryo, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.4; margin: 0; }

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

.sp-only { display: none; }

/* ===== ボタン ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  box-shadow: 0 6px 18px rgba(31, 111, 235, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(31, 111, 235, .4); }
.btn-ghost { border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-large { font-size: 1.15rem; padding: 18px 44px; }

/* ===== ヘッダー ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  transition: background .3s, box-shadow .3s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.logo {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: #fff;
  transition: color .3s;
}
.logo span {
  margin-left: 8px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  opacity: .7;
}
.scrolled .logo { color: var(--navy); }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: #fff;
  transition: color .3s, opacity .2s;
}
.nav a:hover { opacity: .7; }
.scrolled .nav a { color: var(--text); }
.nav .nav-cta {
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff !important;
}

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  position: relative;
}
.menu-toggle span {
  position: absolute; left: 10px; right: 10px; height: 2px;
  background: #fff; transition: transform .3s, opacity .3s, background .3s;
}
.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle span:nth-child(3) { top: 28px; }
.scrolled .menu-toggle span, .menu-open .menu-toggle span { background: var(--navy); }
.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: #fff;
  background: radial-gradient(ellipse at 70% 30%, #17406b 0%, var(--navy) 45%, var(--navy-deep) 100%);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; opacity: .55; }
.hero-bg svg { width: 100%; height: 100%; }
.net-lines line {
  stroke: var(--cyan);
  stroke-width: 1;
  stroke-opacity: .5;
  stroke-dasharray: 6 6;
  animation: dash 12s linear infinite;
}
.net-nodes circle { fill: var(--cyan); animation: pulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.net-nodes circle:nth-child(2n) { animation-delay: 1s; }
.net-nodes circle:nth-child(3n) { animation-delay: 2s; }
@keyframes dash { to { stroke-dashoffset: -120; } }
@keyframes pulse { 50% { transform: scale(1.4); opacity: .6; } }

.hero-inner { position: relative; padding-top: var(--header-h); }
.hero-label {
  margin: 0 0 16px;
  font-size: .9rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 700;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: .02em; }
.hero-text { margin: 28px 0 40px; font-size: 1.05rem; color: rgba(255, 255, 255, .85); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 16px; }

/* ===== セクション共通 ===== */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin-bottom: 56px; }
.section-label {
  margin: 0 0 8px;
  font-size: .85rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 700;
}
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy); }
.section-lead { margin: 16px auto 0; max-width: 640px; color: var(--muted); text-wrap: balance; }

/* ===== 自己紹介 ===== */
.about-grid { max-width: 760px; margin: 0 auto; }
.about-text h3 { font-size: 1.5rem; color: var(--navy); margin-bottom: 20px; }
.about-text h3 small { display: block; font-size: .9rem; color: var(--muted); font-weight: 500; margin-top: 4px; }
.about-text p { margin: 0 0 1.2em; }
.tags { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .85rem;
  color: var(--navy);
}

/* ===== サービス ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 32px;
  box-shadow: 0 4px 20px rgba(15, 42, 71, .06);
  transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(15, 42, 71, .12); }
.card-new { border: 2px solid var(--cyan); }
.badge {
  position: absolute; top: 20px; right: 20px;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--cyan);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.card-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  margin-bottom: 24px;
}
.card-icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.2rem; color: var(--navy); margin-bottom: 12px; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: .95rem; }
.card ul { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .9rem; }
.card li { padding-left: 1.2em; position: relative; }
.card li::before { content: ""; position: absolute; left: 0; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); }

/* ===== 実績 ===== */
.works-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.work {
  padding: 36px;
  border-radius: var(--radius);
  border-left: 4px solid var(--blue);
  background: var(--bg-alt);
}
.work h3 { color: var(--navy); font-size: 1.15rem; margin-bottom: 12px; }
.work p { margin: 0; color: var(--muted); }
.note { margin: 24px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }

/* ===== ご依頼の流れ ===== */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.flow li {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.flow li:not(:last-child)::after {
  content: "";
  position: absolute; right: -12px; top: 50%;
  width: 8px; height: 8px;
  border-top: 2px solid var(--cyan); border-right: 2px solid var(--cyan);
  transform: translateY(-50%) rotate(45deg);
}
.flow-num { display: block; font-size: 1.6rem; font-weight: 700; color: var(--cyan); line-height: 1; margin-bottom: 12px; }
.flow h3 { font-size: 1rem; color: var(--navy); margin-bottom: 8px; }
.flow p { margin: 0; font-size: .85rem; color: var(--muted); }

/* ===== お問い合わせ ===== */
.contact { background: linear-gradient(135deg, var(--navy), #17406b); color: #fff; text-align: center; }
.contact h2 { color: #fff; margin-bottom: 20px; }
.contact .section-label { color: var(--cyan); }
.contact-inner > p { margin: 0 0 36px; color: rgba(255, 255, 255, .85); }
.contact .contact-note { margin: 20px 0 0; font-size: .85rem; color: rgba(255, 255, 255, .6); }

/* 問い合わせフォーム */
.contact-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 700; font-size: .95rem; margin-bottom: 6px; color: var(--navy); }
.req, .opt {
  display: inline-block;
  margin-left: 8px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: .72rem;
  font-weight: 700;
  vertical-align: 2px;
}
.req { background: #e5484d; color: #fff; }
.opt { background: var(--line); color: var(--muted); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #c8d2dd;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .2);
}
.form-privacy { margin: 0 0 24px; font-size: .82rem; color: var(--muted); line-height: 1.7; }
.form-submit { text-align: center; }
.form-submit .btn { border: 0; cursor: pointer; font-family: inherit; }
/* 迷惑メール対策の入力欄は画面に出さない */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 送信完了ページ */
.thanks-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--bg-alt); }
.thanks-page .site-header { position: static; background: #fff; box-shadow: 0 1px 0 var(--line); }
.thanks-page .logo { color: var(--navy); }
.thanks { flex: 1; display: grid; place-items: center; padding: 80px 0; text-align: center; }
.thanks h1 { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--navy); margin-bottom: 20px; }
.thanks p { margin: 0 0 36px; color: var(--muted); }

/* ===== フッター ===== */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .6); text-align: center; padding: 24px 0; font-size: .85rem; }
.site-footer p { margin: 0; }

/* ===== スクロールで表示 ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s, transform .8s; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .net-lines line, .net-nodes circle { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===== タブレット ===== */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
  .flow { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .flow li { display: grid; grid-template-columns: 56px 1fr; text-align: left; align-items: center; column-gap: 12px; }
  .flow-num { grid-row: span 2; margin: 0; }
  .flow li:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -12px; transform: translateX(-50%) rotate(135deg); }
}

/* ===== スマホ ===== */
@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .container { padding: 0 16px; }
  .pc-only { display: none; }
  .sp-only { display: inline; }
  .section { padding: 80px 0; }

  /* backdrop-filter があると全画面メニュー（position: fixed）がヘッダーの高さに収まってしまうため外す */
  .site-header.scrolled { backdrop-filter: none; background: #fff; }
  .menu-toggle { display: block; z-index: 2; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
  }
  .nav a { color: var(--text); font-size: 1.15rem; }
  .menu-open .nav { opacity: 1; visibility: visible; }
  .menu-open .logo { color: var(--navy); position: relative; z-index: 2; }

  .work { padding: 28px 24px; }
  .btn-large { font-size: 1rem; padding: 16px 28px; }
  .contact-form { padding: 28px 20px; }
}
