:root {
  --main-color: #ff2e2e;
  --light-grey: #e6e7e8;
  --black: #000000;
}
/* Reset + 基本設置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter";
}
body {
  background: #000;
  cursor: url(../assets/images/cursor-white.png), auto;
  overflow: hidden;
}
body.red-mode {
  cursor: url(../assets/images/cursor.png), auto;
  overflow: auto;
}
body.no-scroll {
  overflow: hidden !important;
  height: 100vh;
}
body.dark-overlap {
  cursor: url(../assets/images/cursor-white.png), auto;
}
img {
  max-width: 100%;
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
}
body.red-mode.dark-overlap.no-scroll header.site-header,
body.red-mode.dark-overlap.no-scroll header.site-header a {
  color: #000;
}
body.red-mode.dark-overlap.no-scroll header.site-header img.logo-white {
  display: none;
}
body.red-mode.dark-overlap.no-scroll header.site-header img.logo-black {
  display: block;
}
footer {
  text-align: center;
  font-size: 14px;
  color: #fff;
  padding: 20px 20px;
  display: flex;
  width: 100%;
  z-index: 3;
  position: relative;
}
footer a {
  /* color: var(--main-color); */
  color: #fff;
}
footer div {
  width: 1100px;
  max-width: 100%;
  margin: auto;
}
footer div p {
  width: 50%;
  float: left;
  text-align: left;
}
footer div p {
  width: 50%;
  float: left;
  text-align: left;
}
footer div p:last-child {
  text-align: right;
}

div.pupil img {
  width: 28px;
  height: 28px;
  position: absolute;
  left: 12px;
  top: 12px;
  display: none;
}
.red-mode div.pupil img {
  display: block;
}
.site-header.hidden {
  display: none;
}
.header-left,
.header-center,
.header-right {
  display: flex;
  align-items: center;
  justify-content: center;
}
.header-center {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.header-left {
  font-weight: bold;
  font-size: 18px;
}

.header-left a {
  color: #000;
  font-weight: 400;
  text-decoration: none;
}

.header-center img {
  height: 40px;
}
.header-center img.logo-white {
  display: none;
}

.hamburger {
  font-size: 56px;
  margin-top: -7px;
  cursor: pointer;
}

/* optional: push整個 section 向下避開 header */
.section {
  padding-top: 80px;
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100vw;
  height: 100vh;
}
#section-1 .inner {
  transform: translateY(0%);
}
.section .inner {
  width: 100%;
  height: 100%;
  transform: translateY(100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 滾動容器，提供足夠 scroll 長度 */
.scroll-wrapper {
  position: relative;
  height: calc(100vh * 4); /* 你想要每個 section 200% 滾距 */
}

/* section 1 固定底層 */
#section-1 {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  top: 0;
  left: 0;
  z-index: 1;
  transform: translateY(0);
  padding-top: 40px !important;
}

/* section 2 與 3 疊上，初始在畫面外 */
#section-2,
#section-3,
#section-4,
#section-5,
#section-6 {
  position: relative;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  /* pointer-events: none; */
  padding: 0px !important;
}
#section-2 {
  background: var(--light-grey);
}
#section-3-wrapper,
#section-3 {
  z-index: 4;
  background: none;
}
#section-4 {
  z-index: 3;
  background: none;
  padding: 0px;
}
#section-4 .inner {
  justify-content: start;
  background: var(--black);
  padding-left: 18vw;
}
#section-4 .landing-intro {
  padding-top: 60px;
  font-size: 14px;
  line-height: 1.4em;
  font-weight: 300;
}
#section-4 .landing-intro p {
  margin-bottom: 20px;
  color: #fff;
}

.dark-overlap header,
.dark-overlap header a {
  color: #fff;
}
.dark-overlap header .logo-white {
  display: block;
}
.dark-overlap header .logo-black {
  display: none;
}

#section-5 {
  background-color: var(--light-grey);
  height: auto;
}
#section-5 .inner {
  flex-direction: column;
  min-height: 100vh;
  padding: 22vh 10vw 20vh 10vw;
}
img.section-5-title {
  width: 300px;
  margin-bottom: 20px;
}

