@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Noto+Sans+JP:wght@100..900&family=Noto+Serif+TC:wght@200..900&family=Noto+Serif:ital,wght@0,100..900;1,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
/*.lora-<uniquifier> {
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}*/

/*
Bickham Script Pro 3 Regular
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 400;
font-style: normal;
Bickham Script Pro 3 Bold
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 700;
font-style: normal;
*/
.Bickham-Script-Pro-3-Regular{
font-family: "bickham-script-pro-3", sans-serif;
font-weight: 400;
font-style: normal;
}
.lora-Regular {
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
}
.lora-Bold {
  font-family: "Lora", serif;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
}

body,
html {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
    --vw-base: calc(100vw / 1920);
    background-color: #f3eee7;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
}

a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

button,
input,
textarea,
select,
option {
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    -webkit-border-radius: 0px;
    border-radius: 0;
    -moz-appearance: none;
    appearance: none;
    outline: none;
}
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
video {
    object-fit: cover;
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}


.container {
    width: 100%;
    height: auto;
    position: relative;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
}

.no-scroll {
    overflow: hidden;
    /* 禁止滚动条 */
    touch-action: none;
    /* 禁止移动端触摸滚动 */
    position: fixed;
    /* 防止页面跳动 */
    width: 100%;
    height: 100vh;
}
.opacity {
    opacity: 1;
    position: relative;
    visibility: visible;
}

/*影片區*/
.main1 {
  width: 100%;
  height: calc(950 * var(--vw-base));
  position: relative;
  background-color: #f3eee7;
  /* 確保超出容器的部分被隱藏，達成裁切感 */
  overflow: hidden; 
}

/* 這裡維持你的動畫觸發 */
.main1.active {
  animation: m1-bg-motion 1.5s forwards; /* 移除 alternate 避免來回彈跳，除非你原本就需要 */
  animation-delay: 0s;
  animation-timing-function: ease-out;
}

.m1-bg {
  width: 100%;
  /* 初始高度與容器一致 */
  height: calc(950 * var(--vw-base));
  position: relative;
  margin: 0 auto;
  z-index: 98;
  overflow: hidden; /* 重要：裁切關鍵 */
}

/* 動畫改為縮減容器高度 */
@keyframes m1-bg-motion {
  0% {
    height: calc(950 * var(--vw-base));
  }
  100% {
    height: calc(760 * var(--vw-base));
  }
}

.m1-bg img {
  object-fit: cover;
  width: 100%;
  /* 關鍵：高度固定為原始高度，不要隨父層縮放 */
  height: calc(950 * var(--vw-base)); 
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}


.m1-txt {
    width: 100%;
    height: calc(520*var(--vw-base));
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 105;
    overflow: hidden;
}
.m1-t1{
    color: rgba(255, 255, 255, 0.2);
    font-family: "Lora", serif;
    font-weight: 600;
    font-size: calc(48 * var(--vw-base));
    line-height: 3vw;
    letter-spacing: 0em;
    transform: scaleX(0.95);
    transform-origin: left center;
    writing-mode: vertical-rl;
    display: block;
    position: absolute;
    left: 12.6vw;
    top: 0.4vw;
    width: calc(50 * var(--vw-base));
    height: calc(260 * var(--vw-base));
    overflow: hidden;
    opacity: 0;
    letter-spacing: 0.1vw;
}
.m1-t2{
    color: rgba(255, 255, 255, 0.6);
    line-height: 3vw;
    font-size: calc(22 * var(--vw-base));
    font-family: 'Noto Serif TC', sans-serif;
    letter-spacing: 0.05em;
    font-weight: 600;
    transform: scaleX(0.95);
    transform-origin: left center;
    display: block;
    position: absolute;
    left: 12.75vw;
    top: 13.6vw;
    width: calc(120 * var(--vw-base));
    height: calc(50 * var(--vw-base));
    overflow: hidden;
    opacity: 0;
}
.m1-t1.active{
    animation: m1-t1-ani 1.5s ease;
    animation-delay: 1s;
    animation-fill-mode: forwards;
}
.m1-t2.active{
    animation: m1-t2-ani 1.5s ease;
    animation-delay: 1s;
    animation-fill-mode: forwards;
}
@keyframes m1-t1-ani {
    0% {
        left: 11.65vw;
        transform: scaleX(0.95);
        opacity: 0;
    }
    100% {
        left: 12.65vw;
        transform: scaleX(0.95);
        opacity: 1;
    }
}
@keyframes m1-t2-ani {
    0% {
        left: 13.75vw;
        transform: scaleX(0.95);
        opacity: 0;
    }
    100% {
        left: 12.75vw;
        transform: scaleX(0.95);
        opacity: 1;
    }
}
.m1-line{
    width: 1px;
    height: calc(0*var(--vw-base));
    background-color: rgba(255,255,255,.35);
    position: absolute;
    left: 12.7vw;
    top: 0.4vw;
    overflow: hidden; /* 🔴 很重要，避免 after 超出 */
}
.m1-line.active{
    animation: m1-line 1.5s linear;
    animation-delay: 2s;
    animation-fill-mode: forwards;
}
@keyframes m1-line {
    0% {
        height: calc(0*var(--vw-base));
    }
    100% {
        height: calc(665*var(--vw-base));
    }
}
.m1-line::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 1);

  transform-origin: top;
  transform: scaleY(0);
}

