/* ============================================
   AXISLOGIC LABS LIMITED - 官網樣式
   主色：深青黑 #042f2e / 熒光青 #2dd4bf
   ============================================ */

/* ---------- CSS 變量 ---------- */
:root {
  --bg: #042f2e;
  --bg-deep: #032322;
  --bg-darker: #021a19;
  --bg-card: #064443;
  --bg-card-hover: #075550;
  --accent: #2dd4bf;
  --accent-bright: #5eead4;
  --accent-dim: #14b8a6;
  --accent-glow: rgba(45, 212, 191, 0.35);
  --accent-glow-strong: rgba(45, 212, 191, 0.55);
  --text: #ccfbf1;
  --text-bright: #ffffff;
  --text-muted: #7dd3c0;
  --text-faint: #4a8580;
  --border: rgba(45, 212, 191, 0.18);
  --border-hover: rgba(45, 212, 191, 0.4);
  --shadow-glow: 0 0 30px rgba(45, 212, 191, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", SFMono-Regular, Monaco, Menlo, Consolas, "Courier New", monospace;
  --max-width: 1140px;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-bright);
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ---------- 通用容器 ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-tight {
  padding: 70px 0;
}

/* ---------- 排版 ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: inline-block;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 50px;
}

.text-accent {
  color: var(--accent);
}

.text-mono {
  font-family: var(--font-mono);
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-darker);
  box-shadow: 0 0 0 0 var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-bright);
  color: var(--bg-darker);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--border-hover);
}

.btn-outline:hover {
  background: rgba(45, 212, 191, 0.08);
  border-color: var(--accent);
  color: var(--accent-bright);
  transform: translateY(-2px);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ---------- 導航欄 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 18px 0;
  transition: all var(--transition);
  background: transparent;
}

.navbar.is-scrolled {
  background: rgba(4, 47, 46, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.nav-logo svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.nav-logo .logo-accent {
  color: var(--accent);
}

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-menu a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.is-active::after {
  width: 100%;
}

.nav-menu a.is-active {
  color: var(--accent);
}

.nav-cta {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--bg-darker) !important;
  font-weight: 600;
}

.nav-cta::after {
  display: none !important;
}

.nav-cta:hover {
  background: var(--accent-bright);
  transform: translateY(-1px);
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  margin: 0 auto;
  transition: all var(--transition);
}

.nav-toggle:hover {
  border-color: var(--accent);
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  padding-top: 80px;
}

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

/* Radial glow */
.hero-bg::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.5;
  filter: blur(40px);
}

/* Gradient overlay */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 95%);
}

/* Water ripple circles */
.ripple {
  position: absolute;
  border: 1px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: rippleExpand 5s ease-out infinite;
}

.ripple-1 {
  width: 100px;
  height: 100px;
  top: 35%;
  left: 15%;
  animation-delay: 0s;
}

.ripple-2 {
  width: 140px;
  height: 140px;
  top: 50%;
  right: 12%;
  animation-delay: 1.5s;
}

.ripple-3 {
  width: 80px;
  height: 80px;
  top: 70%;
  left: 40%;
  animation-delay: 3s;
}

.ripple-4 {
  width: 120px;
  height: 120px;
  top: 25%;
  right: 30%;
  animation-delay: 2s;
}

@keyframes rippleExpand {
  0% {
    transform: scale(0.3);
    opacity: 0;
    border-width: 2px;
  }
  20% {
    opacity: 0.5;
  }
  100% {
    transform: scale(3);
    opacity: 0;
    border-width: 0.5px;
  }
}

/* Floating particles */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.3;
  animation: floatUp 8s ease-in-out infinite;
}

.particle-1 { top: 80%; left: 20%; animation-delay: 0s; }
.particle-2 { top: 70%; left: 60%; animation-delay: 2s; }
.particle-3 { top: 85%; left: 75%; animation-delay: 4s; }
.particle-4 { top: 75%; left: 35%; animation-delay: 1s; }
.particle-5 { top: 90%; left: 50%; animation-delay: 3s; }

@keyframes floatUp {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.2;
  }
  50% {
    transform: translateY(-60px) translateX(15px);
    opacity: 0.6;
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border: 1px solid var(--border-hover);
  border-radius: 30px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(45, 212, 191, 0.06);
  margin-bottom: 28px;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px transparent; }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-title .highlight {
  color: var(--accent);
  position: relative;
}

.hero-title .highlight::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 10px;
  background: var(--accent-glow);
  border-radius: 4px;
  z-index: -1;
  filter: blur(8px);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 580px;
  margin-bottom: 40px;
  line-height: 1.8;
}

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

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-hint .mouse {
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--border-hover);
  border-radius: 12px;
  position: relative;
}