.section-content {
  display: block;
  width: 1000px;
  max-width: 100%;
  padding: 16px;
}
#section-4 .section-content {
  opacity: 0;
  width: 400px;
}
#section-5 .section-content {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  justify-content: center;
}
#section-6 .section-content {
  color: #fff;
  font-size: 18px;
}
#section-6 .section-content p,
#section-6 .section-content a {
  font-size: 16px;
  color: #fff;
}
.section-6 {
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.section-6 .video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* 保持原有內容在影片上層 */
.section-6 .inner {
  position: relative;
  z-index: 1;
  background: #0000008f;
}

.team-col {
  width: 24%;
  padding: 25px 20px;
  opacity: 0;
  background: #d7d8da;
  margin: 0.5%;
}

.team-img-container {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 170px;
  margin: auto;
  margin-bottom: 10px;
  border-radius: 50%;
}
.team-col p {
  z-index: 2;
  display: block;
  position: absolute;
  background: #111;
  color: #fff;
  padding: 10px 20px;
  border-radius: 5px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  overflow: visible;
}
.team-col p:after {
  content: "";
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #111;
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
}
.team-col p img {
  width: 24px;
  margin-right: 8px;
}

.team-img {
  width: 100%;
  height: 100%;
  background-image: var(--img-default);
  background-size: cover;
  transition: all 0.2s ease;
}
body.team-faded-in .team-col.hovered {
  z-index: 1;
}
body.team-faded-in .team-col.hovered .team-img {
  background-image: var(--img-hover);
  scale: 1.3;
}
body.team-faded-in.team-hovering .team-col {
  opacity: 0.4 !important;
}
body.team-faded-in.team-hovering .team-col.hovered {
  opacity: 1 !important;
}
.team-col b,
.team-col span {
  display: block;
  width: 100%;
  text-align: left;
  transition: all 0.2s ease;
  margin-bottom: 3px;
  font-size: 17px;
}
.team-col span {
  font-size: 14px;
  margin-bottom: 0px;
  color: #555;
}
body.team-faded-in .team-col.hovered b,
body.team-faded-in .team-col.hovered span,
body.team-faded-in .team-col.hovered p {
  opacity: 1;
}
body.team-faded-in .team-col.hovered .team-img-container {
  box-shadow: 0px 0px 19px 12px #d3d3d3;
}
.team-col span.quote {
  font-style: italic;
  margin-top: 12px;
  color: #333;
}
img.section-4-we-are,
img.section-6-contact {
  width: 260px;
}
.contact-intro {
  margin-bottom: 30px;
  font-weight: 400;
  color: var(--main-color);

  span {
    margin-top: 5px;
    display: block;
  }
}
.typewriter-container {
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid var(--main-color);
  width: fit-content;
  height: 120px;
}

#typewriter-text {
  font-size: 5.5rem;
  color: var(--main-color);
  height: 75px;
  font-weight: 600;
}
.cursor {
  display: inline-block;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  color: black;
  font-weight: bold;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  50.1%,
  100% {
    opacity: 0;
  }
}

.landing-intro span {
  color: var(--main-color);
}

.red-mode #section-1 {
  background: var(--main-color);
  z-index: 1;
}

.landing-main-text {
  width: 800px;
}

.top-text {
  margin-bottom: 20px;
}
.text-hard-work {
  margin-top: 40px;
}

img.text-play {
  margin-top: 4%;
  margin-bottom: 5%;
}
.eyes {
  display: flex;
  gap: 10px;
}
.eyes img {
  height: 110px;
}
.eye {
  width: 115px;
  height: 115px;
  background: #000; /* 黑色眼框 */
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  border: 12px solid #000;
}

.eye-white {
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 50%;
  border: 1px solid #000;
  position: relative;
  z-index: 0;
}

@keyframes openEye {
  0% {
    transform: scaleY(0.2);
  }
  100% {
    transform: scaleY(1);
  }
}

.pupil {
  width: 70px;
  height: 70px;
  background: #000;
  border-radius: 50%;
  position: absolute;
  top: 7px;
  left: 7px;
  transition: transform 0.1s linear;
  z-index: 1;
}
.eyelid {
  position: absolute;
  width: 100%;
  height: 50%;
  background: #000;
  z-index: 2;
  pointer-events: none;
  border: 4px solid #000;
}

.eyelid.top {
  top: 0;
  transform: translateY(0%);
  animation: openTop 0.3s ease-out 3s forwards,
    blinkTop 0.4s ease-in-out 0.5s forwards;
}

.eyelid.bottom {
  bottom: 0;
  transform: translateY(0%);
  animation: openBottom 0.3s ease-out 3s forwards,
    blinkBottom 0.4s ease-in-out 0.5s forwards;
}

/* 初次睜眼 */
@keyframes openTop {
  to {
    transform: translateY(-100%);
  }
}
@keyframes openBottom {
  to {
    transform: translateY(100%);
  }
}

/* 眨眼：合上再打開 */
@keyframes blinkTop {
  0% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(-100%);
  }
}
@keyframes blinkBottom {
  0% {
    transform: translateY(100%);
  }
  50% {
    transform: translateY(0%);
  }
  100% {
    transform: translateY(100%);
  }
}
.toggle-switch {
  position: fixed;
  width: 100px;
  height: 40px;
  bottom: 16%;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
}
.toggle-switch.hidden {
  animation: hideSwitch 0.5s 1s ease-in forwards;
}
/* 初次睜眼 */
@keyframes hideSwitch {
  to {
    display: none;
  }
}
.light-up {
  bottom: -50px;
  position: absolute;
  color: #fff;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  text-align: center;
  opacity: 0.5;
  animation: lightup 3s 1s ease-in-out infinite;
}

