/* ========= 英文單字對照表（CSS 常用字，學英文用）=========
   color        顏色              background   背景
   border       邊框              radius       圓角（弧度）
   shadow       陰影              width/height 寬度/高度
   margin       外距（元素外面的空間）      padding  內距（元素內部、內容跟邊框之間的空間）
   display      顯示方式          flex/grid    排版方式（彈性排版／格線排版）
   align        對齊              justify      對齊（另一個方向）
   position     定位方式          sticky/fixed 黏著/固定（捲動時的定位）
   transform    變形（移動/縮放/旋轉）    transition 轉場效果（漸變動畫）
   opacity      透明度            hover        滑鼠移過去（懸停）
   active       啟用中/選取中      z-index      堆疊順序（誰蓋在誰上面）
   media query  媒體查詢（依螢幕大小切換樣式）
   ============================================ */

:root { /* root = 根，:root 代表整個網頁最上層，可在這裡定義共用變數 */
  --color-bg: #ffffff;          /* bg = background 背景色 */
  --color-bg-alt: #f7f7f9;      /* alt = alternative 替代用的背景色 */
  --color-text: #1a1a1f;        /* 文字顏色 */
  --color-text-muted: #5b5b66;  /* muted = 較淡、較不顯眼的文字顏色 */
  --color-primary: #2f5ce8;     /* primary = 主要色（品牌主色） */
  --color-primary-dark: #1f3fb8;/* dark = 較深的主色（滑鼠移過去時用） */
  --color-border: #e6e6ec;      /* border = 邊框顏色 */
  --radius: 12px;                /* 圓角大小 */
  --shadow: 0 8px 24px rgba(20, 20, 30, 0.06); /* 陰影效果 */
  --container-width: 1140px;    /* container = 容器，內容最大寬度 */
  --header-height: 72px;        /* header = 頁首（網頁最上方） */
  font-size: 16px;
}

* { box-sizing: border-box; } /* box-sizing = 計算元素寬高的方式（含邊框與內距） */

html {
  scroll-behavior: smooth;       /* scroll = 捲動；smooth = 平滑的（捲動時有滑順動畫） */
  scroll-snap-type: y mandatory; /* snap = 吸附；捲動時自動吸附對齊每個區塊 */
}

body {
  margin: 0;
  font-family: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* font-family = 字體 */
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7; /* line-height = 行高（文字行與行之間的距離） */
}

main > section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-margin-top: var(--header-height);
}

/* Scroll-reveal 捲動時淡入顯現 */
.reveal {
  opacity: 0; /* opacity = 透明度，0 是完全透明（看不見） */
  transform: translateY(32px); /* translateY = 沿 Y 軸（上下）移動位置，先往下移 32px */
  transition: opacity 0.7s ease, transform 0.7s ease; /* transition = 這兩個屬性改變時，花 0.7 秒平滑過渡 */
}
.reveal.in-view {
  opacity: 1; /* 變回完全不透明（看得見） */
  transform: translateY(0); /* 移回原位 */
}
@media (prefers-reduced-motion: reduce) { /* 使用者設定「減少動態效果」時 */
  .reveal { opacity: 1; transform: none; transition: none; }
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 16px; font-weight: 900; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 16px; color: var(--color-text-muted); }

.eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.eyebrow.center { display: block; text-align: center; }
h2.center { text-align: center; margin-bottom: 48px; }

