/* ===== 変数 ===== */
:root {
  --navy: #003F98;
  --navy-deep: #002A66;
  --navy-tint: #EDF2FA;
  --amber: #FFB400;
  --amber-deep: #C98600;
  --ink: #2A313B;
  --ink-soft: #5C6675;
  --paper: #FFFFFF;
  --line: #D9E0EA;
  --line-soft: #E8EDF4;
  --mist: #F6F8FB;

  --s1: #3B82C4;
  --s2: #2FA8A0;
  --s3: #6BA83C;
  --s4: #D9A21B;
  --s5: #E08A00;
}

/* ===== リセット =====
   既存ページに影響させないため、トップページとヘッダー/フッターに限定する */
.home,
.home *, .home *::before, .home *::after,
.site-header *, .site-header *::before, .site-header *::after,
.site-footer *, .site-footer *::before, .site-footer *::after {
  box-sizing: border-box;
}

body.home {
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

.site-header,
.site-footer {
  font-family: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.7;
}

.home a,
.site-header a,
.site-footer a { color: inherit; text-decoration: none; }

.home img { max-width: 100%; }

.home h1, .home h2, .home h3, .home p, .home ul, .home ol,
.site-header p, .site-header ul,
.site-footer h3, .site-footer p, .site-footer ul { margin: 0; }

.home ul, .home ol,
.site-header ul,
.site-footer ul { padding: 0; list-style: none; }

.home :focus-visible,
.site-header :focus-visible,
.site-footer :focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ===== 既存 style.css の打ち消し =====
   header / footer / nav が要素セレクタで指定されているため、明示的に上書きする */
.site-header { box-shadow: none; }
.site-header .header-bar { max-width: none; }

.global-nav {
  display: block;
  justify-content: normal;
  background-color: transparent;
}
.global-nav a::after,
.global-nav a:not(:last-child)::after { content: none; display: none; }

.site-footer { text-align: left; }
.home .site-footer { margin-top: 0; }
body:not(.home) .site-footer { margin-top: 72px; }

.home a:hover,
.site-header a:hover,
.site-footer a:hover { opacity: 1; }

.wrap { width: min(1100px, 90%); margin-inline: auto; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.logo {
  font-weight: 900;
  font-size: 19px;
  color: var(--navy);
  letter-spacing: .06em;
  display: block;
}
.site-header .logo img {
  display: block;
  height: 36px;
  width: auto;
}
@media (max-width: 620px) {
  .site-header .logo img { height: 30px; }
}
@media (max-width: 380px) {
  .site-header .logo img { height: 26px; }
}
.header-actions { display: flex; align-items: center; gap: 22px; }
.header-tel { line-height: 1.25; text-align: right; }
.header-tel .label {
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .06em;
}
.header-tel .num {
  font-size: 23px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-block;
  font-weight: 700;
  border-radius: 3px;
  padding: 13px 26px;
  line-height: 1.4;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--amber); color: #33270A; }
.btn-primary:hover { background: #F5AC00; }
.btn-outline { border: 1px solid var(--line); color: var(--navy); }
.btn-outline:hover { background: var(--mist); border-color: #b9c6dc; }

.link-arrow {
  display: inline-block;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: opacity .15s ease;
}
.link-arrow:hover { opacity: .65; }
.link-arrow.on-dark { color: #fff; }

.global-nav { border-top: 1px solid var(--line-soft); }
.global-nav ul { display: flex; flex-wrap: wrap; }
.global-nav a {
  display: block;
  padding: 13px 22px 13px 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  position: relative;
}
.global-nav a:hover { color: var(--navy); }

/* ---------- ヒーロー ---------- */
.hero {
  background: var(--navy-deep);
  color: #fff;
  padding: 92px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  color: rgba(255,255,255,.7);
  margin-bottom: 26px;
}

.hero h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: .02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 62%, rgba(255,180,0,.5) 62%);
  padding-inline: 2px;
}

.hero-sub {
  margin-top: 26px;
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 700;
  line-height: 1.7;
  color: #fff;
  max-width: 26em;
}
.hero-lead {
  margin-top: 14px;
  font-size: 16px;
  line-height: 1.9;
  color: rgba(255,255,255,.76);
  max-width: 30em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-top: 38px;
}

.hero-copy { min-width: 0; }
.hero h1 span { display: block; }

/* 読み込み直後にすべて見えるようにする（待たせない） */
.hero-inner { animation: hero-in .45s ease-out both; }
@keyframes hero-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- MV右の図：もつれた輪 → 一本の円 ---------- */
.concept { width: 100%; }
.concept svg { display: block; width: 100%; height: auto; overflow: visible; }
.cc-tangle {
  fill: none;
  stroke: rgba(255, 255, 255, .55);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-clean {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-arrow {
  fill: none;
  stroke: rgba(255, 255, 255, .78);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- セクション共通 ---------- */
.section { padding: 92px 0; border-top: 1px solid var(--line-soft); }
.section-mist { background: var(--mist); }

.section-head { margin-bottom: 52px; }
.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.55;
  letter-spacing: .02em;
}
.section-head p {
  margin-top: 22px;
  color: var(--ink-soft);
  max-width: 44em;
}

/* ---------- モットー ---------- */
.motto { border-top: 1px solid var(--line); }
.motto li {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.motto .head { display: flex; flex-direction: column; gap: 4px; }
.motto .en {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .22em;
  color: var(--amber-deep);
}
.motto h3 {
  font-size: 21px;
  font-weight: 900;
  color: var(--navy);
  line-height: 1.5;
}
.motto p { color: var(--ink-soft); }

/* ---------- こんな状態になっていませんか ---------- */
.worry {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 44px;
  border-top: 1px solid var(--line);
}
.worry li {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 19px 2px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  line-height: 1.7;
}
.worry li::before {
  content: "✓";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-tint);
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}
.worry-tail {
  margin-top: 26px;
  color: var(--ink-soft);
}

/* ---------- 対応できるツール ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  padding: 17px 18px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.45;
  transition: border-color .15s ease, background-color .15s ease;
}
.tool-card:hover { border-color: #b9c6dc; background: var(--mist); }
.tool-card svg {
  flex: none;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tool-card.sub {
  border-style: dashed;
  background: transparent;
  color: var(--ink-soft);
}
.tool-card.sub svg { stroke: var(--ink-soft); }
.tools-note { color: var(--ink-soft); font-size: 15px; }

/* ---------- サービス ---------- */
.svc-block { margin-top: 52px; }
.svc-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--navy);
}
.svc-name { font-size: 20px; font-weight: 900; color: var(--navy); line-height: 1.4; }
.svc-desc { font-size: 15px; color: var(--ink-soft); }
.svc-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  column-gap: 32px;
}
.svc-list li {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 700;
}

/* ---------- 進め方 ---------- */
.flow { position: relative; padding-top: 26px; }
.flow-rail {
  position: absolute;
  top: 31px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--line);
  --cycle: 8s;
}
.flow-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--s1), var(--s2) 25%, var(--s3) 50%, var(--s4) 75%, var(--s5));
  background-size: 780px 100%;
  animation: flow-fill var(--cycle) cubic-bezier(.45,.05,.3,1) infinite;
}
.flow-mark {
  position: absolute;
  top: 50%;
  left: 0;
  width: 22px; height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
  color: var(--navy);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  animation: flow-move var(--cycle) cubic-bezier(.45,.05,.3,1) infinite;
}
@keyframes flow-fill {
  0%   { width: 0;    opacity: 1; }
  74%  { width: 100%; opacity: 1; }
  94%  { width: 100%; opacity: 1; }
  100% { width: 100%; opacity: 0; }
}
@keyframes flow-move {
  0%   { left: 0;    opacity: 1; }
  74%  { left: 100%; opacity: 1; }
  94%  { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.flow-steps li { padding: 0 14px; text-align: center; }
.flow-steps .dot {
  display: block;
  width: 11px; height: 11px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--line);
  animation-duration: 8s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.flow-steps h3 {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 900;
  color: var(--ink);
  animation-duration: 8s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}
.flow-steps p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-soft);
  text-align: left;
}

