/* =========================================================
   PilExperience FAQ - frontend
   ========================================================= */

.pil-home-section {
  position: relative;
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
  padding-inline: clamp(1.25rem, 4vw, 4rem);
}

.pil-section-head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  align-items: start;
  max-width: 980px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  font-family: "Roboto", sans-serif;
}

.pil-section-head__mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(54px, 6vw, 72px);
  height: clamp(54px, 6vw, 72px);
  color: #ffffff;
  background: #004a8d;
  border-radius: 18px 18px 18px 4px;
  transform: rotate(-4deg);
  box-shadow: 8px 8px 0 rgba(0, 74, 141, 0.14);
}

.pil-section-head__mark::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(0, 74, 141, 0.35);
  border-radius: 22px 22px 22px 6px;
}

.pil-section-head__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  width: 2px;
  height: 62px;
  background: repeating-linear-gradient(
    to bottom,
    #004a8d 0 8px,
    transparent 8px 15px
  );
  transform: translateX(-50%);
  opacity: 0.55;
}

.pil-section-head__mark svg {
  width: clamp(24px, 2.6vw, 32px);
  height: clamp(24px, 2.6vw, 32px);
  stroke-width: 2.1;
}

.pil-section-head__content {
  position: relative;
  padding-top: 0.2rem;
}

.pil-section-head__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: #004a8d;
  font-size: clamp(0.72rem, 0.68rem + 0.15vw, 0.86rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pil-section-head__kicker::after {
  content: "";
  width: clamp(42px, 5vw, 72px);
  height: 2px;
  background: #004a8d;
  border-radius: 999px;
}

.pil-section-head__title {
  max-width: 820px;
  margin: 0;
  color: #161616;
  font-size: clamp(2rem, 4vw, 3.65rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.pil-section-head__title span {
  position: relative;
  display: inline-block;
  color: #004a8d;
  white-space: nowrap;
}

.pil-section-head__title span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.04em;
  width: 100%;
  height: 0.16em;
  background: rgba(0, 74, 141, 0.16);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left center;
}

.pil-section-head__text {
  max-width: 760px;
  margin: clamp(1rem, 2vw, 1.35rem) 0 0;
  color: rgba(22, 22, 22, 0.76);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  line-height: 1.65;
  font-weight: 400;
  text-wrap: pretty;
}

.pil-animate-section .pil-section-head__title,
.pil-animate-section .pil-section-head__text {
  opacity: 0;
  transform: translateY(14px);
}

.pil-animate-section .pil-section-head__title span {
  opacity: 0;
  transform: translateY(0.18em);
}

.pil-animate-section .pil-section-head__title span::after {
  transform: scaleX(0);
}

.pil-animate-section.is-visible .pil-section-head__title {
  animation: pilTitleReveal 0.75s ease-out 0.15s forwards;
}

.pil-animate-section.is-visible .pil-section-head__title span {
  animation: pilTitleWord 0.75s ease-out 0.4s forwards;
}

.pil-animate-section.is-visible .pil-section-head__title span::after {
  animation: pilTitleUnderline 1.1s ease-out 0.7s forwards;
}

.pil-animate-section.is-visible .pil-section-head__text {
  animation: pilTextReveal 0.85s ease-out 0.8s forwards;
}

.pil-faq-wrap {
  max-width: 980px;
  margin-inline: auto;
  font-family: "Roboto", sans-serif;
}

.pil-faq-list {
  display: grid;
  gap: 0.85rem;
}

.pil-faq-item {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 74, 141, 0.12);
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(0, 74, 141, 0.07);
}

.pil-faq-item__question {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: clamp(1rem, 2vw, 1.25rem);
  border: 0;
  background: transparent;
  color: #161616;
  text-align: left;
  cursor: pointer;
  font-family: "Roboto", sans-serif;
}

.pil-faq-item__question:hover,
.pil-faq-item__question:focus-visible {
  outline: none;
  background: rgba(0, 74, 141, 0.045);
}

.pil-faq-item__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #004a8d;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.pil-faq-item__title {
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.16rem);
  line-height: 1.35;
  font-weight: 800;
}

