/* ===================== Base ===================== */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Noto Sans JP', sans-serif;
}

/* header shrink on scroll */
#site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.nav-link {
  position: relative;
  transition: color .25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0%;
  height: 2px;
  background: #E6511B;
  transition: width .25s ease;
}
.nav-link:hover {
  color: #E6511B;
}
.nav-link:hover::after {
  width: 100%;
}

/* ===================== Reveal on scroll ===================== */
.reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== Section titles ===================== */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
  color: #111827;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #E6511B, #7D1224);
}
@media (min-width: 768px) {
  .section-title { font-size: 2rem; }
}

/* ===================== Hero flow diagram ===================== */
.flow-step {
  min-width: 0;
}
.flow-icon {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: transform .3s ease;
}
@media (min-width: 768px) {
  .flow-icon { width: 56px; height: 56px; font-size: 20px; margin: 0 auto; }
}
.flow-step:hover .flow-icon {
  transform: scale(1.12);
}
.flow-arrow {
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0.6;
}
@media (min-width: 768px) {
  .flow-arrow { font-size: 16px; }
}
.flow-connector {
  padding: 0 2px;
}
@media (max-width: 767px) {
  .flow-connector { margin-left: 24px; margin-top: -6px; margin-bottom: -6px; }
}

/* animated counters get a subtle pop */
.counter {
  display: inline-block;
}

/* underline path animation for hero heading */
.underline-path {
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  animation: draw-underline 1.2s ease forwards 0.6s;
  overflow: visible;
}
@keyframes draw-underline {
  to { stroke-dashoffset: 0; }
}

/* ===================== Problem cards ===================== */
.problem-card {
  background: #fff;
  border: 1px solid #F3F4F6;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.problem-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(230,81,27,0.14);
  border-color: rgba(230,81,27,0.25);
}
.problem-icon {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #FFF1EA, #FBDCCB);
  color: #E6511B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 1.25rem;
  transition: transform .35s ease;
}
.problem-card:hover .problem-icon {
  transform: rotate(-8deg) scale(1.08);
}

/* ===================== Solution cards ===================== */
.solution-card {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem 1.75rem;
  border: 1px solid #F3F4F6;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform .35s ease, box-shadow .35s ease;
}
.solution-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 36px rgba(0,0,0,0.08);
}
.solution-badge {
  position: absolute;
  top: -12px;
  left: 1.5rem;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
}
.solution-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 1.25rem;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
  transition: transform .35s ease;
}
.solution-card:hover .solution-icon {
  transform: scale(1.1) rotate(3deg);
}
.solution-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: #111827;
  margin-bottom: 0.15rem;
  min-height: 1.4em;
}
.solution-sub {
  font-size: 0.78rem;
  color: #9CA3AF;
  font-weight: 600;
  margin-bottom: 1rem;
  min-height: 2.4em;
}
.solution-list {
  font-size: 0.8rem;
  color: #4B5563;
  line-height: 1.9;
}
.solution-list li {
  position: relative;
  padding-left: 1.1rem;
}
.solution-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #E6511B;
}
.solution-list {
  flex-grow: 1;
}

/* ===================== Plan cards ===================== */
.plan-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid #F3F4F6;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.plan-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 40px rgba(0,0,0,0.08);
}
.plan-number {
  position: absolute;
  top: 0.5rem;
  right: 1.25rem;
  font-size: 3rem;
  font-weight: 900;
  color: #F3F4F6;
  line-height: 1;
  z-index: 0;
}
.plan-icon {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: linear-gradient(135deg, #E6511B, #7D1224);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 18px rgba(230,81,27,0.28);
  transition: transform .35s ease;
}
.plan-card:hover .plan-icon {
  transform: scale(1.1);
}
.plan-title {
  font-weight: 800;
  font-size: 1.2rem;
  color: #111827;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}
.plan-desc {
  font-size: 0.88rem;
  color: #6B7280;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

/* ===================== Case cards ===================== */
.case-card {
  background: #fff;
  border: 1px solid #F3F4F6;
  border-radius: 1.25rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  transition: transform .35s ease, box-shadow .35s ease;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px rgba(0,0,0,0.07);
}

/* ===================== FAQ ===================== */
.faq-item {
  background: #fff;
  border: 1px solid #F3F4F6;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  color: #111827;
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
}
.faq-icon {
  transition: transform .3s ease;
  color: #E6511B;
  flex-shrink: 0;
  margin-left: 1rem;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 1.5rem;
  color: #6B7280;
  font-size: 0.92rem;
  line-height: 1.8;
}
.faq-item.open .faq-answer {
  max-height: 300px;
  padding: 0 1.5rem 1.5rem;
}

/* ===================== back to top ===================== */
#back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}
