/* ══════════════════════════════════════════════
   MANI 網路科技 — 設計系統 v3.0
   清新白底 × AI 科技感風格
   主色調：白底 + 藍紫 AI 漸層 + 青藍點綴
══════════════════════════════════════════════ */

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

:root {
  /* ── AI 主色 ── */
  --ai-1:         #6C63FF;
  --ai-2:         #3B8BFF;
  --ai-3:         #00C8C8;
  --ai-grad:      linear-gradient(135deg, #6C63FF 0%, #3B8BFF 60%, #00C8C8 100%);
  --ai-grad-soft: linear-gradient(135deg, rgba(108,99,255,.1) 0%, rgba(59,139,255,.07) 100%);
  --orange:       #FF6B35;

  /* ── 底色 ── */
  --bg:       #F5F7FF;
  --bg-white: #FFFFFF;
  --bg-sec:   #EEF2FF;

  /* ── 文字 ── */
  --text-h:     #1A1A3A;
  --text-body:  #3C3C5E;
  --text-muted: #6A6A8E;
  --text-dim:   #A0A0C0;

  /* ── 邊框 / 陰影 ── */
  --border:        rgba(108,99,255,.12);
  --border-strong: rgba(108,99,255,.28);
  --shadow-sm:     0 2px 10px rgba(108,99,255,.08);
  --shadow-md:     0 8px 28px rgba(108,99,255,.13);
  --shadow-lg:     0 18px 52px rgba(108,99,255,.17);

  --max-w: 1200px;
  --r:     14px;
  --r-sm:  8px;
  --ease:  0.26s cubic-bezier(.4,0,.2,1);
}

/* ════ BASE ════ */
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.78;
  overflow-x: hidden;
}

/* ── SKIP LINK ── */
.skip-link {
  position: absolute; top: -60px; left: 1rem;
  background: var(--ai-grad); color: #fff;
  padding: .5rem 1rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  font-weight: 700; z-index: 9999; transition: top .2s;
}
.skip-link:focus { top: 0; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 {
  font-family: 'Montserrat', 'Noto Sans TC', sans-serif;
  font-weight: 900; line-height: 1.2; color: var(--text-h);
}
h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.1rem; }
p  { color: var(--text-body); line-height: 1.82; }
a  { color: var(--ai-1); }

/* ── LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 1.5rem; }

/* ── SECTION LABELS ── */
.section-label {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .14em;
  background: var(--ai-grad-soft);
  color: var(--ai-1);
  border: 1px solid rgba(108,99,255,.18);
  padding: .3rem .85rem; border-radius: 999px;
  margin-bottom: .9rem;
}
.section-label::before {
  content: ''; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ai-grad);
}

