/* ======== Global ======== */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans Traditional Chinese", "Noto Sans TC",
               -apple-system, BlinkMacSystemFont, "Microsoft JhengHei", sans-serif;
  background: #f1f1f1;
  color: #222;
}

body {
  font-size: 1.1vw;   /* 基準字級 */
  line-height: 1.8;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ======== Header ======== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.2vw 0.6vw rgba(0, 0, 0, 0.06);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8vw 1.6vw;
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 1.4vw;
  color: #c60021;
  letter-spacing: 0.15em;
}

.logo span {
  margin-left: 0.4vw;
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1.6vw;
  font-size: 0.9vw;
}

.main-nav a {
  position: relative;
  padding-bottom: 0.2vw;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 0.15vw;
  background: #c60021;
  transition: width 0.2s;
}

.main-nav a:hover::after {
  width: 100%;
}

.header-cta {
  font-size: 0.9vw;
  padding: 0.4vw 0.8vw;
  border-radius: 999px;
  border: 0.1vw solid #c60021;
  color: #c60021;
  cursor: pointer;
  background: #fff;
  white-space: nowrap;
}

/* ======== Main layout spacing ======== */
main {
  padding-top: 0;
}

/* ======== Section 1: Hero ======== */
.hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.hero-image-wrapper {
  width: 100%;
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.45) 35%,
    rgba(0, 0, 0, 0.35) 60%,
    rgba(0, 0, 0, 0.2) 100%
  );
  pointer-events: none;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;   /* 水平置中 */
  text-align: center;
  color: #fff;
  pointer-events: none;
  margin: 0 0 0 50vw;
}

.hero-title {
  font-size: 3.8vw;
  font-weight: 700;
  margin: 0 0 -2vw;
}

.hero-subtitle {
  font-size: 2.5vw;
  font-weight: 500;
  margin: 0 0 1.2vw;
}

.hero-line3 {
  font-size: 1.6vw;
  font-weight: 500;
  margin: 0 0 0vw;
}

/* 第 4 行：兩個 icon + 文字 */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.4vw;
  font-size: 1vw;
  font-weight: 500;
}

.hero-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 0.6vw;
}

/* Hero 小 PNG icon */
.hero-icon {
  display: inline-block;
  width: 1.1vw;
  height: 1.1vw;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
}

.hero-icon-world {
  background-image: url("img/hero-stat-world.png");
}

.hero-icon-award {
  background-image: url("img/hero-stat-award.png");
}

/* ======== Section 2: Video ======== */
.section-video {
  padding: 4vw 0;
  background: #f1f1f1;
}

.video-frame {
  position: relative;
  margin: 0 auto;
  border-radius: 0.8vw;
  background: #fff;
  padding: 1.2vw;
  box-shadow: 0 0.6vw 1.6vw rgba(0, 0, 0, 0.08);
}

.video-frame::before,
.video-frame::after {
  content: "";
  position: absolute;
  inset: 0.8vw;
  border-radius: 0.8vw;
  border: 0.08vw solid rgba(0,0,0,0.05);
  pointer-events: none;
}

.video-inner {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  border-radius: 0.6vw;
  background: #000;
}

.video-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  text-align: center;
  margin-top: 1.2vw;
  font-size: 1vw;
}

/* ======== Section 3: Timeline ======== */
.section-timeline {
  padding: 4vw 0 5vw;
  background: #f6f6f6;
}

.timeline-header {
  text-align: center;
  margin-bottom: 3vw;
}

/* PNG icon for timeline header */
.timeline-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 0.6vw;
  background: url("img/timeline-icon.png") center/contain no-repeat;
}

.timeline-title {
  font-size: 1.8vw;
  font-weight: 700;
  margin-bottom: 0.3vw;
}

.timeline-subtitle {
  font-size: 1vw;
  color: #666;
}

.timeline-wrapper {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2.8vw;
}

/* 每個年份 */
.timeline-item {
  position: relative;
  padding: 2.2vw 0;
}

