/* =============================================
   倉鼠智慧 Hamster AI — 企業形象網站全站樣式
   www.hamstergo.ai
   ============================================= */

/* --- CSS 變數（品牌色系） --- */
:root {
  --brand-primary: #36d6ae;
  --brand-primary-light: #8df3d8;
  --brand-primary-dark: #12a27e;
  --brand-violet: #f6b25d;
  --accent-cyan: #4cc9f0;
  --accent-coral: #ff6f61;
  --accent-lime: #c4f56a;

  --bg-deep: #09090b;
  --bg-card: #17151b;
  --bg-card-strong: #211d25;
  --bg-border: #39313f;
  --bg-elevated: rgba(255, 255, 255, 0.055);

  --text-primary: #fbfaf7;
  --text-secondary: #c7c0b8;
  --text-muted: #8c8580;

  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  --shadow-soft: 0 18px 55px rgba(0, 0, 0, 0.32);
  --shadow-hover: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius-card: 8px;
  --radius-control: 8px;
  --max-content: 1180px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, #11100f 0%, #09090b 34%, #111315 100%);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: 100%;
  overflow-x: hidden;
}

a {
  color: var(--brand-primary-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--brand-primary);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(141, 243, 216, 0.55);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- 字型載入 --- */
code, pre {
  font-family: 'JetBrains Mono', monospace;
}

/* --- 共用容器 --- */
.container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 1.5rem);
}

/* --- 導覽列 --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.9rem 0;
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.navbar.scrolled {
  background: rgba(9, 9, 11, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.26);
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0;
  min-width: 0;
  white-space: nowrap;
}

/* .navbar-brand .logo-icon 已移除 — 改用 .logo-img（SVG 圖片） */

.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  list-style: none;
}