.section-title { color: var(--text-h); }
.section-title em {
  font-style: normal;
  background: var(--ai-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-title + p { margin-top: .6rem; max-width: 540px; color: var(--text-muted); }

/* ════ BUTTONS ════ */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  font-weight: 700; font-size: .9rem; padding: .8rem 1.7rem;
  border-radius: 999px; text-decoration: none;
  transition: transform var(--ease), box-shadow var(--ease);
  cursor: pointer; border: none; white-space: nowrap;
}
.btn-primary {
  background: var(--ai-grad); color: #fff;
  box-shadow: 0 4px 18px rgba(108,99,255,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(108,99,255,.45); }

.btn-outline {
  background: var(--bg-white);
  border: 1.5px solid var(--border-strong);
  color: var(--ai-1);
}
.btn-outline:hover { background: var(--bg-sec); transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-orange {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; box-shadow: 0 4px 18px rgba(255,107,53,.3);
}
.btn-orange:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(255,107,53,.42); }

/* ════ CARDS ════ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); transform: translateY(-4px); }

/* ════ NAV ════ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 12px rgba(108,99,255,.07);
}
nav.main-nav {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 1.5rem; height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: 'Montserrat', sans-serif; font-size: 1.4rem;
  font-weight: 900; text-decoration: none;
  background: var(--ai-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px; white-space: nowrap;
}
.nav-links { display: flex; gap: 1.8rem; list-style: none; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: .88rem; font-weight: 600;
  transition: color var(--ease); white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ai-1); }

.nav-cta {
  background: var(--ai-grad) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding: .45rem 1.2rem; border-radius: 999px;
  font-weight: 700 !important;
  box-shadow: 0 3px 14px rgba(108,99,255,.3);
}
.nav-cta:hover {
  box-shadow: 0 6px 22px rgba(108,99,255,.45) !important;
  transform: translateY(-1px);
  color: #fff !important;
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--ai-1); border-radius: 2px; transition: var(--ease);
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.mobile-menu {
  display: none; position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.97); backdrop-filter: blur(16px);
  z-index: 999; overflow-y: auto;
}
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; padding: 1.5rem; display: flex; flex-direction: column; gap: .4rem; }
.mobile-menu li a {
  display: block; padding: .85rem 1.1rem;
  color: var(--text-body); text-decoration: none;
  font-size: 1rem; font-weight: 600;
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: color var(--ease), background var(--ease), padding var(--ease);
}
.mobile-menu li a:hover { color: var(--ai-1); background: var(--bg-sec); padding-left: 1.5rem; }
.mobile-menu li:last-child a {
  color: #fff; font-weight: 700;
  background: var(--ai-grad);
  border: none; margin-top: .5rem; text-align: center;
}

/* ════ FOOTER ════ */
.site-footer { background: #14142A; color: rgba(255,255,255,.72); }

.footer-top {
  max-width: var(--max-w); margin: 0 auto;
  padding: 4rem 1.5rem 2.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand p {
  font-size: .88rem; margin-top: .8rem; max-width: 280px;
  line-height: 1.8; color: rgba(255,255,255,.45);
}
.footer-logo {
  font-family: 'Montserrat', sans-serif; font-size: 1.3rem;
  font-weight: 900; text-decoration: none;
  background: var(--ai-grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-col h4 { font-size: .88rem; color: #fff; margin-bottom: 1rem; font-weight: 700; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.footer-col a { color: rgba(255,255,255,.45); text-decoration: none; font-size: .85rem; transition: color var(--ease); }
.footer-col a:hover { color: var(--ai-3); }

.footer-bottom {
  max-width: var(--max-w); margin: 0 auto; padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-bottom p, .footer-bottom a { font-size: .78rem; color: rgba(255,255,255,.3); }
.footer-bottom a { text-decoration: none; transition: color var(--ease); }
.footer-bottom a:hover { color: var(--ai-3); }

/* ── INFO BAR ── */
.info-bar { background: var(--ai-grad); padding: .65rem 1.5rem; }
.info-bar-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem;
  font-size: .82rem; color: rgba(255,255,255,.92);
}
.info-bar a { color: #fff; font-weight: 700; }

/* ════ PAGE HERO ════ */
.page-hero {
  background: linear-gradient(135deg, #EEF2FF 0%, #E8F0FE 60%, #EFF6FF 100%);
  padding: 4rem 1.5rem 3rem;
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(108,99,255,.14) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute; bottom: -50px; left: 8%;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(0,200,200,.09) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: .6rem; }
.page-hero > .container > p { color: var(--text-muted); max-width: 600px; }

/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-dim); margin-bottom: 1.2rem; list-style: none;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--ease); }
.breadcrumb a:hover { color: var(--ai-1); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: .5rem; }

/* ════ SIDEBAR LAYOUT ════ */
.page-layout {
  max-width: var(--max-w); margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  display: grid; grid-template-columns: 220px 1fr; gap: 2.5rem;
}
.sidebar { position: sticky; top: 88px; align-self: start; }
.sidebar-nav {
  list-style: none; background: var(--bg-white);
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.sidebar-nav li { border-bottom: 1px solid var(--border); }
.sidebar-nav li:last-child { border-bottom: none; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .8rem 1.1rem;
  color: var(--text-muted); text-decoration: none;
  font-size: .88rem; font-weight: 600;
  transition: color var(--ease), background var(--ease), padding var(--ease);
}
.sidebar-nav a::before {
  content: ''; display: block; width: 3px; height: 14px;
  background: var(--border); border-radius: 2px;
  transition: background var(--ease), height var(--ease); flex-shrink: 0;
}
.sidebar-nav a:hover,
.sidebar-nav a.active { color: var(--ai-1); background: var(--bg-sec); padding-left: 1.4rem; }
.sidebar-nav a:hover::before,
.sidebar-nav a.active::before { background: var(--ai-1); height: 20px; }

/* ════ PROSE ════ */
.prose { max-width: 700px; }
.prose h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.prose h3 { font-size: 1rem; color: var(--ai-1); margin: 1.5rem 0 .5rem; }
.prose p  { margin-bottom: 1rem; }
.prose ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose strong { color: var(--ai-1); font-weight: 700; }

/* ════ ADV CARDS ════ */
.adv-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: 90px;
  transition: box-shadow var(--ease), border-color var(--ease);
}
.adv-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.adv-card-header { display: flex; align-items: flex-start; gap: 1.2rem; margin-bottom: 1rem; }
.adv-num-badge {
  font-size: .7rem; font-weight: 800;
  background: var(--ai-grad-soft); color: var(--ai-1);
  border: 1px solid rgba(108,99,255,.2);
  padding: .3rem .8rem; border-radius: 999px;
  white-space: nowrap; margin-top: .2rem;
}
.adv-card h2 { font-size: 1.1rem; flex: 1; }
.adv-card p  { font-size: .93rem; line-height: 1.85; margin-bottom: .7rem; }
.adv-divider { width: 36px; height: 3px; background: var(--ai-grad); border-radius: 2px; margin: .8rem 0 1rem; }
.adv-tag {
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--bg-sec); color: var(--ai-1);
  border: 1px solid rgba(108,99,255,.18);
  font-size: .73rem; font-weight: 600;
  padding: .22rem .7rem; border-radius: 999px;
  margin: .25rem .25rem 0 0;
}

/* ════ PAYMENT ════ */
.pay-section { padding: 1.8rem 0; border-bottom: 1px solid var(--border); }
.pay-section:last-child { border-bottom: none; }
.pay-label { display: flex; align-items: center; gap: .8rem; font-size: 1rem; font-weight: 700; color: var(--text-h); margin-bottom: .8rem; }
.pay-badge { background: var(--ai-grad); color: #fff; font-size: .68rem; font-weight: 700; padding: .2rem .6rem; border-radius: 4px; text-transform: uppercase; }
.pay-detail { font-size: .88rem; line-height: 1.85; }
.pay-detail strong { color: var(--text-h); }
.pay-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--ai-grad); color: #fff; font-weight: 700; font-size: .88rem;
  padding: .65rem 1.4rem; border-radius: 999px; text-decoration: none;
  margin-top: .9rem; box-shadow: 0 4px 16px rgba(108,99,255,.3);
  transition: transform var(--ease), box-shadow var(--ease);
}
.pay-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,.42); }

/* ════ FADE-IN ════ */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
  .fade-in.visible { opacity: 1; transform: translateY(0); }
}

/* ════ RESPONSIVE ════ */
@media (max-width: 1024px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  section { padding: 3.5rem 1.2rem; }
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .info-bar-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 560px) {
  .footer-bottom { flex-direction: column; text-align: center; }
  .page-hero { padding: 2.5rem 1.2rem 2rem; }
}
