/* ============================================
   サポニャン リニューアル プロトタイプ
   Palette:
     ink    #1B2B4B  (brand navy)
     teal   #2E7FA6  (brand teal)
     sky    #8EC9E4
     mist   #F4F8FA  (bg, blue-biased white)
     warm   #F09F54  (CTA accent / paw)
   ============================================ */
:root {
  --ink: #1b2b4b;
  --teal: #2e7fa6;
  --teal-deep: #226687;
  --sky: #8ec9e4;
  --sky-soft: #dceef7;
  --mist: #f4f8fa;
  --white: #ffffff;
  --warm: #f09f54;
  --warm-deep: #e0883a;
  --text: #2a3550;
  --text-soft: #5b6a85;
  --radius: 20px;
  --shadow-sm: 0 2px 10px rgba(27, 43, 75, .07);
  --shadow-md: 0 10px 30px rgba(27, 43, 75, .12);
  --font-display: "M PLUS Rounded 1c", sans-serif;
  --font-body: "Noto Sans JP", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  line-height: 1.85;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); text-wrap: balance; }
.sp { display: none; }
@media (max-width: 640px) { .sp { display: inline; } }

/* ---------- スクロール進捗（猫が歩く） ---------- */
.progress-track {
  position: fixed; top: 0; left: 0; right: 0; height: 5px;
  background: transparent; z-index: 1001;
}
.progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--teal), var(--sky));
  border-radius: 0 3px 3px 0;
}
.progress-cat {
  position: absolute; top: 2px; left: 0;
  font-size: 14px; transform: translateX(-50%) scaleX(-1);
  transition: none; filter: hue-rotate(160deg) saturate(.6);
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow .3s, background .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); background: rgba(255, 255, 255, .92); }
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 10px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 46px; height: 46px; object-fit: contain; transition: transform .3s; }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.brand-sub { font-size: .68rem; color: var(--text-soft); letter-spacing: .05em; }
.global-nav { display: flex; align-items: center; gap: 26px; }
.global-nav a {
  font-size: .92rem; font-weight: 500; color: var(--ink); position: relative; padding: 4px 0;
}
.global-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--sky));
  border-radius: 2px; transform: scaleX(0); transform-origin: right; transition: transform .3s;
}
.global-nav a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta {
  background: var(--ink); color: #fff !important; padding: 9px 20px !important; border-radius: 999px;
  transition: background .3s, transform .2s;
}
.nav-cta:hover { background: var(--teal); transform: translateY(-1px); }
.nav-toggle { display: none; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  padding: 14px 30px; border-radius: 999px; transition: transform .25s, box-shadow .25s, background .25s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--warm), var(--warm-deep));
  color: #fff; box-shadow: 0 6px 18px rgba(224, 136, 58, .35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(224, 136, 58, .45); }