.scroll-hint .mouse::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 7px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollWheel 1.8s ease-in-out infinite;
}

@keyframes scrollWheel {
  0% { opacity: 0; transform: translateX(-50%) translateY(0); }
  40% { opacity: 1; }
  80% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  100% { opacity: 0; }
}

/* ---------- 業務卡片 ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.service-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), 0 0 40px rgba(45, 212, 191, 0.1);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all var(--transition);
}

.service-card:hover .service-icon {
  background: rgba(45, 212, 191, 0.18);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.service-card h3 {
  font-size: 1.35rem;
  color: var(--text-bright);
  margin-bottom: 12px;
  font-weight: 700;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 20px;
}

.service-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text);
}

.service-features li svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.service-number {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  color: rgba(45, 212, 191, 0.08);
  line-height: 1;
}

/* ---------- 關於簡述區 ---------- */
.about-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-preview-text .section-title {
  margin-bottom: 24px;
}

.about-preview-text p {
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 20px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 32px;
}

.stat-item .stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

/* Visual card on about preview */
.about-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
  padding: 40px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.about-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.3;
}

.code-block {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text);
}

.code-block .code-keyword { color: var(--accent-bright); }
.code-block .code-string { color: var(--text); }
.code-block .code-comment { color: var(--text-faint); }
.code-block .code-fn { color: var(--accent); }

.about-visual-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border-hover);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: rgba(4, 47, 46, 0.6);
  align-self: flex-start;
}

.about-visual-tag .tag-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* ---------- CTA 區 ---------- */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-box {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 60px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 120%;
  height: 200%;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.12;
}

.cta-box .section-title {
  position: relative;
  z-index: 1;
}

.cta-box p {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 36px;
}

.cta-box .hero-actions {
  position: relative;
  z-index: 1;
  justify-content: center;
}

/* ---------- 關於頁面 ---------- */
.about-hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.3;
  filter: blur(40px);
}

.about-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.about-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 24px;
}

.about-hero h1 .highlight {
  color: var(--accent);
}

.about-hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* 理念卡片 */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
}

.value-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.value-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.value-icon svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.value-card h3 {
  font-size: 1.2rem;
  color: var(--text-bright);
  margin-bottom: 10px;
}

.value-card p {
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.75;
}

/* 時間線 */
.timeline {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 36px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 13px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.timeline-item .time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.timeline-item h4 {
  font-size: 1.1rem;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.timeline-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ---------- 聯絡頁：終端機風 ---------- */
.term-hero {
  padding: 160px 0 56px;
  position: relative;
  overflow: hidden;
}

.term-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 460px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.22;
  filter: blur(40px);
}

.term-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.term-hero h1 {
  font-family: var(--font-mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

.term-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.85;
}

/* 標題閃爍游標 */
.term-caret {
  color: var(--accent);
  margin-left: 6px;
  animation: termBlink 1.1s steps(1) infinite;
}

@keyframes termBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.term-section {
  padding-top: 24px;
}

.term-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

/* 終端視窗 */
.term-window {
  position: relative;
  background: var(--bg-darker);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card), 0 0 40px rgba(45, 212, 191, 0.07);
}

/* 掃描線裝飾 */
.term-window::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(45, 212, 191, 0.05) 0px,
    rgba(45, 212, 191, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
}

.term-bar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 18px;
  background: rgba(45, 212, 191, 0.07);
  border-bottom: 1px solid var(--border);
}

.term-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.term-dot-2 {
  background: var(--accent-dim);
  opacity: 0.55;
}

.term-dot-3 {
  background: var(--text-faint);
  opacity: 0.5;
}

.term-title {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.term-body {
  position: relative;
  z-index: 1;
  padding: 30px 28px 32px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.95;
}

/* 狀態輸出行 */
.term-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0 12px;
  margin-bottom: 12px;
}

.term-line:last-child {
  margin-bottom: 0;
}

.term-prompt {
  flex: 0 0 auto;
  color: var(--accent);
  font-weight: 700;
}

.term-prompt-comment {
  color: var(--text-faint);
  font-weight: 400;
}

.term-tag {
  flex: 0 0 5.2em;
  color: var(--accent-bright);
  letter-spacing: 0.08em;
}

.term-val {
  flex: 1 1 220px;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
}

.term-comment {
  color: var(--text-faint);
}

.term-cmd {
  color: var(--text-bright);
}

.term-flag {
  color: var(--accent);
}