.flow-steps li:nth-child(1) { --c: var(--s1); }
.flow-steps li:nth-child(2) { --c: var(--s2); }
.flow-steps li:nth-child(3) { --c: var(--s3); }
.flow-steps li:nth-child(4) { --c: var(--s4); }
.flow-steps li:nth-child(5) { --c: var(--s5); }

.flow-steps li:nth-child(1) .dot { animation-name: dot-1; }
.flow-steps li:nth-child(2) .dot { animation-name: dot-2; }
.flow-steps li:nth-child(3) .dot { animation-name: dot-3; }
.flow-steps li:nth-child(4) .dot { animation-name: dot-4; }
.flow-steps li:nth-child(5) .dot { animation-name: dot-5; }
.flow-steps li:nth-child(1) h3 { animation-name: ttl-1; }
.flow-steps li:nth-child(2) h3 { animation-name: ttl-2; }
.flow-steps li:nth-child(3) h3 { animation-name: ttl-3; }
.flow-steps li:nth-child(4) h3 { animation-name: ttl-4; }
.flow-steps li:nth-child(5) h3 { animation-name: ttl-5; }

@keyframes dot-1 { 0%, 94% { background: var(--c); } 94.01%, 100% { background: var(--line); } }
@keyframes dot-2 { 0%, 18% { background: var(--line); } 18.01%, 94% { background: var(--c); } 94.01%, 100% { background: var(--line); } }
@keyframes dot-3 { 0%, 37% { background: var(--line); } 37.01%, 94% { background: var(--c); } 94.01%, 100% { background: var(--line); } }
@keyframes dot-4 { 0%, 55% { background: var(--line); } 55.01%, 94% { background: var(--c); } 94.01%, 100% { background: var(--line); } }
@keyframes dot-5 { 0%, 74% { background: var(--line); } 74.01%, 94% { background: var(--c); } 94.01%, 100% { background: var(--line); } }

