/* Font Face */
@font-face {
  font-family: "Source Han Serif TW Medium";
  src: url("../font/SourceHanSerifTW-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Source Han Serif TW Regular";
  src: url("../font/SourceHanSerifTW-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.6;
  background-color: #ffffff;
}
#footer {
  z-index: 5;
  width: 100%;
}

#footer .top {
  top: -12vw;
}

.container {
  font-family: "Source Han Serif TW Regular", "Noto Serif TC", "Noto Sans TC",
    serif;
  margin-top: 134px;
  max-width: 100%;
  /* margin: 0 auto; */
  width: 100%;
  padding: 0;
}

/* Section 1: Hero Section */
.section1 {
  color: rgb(187, 166, 110);
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1920 / 1075;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section1 .outer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("../img/section1_bg.png") no-repeat;
  background-position: center top;
  background-size: cover;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

/* 箭頭上下移動動畫 */
.scroll-indicator img:last-child {
  animation: bounce 1s infinite ease-in-out;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Section 2: Product Showcase */
.section2 {
  background-image: url("../img/section2_bg.png?t=01");

  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  width: 100%;
  aspect-ratio: 640/600; /* 更小的高度，保持比例 */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.section2-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.section2-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section2-logo {
  position: relative;
  margin-top: 118px;
  z-index: 1;
}

.section2 h2 {
  font-size: 2.5vw;
  margin-top: 70px;
  color: #000000;
  font-family: "Source Han Serif TW Medium", "Noto Serif TC", serif;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 10px;
  z-index: 1;
}

.intro-text {
  width: 76%;
  max-width: none;
  margin-top: 75px;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1;
}

.intro-text p {
  font-size: 1.05vw;
  color: #000000;
  line-height: 2.5;
  text-align: left;
  font-family: "Source Han Serif TW Regular", "Noto Serif TC", serif;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.product-grid {
  display: flex;
  justify-content: center;
  gap: 5vw;
  margin-top: 125px;
  z-index: 1;
}

.product-item {
  text-align: center;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
  flex: 1;
}

/* PC版和手機版圖片控制 */
.product-image-pc {
  display: flex;
  position: relative;
  left: 18%;
  gap: 1vw;
  justify-content: center;
}
.award-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4vw;
  margin-top: 4%;
}

.award-image img {
  width: 55%;
}

.product-image-mb {
  display: none;
}

.product-item .subtitle {
  font-size: 1.15vw;
  color: #000000;
  margin-bottom: 65px;
  line-height: 2.2;
}

.product-item img {
  /* max-width: 120px;
  height: auto; */
}

.product-item .description {
  font-size: 1vw;
  color: #000000;
  line-height: 2.6;
  margin-bottom: 30px;
  margin-top: 75px;
  letter-spacing: 1px;
  flex-grow: 1;
  min-height: 120px; /* PC版設定固定高度 */
  letter-spacing: 0.01vw;
}

.detail-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.3s ease;
  padding: 0;
}

.detail-btn img {
  max-width: 95px;
  height: auto;
}

.detail-btn:hover {
  transform: scale(1.1);
}

.video-container {
  position: relative;
  margin-top: 300px;
  padding-bottom: 14.35%; /* 16:9 比例 ㄈ(9/16 = 0.5625) */
  z-index: 1;
  width: 100%; /* 與section2寬度一致 */
  max-width: none; /* 移除寬度限制 */
}

.video-placeholder {
  width: 100%;
  max-width: 70%; /* 與section2寬度一致 */
  margin: 0 auto;
  position: relative;
  padding-bottom: 39.35%;
  height: 0;
  overflow: hidden;
}

.video-placeholder iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.flavor-journey {
  margin: 50px auto 0 auto; /* 水平置中，頂部間距50px */
  text-align: center;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flavor-journey h3 {
  font-size: 2vw;
  font-family: "Source Han Serif TW Medium", "Noto Serif TC", serif;
  color: #000000;
  font-weight: 300;
  text-align: center;
}

.flavor-journey p {
  font-size: 1.1vw;
  color: #000000;
}

/* PC版和手機版文字控制 */
.pc-text {
  display: block;
}

.mobile-text {
  display: none;
}

/* Section 3: Craftsmanship */
.section3 {
  position: relative;
  aspect-ratio: 640 / 429;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: black;
}

.craftsmanship-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 5s ease;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #000;
}

.craftsmanship-content-1 .slide-background {
  background-image: url("../img/section3_bg.png?t=01");
}
.craftsmanship-content-2 .slide-background {
  background-image: url("../img/section3_bg01.png?t=01");
}
.craftsmanship-content-3 .slide-background {
  background-image: url("../img/section3_bg02.png?t=01");
}
.craftsmanship-content-4 .slide-background {
  background-image: url("../img/section3_bg03.png?t=01");
}

/* PC版和手機版內容控制 */
.slide-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.slide-content-mb {
  display: none !important;
}

.slide-content {
  text-align: center;
  color: white;
  width: 100%;
  max-width: 1500px;
  position: relative;
  /* z-index: 2; */
  padding: 0 20px;
  box-sizing: border-box;
  margin-top: 15%;
}

div.first-content {
  margin-top: 7%;
}

.slide-content h2 {
  font-size: 2vw;
  margin-bottom: 3%;
  color: white;
  font-weight: 300;
  line-height: 1.3;
}

.slide-content p {
  font-size: 1.15vw;
  margin-bottom: 6%;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.slide-content > .sub-title {
  font-size: 38px;
  margin-top: 170px;
  color: #ffffff;
  font-family: "Source Han Serif TW Medium", "Noto Serif TC", serif;
  line-height: 1.2;
  letter-spacing: 10px;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  25% {
    opacity: 1;
  }
  35% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.view-more-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 4s ease;
  padding: 0;
  display: inline-block;
  line-height: 0;
  position: relative;
}

/* 隱藏非 .active 輪播的按鈕 */
.craftsmanship-slide:not(.active) .view-more-btn {
  pointer-events: none;
  opacity: 0;
}

.view-more-btn img {
  max-width: 9.3vw;
  height: auto;
  display: block;
}

.view-more-btn:hover {
  transform: scale(1.05);
}

/* Section 4: Master Blender */
.section4 {
  background-image: url("../img/Section4_bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  position: relative;
  aspect-ratio: 1920 / 2320;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  margin-bottom: 665px;
}

.section4-container {
  position: relative;
  top: 15vw;
  width: 80%;
  aspect-ratio: 1432 / 560;
  /* padding: 15px 0 0 0; */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.master-blender-content {
  display: flex;
  align-items: center;
  gap: 4.2vw;
  width: 100%;
  max-width: 75vw;
  /* margin: 0 auto; */
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.blender-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}

/* PC版和手機版文字控制 */
.blender-text-mb {
  display: none !important;
}

.blender-text h2,
.timeline-content h2 {
  font-size: 2.5vw;
  margin-bottom: 1.1vw;
  color: #000000;
  font-weight: 300;
  line-height: 1.3;
}

.timeline-content h2 {
  position: absolute;
  left: 30vw;
  top: -2vw;
}

.blender-text h3 {
  font-size: 1.45vw;
  margin-bottom: 125px;
  color: #000000;
  font-weight: 400;
}

.blender-text h3 .master-name {
  font-size: 1.68vw;
}

.blender-text p {
  font-size: 1vw;
  color: #000000;
  line-height: 3;
}

.blender-image {
  flex: 1;
}

.blender-image img {
  width: 100%;
  height: auto;
}

.timeline-content {
  max-width: 75vw;
  display: flex;
  align-items: flex-start;
  gap: 4.2vw;
  margin-top: 10.2vw;
  position: relative;
  width: 100%;
}

.timeline-image {
  flex: 1;
}

.timeline-image img {
  width: 100%;
  height: auto;
}

.timeline-text {
  font-size: 1vw;
  flex: 1.5;
  top: 20%;
  left: 43%;
  position: absolute;
  width: 36%;
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.1vw;
  border-bottom: none;
  gap: 1.2vw;
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.year {
  /* font-size: 16px; */
  color: #823f04;
  min-width: 4.2vw;
  font-family: "Source Han Serif TW Medium", "Noto Serif TC", serif;
}

.timeline-item p {
  /* font-size: 16px; */
  color: #000000;
  line-height: 1.6;
  margin: 0;
  font-weight: normal;
}

/* 滾動淡入動畫 */
.fade-in-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
  opacity: 1;
  transform: translateY(0);
}

.section2-logo,
.section2 h2,
.intro-text,
.product-grid,
.video-container,
.flavor-journey {
  opacity: 0;
  transform: translateY(150px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.section2-logo.visible,
.section2 h2.visible,
.intro-text.visible,
.product-grid.visible,
.video-container.visible,
.flavor-journey.visible,
.craftsmanship-slide.visible,
.master-blender-content.visible,
.timeline-content.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== 響應式設計 ===== */

@media screen and (max-width: 1660px) {
  .blender-text h3 {
    margin-bottom: 50px;
  }
  .timeline-text {
    font-size: 14px;
  }

  .blender-text h2 {
    font-size: 36px;
  }

  .blender-text h3 {
    font-size: 20px;
  }

  .blender-text h3 .master-name {
    font-size: 24px;
  }

  .blender-text p {
    line-height: 1.5;
  }
}

@media screen and (max-width: 1250px) {
  .timeline-text {
    width: 50%;
  }
}

@media (min-width: 1000px) and (max-width: 1130px) {
  #footer .top {
    top: -20vw;
  }
}

/* 手機版 (最大1000px) */
@media screen and (max-width: 1000px) {
  .container {
    padding: 0;
    margin-top: 55px;
  }

  /* Section 1 手機版 */
  .section1 {
    aspect-ratio: 9 / 16;
    /* min-height: 100vh; */
  }

  .section1 .outer {
    background-image: url("../img/m/section1_bg.png");
    background-size: cover;
    background-position: center;
  }

  .scroll-indicator {
    bottom: 20px;
    gap: 15px;
  }

  .scroll-indicator img {
    max-width: 55px;
  }

  .scroll-indicator picture img {
    max-width: 21px;
  }

  /* Section 2 手機版 */
  body {
    overflow-x: hidden;
  }

  .section2 {
    aspect-ratio: 9 / 20;
    min-height: auto;
    padding: 20px 0;
    background-image: url("../img/m/section2_bg.png");
  }

  /* .section2-bg {
    
    background-size: cover;
    background-position: center;
  } */

  .section2-logo {
    margin-top: 60px;
  }

  .section2-logo img {
    max-width: 250px;
  }

  .section2 h2 {
    font-size: 30px;
    margin-top: 30px;
    letter-spacing: 2px;
    text-align: center;
  }

  .intro-text {
    width: 94%;
    margin-top: 30px;
  }

  .intro-text p {
    font-size: 17px;
    line-height: 2;
    text-align: center;
  }

  .product-grid {
    flex-direction: column;
    gap: 30px;
    margin-top: 6.5vw;
    padding: 0 20px;
  }

  .product-item {
    max-width: 100%;
    margin-bottom: 20px;
    flex-direction: row;
    text-align: left;
    align-items: flex-end;
    justify-content: center;
  }

  .product-item .description {
    letter-spacing: 1px;
  }

  /* 手機版圖片控制 */
  .product-image-pc {
    display: none;
  }

  .product-image-mb {
    display: block;
  }

  .product-item .subtitle {
    font-size: 20px;
    margin-bottom: 0px;
    line-height: 1.5;
  }

  .product-item img {
    max-width: 80px;
  }

  .product-item .description {
    font-size: 14px;
    line-height: 1.4;
    margin-top: 15px;
    margin-bottom: 15px;
    min-height: auto;
  }

  .product-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: flex-start;
    align-items: flex-start;
    width: 57%;
    padding-left: 2%;
  }

  .product-image-mb {
    display: flex;
    position: relative;
    left: 6%;
    padding-right: 12px;
    gap: 13px;
  }

  .award-image img {
    width: 32px;
  }

  .video-container {
    margin-top: 40px;
    padding-bottom: 40px;
  }

  .video-placeholder {
    max-width: 90%;
    margin: 0 auto;
    padding-bottom: 50.7%;
  }

  .flavor-journey {
    margin-top: 20px;
    padding: 0 20px;
    text-align: center;
    align-items: center; /* 確保手機版置中對齊 */
  }

  .flavor-journey h3 {
    font-size: 20px;
    text-align: center; /* 明確設定h3置中 */
  }

  .flavor-journey p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* 手機版文字控制 */
  .pc-text {
    display: none;
  }

  .mobile-text {
    display: block;
  }

  /* Section 3 手機版 */
  .section3 {
    aspect-ratio: 1125 / 2282;
    min-height: auto;
  }

  /* 手機版背景圖片 */
  .craftsmanship-content-1 .slide-background {
    background-image: url("../img/m/m-section3_bg.png");
  }
  .craftsmanship-content-2 .slide-background {
    background-image: url("../img/m/m-section3_bg01.png");
  }
  .craftsmanship-content-3 .slide-background {
    background-image: url("../img/m/m-section3_bg02.png");
  }
  .craftsmanship-content-4 .slide-background {
    background-image: url("../img/m/m-section3_bg03.png");
  }

  /* 手機版內容切換 */
  .slide-content {
    display: none;
  }

  .craftsmanship-content-1 {
    opacity: 1;
  }

  .craftsmanship-content-2,
  .craftsmanship-content-3,
  .craftsmanship-content-4 {
    opacity: 0;
    pointer-events: none;
  }

  .slide-content-mb {
    display: block !important;
    text-align: left;
    color: white;
    width: 100%;
    max-width: 1500px;
    position: relative;
    z-index: 2;
    padding: 0 0 0 60px;
    box-sizing: border-box;
    margin-top: 8%;
  }

  .slide-content-mb h2 {
    font-size: 6vw;
    margin-bottom: 20px;
    line-height: 1.9;
    color: white;
    font-weight: 300;
    text-align: left;
    text-shadow: 0 0px 20px rgb(0 0 0);
    top: -16vw;
    position: relative;
  }

  .slide-content-mb p {
    font-size: 2.82vw;
    margin-bottom: 30px;
    line-height: 2.2;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    position: relative;
    top: -2vw;
  }

  .view-more-btn {
    display: inline-block;
    pointer-events: auto;
    line-height: 0;
    position: relative;
    transition: opacity 4s ease;
  }

  .slide-content-mb .view-more-btn {
    display: inline-block;
    text-align: left;
    width: auto;
  }
  .view-more-btn img {
    max-width: 95px;
    justify-content: flex-start;
    vertical-align: top;
  }

  .craftsmanship-content-1 .slide-content-mb .mb-h2-1 {
    position: relative;
    top: -26vw;
  }

  .craftsmanship-content-1 .slide-content-mb .mb-h2-2 {
    margin-bottom: 5px;
    top: -20vw;
    position: relative;
  }

  .craftsmanship-content-1 .slide-content-mb .mb-h2-3 {
    top: -21vw;
    position: relative;
  }

  .craftsmanship-content-1 .slide-content-mb p {
    font-size: 3.2vw;
    margin-bottom: 30px;
    line-height: 2.6;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
    position: relative;
    transform: translateY(-15vw);
  }

  .craftsmanship-content-1 .view-more-btn {
    position: relative;
    transform: translateY(-15vw);
    pointer-events: auto;
    z-index: 2;
  }

  /* Section 4 手機版 */
  .section4 {
    background-image: url("../img/m/section4_bg.png");
    aspect-ratio: 1080 / 4454;
    min-width: 375px;
    margin-bottom: 0;
  }

  .section4-container {
    aspect-ratio: auto;
    width: 90%;
  }

  .master-blender-content {
    flex-direction: column;
    gap: 60px;
    padding: 0;
  }

  .blender-text {
    display: none !important;
  }

  .blender-text-mb {
    display: block !important;
    text-align: center;
    order: 2;
    flex: 1;
    min-width: 0;
    width: 77%;
  }

  .blender-text-mb h2,
  .timeline-content h2 {
    font-size: 3.9vw;
    margin-bottom: 15px;
    line-height: 1.3;
    color: #000000;
    font-weight: 300;
  }

  .timeline-content h2 {
    top: 72vw;
    position: absolute;
    left: 5vw;
  }

  .blender-text-mb h3 {
    font-size: 2.7vw;
    margin-bottom: 10vw;
    color: #000000;
    font-weight: 400;
  }

  .blender-text-mb h3 .master-name {
    font-size: 3.5vw;
  }

  .blender-text-mb p {
    font-size: 2.9vw;
    line-height: 1.8;
    text-align: left;
    color: #000000;
  }

  .blender-image {
    order: 1;
  }

  .blender-image img {
    max-width: 100%;
    margin: 0 auto;
    display: block;
  }

  .timeline-content {
    flex-direction: column;
    gap: 2.5vw;
    margin-top: 18vw;
  }

  .timeline-image {
    order: 1;
  }

  .timeline-image img {
    width: 100%;
    margin: 0 auto;
    display: block;
  }

  .timeline-text {
    position: static;
    width: 100%;
    order: 1;
    padding: 0px 2.1vw;
    margin-top: 25vw;
  }

  .timeline-item {
    flex-direction: row;
    margin-bottom: 15px;
    text-align: left;
    align-items: flex-start;
  }

  .year {
    font-size: 2.9vw;
    margin-bottom: 0;
    margin-right: 10px;
    min-width: 60px;
    flex-shrink: 0;
  }

  .timeline-item p {
    font-size: 2.9vw;
    line-height: 1.5;
  }

  #footer .top {
    top: -40vw;
  }
}