/* 中線圖片：寬30px，高度依父層自動 + 上下多出27px */
.timeline-line {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -27px;
  bottom: -27px;
  width: 30px;
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 30px auto;
  z-index: 5;          /* 壓在白卡片上方 */
  pointer-events: none;
}

/* 六張對應的中線圖：放進 /img 即可銜接 */
.timeline-line-1 { background-image: url("img/timeline-line-1.png"); }
.timeline-line-2 { background-image: url("img/timeline-line-2.png"); }
.timeline-line-3 { background-image: url("img/timeline-line-3.png"); }
.timeline-line-4 { background-image: url("img/timeline-line-4.png"); }
.timeline-line-5 { background-image: url("img/timeline-line-5.png"); }
.timeline-line-6 { background-image: url("img/timeline-line-6.png"); }

/* 整片白底卡片：橫跨中線，內部排文圖 */
.timeline-card {
  position: relative;
  z-index: 1;
  background: #fff;
  padding: 68px 1.8vw 1.6vw;   /* 上方留空給年份往上凸出 */
  /*border-radius: 0.6vw;*/
  /*box-shadow: 0 0.4vw 1.2vw rgba(0, 0, 0, 0.06);*/
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3vw;
  overflow: visible;           /* 讓年份可以超出不被砍掉 */
}

.timeline-text {
  text-align: left;
}

.timeline-image img {
  /*border-radius: 0.6vw;*/
  /*box-shadow: 0 0.4vw 1.2vw rgba(0, 0, 0, 0.06);*/
}

/* 左右版型：用 order 控制圖文互換 */
.timeline-item.left .timeline-text {
  order: 1;
}

.timeline-item.left .timeline-image {
  order: 2;
}

.timeline-item.right .timeline-text {
  order: 2;
}

.timeline-item.right .timeline-image {
  order: 1;
}

/* ===== 年份區：Noto Serif Traditional Chinese, 72px, 往上凸出一半 ===== */
.timeline-year {
  position: absolute;
  top: 0;
  left: 1.8vw;
  transform: translateY(-50%) skewX(-8deg);  /* ← 原本只有 translateY，加上 skewX */ /* 往上超出一半 */
  font-family: "Noto Serif Traditional Chinese", "Noto Serif TC",
               "Noto Sans Traditional Chinese", serif;
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  color: #c60021;
  z-index: 2;                    /* 在白底之上 */
}

/* 車型標題與副標、內文字級設定 */
.timeline-car-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 0.4vw;
}

.timeline-car-subtitle {
  font-size: 18px;
  color: #333333;
  margin-bottom: 0.6vw;
}

.timeline-text p {
  font-size: 16px;
  margin: 0 0 0.4vw;
}

.timeline-text ul {
  padding-left: 1.1em;
  margin: 0.4vw 0 0;
  font-size: 16px;
}

/* ======== Footer ======== */
.site-footer {
  background: #ffffff;
  border-top: 0.1vw solid #ddd;
  padding: 2.5vw 0 1.8vw;
  font-size: 0.8vw;
}

.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6vw;
  padding-bottom: 1.4vw;
  border-bottom: 0.06vw solid #e0e0e0;
  margin-bottom: 1.2vw;
}

.footer-nav a {
  color: #555;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1vw;
  color: #999;
}

.footer-social {
  display: flex;
  gap: 1vw;
  align-items: center;
}

.footer-social span {
  font-size: 0.9vw;
}

.footer-social a {
  font-size: 1vw;
}

/* TOP 按鈕 */
.btn-top {
  position: fixed;
  right: 1.6vw;
  bottom: 1.6vw;
  width: 3vw;
  height: 3vw;
  border-radius: 50%;
  border: none;
  background: #c60021;
  color: #fff;
  font-size: 1vw;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.4vw 1vw rgba(0, 0, 0, 0.25);
  z-index: 900;
}