/* Buttons 按鈕 */
.btn { /* btn = button 按鈕的縮寫 */
  display: inline-block; /* inline-block = 行內區塊（跟文字同行，但可設定寬高） */
  padding: 14px 28px;
  border-radius: 999px; /* 圓角很大 → 變成膠囊/圓形按鈕 */
  font-weight: 700; /* font-weight = 字重（粗細），700 = 粗體 */
  text-decoration: none; /* text-decoration = 文字裝飾，none = 去掉底線 */
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent; /* transparent = 透明 */
  cursor: pointer; /* cursor = 滑鼠游標樣式，pointer = 手指圖案（可點擊） */
  font-size: 1rem;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff; /* #fff = 白色 */
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); } /* hover = 滑鼠移過去時 */
.btn-ghost { /* ghost = 幽靈，指「較淡、只有外框」的按鈕樣式 */
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-block { width: 100%; text-align: center; } /* block = 區塊；佔滿整行寬度 */

/* Header 頁首 */
.site-header {
  position: sticky; /* sticky = 黏著定位；捲動時黏在頂端，直到超出父層範圍 */
  top: 0; /* 黏在距離頂端 0 的位置 */
  z-index: 100; /* z-index = 堆疊順序，數字越大越蓋在上面 */
  background: rgba(255, 255, 255, 0.9); /* rgba = 紅綠藍+透明度，0.9 接近不透明 */
  backdrop-filter: blur(8px); /* backdrop-filter = 背景濾鏡；blur = 模糊，做出毛玻璃效果 */
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex; /* flex = 彈性排版，讓內部元素可以左右排列並對齊 */
  align-items: center; /* align-items = 讓內部元素在「交叉軸」（這裡是垂直方向）置中 */
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* justify-content = 主軸方向的對齊；space-between = 兩端貼齊，中間平均留白 */
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--color-text);
  text-decoration: none;
}
.logo-city {
  font-family: "Caveat", "Noto Sans TC", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  transform: rotate(-4deg);
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
}
/* Side nav 側邊導覽列（nav = navigation 導覽） */
.side-nav {
  position: fixed; /* fixed = 固定定位；不管怎麼捲動，永遠固定在畫面同一個位置 */
  top: 50%;
  right: 28px;
  transform: translateY(-50%); /* 往上移自己高度的一半，讓它「垂直置中」 */
  z-index: 200;
  display: flex;
  flex-direction: column; /* flex-direction = 排列方向；column = 直排（由上到下） */
  gap: 20px; /* gap = 間距（元素之間的空隙） */
}
.side-nav a,
.side-nav button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  text-decoration: none;
}
.side-nav button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.lang-toggle {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}
.side-nav .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-border);
  box-shadow: 0 0 0 3px transparent;
  transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}
.side-nav-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.side-nav a:hover .side-nav-label,
.side-nav button:hover .side-nav-label {
  opacity: 1;
  transform: translateX(0);
}
.side-nav a:hover .dot,
.side-nav button:hover .dot {
  background: var(--color-primary);
}
.side-nav a.active .dot {
  background: var(--color-primary);
  transform: scale(1.4);
  box-shadow: 0 0 0 3px rgba(47, 92, 232, 0.18);
}
.side-nav a.active .side-nav-label {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Hero */
.hero {
  position: relative;
  padding: 120px 0 90px;
  background: var(--color-bg);
  overflow: hidden;
}
.hero-map-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130%;
  max-width: none;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}
.hero-brand-group {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
}
.hero-city {
  font-family: "Caveat", "Noto Sans TC", cursive;
  font-size: 2.1rem;
  font-weight: 700;
  color: #294197;
}
.hero-icon {
  height: 160px;
  width: auto;
  margin: 4px 0;
}
.hero-brand-text {
  font-family: "Caveat", "Noto Sans TC", cursive;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--color-text);
  text-align: center;
}
.hero-tagline {
  font-size: 1.1rem;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--color-text-muted);
  max-width: 460px;
  margin: 0 auto;
}

/* Explore */
.explore {
  padding: 120px 0 60px;
  background: var(--color-bg-alt);
}
.explore-header { margin-bottom: 32px; }
.explore-body {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.explore-map {
  position: relative;
  flex: 1 1 62%;
  min-width: 0;
  aspect-ratio: 2430 / 1192;
  border-radius: var(--radius);
  overflow: visible;
  background: var(--color-bg-alt);
}
.taichung-districts {
  position: absolute;
  inset: 0;
}
.district {
  position: absolute;
  max-width: none;
  opacity: 0.6;
  transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
  filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
  cursor: pointer;
}
.district:hover,
.district.lifted {
  transform: translateY(-14px) scale(1.03);
  opacity: 1;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.35));
  z-index: 5;
}
/* Zones */
.zones {
  flex: 1 1 38%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.zone {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.zone:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}
.zone h3 {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zone h3::after {
  content: "+";
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  transition: transform 0.25s ease;
}
.zone.active h3::after {
  content: "−";
  color: var(--color-primary);
}
.zone-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.3s ease;
}
.zone.active .zone-content {
  max-height: 480px;
  opacity: 1;
  margin-top: 12px;
}
.zone-desc {
  font-size: 0.8rem;
  margin-bottom: 12px;
}
.zone ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.zone li {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 0;
  border-top: 1px solid var(--color-border);
}
.zone li:first-child { border-top: none; }

/* Prepare */
.prepare { padding: 120px 0; }
.checklist {
  list-style: none; /* list-style = 清單前面的符號樣式，none = 不顯示 */
  margin: 0;
  padding: 0;
  display: grid; /* grid = 格線排版，把區域切成好幾行好幾列 */
  grid-template-columns: repeat(2, 1fr); /* 分成 2 欄，每欄等寬(1fr = 平均分配的一份) */
  gap: 24px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 24px;
}
.checklist h3 { margin-bottom: 6px; }
.checklist p { margin: 0; }
.check-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 900;
  flex-shrink: 0;
}

