@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,
p {
  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,
ol {
  /* list-style: none; */
  padding: 0;
  padding-left: 1.5em;
  margin: 0;
}

.acc-inner-txt ol ul {
  list-style-type: disc;
}

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 {
  position: relative;
  width: 100%;
  height: calc(950 * var(--vw-base));
  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: 8vw;
  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;
}

.bottom-line {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: rgba(137, 126, 121, 0.5);
  z-index: 10;
}

.main2 {
  position: relative;
  width: 100%;
  min-height: calc(950 * var(--vw-base));
  background-color: #f3eee7;
  overflow: hidden;
  box-sizing: border-box;
  padding: calc(218*var(--vw-base)) 0 calc(134*var(--vw-base)) calc(174*var(--vw-base));
}

.m2-card-box {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, calc(481*var(--vw-base)));
  grid-gap: calc(58*var(--vw-base));
}

.m2-card {
  position: relative;
  width: 100%;
  height: calc(471*var(--vw-base));
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
}


.m2-card-block {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-image: url(../img/03/03-pic-block.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: opacity 0.6s ease;
}

.m2-card-pic {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  transform: translate(-50%, -50%);
  transition: transform 0.6s ease;
}

.m2-card-pic img {
  object-position: bottom center;
}


.m2-card-content {
  position: absolute;
  left: calc(28*var(--vw-base));
  top: calc(278*var(--vw-base));
  transition: opacity 0.6s ease;
}

.m2-card-date {
  position: relative;
  font-family: "Lora", serif;
  font-size: calc(22*var(--vw-base));
  line-height: 1.15em;
  letter-spacing: 0.13em;
  font-weight: 600;
  color: #f3eee7;
}

.m2-card-category {
  position: relative;
  margin-top: calc(5*var(--vw-base));
  font-family: "Noto Serif TC", serif;
  font-size: calc(22*var(--vw-base));
  line-height: 1.15em;
  letter-spacing: 0.2em;
  font-weight: 300;
  color: #f3eee7;
}

.m2-card-line {
  position: relative;
  margin: calc(15*var(--vw-base)) 0;
  width: calc(18*var(--vw-base));
  height: 1px;
  background-color: #f3eee7;
  opacity: 0.5;
}

.m2-card-title {
  position: relative;
  width: calc(340*var(--vw-base));
  font-family: "Noto Serif TC", serif;
  font-size: calc(16*var(--vw-base));
  line-height: 1.8em;
  letter-spacing: 0.2em;
  font-weight: 400;
  color: #f3eee7;
}

.m2-card:hover .m2-card-pic {
  /* opacity: 0.8; */
  transform: translate(-50%, -50%) scale(1.05);
}

.m2-card:hover .m2-card-block,
.m2-card:hover .m2-card-content {
  opacity: 0;
}

.m2-line1,
.m2-line2,
.m2-line3 {
  width: 1px;
  height: calc(0*var(--vw-base));
  background-color: rgba(137, 126, 121, 0.5);
  position: absolute;
  overflow: hidden;
  /* z-index: 100; */
}


.m2-line1 {
  left: 12.7vw;
  top: 0;
}

.m2-line2 {
  left: 69vw;
  bottom: 0;
}

.m2-line3 {
  left: 86.5vw;
  top: 0;
}

.m2-line1.active {
  animation: m2-1-line 2s linear;
  animation-fill-mode: forwards;
}

.m2-line2.active {
  animation: m2-2-line 2s linear;
  animation-delay: 0.5s;
  animation-fill-mode: forwards;
}

.m2-line3.active {
  animation: m2-3-line 2s linear;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}

@keyframes m2-1-line {
  from {
    height: 0
  }

  to {
    height: 100%;
  }
}

@keyframes m2-2-line {
  from {
    height: 0
  }

  to {
    height: 100%;
  }
}

@keyframes m2-3-line {
  from {
    height: 0
  }

  to {
    height: 100%;
  }
}

.m2-line-bottom {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: rgba(137, 126, 121, 0.5);
  z-index: 100;
}

.m2-nav {
  position: fixed;
  right: calc(16*var(--vw-base));
  top: calc(340*var(--vw-base));
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: calc(16*var(--vw-base));
  /* 預設隱藏 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 顯示狀態 */
.m2-nav.active {
  opacity: 1;
  visibility: visible;
}

/* 到達 Footer 時切換為絕對定位 */
.m2-nav.at-footer {
  position: absolute;
  top: auto;
  bottom: calc(15 * var(--vw-base));
  /* 略高於 footer 高度 520 */
}

.m2-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc(12*var(--vw-base));
}

.m2-nav-txt {
  position: relative;
  width: calc(90*var(--vw-base));
  font-family: "Noto Serif TC", serif;
  font-size: calc(16*var(--vw-base));
  line-height: 1.8em;
  letter-spacing: 0.2em;
  font-weight: 400;
  color: #897e79;
  text-align-last: justify;
  transition: all 0.3s ease;
}

.m2-nav-line {
  position: relative;
  width: calc(10*var(--vw-base));
  height: 1px;
  background-color: #897e79;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.m2-nav-item.active .m2-nav-txt {
  font-weight: 900;
}

.m2-nav-item.active .m2-nav-line {
  height: 2px;
  opacity: 0.8;
}