.pil-faq-item__icon {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 74, 141, 0.08);
}

.pil-faq-item__icon::before,
.pil-faq-item__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  background: #004a8d;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease;
}

.pil-faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.pil-faq-item__question[aria-expanded="true"] .pil-faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.pil-faq-item__answer-inner {
  padding: 0 clamp(1rem, 2vw, 1.25rem) clamp(1.1rem, 2vw, 1.35rem) calc(clamp(1rem, 2vw, 1.25rem) + 54px);
  color: rgba(22, 22, 22, 0.74);
  font-size: clamp(1rem, 0.96rem + 0.16vw, 1.08rem);
  line-height: 1.7;
}

.pil-faq-item__answer-inner > :first-child {
  margin-top: 0;
}

.pil-faq-item__answer-inner > :last-child {
  margin-bottom: 0;
}

.pil-faq-empty {
  padding: 1.25rem;
  border: 1px solid rgba(0, 74, 141, 0.12);
  border-radius: 18px;
  background: rgba(0, 74, 141, 0.045);
  color: rgba(22, 22, 22, 0.76);
}

.pil-animate-section .pil-faq-item {
  opacity: 0;
  transform: translateY(14px);
}

.pil-animate-section.is-visible .pil-faq-item {
  animation: pilTextReveal 0.65s ease-out forwards;
}

.pil-animate-section.is-visible .pil-faq-item:nth-child(1) { animation-delay: 0.85s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(2) { animation-delay: 0.95s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(3) { animation-delay: 1.05s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(4) { animation-delay: 1.15s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(5) { animation-delay: 1.25s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(6) { animation-delay: 1.35s; }
.pil-animate-section.is-visible .pil-faq-item:nth-child(n+7) { animation-delay: 1.45s; }

@keyframes pilTitleReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pilTitleWord {
  from { opacity: 0; transform: translateY(0.18em); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pilTitleUnderline {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes pilTextReveal {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 700px) {
  .pil-home-section {
    padding-block: 3.25rem;
    padding-inline: 1.35rem;
  }

  .pil-section-head {
    grid-template-columns: 1fr;
    gap: 1.15rem;
    margin-bottom: 2.4rem;
  }

  .pil-section-head__mark {
    width: 52px;
    height: 52px;
  }

  .pil-section-head__mark::after {
    display: none;
  }

  .pil-section-head__content {
    padding-top: 0;
  }

  .pil-section-head__kicker {
    margin-bottom: 0.85rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    line-height: 1.25;
  }

  .pil-section-head__title {
    font-size: clamp(2rem, 9.2vw, 2.75rem);
    line-height: 1.08;
  }

  .pil-section-head__title span {
    white-space: normal;
  }

  .pil-section-head__text {
    margin-top: 1.15rem;
    font-size: 1.02rem;
    line-height: 1.65;
  }

  .pil-faq-item {
    border-radius: 18px;
  }

  .pil-faq-item__question {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .pil-faq-item__number {
    width: 34px;
    height: 34px;
  }

  .pil-faq-item__answer-inner {
    padding-left: 1rem;
  }
}

@media (max-width: 420px) {
  .pil-home-section {
    padding-block: 2.85rem;
    padding-inline: 1.15rem;
  }

  .pil-section-head__title {
    font-size: clamp(1.85rem, 10vw, 2.35rem);
  }

  .pil-faq-item__question {
    grid-template-columns: 1fr auto;
  }

  .pil-faq-item__number {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pil-animate-section .pil-section-head__title,
  .pil-animate-section .pil-section-head__title span,
  .pil-animate-section .pil-section-head__title span::after,
  .pil-animate-section .pil-section-head__text,
  .pil-animate-section .pil-faq-item {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