@keyframes lightup {
  15% {
    opacity: 0.5;
  }
  20% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  70% {
    opacity: 0.4;
  }
  75% {
    opacity: 1;
  }
  99% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.light-up.hidden {
  animation: hideSwitch 0.5s 1s ease-in forwards;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #363636;
  border: 2px solid #000;
  transition: 0.4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 64px;
  width: 64px;
  left: -15px;
  bottom: -14px;
  background: url(../assets/images/toggle-button.png);
  background-size: cover;
  transition: 0.6s;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  transition: 0.6s;
  opacity: 0;
  background-color: #000;
}
.toggle-switch input:checked ~ p {
  transition: 0.6s;
  opacity: 0;
}
.toggle-switch input:checked {
  opacity: 0;
}
.toggle-switch input:checked + .slider:before {
  transform: translateX(50px);
  background-color: var(--main-color);
  /* opacity: 0; */
}

body.red-mode {
  color: #000;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--light-grey);
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.5s ease, opacity 0.5s ease;
  z-index: 999;
}

.nav-overlay.active {
  transform: translateY(0%);
  opacity: 1;
  pointer-events: auto;
}

.nav-menu {
  list-style: none;
  text-align: center;
  padding: 0;
  width: 100%;
}

.nav-menu li {
  margin: 20px 0;
  padding: 20px 50px;
  width: 100%;
  text-align: left;
  border-bottom: 1px solid #000;
}
.nav-menu li:last-child {
  border: 0;
}
.nav-menu a {
  font-size: 6vw;
  text-decoration: none;
  color: #000;
  transition: color 0.3s;
  position: relative;
  display: table;
}

.nav-menu a:hover {
  color: var(--main-color);
  font-style: italic;
}
.nav-menu a:hover:after {
  content: "";
  background: url(../assets/images/menu-red-arrow.png);
  width: 80px;
  height: 80px;
  display: table;
  position: absolute;
  background-size: contain;
  background-repeat: no-repeat;
  top: 51%;
  right: -100px;
  transform: translateY(-50%);
}

.nav-menu a:hover {
  color: var(--main-color);
}

.section-2-title {
  width: 80%;
  opacity: 0;
}

svg#section-4-svg {
  position: absolute;
  right: 0;
  top: 40%;
  width: 800px;
}

.section-3-badge {
  position: absolute;
  width: 18vw;
}

/* 
#section-3-top-left svg:hover {
  transition: 0.5s;
  transform: translateY(-20px);
  filter: drop-shadow(0px 9px 0px rgba(0, 0, 0, 1));
} */

@keyframes draw {
  0% {
    transform: translateY(0px);
    filter: drop-shadow(0px 0px 0px rgba(36, 26, 21, 0.3));
  }
  100% {
    transform: translateY(-20px);
    filter: drop-shadow(0px 16px 6px rgba(36, 26, 21, 0.1));
  }
}

#section-3-top-right {
  top: 20vh;
  right: 20vw;
}
#section-3-top-left {
  top: 5vh;
  left: 20vw;
}

#section-3-bottom-right {
  bottom: 10vh;
  right: 10vw;
}
#section-3-bottom-left {
  bottom: 20vh;
  left: 10vw;
}
.scroll-down-indicator {
  border: 2px solid #000000;
  border-radius: 20px;
  width: 40px;
  height: 60px;
  position: absolute;
  bottom: 8vh;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}
.indicator-dot {
  display: block;
  width: 18px;
  height: 18px;
  background: url(../assets/images/cursor.png);
  background-size: cover;
  border-radius: 100%;
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
}
#preloader {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#preloader .loading-content {
  text-align: center;
  animation: fadeIn 0.5s ease-in;
  width: 15vw;
  height: 15vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}
#loading-icon {
  width: 120px;
  margin-bottom: 15px;
  scale: 13;
  opacity: 0.3;
  animation: fadeInLogo 2.6s ease-in forwards;
}

@keyframes fadeInLogo {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}

.loading-percentage {
  margin-top: 15px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 0.5px;
  position: absolute;
  bottom: 8vh;
  opacity: 0.3;
  animation: fadeInCountDown 2s ease-in forwards;
}

@keyframes fadeInCountDown {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}
.preload-overlay {
  position: absolute;
  bottom: -100vh;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#mask rect {
  transform: translateY(50%);
  animation: slideMask 2.6s ease-in forwards;
  animation-timing-function: cubic-bezier(0.2, 0.5, 0.2, 0);
}

