@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100..900&display=swap");
@font-face {
  font-family: "LINESeedTW";
  src: url("../fonts/LINESeedTW_OTF_Th.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LINESeedTW";
  src: url("../fonts/LINESeedTW_OTF_Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LINESeedTW";
  src: url("../fonts/LINESeedTW_OTF_Bd.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JockeyOne";
  src: url("../fonts/JockeyOne-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GlowSansTC";
  src: url("../fonts/GlowSansTC-Condensed-Medium.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "GlowSansTC";
  src: url("../fonts/GlowSansTC-Condensed-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
body {
  width: 100%;
}

.index-intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  background: #fff;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  -webkit-transition: opacity 0.6s ease, visibility 0.6s ease;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.index-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.index-intro__logo {
  width: min(60vw, 480px);
  max-height: 60vh;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}
body.index-intro-active {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}
html.index-intro-active,
body.index-intro-active {
  height: 100%;
}
body.index-intro-active {
  position: fixed;
  inset: 0;
  width: 100%;
}
body.index-intro-active .site-header,
body.index-intro-active .scroll-hint,
body.index-intro-active .site-footer {
  visibility: hidden;
}
@media (max-width: 768px) {
  .index-intro__logo {
    width: min(72vw, 322px);
    max-height: 50vh;
  }
}

.index-card-wrapper {
  height: 100dvh;
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  isolation: isolate;
}
.index-card {
  margin-top: 5%;
  position: absolute;
  top: 0%;
  width: 100%;
  height: 100%;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  will-change: transform, opacity;
}
@media (min-width: 769px) {
  .index-card-wrapper > .index-card {
    -webkit-transform-origin: left bottom;
            transform-origin: left bottom;
  }
}
@media (max-width: 768px) {
  .index-card {
    overflow-x: hidden;
  }
}

.card-1 {
  background: linear-gradient(180deg, #B5DDF5 0%, #8FC8EE 38%, #6BB5E3 100%);
  z-index: 1;
  top: 0 !important;
}
.card-1 .index-card {
  margin-top: 0;
  background-color: #ffffff;
  background-image: url("./../src/img/index_mainpic_bg.png"), linear-gradient(180deg, #B5DDF5 0%, #8FC8EE 38%, #6BB5E3 100%);
  background-repeat: no-repeat;
  background-size: 100% auto, 100% 100%;
  background-position: bottom -12vw left 2vw, center;
  /* fixed 在 iOS 會讓藍底滲到頁面底部，改 scroll */
  background-attachment: scroll;
  padding-top: 100px;
}
@media (max-width: 768px) {
  .card-1 .index-card {
    padding-top: 74px;
    background-size: 270% auto, 100% 100%;
    background-position: bottom -30vw center, center;
  }
}

.landing-wrap {
  position: relative;
  z-index: 8;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 32px;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  padding-left: 6.25%;
  padding-right: 4.9479166667%;
}

.main-info {
  text-align: right;
}
.main-info .title {
  font-size: 2rem;
  line-height: 5rem;
  font-family: "GlowSansTC", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-weight: bold;
}
.main-info .title span {
  font-family: "GlowSansTC", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-weight: bold;
}
.main-info p {
  font-family: "GlowSansTC", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.3333333333rem;
  line-height: 2rem;
}

.card-2 {
  z-index: 2;
  background-color: transparent;
  transition: background 0.45s ease;
}
.card-2 .index-card {
  background-color: #325F87;
  background-image: linear-gradient(180deg, #6BB5E3 0%, #4A85B8 42%, #325F87 100%);
  transition: margin-top 0.45s ease;
}
.card-2.is-at-top {
  background: linear-gradient(180deg, #6BB5E3 0%, #4A85B8 42%, #325F87 100%);
}
.card-2.is-at-top .index-card {
  margin-top: 0;
}

.section-title {
  position: absolute;
  color: white;
  left: 2.6041666667%;
  bottom: calc(2dvh + 100px);
  line-height: 1.6;
  z-index: 3;
}
.section-title .en {
  font-size: clamp(2.5rem, 4.6vw, 5rem);
}
.section-title .sm {
  font-size: clamp(2rem, 2.5vw, 2.6667rem);
  font-family: "GlowSansTC", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-weight: bold;
}

.service-grid {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  width: 100%;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  position: relative;
  z-index: 2;
  padding: 0 8.6979166667%;
  padding-top: 16vh;
  margin: 0 auto;
  gap: 5.7291666667vw;
}

/* 核心：設定特殊卡片的佔位 */
.service-card {
  width: 100%;
}
.service-card.special {
  padding-top: 10.9375vw;
}
.service-card.special .service-card-img:before {
  -webkit-transform: rotate(atan2(calc(var(--x) * -1), var(--y)));
          transform: rotate(atan2(calc(var(--x) * -1), var(--y)));
}
.service-card:last-child .service-card-img:before {
  content: unset;
}

.service-card-img {
  margin-bottom: 3.0185185185dvh;
  position: relative;
  max-width: 270px;
  opacity: 0;
}
.service-card-img img {
  position: relative;
  z-index: 1;
  width: 100%;
}
.service-card-img:before {
  content: "";
  display: block;
  border-top: 4px dotted white;
  height: 1px;
  position: absolute;
  top: 50%;
  /* 從圖示中心開始 */
  left: 50%;
  -webkit-transform-origin: left center;
          transform-origin: left center;
  -webkit-transition: 0.3s linear;
  transition: 0.3s linear;
  --y: calc(1643/1920*25vw);
  --x: calc(210/1920*100vw);
  width: 0;
  -webkit-transform: rotate(atan2(var(--x), var(--y)));
          transform: rotate(atan2(var(--x), var(--y)));
}
.service-card-img.draw:before {
  width: hypot(var(--x), var(--y));
}

.service-card-title {
  font-family: "GlowSansTC", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-size: clamp(1.333rem, 3vw, 1.6667rem);
  font-weight: bold;
  line-height: 5dvh;
  margin-bottom: 2.2916666667dvh;
}

.service-card-text {
  font-size: clamp(1rem, 1.2vw, 1.1111rem);
  line-height: 2;
  margin-bottom: 15px;
}
.service-card-text .service-card-line {
  display: block;
}

.service-card-link {
  color: white;
  font-family: "JockeyOne", system-ui, -apple-system, "Roboto", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 24px;
  font-size: 1rem;
  vertical-align: middle;
}
.service-card-link:after {
  content: "";
  vertical-align: middle;
  width: 24px;
  height: 24px;
  display: inline-block;
  background-image: url("./../src/svg/arrow_right_white.svg");
  background-size: cover;
}

.card-3 {
  z-index: 4;
  background-color: transparent;
  transition: background-color 0.45s ease;
}
.card-3 .index-card {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
          transform: translateZ(0);
  will-change: transform, opacity;
  background-color: #3D7298;
  background-image: linear-gradient(180deg, #4A85B8 0%, #3D7298 100%);
  overflow: hidden;
  transition: margin-top 0.45s ease;
}
.card-3.is-at-top {
  background: linear-gradient(180deg, #4A85B8 0%, #3D7298 100%);
}
.card-3.is-at-top .index-card {
  margin-top: 0;
}
.card-3 .index-card.move-in .card-3-img {
  -webkit-animation: slideInAndStay 0.8s 0.5s ease-out forwards;
          animation: slideInAndStay 0.8s 0.5s ease-out forwards;
}
@media (max-width: 768px) {
  .card-3 .section-title {
    bottom: 80px;
    left: 24px;
  }
}

@-webkit-keyframes slideInAndStay {
  from {
    /* 這裡使用 translate 比起 top/left 效能更好，因為會啟動 GPU 加速 */
    -webkit-transform: translate(100px, -100px);
            transform: translate(100px, -100px);
    opacity: 0;
  }
  to {
    -webkit-transform: translate(0, 0);
            transform: translate(0, 0);
    opacity: 1;
  }
}

@keyframes slideInAndStay {
  from {
    /* 這裡使用 translate 比起 top/left 效能更好，因為會啟動 GPU 加速 */
    -webkit-transform: translate(100px, -100px);
            transform: translate(100px, -100px);
    opacity: 0;
  }
  to {
    -webkit-transform: translate(0, 0);
            transform: translate(0, 0);
    opacity: 1;
  }
}
.card-3-img {
  position: relative;
  text-align: right;
  overflow: hidden;
  width: 100%;
  height: 100%;
  opacity: 0;
  will-change: transform, opacity;
}
.card-3-img img {
  position: absolute;
  z-index: 5;
  top: unset;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
@media (max-width: 768px) {
  .card-3-img {
    position: absolute;
    z-index: 5;
    top: -27%;
    left: -44%;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 220%;
    -o-object-position: center;
       object-position: center;
  }
}

.slogan {
  font-size: clamp(2.5rem, 5vw, 5rem);
}
.slogan .bigger {
  font-size: 1.4444444444em;
}

#rotate-wrap {
  position: absolute;
  z-index: 1;
  width: 55%;
  left: 0;
  right: 0;
  aspect-ratio: 1.5;
  bottom: 5vw;
  margin: auto;
  /* 或 100dvh */
  overflow: hidden;
  display: block;
  -webkit-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
}

/* JS 注入的 Canvas 會自動套用這些樣式 */
#rotate-wrap canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.card-4 {
  z-index: 5;
  background-color: transparent;
  transition: background 0.45s ease;
}
.card-4 .index-card {
  background-color: #EDF0F4;
  background-image: linear-gradient(180deg, #3D6A94 0%, #6A9BC4 38%, #B8CEDF 72%, #EDF0F4 100%);
  padding-top: 50px;
  margin-top: 40px;
  transition: margin-top 0.45s ease;
}
.card-4.is-at-top {
  background: linear-gradient(180deg, #3D6A94 0%, #6A9BC4 38%, #B8CEDF 72%, #EDF0F4 100%);
}
.card-4.is-at-top .index-card {
  background-color: #EDF0F4;
  background-image: linear-gradient(180deg, #3D6A94 0%, #6A9BC4 38%, #B8CEDF 72%, #EDF0F4 100%);
  margin-top: 0;
}
.card-4 .section-title {
  position: static;
  color: #fff;
  text-shadow: 0 1px 10px rgba(15, 36, 58, 0.18);
  padding-left: 2.6041666667%;
  margin-bottom: 5.25dvh;
}

/* 容器 */
.cards-stack_list {
  position: relative;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
  width: 100%;
  max-width: 1300px;
  padding: 3vh 15.625vw;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  height: 50dvh;
  margin: 0 auto;
  -webkit-transform: translateX(-10.4166666667vw);
          transform: translateX(-10.4166666667vw);
  -webkit-perspective: 1000px;
          perspective: 1000px;
}
@media (max-width: 768px) {
  .cards-stack_list {
    width: 100%;
    padding: 0 20px;
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
}

/* 卡片項目基礎樣式 */
.cards-stack_item {
  width: 100%;
  position: relative;
  -webkit-transform: scale(0.9);
          transform: scale(0.9);
  -webkit-transform-origin: center top;
          transform-origin: center top;
  -webkit-transition: 0.5s;
  transition: 0.5s;
}
.cards-stack_item:nth-child(even) .recommend-card {
  background-color: #F5F7FA;
}
@media (max-width: 768px) {
  .cards-stack_item:nth-child(n+6) {
    display: none;
  }
}

/* 卡片被懸停（或手機點擊）時的凸顯狀態 */
.cards-stack_item.active {
  z-index: 12 !important;
  -webkit-box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2);
          box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2);
}
@media (min-width: 769px) {
  .cards-stack_item.active {
    -webkit-transform: translate(0, 0) scale(1) !important;
            transform: translate(0, 0) scale(1) !important;
  }
}

.recommend-card {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
  width: 25vw;
  min-width: 180px;
  /* 根據設計調整 */
  background: #ededed;
  padding: 2.8125vw 2.0833333333vw;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  border-radius: 10px;
  /* 效能優化與動畫平滑 */
  will-change: transform, z-index;
  -webkit-transition: z-index 0.4s ease, -webkit-transform 0.4s ease, -webkit-box-shadow 0.4s ease;
  transition: z-index 0.4s ease, -webkit-transform 0.4s ease, -webkit-box-shadow 0.4s ease;
  transition: transform 0.4s ease, z-index 0.4s ease, box-shadow 0.4s ease;
  transition: transform 0.4s ease, z-index 0.4s ease, box-shadow 0.4s ease, -webkit-transform 0.4s ease, -webkit-box-shadow 0.4s ease;
}
@media (max-width: 768px) {
  .recommend-card {
    padding: 16px 20px;
  }
}
.recommend-card .text {
  line-height: 2;
  font-size: clamp(1.125rem, 1.25vw, 1.3334rem);
  margin-bottom: 1rem;
}
@media (max-width: 768px) {
  .recommend-card .text {
    margin-bottom: 14px;
  }
}
.recommend-card .user {
  font-size: clamp(1.125rem, 1.25vw, 1.3334rem);
  line-height: 2;
}

.cards-stack_item:nth-child(n+10) {
  display: none;
}

.rate-wrap {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  margin-bottom: 3.9583333333dvh;
}
.rate-wrap .star {
  width: 24px;
  height: 24px;
  background-image: url("./../src/svg/star_border_colored.svg");
  background-size: 100% auto;
  background-position: center;
}
.rate-wrap .star.fill {
  background-image: url("./../src/svg/star_colored.svg");
}

@media screen and (max-width: 992px) {
  .landing-wrap {
    padding: 0 20px;
  }
}
@media screen and (max-width: 768px) {
  .card-1 {
    background: linear-gradient(180deg, #B5DDF5 0%, #8FC8EE 38%, #6BB5E3 100%);
  }

  /* 手機卡片流：非當前屏的 card-1 清掉底色，避免 iOS 從底部透出 */
  .mobile-card-flow .card-1 .index-card:not(.is-card-bg-active) {
    background: transparent !important;
    background-image: none !important;
  }

  .main-info {
    text-align: left;
  }
  .main-info .title {
    font-size: 2.5rem;
    line-height: 1.6;
    margin-bottom: 15px;
  }
  .main-info p {
    font-size: 1.1666666667rem;
    line-height: 2rem;
  }

  .landing-wrap {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
  }

  #rotate-wrap {
    position: absolute;
    z-index: 1;
    width: 150%;
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
    left: 50%;
    bottom: 63px;
  }

  .card-2 {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
  }
  .card-2 .index-card {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 20px;
    padding-right: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
  }
  .card-2 .section-title {
    position: static;
    text-align: center;
    margin-bottom: 8px;
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }

  .service-card-title {
    line-height: 1.875;
    margin-bottom: 0;
  }

  .service-card-text {
    line-height: 1.5;
    margin-bottom: 0;
  }
  .service-card-text .service-card-line {
    display: inline;
  }
  .service-card-text .service-card-line:not(:last-child)::after {
    content: "、";
  }

  .service-grid {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    gap: 10px;
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
    -webkit-box-flex: 0;
        -ms-flex-positive: 0;
            flex-grow: 0;
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }

  .service-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 12px;
    max-height: 15vh;
    height: auto;
    width: 100%;
  }
  .service-card.special {
    padding-top: 0;
  }
  .service-card.special .service-card-img:before {
    -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
  }

  .service-card-img {
    width: 31%;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    margin-bottom: 0;
  }
  .service-card-img.draw:before {
    width: 100%;
    border-width: 2px;
    top: 50%;
    -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
  }

  .card-4 .index-card {
    margin-top: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
  }

  .card-4__content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 320px;
    padding: 0 16px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
  }

  .card-4 .section-title {
    width: 100%;
    text-align: center;
    padding-left: 0;
    margin-bottom: 0;
    -ms-flex-negative: 0;
        flex-shrink: 0;
  }

  .card-4 .cards-stack_list {
    display: block;
    position: relative;
    width: 100%;
    max-width: 318px;
    height: 320px;
    margin: 0 auto;
    padding: 48px 40px 0 12px;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    overflow: visible;
    -webkit-transform: none;
            transform: none;
    -webkit-perspective: 600px;
            perspective: 600px;
  }

  .card-4 .cards-stack_item {
    position: absolute;
    left: 0;
    right: auto;
    margin-left: 0;
    margin-right: auto;
    width: 100%;
    max-width: 280px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-transform-origin: left bottom;
            transform-origin: left bottom;
  }

  .card-4 .cards-stack_item.active {
    z-index: 20 !important;
  }

  .card-4 .cards-stack_item.active .recommend-card {
    -webkit-box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  }

  .card-4 .recommend-card {
    position: relative;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 280px;
    min-width: 0;
    margin: 0;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }

  .card-4 .rate-wrap {
    margin-bottom: 12px;
  }
}

.cta-wrap {
  right: auto;
  left: 50px;
}

@media screen and (max-width: 900px) {
  .cta-wrap {
    left: 10px;
    right: auto;
  }
}