.navbar-links a {
  color: var(--text-secondary);
  font-weight: 650;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--text-primary);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- 按鈕系統 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-control);
  font-weight: 750;
  font-size: 0.95rem;
  line-height: 1.25;
  min-height: 44px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  text-align: center;
  white-space: normal;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-lime));
  color: #06110e;
  box-shadow: 0 12px 30px rgba(54, 214, 174, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(54, 214, 174, 0.28);
  color: #06110e;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.13);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(141, 243, 216, 0.5);
  color: var(--brand-primary-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* --- 區塊通用 --- */
.section {
  padding: 6rem 0;
  position: relative;
}

.section-sm {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 850;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

/* --- Hero 區塊 --- */
.hero {
  position: relative;
  min-height: min(860px, 96vh);
  padding: 9rem 0 5rem;
  text-align: center;
  overflow: hidden;
  display: grid;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 5.5rem 1.5rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-card);
  background:
    linear-gradient(115deg, rgba(54, 214, 174, 0.14), transparent 36%),
    linear-gradient(245deg, rgba(246, 178, 93, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.015));
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.65rem, 7vw, 5.8rem);
  font-weight: 900;
  line-height: 1.02;
  margin-bottom: 1.5rem;
  letter-spacing: 0;
}

.hero-title .gradient-text {
  background: linear-gradient(115deg, var(--brand-primary-light), var(--accent-lime) 45%, var(--brand-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.16rem;
  color: var(--text-secondary);
  max-width: 760px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.access-note {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  max-width: 760px;
  margin: 1rem auto 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid rgba(246, 178, 93, 0.28);
  border-radius: var(--radius-card);
  background: rgba(246, 178, 93, 0.08);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.access-note strong {
  color: var(--text-primary);
  white-space: nowrap;
}

/* --- 卡片系統 --- */
.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.026)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(141, 243, 216, 0.35);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, rgba(54, 214, 174, 0.16), rgba(246, 178, 93, 0.14));
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: var(--brand-primary-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- 格線佈局 --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > * {
  min-width: 0;
}

/* --- 系統敘事區 --- */
.system-story-section {
  background:
    linear-gradient(180deg, rgba(54, 214, 174, 0.07), transparent 42%),
    linear-gradient(90deg, rgba(246, 178, 93, 0.055), transparent 52%),
    transparent;
}

.story-kicker {
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin-bottom: 0.75rem;
  text-align: center;
  text-transform: uppercase;
}

.system-story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.system-story-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.025)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.system-story-label {
  color: var(--warning);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.system-story-panel h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.system-story-panel p,
.silicon-narrative p,
.blueprint-column p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.silicon-narrative {
  border: 1px solid rgba(76, 201, 240, 0.24);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-card);
  margin: 2rem auto 0;
  max-width: 900px;
  padding: 1.25rem 1.5rem;
  background: rgba(76, 201, 240, 0.075);
}

.silicon-narrative-title {
  color: var(--text-primary) !important;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

/* --- 升級雷達 --- */
.upgrade-radar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.upgrade-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.064), rgba(255, 255, 255, 0.024)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  min-width: 0;
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.upgrade-card:hover {
  border-color: rgba(246, 178, 93, 0.42);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.upgrade-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  margin-bottom: 1rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid rgba(246, 178, 93, 0.38);
  border-radius: var(--radius-control);
  background: rgba(246, 178, 93, 0.12);
  color: var(--brand-violet);
  font-size: 0.78rem;
  font-weight: 850;
}

.upgrade-card h3,
.upgrade-step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.upgrade-card p,
.upgrade-step p {
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.75;
}

.upgrade-list {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 1rem 0 0 1.1rem;
  font-size: 0.86rem;
}

.upgrade-ladder {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: upgrade-step;
}

.upgrade-step {
  position: relative;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid rgba(76, 201, 240, 0.22);
  border-radius: var(--radius-card);
  background:
    linear-gradient(180deg, rgba(76, 201, 240, 0.09), rgba(255, 255, 255, 0.022)),
    var(--bg-card);
}

.upgrade-step::after {
  content: '';
  position: absolute;
  top: 2.2rem;
  right: -1rem;
  width: 1rem;
  height: 2px;
  background: rgba(76, 201, 240, 0.34);
}

.upgrade-step:last-child::after {
  display: none;
}

.upgrade-step-index {
  display: block;
  color: var(--accent-cyan);
  font-size: 0.82rem;
  font-weight: 850;
  margin-bottom: 0.75rem;
}

/* --- 數據統計區 --- */
.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-primary-light), var(--accent-lime) 52%, var(--brand-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.stat-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* --- 流程步驟 --- */
.steps {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step::after {
  content: '';
  position: absolute;
  top: 2rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: var(--bg-border);
}

.step:last-child::after {
  display: none;
}

.step-number {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-lime));
  color: #07110e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1.25rem;
}

.step-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- CTA 橫幅 --- */
.cta-banner {
  background:
    linear-gradient(135deg, rgba(54, 214, 174, 0.22), rgba(246, 178, 93, 0.16)),
    var(--bg-card-strong);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  padding: 4rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.cta-banner h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-banner .btn-primary {
  background: var(--text-primary);
  color: #0a0a0a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.cta-banner .btn-primary:hover {
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

/* --- 表單 --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--error);
  margin-left: 0.25rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-control);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(54, 214, 174, 0.16);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23c7c0b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* --- Footer --- */
.footer {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #0a0a0b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- 服務比較表 --- */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--bg-border);
}

.comparison-table th {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table td {
  font-size: 0.95rem;
}

.comparison-table tbody tr:hover {
  background: rgba(54, 214, 174, 0.06);
}

/* --- 定價卡片 --- */
.pricing-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.066), rgba(255, 255, 255, 0.025)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.pricing-card.featured {
  border-color: var(--brand-primary);
  box-shadow: 0 24px 70px rgba(54, 214, 174, 0.16);
  transform: scale(1.03);
  position: relative;
}

.pricing-card.featured::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--accent-lime), var(--brand-violet));
}

.pricing-card .price {
  font-size: 3rem;
  font-weight: 800;
}

.pricing-card .price-period {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- 聯絡資訊卡片 --- */
.contact-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.022)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-card > div {
  min-width: 0;
}

.contact-card:hover {
  border-color: rgba(141, 243, 216, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.contact-card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(54, 214, 174, 0.16), rgba(246, 178, 93, 0.14));
  border-radius: var(--radius-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* --- 品牌圖片 --- */
.logo-img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-card);
}

.card-icon-img {
  width: 56px;
  height: 56px;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 18px rgba(54, 214, 174, 0.13));
}

