/* ==========================================================================
   RADIANT MARKETING LIMITED — 專業白色版
   紙白 × 墨黑 × 冷光藍青。母題「光」：光束 + 徑向光暈 + 會淡出的編輯線條。
   全 Grotesk（Inter）。漸進增強：CSS 預設 = 完整靜態版；JS 只加細膩動效。
   ========================================================================== */

:root {
  --paper: #F9FAFB;        /* 頁面底 */
  --card: #FFFFFF;         /* 卡片 */
  --ink: #101418;          /* 主字 */
  --ink-2: #2B3038;        /* 次深 */
  --muted: #6B7280;        /* 次字 */
  --faint: #99A1AD;        /* 更淡 */
  --line: #E5E7EB;         /* hairline */
  --line-2: #EEF0F3;
  --teal: #2A98A2;         /* 主 accent（冷光藍青） */
  --teal-deep: #1F7681;
  --sky: #60A5FA;          /* 漸層夥伴 */
  --tint: #EAF6F7;         /* 極淡藍青底 */
  --tint-2: #EAF1FB;

  --shadow-sm: 0 1px 2px rgba(16, 20, 24, .04), 0 6px 16px rgba(16, 20, 24, .04);
  --shadow: 0 2px 4px rgba(16, 20, 24, .05), 0 18px 40px rgba(16, 20, 24, .08);
  --radius: 16px;

  --sans: "Inter", -apple-system, "Segoe UI", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --tc: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --container: 1200px;
  color-scheme: light;
}

/* ====== 基礎 ====== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: 84px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--tc);
  font-size: 16px;
  line-height: 1.8;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 700; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
i { font-style: normal; }
svg { display: block; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(42, 152, 162, .18); color: var(--ink); }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 152, 162, .35);
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #D6DAE0; border-radius: 8px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #C2C7D0; }

/* ====== 母題「光」：環境光束 + 徑向光暈 ====== */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.beam {
  position: absolute;
  width: 60vw;
  height: 150vh;
  filter: blur(60px);
  opacity: .55;
  will-change: transform;
}
.beam-1 {
  top: -30vh; left: -10vw;
  background: linear-gradient(135deg, rgba(96, 165, 250, .12), rgba(96, 165, 250, 0) 55%);
  transform: rotate(-14deg);
}
.beam-2 {
  top: -10vh; right: -18vw;
  background: linear-gradient(215deg, rgba(42, 152, 162, .12), rgba(42, 152, 162, 0) 55%);
  transform: rotate(12deg);
}
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
}
.glow-1 {
  top: -14vh; left: 44%;
  width: 46vw; height: 46vw;
  background: radial-gradient(circle, rgba(42, 152, 162, .1), transparent 62%);
}
.glow-2 {
  bottom: -20vh; left: 8%;
  width: 40vw; height: 40vw;
  background: radial-gradient(circle, rgba(96, 165, 250, .09), transparent 62%);
}

/* ====== 左緣 through-line（閱讀進度光） ====== */
.progress {
  position: fixed;
  top: 0; left: 0;
  width: 2px; height: 100vh;
  z-index: 40;
  pointer-events: none;
  background: var(--line);
}
.progress-fill {
  display: block;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--sky), var(--teal) 60%, var(--teal-deep));
  box-shadow: 0 0 10px rgba(42, 152, 162, .5);
  transform-origin: top;
}

/* ====== Wordmark ====== */
.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--ink);
  padding-left: .26em;
  background-image: linear-gradient(100deg, var(--ink) 0%, var(--ink) 38%, var(--teal) 50%, var(--ink) 62%, var(--ink) 100%);
  background-size: 220% 100%;
  background-position: 120% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.wordmark-sm {
  font-size: 16px;
  letter-spacing: .24em;
  -webkit-text-fill-color: currentColor;
  color: var(--ink);
  background: none;
}

/* ====== 通用元件 ====== */
.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow span { color: var(--teal); }