.btn-primary .btn-paw { transition: transform .3s; }
.btn-primary:hover .btn-paw { transform: rotate(20deg) scale(1.2); }
.btn-ghost {
  border: 2px solid var(--ink); color: var(--ink); background: transparent;
}
.btn-ghost:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
.btn-lg { font-size: 1.15rem; padding: 18px 42px; }

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(160deg, #fdfeff 0%, var(--sky-soft) 55%, #cfe7f3 100%);
  padding: 130px 24px 90px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5;
}
.blob-1 { width: 480px; height: 480px; background: var(--sky); top: -120px; right: -80px; animation: blobFloat 14s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; background: #bfe0f0; bottom: -140px; left: -100px; animation: blobFloat 18s ease-in-out infinite reverse; }
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 30px) scale(1.08); }
}
.float-icon {
  position: absolute; font-size: 28px; opacity: .35;
  animation: iconFloat 8s ease-in-out infinite;
}
.fi-1 { top: 18%; left: 6%; animation-delay: 0s; }
.fi-2 { top: 12%; left: 42%; animation-delay: -2s; font-size: 34px; }
.fi-3 { top: 30%; right: 8%; animation-delay: -4s; }
.fi-4 { bottom: 28%; left: 12%; animation-delay: -1s; }
.fi-5 { bottom: 20%; right: 20%; animation-delay: -5s; }
.fi-6 { top: 55%; left: 48%; animation-delay: -3s; font-size: 24px; }
@keyframes iconFloat {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-22px) rotate(6deg); }
}
.hero-inner {
  position: relative; max-width: 1180px; margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center;
}
.hero-eyebrow {
  display: inline-block; font-weight: 700; font-size: .85rem; letter-spacing: .12em;
  color: var(--teal-deep); background: #fff; border: 1.5px solid var(--sky);
  padding: 6px 18px; border-radius: 999px; margin-bottom: 22px;
  opacity: 0; animation: fadeUp .7s .1s forwards;
}
.hero-title {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.32; margin-bottom: 24px;
}
.hero-title .line { display: block; opacity: 0; animation: fadeUp .7s forwards; }
.hero-title .line:nth-child(1) { animation-delay: .25s; }
.hero-title .line:nth-child(2) { animation-delay: .45s; }
.hero-title .line:nth-child(3) { animation-delay: .65s; }
.hero-title .accent {
  background: linear-gradient(120deg, var(--teal) 20%, var(--teal-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-lead {
  max-width: 34em; color: var(--text-soft); font-size: 1.02rem; margin-bottom: 34px;
  opacity: 0; animation: fadeUp .7s .85s forwards;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; opacity: 0; animation: fadeUp .7s 1.05s forwards; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-visual { display: flex; justify-content: center; }
.hero-cat-wrap { position: relative; width: min(420px, 90%); }
.hero-cat {
  border-radius: 32px; box-shadow: var(--shadow-md);
  opacity: 0; animation: catIn 1s .5s cubic-bezier(.2, .9, .3, 1.2) forwards;
}
@keyframes catIn {
  from { opacity: 0; transform: translateY(40px) rotate(3deg) scale(.92); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}
.hero-badge {
  position: absolute; background: #fff; border-radius: 999px;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem; color: var(--ink);
  padding: 8px 18px; box-shadow: var(--shadow-sm);
  opacity: 0; animation: fadeUp .6s forwards;
}
.badge-1 { top: -14px; right: 6%; animation-delay: 1.3s; }
.badge-2 { bottom: -12px; left: 4%; animation-delay: 1.5s; }
.hero-wave { position: absolute; bottom: -1px; left: 0; right: 0; line-height: 0; }
.hero-wave svg { width: 100%; height: 60px; }

/* ---------- セクション共通 ---------- */
.section { padding: 96px 24px; }
.container { max-width: 1180px; margin: 0 auto; }
.section-eyebrow {
  font-family: var(--font-display); font-weight: 800; font-size: .8rem;
  letter-spacing: .22em; color: var(--teal); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin-bottom: 18px; position: relative;
}
.section-title::after {
  content: ""; display: block; width: 52px; height: 4px; margin-top: 14px;
  border-radius: 4px; background: linear-gradient(90deg, var(--teal), var(--sky));
}
.section-lead { color: var(--text-soft); margin-bottom: 8px; }

/* リビール */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 強み ---------- */
.about { background: var(--mist); }
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 44px;
}
.feature-card {
  background: #fff; border-radius: var(--radius); padding: 38px 30px;
  box-shadow: var(--shadow-sm); transition: transform .35s, box-shadow .35s, opacity .7s;
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: "🐾"; position: absolute; right: -6px; bottom: -10px; font-size: 74px;
  opacity: .06; transform: rotate(-18deg); transition: transform .5s, opacity .5s;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.feature-card:hover::before { transform: rotate(0deg) scale(1.15); opacity: .12; }
.feature-icon {
  width: 120px; height: 120px; margin-bottom: 20px;
  border-radius: 50%; overflow: hidden; background: var(--sky-soft);
  transition: transform .4s;
}
.feature-icon img { width: 100%; height: 100%; object-fit: cover; }
.feature-card:hover .feature-icon { transform: scale(1.06) rotate(-3deg); }
@media (max-width: 820px) { .feature-icon { margin-inline: auto; } }
.feature-card h3 { font-size: 1.18rem; font-weight: 800; margin-bottom: 12px; }
.feature-card p { font-size: .93rem; color: var(--text-soft); }

/* ---------- サービス ---------- */
.service-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px;
}
.service-card {
  background: #fff; border: 1.5px solid #e4edf3; border-radius: var(--radius);
  padding: 24px 22px 26px; transition: transform .35s, box-shadow .35s, border-color .35s, opacity .7s;
}
.service-card:hover {
  transform: translateY(-8px); box-shadow: var(--shadow-md); border-color: var(--sky);
}
.service-img {
  border-radius: 14px; overflow: hidden; background: var(--mist); margin-bottom: 18px;
  aspect-ratio: 1 / 1; display: grid; place-items: center;
}
.service-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.service-card:hover .service-img img { transform: scale(1.07) rotate(1deg); }
.service-card h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.service-card p { font-size: .85rem; color: var(--text-soft); line-height: 1.75; }

/* ---------- 流れ ---------- */
.flow { background: var(--mist); }
.flow-list {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 44px;
  counter-reset: flow;
}
.flow-step {
  background: #fff; border-radius: var(--radius); padding: 34px 26px; position: relative;
  box-shadow: var(--shadow-sm); transition: transform .35s, box-shadow .35s, opacity .7s;
}
.flow-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.flow-num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep)); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; margin-bottom: 16px;
}
.flow-step h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: 10px; }
.flow-step p { font-size: .87rem; color: var(--text-soft); }
.flow-step:not(:last-child)::after {
  content: "»"; position: absolute; right: -18px; top: 50%; transform: translateY(-50%);
  color: var(--sky); font-size: 22px; font-weight: 700;
}