/* ======== RWD: Mobile (<= 768px) ======== */
@media (max-width: 768px) {
  body {
    font-size: 3.4vw;
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    padding: 2.2vw 4vw;
    flex-wrap: wrap;
    gap: 2.4vw;
  }

  .logo {
    font-size: 4vw;
  }

  .main-nav {
    width: 100%;
    order: 3;
  }

  .main-nav ul {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 4vw;
    padding-bottom: 1vw;
    font-size: 3vw;
  }

  .header-cta {
    font-size: 2.8vw;
    padding: 1.4vw 3vw;
    border-width: 0.3vw;
  }

  main {
    padding-top: 0;
  }

  /* Hero：主圖等比縮小＋文字在圖下 */
  .hero {
    position: relative;
    background: #000;
  }

  .hero-overlay {
    display: none;
  }

  .hero-content {
    position: static;
    padding: 4vw;
    color: #111;
    background: #ffffff;
    align-items: center;
    text-align: center;
    margin: auto;
  }

  .hero-title {
    font-size: 7vw;
    margin-bottom: 2vw;
  }

  .hero-subtitle {
    font-size: 4.2vw;
    margin-bottom: 2.5vw;
  }

  .hero-line3 {
    font-size: 3.6vw;
    margin-bottom: 3vw;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.8vw;
    font-size: 3.2vw;
  }

  .hero-stats .stat {
    gap: 2vw;
  }

  .hero-icon {
    width: 4vw;
    height: 4vw;
  }

  /* Timeline header icon 調整尺寸 */
  .timeline-icon {
    width: 14vw;
    height: 14vw;
    margin-bottom: 2vw;
  }

  /* Video */
  .section-video {
    padding: 6vw 0;
  }

  .video-frame {
    padding: 3vw;
    border-radius: 2.4vw;
  }

  .video-frame::before,
  .video-frame::after {
    inset: 2.4vw;
    border-width: 0.3vw;
    border-radius: 2.4vw;
  }

  .video-inner {
    border-radius: 2vw;
  }

  .video-caption {
    font-size: 3.2vw;
    margin-top: 3vw;
  }

  /* Timeline */
  .section-timeline {
    padding: 6vw 0 8vw;
  }

  .timeline-header {
    margin-bottom: 5vw;
  }

  .timeline-title {
    font-size: 5.2vw;
    margin-bottom: 1.2vw;
  }

  .timeline-subtitle {
    font-size: 3.4vw;
  }

  /* 手機版不顯示中線圖片 */
  .timeline-line {
    display: none;
  }

  .timeline-list {
    gap: 4vw;
  }

  .timeline-item {
    padding: 0;
  }

  .timeline-card {
    display: flex;
    flex-direction: column;
    padding: 4vw;
     /*border-radius: 3vw;*/
  }

  /* 手機版：六個區塊一律上文下圖 */
  .timeline-item.left .timeline-text,
  .timeline-item.right .timeline-text {
    order: 1;
  }

  .timeline-item.left .timeline-image,
  .timeline-item.right .timeline-image {
    order: 2;
  }


  /* 手機版年份改回正常排版，不再往上凸 */
  .timeline-year {
    position: static;
    transform: translateY(0%) skewX(-8deg);
    font-size: 7vw;
    margin-bottom: 2vw;
  }

  .timeline-car-title {
    font-size: 4vw;
    margin-bottom: 1vw;
  }

  .timeline-car-subtitle {
    font-size: 3.4vw;
    margin-bottom: 2vw;
  }

  .timeline-text p,
  .timeline-text ul {
    font-size: 3.2vw;
  }

  .timeline-image img {
    margin-top: 3vw;
    /*border-radius: 3vw;*/
  }

  /* Footer */
  .site-footer {
    font-size: 3vw;
    padding: 6vw 0 5vw;
  }

  .footer-nav {
    gap: 3vw;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 2vw;
  }

  .footer-social span,
  .footer-social a {
    font-size: 3vw;
  }

  .btn-top {
    width: 10vw;
    height: 10vw;
    right: 4vw;
    bottom: 4vw;
    font-size: 4vw;
    box-shadow: 0 1vw 3vw rgba(0,0,0,0.3);
  }
}
