/* site.css 
 * 功能：全站核心樣式表，包含基礎變數、排版與各區塊樣式。
 * 相依性：依賴 Noto Sans TC 與 Montserrat 字體。
 */

:root {
  /* 核心色彩變數 */
  --navy-900: #0A192F;
  /* 深海藏青（深邃底座） */
  --navy-800: #112240;
  /* 輔助亮色（卡片與區塊） */
  --navy-700: #233554;
  /* 框線與更亮的區塊 */
  --cyan-500: #64FFDA;
  /* 電光青（標準強調色） */
  --cyan-400: #00E5FF;
  /* 輔助高光（發光效果） */
  --amber-500: #FFB300;
  /* 琥珀金（標準點綴） */
  --amber-600: #FF8F00;
  /* 琥珀金深色（漸層過渡） */

  /* 擴充變數 */
  --bg: #0D1117;
  /* 稍微調亮的深藍底 */
  --bg-soft: #161B22;
  /* 層次感較好的次背景 */
  --text: #E6EDF3;
  /* 更明亮的文字色 */
  --muted: #8B949E;
  /* 次要文字 */
  --line: #30363D;
  /* 框線色 */
  --card: #161B22;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Noto Sans TC", sans-serif;
  line-height: 1.72;
  overflow-x: hidden;
  font-weight: 300;
  /* 內文極細 */
}

/* 網格與幾何背景 - 電光青的數位感 */
.mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(rgba(10, 25, 47, 0.95), rgba(10, 25, 47, 0.95)),
    radial-gradient(circle at 50% 10%, rgba(100, 255, 218, 0.05) 0%, transparent 50%),
    linear-gradient(rgba(100, 255, 218, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 255, 218, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.narrow {
  width: min(860px, 92%);
}

/* 頂部導覽列 - 消光霧面材質 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(10, 25, 47, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.brand {
  font-family: "Montserrat", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--cyan-500);
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(100, 255, 218, 0.3);
}

.nav nav {
  display: flex;
  gap: 30px;
}

.nav nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav nav a:hover {
  color: var(--cyan-500);
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.5);
}

/* 標題與排版 - 字重對比強烈 */
h1,
h2,
h3 {
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
  margin: 0.2em 0;
  color: #E6F1FF;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 30px;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #E6F1FF;
}

.section {
  padding: 90px 0;
}

.section.alt {
  background: rgba(17, 34, 64, 0.4);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* 滿版英雄區塊 */
.hero-full {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-full-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-full-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(60%) contrast(1.2) brightness(0.4);
}

.hero-full-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(10, 25, 47, 0.2) 0%, rgba(10, 25, 47, 0.9) 100%);
  mix-blend-mode: multiply;
}

.hero-full-content {
  position: relative;
  z-index: 10;
  max-width: 900px;
  padding: 0 20px;
}

.hero-full-content h1 {
  font-size: 4.5rem;
  letter-spacing: 0.05em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  margin-bottom: 24px;
}

.hero-full-content .eyebrow {
  text-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
  margin-bottom: 20px;
}

.hero-full-content .lead {
  color: #CCD6F6;
  font-size: 1.35rem;
  font-weight: 300;
  margin: 0 auto;
  line-height: 1.8;
  max-width: 650px;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8);
}

.eyebrow {
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.25em;
  color: var(--amber-500);
  /* 改為琥珀金以提升點綴感 */
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(255, 179, 0, 0.4);
}

.lead {
  color: var(--muted);
  max-width: 58ch;
  font-size: 1.1rem;
  margin-top: 20px;
  font-weight: 400;
}

/* 按鈕設計 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 2px;
  /* 工業風格消光與直線切割感 */
  text-decoration: none;
  font-weight: 500;
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* 核心價值按鈕 (5% 琥珀金) */
.btn.cta {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: #000;
  font-weight: 800;
  border: 1px solid var(--amber-600);
  box-shadow: 0 0 20px rgba(255, 179, 0, 0.5), 0 0 40px rgba(255, 179, 0, 0.2);
}