/* ---------- 会社概要 ---------- */
.company-card {
  background: #fff; border: 1.5px solid #e4edf3; border-radius: var(--radius);
  padding: 20px 34px; margin-top: 40px; box-shadow: var(--shadow-sm);
}
.company-table { width: 100%; border-collapse: collapse; }
.company-table th, .company-table td { padding: 18px 8px; border-bottom: 1px solid #edf3f7; text-align: left; }
.company-table tr:last-child th, .company-table tr:last-child td { border-bottom: none; }
.company-table th { width: 140px; color: var(--teal-deep); font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.company-table td { color: var(--text); }

/* ---------- CTA ---------- */
.cta-band {
  background: linear-gradient(140deg, var(--ink) 0%, #223a63 55%, var(--teal-deep) 100%);
  padding: 100px 24px; text-align: center; position: relative; overflow: hidden;
}
.cta-band::before, .cta-band::after {
  content: "🐾"; position: absolute; font-size: 120px; opacity: .07; pointer-events: none;
}
.cta-band::before { left: 6%; top: 12%; transform: rotate(-20deg); }
.cta-band::after { right: 7%; bottom: 10%; transform: rotate(15deg); }
.cta-inner { max-width: 720px; margin: 0 auto; }
.cta-cat {
  width: 110px; margin: 0 auto 22px; border-radius: 26px; background: #fff; padding: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 18px; }
.cta-band p { color: #c6d8ea; margin-bottom: 36px; font-size: .97rem; }

/* ---------- フッター ---------- */
.site-footer { background: #101c33; padding: 56px 24px 32px; }
.footer-inner { max-width: 1180px; margin: 0 auto; text-align: center; }
.footer-logo { width: 130px; margin: 0 auto 26px; border-radius: 18px; background: #fff; padding: 10px; }
.footer-nav { display: flex; justify-content: center; gap: 28px; flex-wrap: wrap; margin-bottom: 30px; }
.footer-nav a { color: #9fb2cc; font-size: .88rem; transition: color .3s; }
.footer-nav a:hover { color: #fff; }
.copyright { color: #64789a; font-size: .78rem; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 1024px) {
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-list { grid-template-columns: repeat(2, 1fr); }
  .flow-step:nth-child(2)::after { display: none; }
}
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-cat-wrap { width: min(340px, 80%); }
  .section-title::after { margin-inline: auto; }
  .about .container, .services .container, .flow .container, .company .container { text-align: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .global-nav {
    position: fixed; inset: 0; background: rgba(255, 255, 255, .97);
    flex-direction: column; justify-content: center; font-size: 1.2rem;
    transform: translateX(100%); transition: transform .35s;
  }
  .global-nav.open { transform: translateX(0); }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; background: none; border: none;
    padding: 8px; cursor: pointer; z-index: 1002;
  }
  .nav-toggle span { width: 26px; height: 3px; background: var(--ink); border-radius: 2px; transition: .3s; }
  .nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
@media (max-width: 640px) {
  .service-grid { grid-template-columns: 1fr; }
  .flow-list { grid-template-columns: 1fr; }
  .flow-step::after { display: none !important; }
  .company-card { padding: 8px 20px; }
  .company-table th { width: 96px; font-size: .85rem; }
  .company-table td { font-size: .9rem; }
}

/* ---------- キャプチャ検証モード（?capture付きURL） ---------- */
body.capture .hero { min-height: 880px; }
body.capture .reveal,
body.capture .hero-title .line, body.capture .hero-lead, body.capture .hero-actions,
body.capture .hero-eyebrow, body.capture .hero-cat, body.capture .hero-badge {
  opacity: 1 !important; transform: none !important; animation: none !important;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .hero-title .line, .hero-lead, .hero-actions, .hero-eyebrow, .hero-cat, .hero-badge { opacity: 1; }
}