@keyframes drawLine {
  0% {
    transform: scaleY(0);
    opacity: 1;
  }

  70% {
    transform: scaleY(1);
    opacity: 1;
  }

  100% {
    transform: scaleY(1);
    opacity: 0;
    /* 畫完淡出再重來 */
  }
}

.m1-line.active::after {
  animation: drawLine 3s ease-in-out infinite;
  animation-delay: 3s;
  
}



/* 基礎視覺比例設定 */
.m-scale {
  display: inline-block;
  transform: scaleX(0.95);
  /* 預設維持 left，給左邊的 2024 使用 */
  transform-origin: left center; 
}

/* 🎯 針對 brand-info 內部的文字，將基準點改為右側 */
.brand-info .m-scale {
  transform-origin: right center;
}


/* =========================================
   MAIN2
========================================= */
.main2{
  position: relative;
  width: 100%;
  height: calc(950 * var(--vw-base));
  overflow: hidden;
  z-index: 10;
  
  /* ⚡ 修正：取消水平居中，改用垂直居中即可 */
  display: flex;
  justify-content: flex-start; /* 靠左對齊 */
  align-items: center; /* 依然保持上下置中 */
}
.main2 > img{
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* 移除所有 .active 相關的 animation 設定 */
.m-line1, .m-line2, .m-line3 {
    width: 1px;
    height: 0; /* JS 會負責把它變長 */
    background-color: rgba(137, 126, 121, 0.5);
    position: absolute;
    z-index: 10;
}

.m-line4 {
    width: 100%; /* JS 會負責把它變寬 */
    height: 1px;
    background-color: rgba(137, 126, 121, 0.5);
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 10;
}

/* 定位點依然要留著，JS 才知道從哪開始長 */
.m-line1 { left: 12.7vw; top: 0; }
.m-line2 { left: 69vw; bottom: 0; }
.m-line3 { left: 86.5vw; top: 0; }

:root {
    --img-width: 73.8vw;
    --line-color: rgba(0, 0, 0, 0.1);
}
/* 互動區域 */
.interactive-banner {
  position: relative;
  width: 73.8vw;
  left: 12.7vw;
  cursor: pointer;
  z-index: 30; /* 調高層級確保能被滑到 */
  display: block; /* 確保它是區塊元素 */
  margin-left: 0;
  /* 🛡️ 防禦性設定：確保區塊即便在動畫中也能接收滑鼠事件 */
  pointer-events: auto; 
/* 1. 確保它有明確的堆疊上下文 */
    isolation: isolate; 
    
    /* 2. 關鍵：加上 will-change 提示瀏覽器優化，但不要過度 */
    will-change: auto;

  /* 避免圖片縮放時溢出導致 hover 判定範圍變動 */
  overflow: visible;
}
/* 圖片遮罩：控制反黑 */
.img-mask {
  position: relative;
  width: 100%; /* 跟隨父層 73.8vw */
  height: auto;
  background-color: rgba(0, 0, 0, 0); /* 變暗時的底色 */
  overflow: hidden;
}
.img-mask img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 1;
  filter: brightness(1) grayscale(0);
}
/* 掃描線基礎設定 */
.scan-line {
  position: absolute;
  top: calc(50% - (3 * var(--vw-base)));
  left: 0;
  width: 99%;
  height: calc(3 * var(--vw-base));
  transform: translateY(-50%);
  background: url('../img/04/04-1-pic-af-line.png') no-repeat center;
  background-size: contain; 
  z-index: 25;
  pointer-events: none;
  clip-path: inset(0 100% 0 0);
  opacity: 0; /* 初始完全透明 */
  transition: clip-path 0.6s ease-in, opacity 0.5s ease-in;
}
/* 修正 Main2 線條 */
/* --- 1. 線條容器 (遮罩) --- */
.m2-title-line {
    position: absolute;
    left: 0;
    top: calc(50% - (20 * var(--vw-base)));
    transform: translateY(-50%);
    
    width: 0% !important; /* 如果還是不跑，暫時加 !important 測試是否被其他 CSS 蓋掉 */
    height: calc(3 * var(--vw-base));
    overflow: hidden;
    z-index: 35;
    
    /* 滑出動畫：0.4s */
    transition: width 0.4s cubic-bezier(0.4, 0, 1, 1);
}
.m2-title-line.active {
    width: 98% !important; 
    /* 滑入動畫：0.8s */
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}


