/* ============================================================
   全台借貸媒合網 — 前台樣式
   設計方向：深藍 + 米白 + 琥珀點綴，走專業金融感。
   刻意避開同業常見的金黃插畫風與吉祥物，改以幾何線條與留白建立信任感。
   ============================================================ */

:root {
  --navy-900: #0b2239;
  --navy-800: #0f2c4c;
  --navy-700: #163a61;
  --navy-600: #1f4b78;
  --amber: #d4a24c;
  --amber-light: #e8c583;
  --amber-dark: #b8863a;
  --cream: #faf8f4;
  --white: #ffffff;
  --ink: #16202b;
  --muted: #5a6b7c;
  --muted-light: #8a99a8;
  --border: #e2e6eb;
  --border-strong: #cbd3dc;
  --success: #1f7a5c;
  --danger: #c0392b;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(11, 34, 57, 0.06);
  --shadow: 0 4px 16px rgba(11, 34, 57, 0.08);
  --shadow-lg: 0 12px 40px rgba(11, 34, 57, 0.12);

  --max-width: 1140px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC',
    'Noto Sans TC', 'Microsoft JhengHei', 'Helvetica Neue', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--amber-dark); }

img { max-width: 100%; height: auto; }

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

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--cream { background: var(--cream); }
.section--white { background: var(--white); }

.section-head {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 44px;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

/* 小標籤：取代同業常見的插畫裝飾 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 12px;
}

/* ===================== 頁首 ===================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--navy-800);
  letter-spacing: -0.02em;
}

.logo:hover { color: var(--navy-800); }

/* 幾何標誌：三條遞增的線，象徵額度級距 */
.logo__mark {
  display: grid;
  gap: 3px;
  width: 26px;
}

.logo__mark span {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--navy-700);
}

.logo__mark span:nth-child(1) { width: 60%; }
.logo__mark span:nth-child(2) { width: 100%; background: var(--amber); }
.logo__mark span:nth-child(3) { width: 80%; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
}

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

/* ===================== 按鈕 ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.16s ease,
    border-color 0.16s ease, box-shadow 0.16s ease;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn--primary {
  background: var(--navy-800);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover:not(:disabled) {
  background: var(--navy-700);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn--accent {
  background: var(--amber);
  color: var(--navy-900);
}

.btn--accent:hover:not(:disabled) {
  background: var(--amber-light);
  color: var(--navy-900);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--navy-800);
}

.btn--ghost:hover:not(:disabled) {
  border-color: var(--navy-600);
  color: var(--navy-800);
}

.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn--block { width: 100%; }

/* 首屏那顆 LINE 是全站唯一的主要轉換點，比一般按鈕再大一級 */
.btn--lg { padding: 15px 24px; font-size: 1.02rem; }

/*
 * LINE 是站上唯一借用外部品牌色的元件 —— 使用者要一眼認出「這是加 LINE」，
 * 換成深藍反而降低辨識度。其餘元件仍維持深藍 + 琥珀。
 */
.btn--line {
  background: #06c755;
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn--line:hover:not(:disabled) {
  background: #05b34c;
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn__line-icon {
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: #06c755;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
}

/* ===================== 首屏 ===================== */

.hero {
  position: relative;
  background: var(--navy-800);
  color: var(--white);
  padding: 64px 0 80px;
  overflow: hidden;
}

/* 幾何背景：斜向網格線，取代插畫 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      115deg,
      transparent 0 46%,
      rgba(255, 255, 255, 0.035) 46% 47%,
      transparent 47%
    ),
    linear-gradient(
      115deg,
      transparent 0 68%,
      rgba(212, 162, 76, 0.14) 68% 69%,
      transparent 69%
    );
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 56px;
  align-items: start;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber-light);
}

.hero__lead {
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 30em;
  margin-bottom: 28px;
}

.hero .eyebrow { color: var(--amber-light); }

.hero__points {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}

.hero__points li {
  position: relative;
  padding-left: 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.97rem;
}

.hero__points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 12px;
  height: 2px;
  background: var(--amber);
}

.hero__stats {
  display: flex;
  gap: 36px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hero__stat strong {
  display: block;
  font-size: 1.6rem;
  color: var(--amber-light);
  line-height: 1.2;
}

.hero__stat span {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.66);
}

/* ===================== LINE 諮詢卡片 ===================== */

.cta-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  color: var(--ink);
}

.cta-card__head {
  padding: 26px 28px 0;
}

.cta-card__head h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.cta-card__head p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.cta-card__body { padding: 18px 28px 26px; }

.cta-card__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cta-card__list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.6;
}

.cta-card__list li:last-child { margin-bottom: 0; }