@keyframes ttl-1 { 0%, 94% { color: var(--c); } 94.01%, 100% { color: var(--ink); } }
@keyframes ttl-2 { 0%, 18% { color: var(--ink); } 18.01%, 94% { color: var(--c); } 94.01%, 100% { color: var(--ink); } }
@keyframes ttl-3 { 0%, 37% { color: var(--ink); } 37.01%, 94% { color: var(--c); } 94.01%, 100% { color: var(--ink); } }
@keyframes ttl-4 { 0%, 55% { color: var(--ink); } 55.01%, 94% { color: var(--c); } 94.01%, 100% { color: var(--ink); } }
@keyframes ttl-5 { 0%, 74% { color: var(--ink); } 74.01%, 94% { color: var(--c); } 94.01%, 100% { color: var(--ink); } }

/* ---------- ピックアップ ---------- */
.pickup { border-top: 1px solid var(--line); }
.pickup > li { border-bottom: 1px solid var(--line); }
.pickup a {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 34px 8px;
  transition: background-color .15s ease;
}
.pickup a:hover { background: var(--mist); }
.pickup .tag {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .06em;
  color: var(--navy);
}
.pickup h3 {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: 8px;
}
.pickup p { font-size: 15px; color: var(--ink-soft); }
.pickup .go { color: var(--navy); font-weight: 900; }

