:root {
  --brand:#0d6efd;
  --ink:#0e1726;
  --muted:#6b7280;
  --bg:#F7FAFC;
  --card:#ffffff;
  --cradradius:8px;
  --shadow:0 8px 24px #F7FAFC;
  --footer-bg: #f6fafc;       /* 淺底色，接近截圖 */
  --footer-line: #d9e3ef;     /* 頂部分隔線 */
  --footer-text: #3b6ea5;   /* 文字顏色 */
}

* {
  box-sizing:border-box;
}
html,body {
    height:100%;
}
body {
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif;
  color:var(--ink);
  background:var(--bg);
  overflow-x: hidden;
}

/* utility */
.container {
  width:min(1100px, 92%);
  margin-inline:auto;
}

/* Navbar */
.navbar {
  position:fixed;
  top:0; 
  left:0; 
  right:0;
  background:#fff;
  border-bottom:1px solid #eef2f7;
  z-index:1000;
}
.nav-inner {
  display:flex; 
  align-items:center; 
  justify-content:space-between;
  height:64px;
}
.logo {
  font-weight:800; 
  letter-spacing:.3px;
}
.nav-links {
  display:flex; 
  align-items:center; 
  gap:20px;
}
.nav-links a {
  color:#111827; 
  text-decoration:none; 
  font-size:14px;
  font-weight:600;
}
.nav-links a:hover {
    color:var(--brand);
}
.auth {
    display:flex; 
    gap:8px;
}
.btn {
  padding:8px 14px; 
  border-radius:10px; 
  border:1px solid #e5e7eb;
  background:#fff; 
  cursor:pointer; 
  font-weight:600;
}
.btn.primary {
  background:#000000; 
  border-color:var(--brand); 
  color:#fff;
}
.btn.ghost:hover {
    border-color:#cbd5e1;
}
.btn.primary:hover {
    background:#303030;
}
.menu-button {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.menu-button:hover {
    transform: scale(1.1);
}

.menu-button span{
  display:block; width:20px; height:2px; background:#111; margin:4px auto;
  transition: transform .25s ease, opacity .25s ease;
}

@media (max-width: 768px) {
    .menu-button {
        display: block;
    }

    .nav-links {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        max-height: 500px;
        padding: 20px;
    }

    .nav-links a {
        padding: 15px 20px;
        display: block;
        transform: translateY(-20px);
        opacity: 0;
        transition: all 0.3s ease-in-out;
        font-size: 16px;
    }

    .nav-links.active a {
        transform: translateY(0);
        opacity: 1;
    }

    /* 為每個連結添加延遲動畫 */
    .nav-links a:nth-child(1) { transition-delay: 0.1s; }
    .nav-links a:nth-child(2) { transition-delay: 0.2s; }
    .nav-links a:nth-child(3) { transition-delay: 0.3s; }
    .nav-links a:nth-child(4) { transition-delay: 0.4s; }
    .nav-links a:nth-child(5) { transition-delay: 0.5s; }
    .nav-links a:nth-child(6) { transition-delay: 0.6s; }
    .nav-links a:nth-child(7) { transition-delay: 0.7s; }
    .nav-links .auth { margin-top: 8px; display: grid; gap: 10px; }
}
@media (max-width: 768px){
  .nav-links.active ~ .menu-button span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
  .nav-links.active ~ .menu-button span:nth-child(2){ opacity: 0; }
  .nav-links.active ~ .menu-button span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }
}

/* Footer */
/* 外層區塊 */
.site-footer{
  background: var(--footer-bg);
  color: var(--footer-text);
}

.footer-inner{
  max-width: 980px;           /* 與截圖相近的寬度 */
  margin: 0 auto;
  padding: 18px 16px 28px;
  text-align: center;
}

/* 頂部細分隔線（不佔滿全寬） */
.footer-divider{
  border-top: 1px solid var(--footer-line);
  width: calc(100% - 70px);  /* 兩側留白，像截圖 */
  padding: 25px;
}

/* 三個連結：桌面三欄、手機置中換行 */
.footer-links{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 30px;
}

.footer-links .link{
  color: var(--footer-text);
  text-decoration: none;
  font-weight: 500;
}
.footer-links .link:hover{
  text-decoration: underline;
}

/* 社群 icon：描邊風、圓形外框 */
.footer-social{
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 30px;
}
.icon-btn{
  width: 34px; height: 34px;
  border: 1px solid var(--footer-text);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease;
}
.icon-btn:hover{
  transform: translateY(-1px);
  background: rgba(59,110,165,0.06);
}

/* 版權文字 */
.footer-copy{
  display: block;
  font-size: 14px;
  letter-spacing: .2px;
}

@media (max-width: 640px) {
    .footer-inner{ 
      padding-bottom: 32px; 
    }
    .footer-divider{ 
      width: calc(100% - 48px); 
    }
    .footer-links{
      grid-template-columns: 1fr;
      gap: 10px;
    }
}