/* --- 2. 內部圖片 (線條圖案) --- */
.m2-title-line-arr {
    position: absolute;
    right: 0;
    top: 0;
    width: 73.8vw; /* 保持固定寬度，讓父層 width 像窗簾一樣揭開它 */
    height: 100%;
    display: flex;
    align-items: center;
}

/* --- 3. 背景大圖 (img-mask img) --- */
.img-mask {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.5s ease;
}

.img-mask img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 1; /* 保持透明度為 1 */
    filter: brightness(1) grayscale(0);
    transform: scale(1);
    /* 設定過渡，讓濾鏡與縮放平滑 */
    transition: transform 0.6s ease-out, filter 0.6s ease-out;
    will-change: transform, filter; /* 優化效能 */
}

/* --- 4. 觸發狀態 --- */
.interactive-banner:hover .img-mask img,
.interactive-banner.is-active .img-mask img {
    filter: brightness(0.6) grayscale(0.5);
    transform: scale(1.05);
    opacity: 1; /* 保持透明度為 1 */
}

.interactive-banner:hover .img-mask,
.interactive-banner.is-active .img-mask {
    background-color: rgba(0, 0, 0, 0.5);
}



/* 文字資訊 */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: calc(30 * var(--vw-base)); /* 保持響應式間距 */
  padding: 0 1vw 0 2vw;
}

.status-tag { 
  color:#897e79;
  font-family: "Lora", serif;
  font-weight: 600;
  font-size:calc(36 * var(--vw-base));
  line-height:calc(40 * var(--vw-base));
  letter-spacing:0.08em;
  text-align: left;
}
.brand-info {
  max-width: 75%; 
  text-align: right; 
  margin-left: auto;
/* 防止 Flexbox 壓縮 */
  flex-shrink: 0;
}
.brand-info h2 { 
  margin: 0; 
  color: #897e79;
  text-align: right;
  font-size: calc(22 * var(--vw-base));
  line-height:calc(25 * var(--vw-base));
  font-family: 'Noto Serif TC', sans-serif;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.brand-info p { 
  margin: 0.5vw 0 0; 
  color: #897e79;
  text-align: right;
  font-size: calc(16 * var(--vw-base));
  line-height:calc(20 * var(--vw-base));
  font-family: 'Noto Serif TC', sans-serif;
  letter-spacing: 0.08em;
  font-weight: 600;
}

