/* 旭勝資訊 NSMCS — 高科技未來感主題 */
:root {
  --bg-dark: #0a0e17;
  --bg-card: #111827;
  --bg-elevated: #1a2234;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --primary: #06b6d4;
  --primary-glow: rgba(6, 182, 212, 0.4);
  --accent-cyan: #22d3ee;
  --accent-purple: #a78bfa;
  --accent-pink: #f472b6;
  --accent-green: #34d399;
  --border: rgba(148, 163, 184, 0.15);
  --gradient-1: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
  --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
  --gradient-mesh: radial-gradient(at 40% 20%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    radial-gradient(at 80% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(at 0% 50%, rgba(236, 72, 153, 0.08) 0%, transparent 50%);
  --font-sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.15);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: var(--gradient-mesh);
}

/* 網格背景裝飾 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* 動畫關鍵幀 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px var(--primary-glow); }
  50% { box-shadow: 0 0 40px var(--primary-glow); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes scanline {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100vh); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 工具類 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.5s ease;
}

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

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
}

.brand:hover {
  opacity: 0.9;
}

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.btn-nav {
  padding: 10px 20px;
  background: var(--gradient-2);
  color: #0a0e17 !important;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: var(--transition);
  animation: glowPulse 3s ease-in-out infinite;
}

.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

/* 漢堡選單（手機） */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-elevated);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
}

/* Hero */
.hero {
  padding: 140px 0 100px;
  text-align: center;
  position: relative;
  z-index: 1;
}


.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease forwards;
}

.hero .subtitle {
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  animation: fadeInUp 0.8s 0.1s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero .desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.8;
  animation: fadeInUp 0.8s 0.2s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.3s ease forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* 按鈕 */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-2);
  color: #0a0e17;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: rgba(6, 182, 212, 0.15);
}

/* Section */
.section {
  padding: 80px 0;
  position: relative;
  z-index: 1;
}

.section:nth-child(even) {
  background: rgba(17, 24, 39, 0.5);
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-align: center;
}

.section-title span {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* 問題卡片 */
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
}

.problem-card:nth-child(1) { animation-delay: 0.1s; }
.problem-card:nth-child(2) { animation-delay: 0.2s; }
.problem-card:nth-child(3) { animation-delay: 0.3s; }
.problem-card:nth-child(4) { animation-delay: 0.4s; }

.problem-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.problem-card .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.problem-card:nth-child(1) .icon { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }
.problem-card:nth-child(2) .icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.problem-card:nth-child(3) .icon { background: linear-gradient(135deg, #ec4899, #f472b6); }
.problem-card:nth-child(4) .icon { background: linear-gradient(135deg, #34d399, #22c55e); }

.problem-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.problem-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* 服務卡片 */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }

.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

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

.service-card ul {
  list-style: none;
  margin-bottom: 24px;
}

.service-card li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.service-card li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* 服務區塊（頁面用） */
.service-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
}

.service-block:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.service-block h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.service-block ul {
  margin: 16px 0;
  padding-left: 1.5rem;
  color: var(--text-muted);
}

.service-block .deliver {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--primary);
}

/* 案例 */
.featured {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 48px;
  animation: fadeInUp 0.6s ease forwards;
}

.featured:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.featured h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.featured .meta {
  color: var(--primary);
  margin-bottom: 12px;
}

.featured .meta a {
  color: var(--primary);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.case-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
}

.case-tile:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(6, 182, 212, 0.2);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.case-tile:nth-child(1) .tag { background: rgba(6, 182, 212, 0.2); color: var(--accent-cyan); }
.case-tile:nth-child(2) .tag { background: rgba(139, 92, 246, 0.2); color: var(--accent-purple); }
.case-tile:nth-child(3) .tag { background: rgba(236, 72, 153, 0.2); color: var(--accent-pink); }
.case-tile:nth-child(4) .tag { background: rgba(52, 211, 153, 0.2); color: var(--accent-green); }
.case-tile:nth-child(5) .tag { background: rgba(14, 165, 233, 0.2); color: #38bdf8; }
.case-tile:nth-child(6) .tag { background: rgba(251, 146, 60, 0.2); color: #fb923c; }

.case-tile h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.case-tile p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 合作流程 */
.flow-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
}

.flow-step {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
  animation: fadeInUp 0.6s ease forwards;
}

.flow-step:nth-child(1) { animation-delay: 0.1s; }
.flow-step:nth-child(2) { animation-delay: 0.2s; }
.flow-step:nth-child(3) { animation-delay: 0.3s; }

.flow-step:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.flow-step .num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient-2);
  color: #0a0e17;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.flow-step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.flow-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* CTA */
.cta-block {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  position: relative;
}

.cta-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
  position: relative;
}

.cta-block .btn {
  position: relative;
}

/* 聯絡表單 */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: sticky;
  top: 100px;
}

.contact-side h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.line-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: #06c755;
  color: white !important;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
  margin-top: 16px;
  transition: var(--transition);
}

.line-btn:hover {
  background: #05b04b;
  transform: translateY(-2px);
}

/* Footer（三欄式，參考 Ultra Lab） */
.footer {
  border-top: 1px solid var(--border);
  background: #0a0e17;
  color: var(--text);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 32px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: start;
}

.footer-brand {
  max-width: 320px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.footer-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gradient-2);
  color: #0a0e17;
  border-radius: 8px;
  font-size: 0.85rem;
}

.footer-logo-accent {
  background: var(--gradient-2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.footer-quicklinks ul,
.footer-contact p {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: none;
}

.footer-quicklinks a,
.footer-contact a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.footer-quicklinks a:hover,
.footer-contact a:hover {
  color: var(--primary);
}

.footer-quicklinks li {
  margin-bottom: 8px;
}

.footer-social {
  margin-top: 12px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: #06c755;
  color: #fff !important;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-social a:hover {
  background: #05b04b;
  color: #fff !important;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom small {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* 舊版 footer 相容（若尚未載入 partial） */
.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 24px 24px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* 成功訊息 */
.form-success {
  display: none;
  padding: 16px;
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius);
  color: var(--accent-green);
  margin-bottom: 20px;
}

.form-success.show {
  display: block;
  animation: fadeIn 0.5s ease;
}

/* RWD */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 80px;
  }
  .section {
    padding: 60px 0;
  }
  .flow-steps {
    flex-direction: column;
    align-items: center;
  }
  .featured {
    grid-template-columns: 1fr;
  }
}
