/* =============================================== */
/*  COMPONENTS.CSS                                 */
/*  可重用的 UI 元件                                */
/*  navigation / button / form / card / eyebrow /  */
/*  accent / language-switch / hamburger           */
/* =============================================== */


/* =============================================== */
/*  1. SITE HEADER & NAVIGATION                    */
/* =============================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background-color: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  box-shadow: var(--shadow-nav);
  z-index: var(--z-header);
  transition: background-color var(--t), box-shadow var(--t);
}

.site-header.is-scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 60px;
  width: auto;
}

/* Menu wrapper */
.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--sp-7);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

.nav-list a {
  font-family: var(--ff-sans-tc);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--ink);
  letter-spacing: var(--ls-wide);
  position: relative;
  padding-block: var(--sp-2);
  transition: color var(--t-fast);
}

.nav-list a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--red);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t);
}

.nav-list a:hover {
  color: var(--navy);
}

.nav-list a:hover::after {
  transform: scaleX(1);
}

/* Nav actions (CTA + language) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}


/* =============================================== */
/*  2. LANGUAGE SWITCH                             */
/* =============================================== */

.lang-switch {
  display: inline-flex;
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.lang-btn {
  padding: 0.4rem 0.85rem;
  font-family: var(--ff-sans-en);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  color: var(--gtext);
  background-color: var(--white);
  transition: background-color var(--t-fast), color var(--t-fast);
}

.lang-btn + .lang-btn {
  border-left: var(--bw) solid var(--line);
}

.lang-btn:hover {
  color: var(--navy);
}

.lang-btn.is-active {
  background-color: var(--navy);
  color: var(--white);
}


/* =============================================== */
/*  3. HAMBURGER (手機選單按鈕)                     */
/* =============================================== */

.hamburger {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: var(--radius);
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  transition: transform var(--t), opacity var(--t-fast);
  transform-origin: center;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =============================================== */
/*  4. BUTTONS                                     */
/* =============================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.95rem 1.75rem;
  font-family: var(--ff-sans-en);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  border-radius: var(--radius);
  border: var(--bw-2) solid transparent;
  cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t), transform var(--t-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

/* Primary — 深藍底白字 */
.btn-primary {
  background-color: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-primary:hover {
  background-color: var(--navy-d);
  border-color: var(--navy-d);
  color: var(--white);
}

/* Outline — 透明底深藍邊 */
.btn-outline {
  background-color: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background-color: var(--navy);
  color: var(--white);
}

/* Red — 強調紅按鈕 */
.btn-red {
  background-color: var(--red);
  color: var(--white);
  border-color: var(--red);
}

.btn-red:hover {
  background-color: var(--red-d);
  border-color: var(--red-d);
  color: var(--white);
}

/* Sizes */
.btn-sm {
  padding: 0.6rem 1.1rem;
  font-size: var(--fs-xs);
}

.btn-lg {
  padding: 1.1rem 2.25rem;
  font-size: var(--fs-base);
}

.btn-block {
  display: flex;
  width: 100%;
}


/* =============================================== */
/*  5. EYEBROW & SECTION HEADING                   */
/* =============================================== */

/* 小標籤（紅色，區段上方） */
.eyebrow,
.section-eyebrow {
  display: inline-block;
  font-family: var(--ff-sans-en);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--red);
  padding-bottom: var(--sp-3);
  border-bottom: var(--bw) solid var(--line);
  margin-bottom: var(--sp-5);
}

.section-eyebrow.light {
  color: var(--red);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* 區段大標題 */
.section-title {
  font-family: var(--ff-serif-tc);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--ink);
  margin-bottom: var(--sp-5);
}

.section-title.light {
  color: var(--white);
}

/* 紅色斜體強調字（Playfair Italic） */
.accent {
  font-family: var(--ff-serif-en);
  font-style: italic;
  font-weight: var(--fw-bold);
  color: var(--red);
}

/* 區段說明文字 */
.section-lead {
  font-family: var(--ff-sans-tc);
  font-size: var(--fs-md);
  line-height: var(--lh-loose);
  color: var(--gtext);
  max-width: 56ch;
}

.section-lead.light {
  color: rgba(255, 255, 255, 0.78);
}


/* =============================================== */
/*  6. FORM ELEMENTS                               */
/* =============================================== */

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.form-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--sp-5);
}

.form-field label {
  font-family: var(--ff-sans-en);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--gtext);
  margin-bottom: var(--sp-2);
}

.form-field .req {
  color: var(--red);
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: var(--ff-sans-tc);
  font-size: var(--fs-base);
  color: var(--ink);
  background-color: var(--white);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 0;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.12);
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
  font-family: var(--ff-sans-tc);
}

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%231B3A6B' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}


/* =============================================== */
/*  7. CARD BASE (各 section 卡片的共用基底)        */
/* =============================================== */

.card {
  background-color: var(--white);
  border: var(--bw) solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}


/* =============================================== */
/*  8. STATS (數據區塊共用)                         */
/* =============================================== */

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.stat-num {
  font-family: var(--ff-serif-en);
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  color: var(--navy);
  line-height: 1;
}

.stat-label {
  font-family: var(--ff-sans-tc);
  font-size: var(--fs-sm);
  color: var(--gtext);
  letter-spacing: var(--ls-wide);
}