.contact-card-icon-img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.hero-illustration {
  max-width: 100%;
  width: min(840px, 92%);
  height: auto;
  margin: 2.4rem auto 0;
  display: block;
  filter: drop-shadow(0 28px 60px rgba(0, 0, 0, 0.38));
}

.step-icon-img {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: block;
}

.service-header-icon {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

/* --- 表單驗證狀態 --- */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.form-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-note {
  margin: -0.35rem 0 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* --- 手機導覽列動畫 --- */
.navbar-links {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.navbar-toggle {
  transition: transform 0.3s ease;
}

.navbar-toggle.open {
  transform: rotate(90deg);
}

/* --- 滾動顯示動畫 --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-up-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-up-delay-3 { animation-delay: 0.3s; opacity: 0; }
.fade-in-up-delay-4 { animation-delay: 0.4s; opacity: 0; }

/* IntersectionObserver 驅動的滾動顯示 */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.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; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- 數據計數動畫 --- */
.stat-number {
  transition: transform 0.3s ease;
}

/* --- 服務頁面錨點導覽 --- */
.service-nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.service-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}

.service-nav-btn:hover,
.service-nav-btn.active {
  border-color: var(--brand-primary);
  color: #07110e;
  background: linear-gradient(135deg, var(--brand-primary), var(--accent-lime));
  transform: translateY(-1px);
}

/* --- 從 inline style 提取的工具類別 --- */

/* 導覽按鈕 */
.btn-nav { padding: 0.5rem 1.25rem; }

/* 按鈕尺寸變體 */
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

/* 區塊背景 */
.section-alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015)),
    rgba(23, 21, 27, 0.62);
}

/* 文字 */
.text-center { text-align: center; }
.text-italic { font-style: italic; }
.text-muted-sm { color: var(--text-muted); font-size: 0.85rem; font-style: italic; }
.text-bold-sm { font-weight: 600; font-size: 0.9rem; }

/* 間距 */
.mb-1 { margin-bottom: 1rem; }
.mb-1-5 { margin-bottom: 1.5rem; }
.mt-1-5 { margin-top: 1.5rem; }

/* 卡片圖標置中 */
.card-icon-center { margin: 0 auto 1.25rem; }

/* 服務頁：區段標題 */
.service-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.service-header h2 { font-size: 2rem; font-weight: 800; }
.service-header p { color: var(--text-secondary); }

/* 服務頁：描述段落 */
.service-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 720px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* 服務頁：架構藍圖 */
.blueprint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.blueprint-column {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.062), rgba(255, 255, 255, 0.023)),
    var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.095);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

.blueprint-column h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.blueprint-list {
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  line-height: 1.75;
  margin-left: 1.25rem;
}

.blueprint-list strong,
.moat-strip strong {
  color: var(--text-primary);
}

.reasoning-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.reasoning-flow span {
  background: rgba(76, 201, 240, 0.12);
  border: 1px solid rgba(76, 201, 240, 0.28);
  border-radius: var(--radius-control);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.55rem 0.25rem;
  text-align: center;
}