@keyframes slideMask {
  0% {
    transform: translateY(50%);
  }
  100% {
    transform: translateY(-45%);
  }
}
@media (max-width: 1500px) {
  #loading-icon {
    scale: 10;
  }
}
@media (max-width: 1200px) {
  .landing-main-text {
    width: 600px;
  }
  .eyes img {
    height: 70px;
  }
  .eye {
    height: 72px;
    width: 72px;
    border-width: 10px;
  }
  .pupil {
    width: 45px;
    height: 45px;
    top: 3px;
    left: 3px;
  }
  div.pupil img {
    width: 2.2vw;
    height: 2.2vw;
    left: 10px;
    top: 10px;
  }
  .section-3-badge {
    position: absolute;
    width: 20vw;
  }
  img.section-4-we-are,
  img.section-6-contact {
    width: 200px;
  }
  #section-4 .inner {
    padding-left: 10vw;
  }

  #typewriter-text {
    font-size: 9vw;
  }
  svg#section-4-svg {
    width: 600px;
  }
}

@media (max-width: 1024px) {
  #loading-icon {
    scale: 7;
  }
  .toggle-switch,
  .slider:before {
    transform-origin: center center;
  }
  .scroll-down-indicator {
    bottom: 12vh;
  }
  .team-col {
    width: 32.2%;
  }
  #section-3-top-right {
    top: 20vh;
    right: 10vw;
  }
  #section-3-top-left {
    left: 5vw;
  }
  #section-3-bottom-left {
    left: 5vw;
  }
  #section-4 .inner {
    padding-left: 5vw;
  }
  #section-4 .landing-intro {
    padding-top: 24px;
  }
  #section-4 .section-content {
    max-width: 90%;
    margin-bottom: 13vh;
  }
  svg#section-4-svg {
    width: 80vw;
    top: auto;
    bottom: -2vh;
  }
  img.section-4-we-are {
    width: 20vmin;
  }
  .section-3-badge {
    width: 30vw;
  }
  #section-6 .section-content {
    max-width: 90vw;
  }
  .nav-overlay {
    align-items: start;
    padding-top: 80px;
  }
  .nav-menu a {
    width: 100%;
  }
}
@media (max-width: 768px) {
  #loading-icon {
    scale: 6.5;
  }
  #section-1 {
    padding-top: 0px !important;
  }
  .site-header {
    padding: 0 10px;
  }
  .header-center img {
    height: 35px;
  }
  .nav-menu li {
    height: 15vh;
    padding: 2.5vh;
    margin: 0;
    line-height: 10vh;
  }
  .nav-menu a {
    font-size: 9vw;
  }

  .scroll-down-indicator {
    bottom: 20vh;
  }
  img.text-play {
    padding-bottom: 5vh;
  }
  #typewriter-text {
    font-size: 9vw;
  }
  .typewriter-container {
    height: 10vw;
  }
  .team-col {
    width: 49%;
  }
  img.section-6-contact {
    width: 40vw;
  }
  .contact-intro {
    font-size: 16px;
  }
  .section-3-badge {
    width: 40vw;
  }
  svg#section-4-svg {
    bottom: -10vh;
  }
  #section-5 .inner {
    padding: 12vh 16px;
    max-width: 90vw;
  }
  body.team-faded-in .team-col.hovered .team-img {
    scale: 1.2;
  }
  body.team-faded-in .team-col.hovered b,
  body.team-faded-in .team-col.hovered span {
    scale: 1;
  }
  .team-col b {
    top: -25px;
  }
  .team-col span {
    bottom: -15px;
  }
  img.section-5-title {
    width: 200px;
  }

  .hamburger {
    font-size: 42px;
  }
  .header-left a {
    font-size: 15px;
  }
  .landing-main-text {
    width: 85%;
  }
  .text-hard-work.landing-main-text {
    margin-top: 20px;
    margin-bottom: 20px;
  }
  .eyes img {
    height: 13vw;
    width: auto;
  }
  .eyes {
    gap: 6px;
  }
  .eye {
    width: 13vw;
    height: 13vw;
    border-width: 1.5vw;
  }
  .pupil {
    width: 8vw;
    height: 8vw;
    top: 2vw;
    left: 2vw;
  }
  div.pupil img {
    width: 4vw;
    height: 4vw;
    left: 6px;
    top: 6px;
  }
}

@media (max-width: 500px) {
  #loading-icon {
    scale: 5;
  }
  #section-5 .inner {
    padding: 12vh 16px;
    max-width: 95vw;
  }
  .eyes img {
    height: 15vw;
  }
  .eye {
    width: 15vw;
    height: 15vw;
  }
  .pupil {
    width: 10vw;
    height: 10vw;
    top: 2vw;
    left: 2vw;
  }
  .section-2-title {
    width: 90%;
  }
}
span.hover-count {
  position: initial !important;
  display: inline;
  font-weight: 900;
}