.btn.cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 30px rgba(255, 179, 0, 0.7), 0 0 60px rgba(255, 179, 0, 0.3);
}

/* 科技引導按鈕 (15% 電光青) */
.btn.tech {
  background: transparent;
  color: var(--cyan-500);
  border: 1px solid var(--cyan-500);
}

.btn.tech:hover {
  background: rgba(100, 255, 218, 0.1);
  box-shadow: 0 0 15px rgba(100, 255, 218, 0.3);
}

/* 內容區塊專用的寬感服務按鈕 */
.btn.service-link {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 40px;
  background: #1e3a8a;
  /* 穩重的深藍色實心底 */
  color: #ffffff;
  border: 1px solid #2563eb;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.1em;
}

.btn.service-link:hover {
  background: var(--amber-500);
  /* 懸浮時轉為我們的琥珀金 */
  color: #000000;
  border-color: var(--amber-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 179, 0, 0.5);
}



/* 發光線條與神經節點動畫 */
.hero-anim {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  mix-blend-mode: screen;
}

.cyber-grid {
  position: absolute;
  inset: -50% -50%;
  background-image:
    linear-gradient(rgba(100, 255, 218, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(100, 255, 218, 0.08) 1px, transparent 1px);
  background-size: 80px 80px;
  transform: perspective(800px) rotateX(60deg) translateY(0) translateZ(-100px);
  animation: gridMove 25s linear infinite;
  opacity: 0.6;
}

.pulse {
  position: absolute;
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 50%;
  animation: radar 10s cubic-bezier(0.25, 0.1, 0.25, 1) infinite;
  opacity: 0;
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.2) inset, 0 0 20px rgba(100, 255, 218, 0.2);
}

.pulse.p1 {
  width: 150px;
  height: 150px;
  left: 15%;
  top: 20%;
  animation-delay: 0s;
}

.pulse.p2 {
  width: 300px;
  height: 300px;
  left: 65%;
  top: 55%;
  animation-delay: 2s;
}

.pulse.p3 {
  width: 400px;
  height: 400px;
  left: 40%;
  top: 30%;
  animation-delay: 4s;
}

.pulse.p4 {
  width: 200px;
  height: 200px;
  left: 80%;
  top: 15%;
  animation-delay: 6s;
}

.pulse.p5 {
  width: 250px;
  height: 250px;
  left: 10%;
  top: 70%;
  animation-delay: 1.5s;
}

.beam {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.5), transparent);
  animation: scanline 12s ease-in-out infinite;
  width: 100%;
  left: 0;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
}

.beam.b1 {
  top: 15%;
  animation-duration: 15s;
}

.beam.b2 {
  top: 50%;
  animation-delay: -5s;
  animation-duration: 18s;
}

.beam.b3 {
  top: 85%;
  animation-delay: -2s;
  animation-duration: 14s;
}

/* 網格系統卡片 */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-3 article,
.post-card,
.blog-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px;
  transition: all 0.3s ease;
  position: relative;
}

.grid-3 article:hover,
.post-card:hover,
.blog-card:hover {
  transform: translateY(-5px);
  border-color: var(--amber-500);
  /* 懸浮時顯現金邊回饋 */
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 179, 0, 0.15);
}

.grid-3 article h3 {
  color: #E6F1FF;
  display: flex;
  align-items: center;
}

.grid-3 article h3::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  background: var(--cyan-500);
  margin-right: 12px;
}

.grid-3 article p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* 寫實情境圖 - 動態與互動感 */
.scene-wrap {
  margin: 30px 0 40px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 21/9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  /* 持續的呼吸漂浮動畫 */
  animation: sceneFloat 8s ease-in-out infinite;
  transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 懸停時外框發光並停止漂浮 */
.scene-wrap:hover {
  border-color: var(--amber-500);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 179, 0, 0.3);
  transform: translateY(-8px);
  animation-play-state: paused;
}