/* ---------- お知らせ・記事 ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.two-col h2 {
  font-size: 21px;
  font-weight: 900;
  color: var(--navy);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--navy);
  margin-bottom: 8px;
}
.list-plain li { border-bottom: 1px solid var(--line-soft); }
.list-plain a { display: block; padding: 18px 4px; transition: color .15s ease; }
.list-plain a:hover { color: var(--navy); }
.list-plain .meta {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.list-plain .ttl { font-weight: 700; line-height: 1.7; }
.more-line { margin-top: 26px; }

/* ---------- CTA ---------- */
.cta {
  background: var(--navy-deep);
  color: #fff;
  padding: 84px 0;
}
.cta h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 900;
  line-height: 1.6;
}
.cta p { margin-top: 20px; color: rgba(255,255,255,.85); max-width: 44em; }
.cta-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}
.cta-tel { line-height: 1.25; }
.cta-tel .label { font-size: 12px; letter-spacing: .06em; color: rgba(255,255,255,.75); }
.cta-tel .num {
  display: block;
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* ---------- フッター ---------- */
.site-footer {
  background: #1C232D;
  color: rgba(255,255,255,.75);
  padding: 56px 0 0;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 44px;
  padding-bottom: 44px;
}
.site-footer .logo { color: #fff; display: block; margin-bottom: 16px; }
.site-footer h3 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  margin-bottom: 14px;
}
.footer-links li { padding: 5px 0; }
.footer-links a:hover { color: var(--amber); }
.copyright {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 0;
  font-size: 12px;
  color: rgba(255,255,255,.55);
}

/* ---------- スクロール表示（Magic UI: Blur Fade 相当） ---------- */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 940px) {
  .roll { width: 230px; height: 230px; margin-top: -115px; }
  @keyframes roll-across {
    0%, 16.7%   { transform: translate(4vw, 0) rotate(0deg);    opacity: .38; }
    66.7%, 100% { transform: translate(54vw, 0) rotate(398deg); opacity: .82; }
  }
  .motto li { grid-template-columns: 1fr; gap: 10px; }
  .flow-steps { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .flow-rail { display: none; }
  .flow-steps .dot, .flow-steps h3 { animation: none; }
  .flow-steps .dot { background: var(--c); }
  .flow-steps h3 { color: var(--c); }
  .flow-steps li { text-align: left; padding: 0; }
  .flow-steps .dot { margin: 0; }
  .pickup a { grid-template-columns: 1fr; gap: 12px; padding: 26px 4px; }
  .pickup .go { display: none; }
  .two-col { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .header-tel { display: none; }
}

@media (max-width: 620px) {
  .tool-grid { grid-template-columns: 1fr; gap: 10px; }
  .tool-card { padding: 14px 16px; }
  .section { padding: 62px 0; }
  .hero { padding: 62px 0 70px; }
  .roll { width: 180px; height: 180px; margin-top: -90px; opacity: .3; }
  .global-nav ul { overflow-x: auto; flex-wrap: nowrap; }
  .global-nav a { white-space: nowrap; padding-right: 18px; }
  .flow-steps { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .hero-inner,
  .flow-fill, .flow-mark, .flow-steps .dot, .flow-steps h3 { animation: none; }
  .hero-inner { opacity: 1; transform: none; }
  .flow-fill { width: 100%; }
  .flow-mark { left: 100%; }
  .flow-steps .dot { background: var(--c); }
  .flow-steps h3 { color: var(--c); }
  .reveal { opacity: 1; transform: none; }
}


/* ===== 既存ページとの調整 ===== */

/* 下層ページの見出し帯。ヘッダーを固定配置から外したぶん、高さを詰める */
.archive-visual {
  height: auto;
  min-height: 160px;
  padding: 38px 0;
}
@media (max-width: 620px) {
  .archive-visual { min-height: 120px; padding: 26px 0; }
  body:not(.home) .site-footer { margin-top: 48px; }
}

/* 会社概要などの表。モバイルで横にはみ出さないようにする */
@media (max-width: 620px) {
  .main-content th {
    white-space: normal;
    width: 32%;
  }
  .main-content th,
  .main-content td { padding: 10px; }
}

/* ===== モバイルのヘッダー =====
   ボタンの文言が長く、ロゴと並ぶと画面幅を超えてしまうため詰める */
@media (max-width: 620px) {
  .header-bar { gap: 12px; padding: 12px 0; }
  .logo { font-size: 17px; letter-spacing: .04em; }
  .site-header .btn-primary {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }
  .btn-tail { display: none; }
}

@media (max-width: 380px) {
  .logo { font-size: 15px; }
  .site-header .btn-primary { padding: 9px 12px; font-size: 12px; }
}

/* ===== モバイルのヒーロー =====
   輪の移動先が画面外に出てしまうため、移動量を詰める。
   あわせて縦位置を下げ、見出しと重ならないようにする */
@media (max-width: 620px) {
  .roll {
    top: 72%;
    width: 172px;
    height: 172px;
    margin-top: -86px;
  }
  @keyframes roll-across {
    0%, 16.7%   { transform: translate(4vw, 0) rotate(0deg);    opacity: .34; }
    66.7%, 100% { transform: translate(46vw, 0) rotate(398deg); opacity: .62; }
  }
  .hero-inner { min-height: 300px; }
}