/* 勾選記號用 CSS 畫：省一次請求，也不必擔心字型缺字 */
.cta-card__list li::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 11px;
  border: solid var(--amber);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cta-card__fallback {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-card__fallback a { color: var(--navy-700); font-weight: 600; }

/* 免責與防詐提醒：存在感要有，但不能搶走 LINE 按鈕的視線 */
.note {
  margin: 16px 0 0;
  font-size: 0.78rem;
  color: var(--muted-light);
  line-height: 1.7;
}

/* LINE 邀請：首屏卡片與客服區塊共用，後台沒設定連結時整塊隱藏 */
.line-invite {
  margin: 20px 0 4px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(6, 199, 85, 0.06);
  border: 1px solid rgba(6, 199, 85, 0.2);
}

.line-invite p {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ===================== 流程 / 特色 ===================== */

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  counter-reset: flow;
}

.flow__item {
  position: relative;
  padding-top: 18px;
  counter-increment: flow;
}

.flow__item::before {
  content: counter(flow, decimal-leading-zero);
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--amber-dark);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.flow__item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
}

.flow__item h3 { margin-bottom: 6px; }
.flow__item p { color: var(--muted); font-size: 0.94rem; margin: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { color: var(--navy-800); margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.93rem; margin: 0; }

.card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(15, 44, 76, 0.06);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.card__icon svg { width: 20px; height: 20px; stroke: var(--navy-700); }

/* 額度級距表 */
.range-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.range-table th,
.range-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}

.range-table th {
  background: var(--navy-800);
  color: var(--white);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
}

.range-table tr:last-child td { border-bottom: none; }
.range-table td:first-child { font-weight: 600; color: var(--navy-800); }
.range-table tbody tr:hover { background: var(--cream); }

.table-scroll { overflow-x: auto; }

/* ===================== FAQ ===================== */

.faq { max-width: 780px; margin: 0 auto; }

.faq__item {
  border-bottom: 1px solid var(--border);
}

.faq__item summary {
  padding: 18px 34px 18px 0;
  font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}

.faq__item[open] summary::after { transform: translateY(-20%) rotate(-135deg); }

.faq__item p {
  color: var(--muted);
  font-size: 0.94rem;
  padding-bottom: 18px;
  margin: 0;
}

/* ===================== 聯絡客服 ===================== */

.contact-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 44px 48px;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  color: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.contact-panel .eyebrow { color: var(--amber-light); }
.contact-panel h2 { color: var(--white); margin-bottom: 12px; }
.contact-panel p { margin: 0; }

.contact-panel__list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.contact-panel__list a { color: var(--amber-light); }
.contact-panel__list a:hover { color: var(--white); }

/* 深色底上不需要再加淺綠外框，按鈕本身已經夠顯眼 */
.contact-panel .line-invite {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

.contact-panel__note {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.contact-panel__note a { color: var(--amber-light); }

/* ===================== 法遵揭露 ===================== */

.legal {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  padding: 52px 0;
  font-size: 0.87rem;
}

.legal h2 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.legal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}

.legal h3 {
  color: var(--amber-light);
  font-size: 0.92rem;
  margin-bottom: 8px;
}

.legal p { margin: 0 0 8px; line-height: 1.7; }

.legal strong { color: var(--white); }

/* ===================== 頁尾 ===================== */

.site-footer {
  background: var(--navy-800);
  color: rgba(255, 255, 255, 0.6);
  padding: 40px 0 28px;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  justify-content: space-between;
  align-items: center;
}

.site-footer a { color: rgba(255, 255, 255, 0.78); }
.site-footer a:hover { color: var(--amber-light); }

.site-footer__links { display: flex; gap: 20px; flex-wrap: wrap; }

.site-footer__bottom {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ===================== 單欄置中頁（404） ===================== */

.simple-page {
  min-height: 62vh;
  display: grid;
  place-items: center;
  padding: 56px 20px;
}

/* ===================== 響應式 ===================== */

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  /* 單欄時把 LINE 卡片提到文案之前 —— 它是站上唯一的轉換入口，
     排在三段介紹之後等於一進站就落在摺線以下 */
  .hero__grid .cta-card { order: -1; }
  .flow { grid-template-columns: 1fr; gap: 24px; }
  .contact-panel { grid-template-columns: 1fr; gap: 28px; padding: 34px 28px; }
  .section { padding: 56px 0; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.btn) { display: none; }
  .hero { padding: 44px 0 56px; }
  .hero__stats { gap: 22px; flex-wrap: wrap; }
  .cta-card__head, .cta-card__body { padding-left: 20px; padding-right: 20px; }
}

/* 尊重使用者的減少動態偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