.scene-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 移除暗沉的黑白遮罩，保留原本色彩但稍微壓暗對比做預備 */
  filter: brightness(0.85) contrast(1.1);
  transition: transform 1.2s cubic-bezier(0.25, 0.1, 0.25, 1), filter 0.8s ease;
}

/* 懸停時內部圖片縮放與點亮 */
.scene-wrap:hover img {
  transform: scale(1.06);
  filter: brightness(1.1) contrast(1.2);
}

/* 極淡的科技感漸層疊加 */
.scene-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.05) 0%, transparent 50%, rgba(255, 179, 0, 0.05) 100%);
  pointer-events: none;
  z-index: 2;
  transition: all 0.8s ease;
}

/* 懸停時加強疊加反光 */
.scene-wrap:hover::after {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.15) 0%, transparent 50%, rgba(255, 179, 0, 0.15) 100%);
}

/* 定義漂浮動畫 */
@keyframes sceneFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* 聯絡表單 */
.contact-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px;
  display: grid;
  gap: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.contact-form label {
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  display: block;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(10, 25, 47, 0.5);
  color: var(--text);
  font-family: inherit;
  transition: all 0.3s ease;
  margin-top: 5px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 1px var(--cyan-500) inset;
  background: rgba(10, 25, 47, 0.8);
}

/* Flash Messages */
.flash {
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid var(--cyan-500);
  color: var(--cyan-500);
  padding: 12px 20px;
  border-radius: 2px;
  margin: 20px 0;
  font-weight: 500;
}

/* 文章列表 */
.post-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 2px;
  margin: 0 0 20px;
  border: 1px solid var(--line);
  filter: grayscale(30%) contrast(1.1);
  transition: filter 0.3s ease;
}

.grid-3 article:hover .post-thumb {
  filter: grayscale(0%);
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters a {
  background: transparent;
  padding: 6px 16px;
  border-radius: 2px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.filters a:hover {
  border-color: var(--cyan-500);
  color: var(--cyan-500);
}

.filters a.active {
  border-color: var(--cyan-500);
  color: var(--navy-900);
  background: var(--cyan-500);
}

.blog-head p {
  color: var(--muted);
}

.blog-toolbar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 16px 20px;
}

.meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.chip {
  display: inline-block;
  background: rgba(100, 255, 218, 0.1);
  border: 1px solid rgba(100, 255, 218, 0.2);
  padding: 4px 12px;
  border-radius: 2px;
  font-size: 12px;
  color: var(--cyan-500);
}

a {
  color: var(--cyan-500);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--cyan-400);
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
}

/* 動畫定義 */
@keyframes radar {
  0% {
    transform: scale(0.1);
    opacity: 0;
  }

  30% {
    opacity: 0.8;
  }

  70% {
    opacity: 0.1;
  }

  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes scanline {
  0% {
    transform: translateY(-300px);
    opacity: 0;
  }

  20% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    transform: translateY(1200px);
    opacity: 0;
  }
}

@keyframes gridMove {
  0% {
    transform: perspective(800px) rotateX(60deg) translateY(0) translateZ(-100px);
  }

  100% {
    transform: perspective(800px) rotateX(60deg) translateY(80px) translateZ(-100px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .pulse,
  .beam {
    animation: none;
  }
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.5rem;
  }

  .hero-full-content h1 {
    font-size: 2.8rem;
  }

  .hero-full-content .lead {
    font-size: 1.1rem;
  }
}

/* 頁腳設計 */
.site-footer {
  margin-top: 80px;
  background: rgba(10, 25, 47, 0.95);
  border-top: 1px solid var(--line);
  padding: 60px 0 0;
  position: relative;
  z-index: 10;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-brand h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cyan-500);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  gap: 80px;
  flex-wrap: wrap;
}

.link-group h4 {
  color: #E6F1FF;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

.link-group a,
.link-group p {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.link-group a:hover {
  color: var(--cyan-500);
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
}

.footer-bottom {
  background: var(--card);
  padding: 24px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-bottom p {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
  font-family: "Montserrat", "Noto Sans TC", sans-serif;
}

@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    gap: 40px;
    flex-direction: column;
  }
}