.moat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.moat-strip div {
  background: rgba(196, 245, 106, 0.075);
  border: 1px solid rgba(196, 245, 106, 0.18);
  border-radius: var(--radius-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  padding: 1rem;
}

/* 服務頁：子標題 */
.section-title-left {
  font-size: 1.5rem;
  font-weight: 800;
  text-align: left;
  margin-bottom: 2rem;
}

/* Hero 變體 */
.hero-compact {
  min-height: auto;
  padding: 8rem 0 3.5rem;
}

/* 分隔線 */
.section-divider {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-divider hr {
  border: none;
  border-top: 1px solid var(--bg-border);
}

/* 定價卡片 */
.pricing-label {
  color: var(--text-secondary);
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.pricing-label-featured { color: var(--brand-primary-light); }
.pricing-divider {
  border: none;
  border-top: 1px solid var(--bg-border);
  margin: 1.5rem 0;
}
.pricing-features {
  list-style: none;
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.pricing-features li { margin-bottom: 0.75rem; }
.pricing-btn { width: 100%; justify-content: center; margin-top: 1.5rem; }

/* 比較表色標 */
.check-success { color: var(--success); }
.check-muted { color: var(--text-muted); }

/* 聯絡頁 */
.contact-layout { gap: 4rem; align-items: start; }
.contact-subtitle { font-size: 1.5rem; font-weight: 700; margin-bottom: 2rem; }
.contact-methods { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 3rem; }
.contact-link { text-decoration: none; color: inherit; }
.contact-info-title { font-weight: 600; margin-bottom: 0.25rem; }
.contact-info-detail { color: var(--text-secondary); font-size: 0.9rem; overflow-wrap: anywhere; }
.contact-company-info { color: var(--text-secondary); font-size: 0.9rem; line-height: 2; }
.contact-company-name { color: var(--text-primary); }
.contact-faq { margin-top: 2rem; }
.contact-faq h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-card { padding: 1.25rem; }
.faq-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.5rem; }
.faq-text { font-size: 0.85rem; }

/* 全寬送出按鈕 */
.btn-full { width: 100%; justify-content: center; }

/* CTA 按鈕組 */
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cta-btn-light { border-color: rgba(255,255,255,0.3); color: white; }

/* Footer */
.footer-brand-text { font-size: 1.1rem; }
.logo-img-sm { width: 32px; height: 32px; }

/* 送出按鈕狀態 --- */
.btn.submitting {
  opacity: 0.7;
  pointer-events: none;
}

.btn.submitted {
  background: var(--success) !important;
  box-shadow: none !important;
}

/* --- 響應式設計 --- */

/* Tablet 橫向 */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .system-story-grid,
  .moat-strip,
  .upgrade-radar-grid,
  .upgrade-ladder {
    grid-template-columns: 1fr;
  }

  .upgrade-step::after {
    display: none;
  }

  .blueprint-layout {
    grid-template-columns: 1fr;
  }

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

  .pricing-card.featured {
    transform: scale(1);
  }
}

/* Tablet 直向 & 手機橫向 */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.97);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
  }

  .navbar-links.open {
    display: flex;
  }

  .navbar-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 7.5rem 0 4rem;
  }

  .hero::before {
    inset: 5.25rem 0.85rem 0.85rem;
  }

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

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

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .reasoning-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    flex-direction: column;
  }

  .step::after {
    display: none;
  }

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

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

  .section {
    padding: 4rem 0;
  }

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

  .cta-banner {
    padding: 3rem 1.5rem;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }

  /* 服務頁標題區塊堆疊 */
  .service-header {
    align-items: flex-start;
  }

  .service-header > div {
    min-width: 0;
  }

  .service-header-icon {
    width: 44px;
    height: 44px;
  }

  /* 定價卡片手機佈局 */
  .pricing-card {
    padding: 2rem 1.5rem;
  }

  /* 比較表水平捲動提示 */
  .comparison-table {
    display: block;
    min-width: 600px;
    overflow-x: auto;
  }

  /* 聯絡頁：右欄接在表單下方 */
  .contact-right { margin-top: 2rem; }
  .contact-layout { gap: 2rem; }
  .contact-methods { margin-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* 手機直向 */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  .access-note {
    align-items: flex-start;
    flex-direction: column;
    text-align: left;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  .service-nav {
    gap: 0.5rem;
  }

  .service-nav-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}