.section {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  padding: clamp(72px, 12vh, 132px) clamp(22px, 5vw, 56px);
}
.section-head { max-width: 720px; margin-bottom: clamp(40px, 6vh, 64px); }
.section-head .eyebrow { margin-bottom: 18px; }
.section-title {
  font-family: var(--sans);
  font-size: clamp(28px, 4.4vw, 50px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.14;
  color: var(--ink);
}
.section-intro {
  margin-top: 20px;
  font-size: clamp(15px, 1.7vw, 17px);
  color: var(--muted);
  max-width: 560px;
}

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

.btn-primary {
  background: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(42, 152, 162, .24);
}
.btn-primary:hover {
  background: var(--teal-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(42, 152, 162, .32);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }
.wa-icon { flex: none; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ====== 導覽列 ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.nav.scrolled {
  background: rgba(249, 250, 251, .82);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(16, 20, 24, .02);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  max-width: var(--container);
  margin: 0 auto;
  height: 68px;
  padding-inline: clamp(22px, 5vw, 56px);
}
.brand { display: inline-flex; align-items: center; }
.nav-links {
  display: flex;
  gap: 30px;
  margin-left: auto;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  transition: color .2s ease;
  padding: 6px 0;
  position: relative;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

/* ====== Hero ====== */
.hero {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px clamp(22px, 5vw, 56px) 100px;
}
.hero-inner { max-width: 760px; }
.hero .eyebrow { margin-bottom: 26px; }
.hero-wordmark { line-height: 1; }
.hero-wordmark .wordmark {
  font-size: clamp(52px, 12vw, 132px);
  letter-spacing: .18em;
  padding-left: .18em;
}
.hero-submark {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: clamp(11px, 1.5vw, 14px);
  font-weight: 500;
  letter-spacing: .52em;
  color: var(--muted);
  padding-left: .52em;
}
.hero-lead {
  margin-top: clamp(30px, 5vh, 46px);
  font-family: var(--sans);
  font-size: clamp(22px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.28;
  color: var(--ink);
}
.hero-sub {
  margin: 18px auto 0;
  max-width: 540px;
  font-size: clamp(14.5px, 1.7vw, 16.5px);
  color: var(--muted);
  line-height: 1.85;
}
.hero .actions { margin-top: 36px; justify-content: center; }
.hero-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.hint-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .4em;
  color: var(--faint);
}
.hint-line {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--teal), transparent);
  animation: hintDrop 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes hintDrop {
  0%   { transform: scaleY(0); opacity: 0; }
  35%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ====== 服務 ====== */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.4vw, 18px);
}
.svc {
  position: relative;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  padding: clamp(22px, 2vw, 28px);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.svc:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow);
}
.svc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--teal-deep);
  transition: background .28s ease, color .28s ease;
}
.svc-icon svg { width: 22px; height: 22px; }
.svc:hover .svc-icon { background: var(--teal); color: #FFFFFF; }
.svc-num {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--faint);
}
.svc h3 {
  margin-top: 6px;
  font-family: var(--sans);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.svc h3 .svc-en {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}
.svc-desc {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ====== 案例（編輯式列） ====== */
.case-list { border-top: 1px solid var(--line); }
.case {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: start;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(30px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--line);
  transition: background .3s ease;
}
.case:hover { background: linear-gradient(90deg, rgba(42, 152, 162, .03), transparent 70%); }
.case-num {
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
  color: var(--teal);
  opacity: .5;
}
.case-sector {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.case-title {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.case-desc {
  margin-top: 14px;
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.8;
}
.case-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding-top: 6px;
}
.case-meta li {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

/* ====== 合作夥伴 ====== */
.client-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.client {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(116px, 12vw, 152px);
  padding: 28px clamp(14px, 2vw, 26px);
  border-right: 1px solid var(--line);
  transition: background .3s ease;
}
.client:last-child { border-right: none; }
.client:hover { background: var(--tint); }
.client-logo {
  display: block;
  width: auto;
  height: clamp(46px, 5.4vw, 66px);   /* 統一高度：所有 logo 尺寸一致 */
  max-width: 100%;
  object-fit: contain;
}
/* Longbridge 為深色背景版 logo：反相 + 回復色相，適配白底 */
.client-logo--invert { filter: invert(1) hue-rotate(180deg); }

/* ====== 關於 ====== */
.about-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 5vw, 72px);
  padding-top: clamp(20px, 4vh, 40px);
  border-top: 1px solid var(--line);
}
.about-body {
  font-family: var(--sans);
  font-size: clamp(21px, 2.7vw, 32px);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1.5;
  color: var(--ink);
}
.about-note {
  margin-top: 24px;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--teal-deep);
}

/* ====== 聯絡 ====== */
.contact { text-align: center; }
.contact-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(28px, 5vw, 64px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 140% at 50% 0%, var(--tint) 0%, transparent 60%),
    var(--card);
  box-shadow: var(--shadow-sm);
}
.contact-inner .eyebrow { margin-bottom: 18px; }
.contact-title {
  font-family: var(--sans);
  font-size: clamp(26px, 3.8vw, 42px);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.contact-inner .actions { margin-top: 32px; justify-content: center; }
.contact-email {
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--muted);
}

/* ====== 頁尾 ====== */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 28px;
  padding: 32px clamp(22px, 5vw, 56px) 40px;
}
.footer .wordmark-sm { color: var(--ink); }
.footer-meta {
  font-size: 13px;
  color: var(--muted);
}
.footer-slogan {
  margin-left: auto;
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--faint);
}

/* ====== Toast ====== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 100;
  display: none;
  align-items: center;
  background: var(--ink);
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: .02em;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 1;
  transition: opacity .4s ease;
}
.toast.show { display: inline-flex; animation: toastIn .3s cubic-bezier(.22, 1, .36, 1); }
.toast.fading { opacity: 0; }
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ====== 進場動效（JS 加 .is-in；無 JS 時預設可見） ====== */
.reveal { opacity: 1; transform: none; }
.fx .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.22, 1, .36, 1); }
.fx .reveal.is-in { opacity: 1; transform: none; }

/* ====== 響應式 ====== */
@media (max-width: 1024px) {
  .svc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .client-grid { grid-template-columns: repeat(2, 1fr); }
  .client { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .br-m { display: none; }
  .case {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .case-num { font-size: 26px; }
  .case-meta { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
}
@media (max-width: 460px) {
  .svc-grid { grid-template-columns: 1fr; }
  .client-grid { grid-template-columns: 1fr; }
  .client { border-right: none; }
}

/* ====== Reduced motion ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-hint { display: none; }
  .fx .reveal { opacity: 1 !important; transform: none !important; }
  .progress { display: none; }
  .beam, .glow { opacity: .4; }
}