.term-ok {
  display: inline-block;
  margin-right: 8px;
  padding: 0 6px;
  border: 1px solid var(--border-hover);
  border-radius: 4px;
  background: rgba(45, 212, 191, 0.1);
  color: var(--accent-bright);
  font-size: 0.82em;
  letter-spacing: 0.06em;
}

.term-en {
  display: block;
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 0.8em;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.term-val a {
  color: var(--accent-bright);
  border-bottom: 1px dashed var(--border-hover);
}

.term-val a:hover {
  color: var(--text-bright);
  border-bottom-color: var(--accent);
}

/* 閃爍方塊游標 */
.term-cursor {
  display: inline-block;
  width: 9px;
  height: 1.05em;
  vertical-align: -0.15em;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
  animation: termBlink 1.1s steps(1) infinite;
}

/* 終端輸入表單 */
.term-line-head {
  margin-bottom: 22px;
}

.term-line-foot {
  margin-top: 18px;
  margin-bottom: 0;
}

.term-form {
  position: relative;
  z-index: 1;
}

.form-group {
  position: relative;
  z-index: 1;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-group label .term-dollar {
  color: var(--accent);
  font-weight: 700;
  margin-right: 8px;
}

.form-group label .req {
  color: var(--accent);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent-dim);
  border-radius: 6px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
  caret-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-hover);
  border-left-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1), 0 0 18px rgba(45, 212, 191, 0.08);
  background: var(--bg-deep);
}

.form-group textarea {
  resize: vertical;
  min-height: 128px;
  line-height: 1.7;
}

.form-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f87171;
  margin-top: 7px;
  align-items: center;
  gap: 6px;
}

.form-error svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.form-group.has-error input,
.form-group.has-error textarea {
  border-color: rgba(248, 113, 113, 0.5);
  border-left-color: #f87171;
}

.form-group.has-error .form-error {
  display: flex;
}

.form-submit {
  width: 100%;
  padding: 15px;
  font-size: 1rem;
  justify-content: center;
  margin-top: 6px;
}

.term-submit {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  border-radius: 6px;
}

.term-submit .term-dollar-dark {
  font-weight: 700;
  margin-right: 8px;
  opacity: 0.6;
}

#form-success {
  display: none;
  padding: 14px 16px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid var(--accent);
  border-left-width: 3px;
  border-radius: 6px;
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.7;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 22px;
  position: relative;
  z-index: 1;
}

#form-success.is-visible {
  display: flex;
}

#form-success svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ---------- 頁腳 ---------- */
.footer {
  position: relative;
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
  overflow: hidden;
  padding: 60px 0 28px;
}

/* 波紋裝飾線 */
.footer-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.5;
}

.footer-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(30px);
}

.footer-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.75;
  max-width: 320px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-col .footer-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.8;
}

.footer-col .footer-text li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-col .footer-text li svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-faint);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}

.footer-bottom .footer-sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* ---------- Reveal 動畫 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ---------- 通用分隔裝飾線 ---------- */
.section-divider {
  position: relative;
  height: 1px;
  background: var(--border);
  margin: 0;
}

.section-divider::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .services-grid,
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-preview {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .term-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-deep);
    border-left: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 40px;
    gap: 28px;
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 999;
  }

  .nav-menu.is-open {
    transform: translateX(0);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
  }

  .nav-menu a {
    font-size: 1.1rem;
  }

  /* Overlay */
  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 26, 25, 0.6);
    backdrop-filter: blur(2px);
    z-index: 998;
  }

  .nav-overlay.is-open {
    display: block;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .section {
    padding: 70px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .about-hero h1,
  .term-hero h1 {
    font-size: 2.1rem;
  }

  .cta-box {
    padding: 40px 24px;
  }

  .term-body {
    padding: 24px 18px 26px;
    font-size: 0.86rem;
  }

  .term-tag {
    flex-basis: 4.8em;
  }
}

@media (max-width: 600px) {
  .services-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-badge {
    font-size: 0.72rem;
  }

  .term-hero {
    padding: 130px 0 40px;
  }

  .term-hero h1 {
    font-size: 1.8rem;
  }

  .term-body {
    padding: 20px 14px 22px;
    font-size: 0.82rem;
    line-height: 1.85;
  }

  .term-line {
    gap: 0 8px;
    margin-bottom: 10px;
  }

  .term-tag {
    flex-basis: 4.4em;
    letter-spacing: 0.04em;
  }

  .term-title {
    font-size: 0.72rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .container {
    padding: 0 18px;
  }
}

/* ---------- 可訪問性 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- 選區顏色 ---------- */
::selection {
  background: var(--accent);
  color: var(--bg-darker);
}

/* ---------- 滾動條 ---------- */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 5px;
  border: 2px solid var(--bg-darker);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}