/* Safety notes */
.safety-notes {
  margin-top: 32px;
  background: #fff8ec;
  border: 1px solid #f0d9a8;
  border-radius: var(--radius);
  padding: 24px 28px;
}
.safety-title {
  margin-bottom: 16px;
  color: #8a5a00;
}
.safety-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.safety-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.safety-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.speed-sign {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.safety-item h4 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #8a5a00;
}
.safety-item p {
  margin: 0;
  font-size: 0.9rem;
}

/* Services */
.services { padding: 90px 0; background: var(--color-bg); }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cards-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 760px;
  margin: 0 auto;
}
.card {
  position: relative;
  overflow: visible;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}
.card-icon {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.card-spec {
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.card-price {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-primary);
  margin-bottom: 12px;
}
.card-price small {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: 4px;
}
.card-visual {
  position: absolute;
  top: -34px;
  right: -20px;
  width: 210px;
  opacity: 0;
  transform: scale(0.85) rotate(-4deg);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}
.card:hover .card-visual {
  opacity: 1;
  transform: scale(1) rotate(-2deg);
}
.card-visual img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
}

/* Price table 完整車型價目表（可收合） */
.price-table-wrap {
  margin-top: 40px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.price-table-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.price-table-toggle:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow);
}
.price-table-toggle::after {
  content: "+";
  font-weight: 400;
  font-size: 1.2rem;
  color: var(--color-text-muted);
}
.price-table-toggle.active::after {
  content: "\2212"; /* − */
  color: var(--color-primary);
}
.price-table-content {
  max-height: 0;
  overflow: hidden;
  overflow-x: auto; /* 展開時內容太寬就橫向捲動，手機版不會把整頁撐壞 */
  opacity: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: max-height 0.35s ease, opacity 0.25s ease, margin-top 0.3s ease;
}
.price-table-content.active {
  max-height: 900px;
  opacity: 1;
  margin-top: 12px;
}
.price-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.price-table th,
.price-table td {
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap;
}
.price-table thead th {
  background: var(--color-bg-alt);
  font-weight: 700;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
}
.price-table tbody tr {
  border-top: 1px solid var(--color-border);
}
.price-table tbody tr:nth-child(odd) {
  background: var(--color-bg-alt);
}
.price-table td:first-child {
  font-weight: 700;
}
.price-table td.price-now {
  color: var(--color-primary);
  font-weight: 900;
}
.price-table td.price-was {
  color: var(--color-text-muted);
  font-size: 0.85em;
}

/* Features */
.features { padding: 90px 0; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.feature h3::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 2px;
  margin-bottom: 16px;
}

/* Contact */
.contact { padding: 90px 0; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.contact-list li {
  margin-bottom: 12px;
  color: var(--color-text-muted);
}
.contact-list strong {
  display: inline-block;
  min-width: 64px;
  color: var(--color-text);
}
.contact-form {
  background: var(--color-bg-alt);
  padding: 32px;
  border-radius: var(--radius);
}
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}
.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--color-text-muted);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-note {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: var(--color-primary);
  min-height: 1.2em;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--color-primary); }

/* Responsive 響應式（依螢幕寬度自動調整版面） */
/* media query 媒體查詢：max-width 900px = 當螢幕寬度小於等於 900px 時，套用下面這些樣式 */
@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .explore-body { flex-direction: column; }
  .explore-map { width: 100%; }
  /* 手機/平板內容常常比一個畫面高，強制吸附捲動（mandatory）容易讓輕輕一滑就跳到下一頁，關掉比較順手 */
  html { scroll-snap-type: none; }
  main > section { scroll-snap-align: none; min-height: auto; }
}

@media (max-width: 640px) {
  .side-nav { right: 14px; gap: 14px; }
  .side-nav-label { display: none; }
  .side-nav a:hover .side-nav-label { display: none; }
  .lang-toggle .side-nav-label {
    display: block;
    position: static;
    opacity: 1;
    transform: none;
    font-size: 0.65rem;
    padding: 2px 7px;
  }
  .cards, .feature-grid, .checklist, .safety-grid { grid-template-columns: 1fr; }
  .hero { padding: 100px 0 60px; }
  .hero-brand { gap: 6px; }
  .hero-icon { height: 90px; }
  .hero-brand-group { gap: 8px; }
  .hero-city { font-size: 1.1rem; }
  .hero-brand-text { font-size: 1.3rem; }
  .hero-tagline { font-size: 0.95rem; padding: 0 12px; }
  .hero-city { font-size: 1.3rem; }
}
