html {
  scroll-behavior: smooth;
  color: #2D2D2D;
}

body {
  background-color: #f5f9ff;
}

.tab-btn,
.tab-btn *,
.tab-btn.is-active,
.tab-btn.is-active *,
.tab-btn[aria-pressed="true"],
.tab-btn[aria-pressed="true"] * {
  cursor: pointer !important;
}

/* Swiper dots */
.section1-pagination .swiper-pagination-bullet,.swiper-pagination-bullet{
  background-color: #d3e9fa !important;
  opacity: 1 !important;
}

.section1-pagination .swiper-pagination-bullet-active ,.swiper-pagination-bullet-active {
  background-color: #9acdfb !important;
}

.section2-diagonal::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: #BFE3FF;
  clip-path: polygon(0 100%, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
  pointer-events: none;
}

/* section2 固定底圖 */
.section2-fixed-bg {
  position: fixed;
  inset: 0;
  background: url("./images/section2-bg.png") center center / cover no-repeat;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 767px) {
  .section2-fixed-bg {
    background-image: url("./images/section2-bg-mb.png");
  }
  .section2-diagonal::after {
    clip-path: polygon(0 100%, 100% 60%, 100% 100%, 0 100%);
  }
}


.section2-phone,
.section2-title {
  will-change: transform, opacity;
}

/* section2 入場動畫 */
/* 初始狀態 */
.section2-phone {
  opacity: 0;
  transform: translateX(-90px) rotate(20deg) scale(0.96);
  transform-origin: center center;
}

.section2-title {
  opacity: 0;
  transform: translateX(-50%) scale(0.82);
  transform-origin: center center;
}

/* 進場動畫 */
.section2-trigger.is-inview .section2-phone {
  animation: section2PhoneIn 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.section2-trigger.is-inview .section2-title {
  animation: section2TitlePop 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes section2PhoneIn {
  0% {
    opacity: 0;
    transform: translateX(-90px) rotate(20deg) scale(0.96);
  }

  60% {
    opacity: 1;
    transform: translateX(12px) rotate(20deg) scale(1.02);
  }

  78% {
    transform: translateX(-6px) rotate(20deg) scale(0.995);
  }

  100% {
    opacity: 1;
    transform: translateX(0) rotate(20deg) scale(1);
  }
}

@keyframes section2TitlePop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.82);
  }

  60% {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
  }

  76% {
    transform: translateX(-50%) scale(0.985);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@media (min-width: 768px) {
  .section2-phone {
    transform: translateX(-100px) rotate(0deg) scale(0.96);
  }

  .section2-title {
    transform: scale(0.82);
  }

  @keyframes section2PhoneIn {
    0% {
      opacity: 0;
      transform: translateX(-100px) rotate(0deg) scale(0.96);
    }

    60% {
      opacity: 1;
      transform: translateX(14px) rotate(0deg) scale(1.08);
    }

    78% {
      transform: translateX(-6px) rotate(0deg) scale(0.995);
    }

    100% {
      opacity: 1;
      transform: translateX(0) rotate(0deg) scale(1);
    }
  }

  @keyframes section2TitlePop {
    0% {
      opacity: 0;
      transform: scale(0.82);
    }

    58% {
      opacity: 1;
      transform: scale(1.06);
    }

    76% {
      transform: scale(0.985);
    }

    100% {
      opacity: 1;
      transform: scale(1);
    }
  }
}

/* 浮起（上浮） */
@keyframes floatUpDown {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-15px);
    }
  }
  
  /* 下沉→上浮 */
  @keyframes floatDownUp {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(15px);
    }
  }

  /* 彈跳效果 */
  @keyframes dialogPop {
  0% {
    opacity: 0;
    transform: scale(0.82);
  }

  60% {
    opacity: 1;
    transform: scale(1.1);
  }

  76% {
    transform: scale(0.985);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

  .animate-dialog-pop {
    animation: dialogPop 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  }

  /* 上下浮動 */
  .animate-float-up {
    animation: floatUpDown 3.5s ease-in-out infinite;
  }
  
  .animate-float-down {
    animation: floatDownUp 3.5s ease-in-out infinite;
  }

@media (prefers-reduced-motion: reduce) {
  .section2-phone,
  .section2-title {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

.section3-panel {
  display: none;
}

.section3-panel.is-active {
  display: block;
}

.section3-nav-btn {
  background-color: #bfe0ff;
  color: #ffffff;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.section3-nav-btn.is-disabled {
  background-color: rgba(148, 163, 184, 0.8);
  color: #ffffff;
  cursor: default;
}

.tab-label {
  display: block;
  line-height: 1;
  white-space: nowrap;
}

.s2-warp {
  height: 540px;
}

.section2-title {
  top: 300px;
}

/* banner 標題掠光效果 */
.dialog-shine,.dialog-shine-mb{
  position: absolute;
  overflow: hidden;

  /* 直接用圖片形狀裁切整個容器 */
  -webkit-mask-image: url("./images/dialog-2.png");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: 100% 100%;

  mask-image: url("./images/dialog-2.png");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: 100% 100%;
}

.dialog-shine{
  -webkit-mask-image: url("./images/dialog-2.png");
  mask-image: url("./images/dialog-2.png");
}

.dialog-shine-mb{
  -webkit-mask-image: url("./images/dialog-2-mb.png");
  mask-image: url("./images/dialog-2-mb.png");
}


.dialog-shine img,.dialog-shine-mb img {
  display: block;
  width: 100%;
}

/* 細光條 */
.dialog-shine::after,.dialog-shine-mb::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -20%;
  width: 25%;
  height: 160%;
  z-index: 2;
  pointer-events: none;

  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 30%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.12) 70%,
    rgba(255, 255, 255, 0) 100%
  );

  transform: rotate(18deg);
  transform-origin: center;
  animation: dialogShine 3.8s ease-in-out infinite;
}

@keyframes dialogShine {
  0% {
    left: -20%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  38% {
    left: 110%;
    opacity: 1;
  }
  39%,
  100% {
    left: 110%;
    opacity: 0;
  }
}

/* arrow animate */
@keyframes arrowNudge {
  /* 初始 */
  0% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(px);
  }

  20% {
    transform: translateX(0);
  }

  35% {
    transform: translateX(8px);
  }

  55% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(0);
  }
}

.arrow-animate {
  animation: arrowNudge 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@media (min-width: 500px) {
  .s2-warp {
    height: 690px;
  }

  .section2-title {
    top: 390px;
  }
}

@media (min-width: 680px) {
  .s2-warp {
    height: 900px;
  }

  .section2-title {
    top: 520px;
  }
}

@media (min-width: 765px) {
  .s2-warp {
    height: 370px;
  }

  .section2-title {
    top: 10%;
  }
}

@media (min-width: 1200px) {
  .s2-warp {
    height: 600px;
  }
}