/* ══════════════════════════════════════════════════════════════
   聚川文化品牌設計系統 — 共用 CSS 變數
   Brand CIS Shared Variables & Base Styles
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --primary: #1B4270;
  --primary-light: #2460A7;
  --primary-dark: #0F2A47;
  --primary-glow: rgba(27, 66, 112, 0.3);

  --accent: #E8251A;
  --accent-light: #FF4A40;
  --accent-dark: #B51D13;
  --accent-glow: rgba(232, 37, 26, 0.3);

  --bg-cream: #F5F6F8;
  --bg-neutral: #F5F6F8;
  --bg-white: #ffffff;
  --bg-dark: #0F1923;

  --text-dark: #111827;
  --text-medium: #4B5563;
  --text-light: #9CA3AF;

  --border: rgba(0, 0, 0, 0.1);

  --font-sans:
    "Inter",
    "Source Han Sans SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-display:
    "zihunbiantaoti",
    "Source Han Sans SC",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    sans-serif;

  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-medium: 0 8px 24px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.16), 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-elevated: 0 20px 60px rgba(0, 0, 0, 0.15), 0 8px 20px rgba(0, 0, 0, 0.1);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --superindividual: var(--accent);
  --superindividual-light: var(--accent-light);
  --superindividual-dark: var(--accent-dark);
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input {
  font: inherit;
}

::selection {
  background: rgba(27, 66, 112, 0.2);
  color: var(--text-dark);
}

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(245, 246, 248, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-dark);
  text-decoration: none;
}

.nav-brand img {
  height: 28px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-medium);
  text-decoration: none;
  transition: color 0.2s;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 100px 0;
}

section:first-of-type {
  padding-top: 140px;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc {
  font-size: clamp(16px, 2vw, 18px);
  color: var(--text-medium);
  max-width: 600px;
  line-height: 1.7;
}

.btn-primary {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--bg-white);
  color: var(--text-dark);
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-dark);
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 200;
  box-shadow: var(--shadow-elevated);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.code-block {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.8;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  white-space: pre;
  line-height: inherit;
}

.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #cdd6f4;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  cursor: pointer;
  font-family: var(--font-mono);
  transition: background 0.2s;
}

.code-block .copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.copy-url-btn {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-url-btn:hover {
  background: var(--text-dark);
  color: white;
  border-color: var(--text-dark);
}

.copy-url-btn.copied {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.footer {
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: 0.82rem;
  color: var(--text-light);
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.footer a:hover {
  text-decoration: underline;
}

.bottom-brand-gradient {
  height: clamp(120px, 18vw, 220px);
  pointer-events: none;
  background:
    radial-gradient(55% 110% at 15% 100%, rgba(27, 66, 112, 0.18) 0%, rgba(27, 66, 112, 0) 75%),
    radial-gradient(55% 110% at 85% 100%, rgba(232, 37, 26, 0.2) 0%, rgba(232, 37, 26, 0) 75%),
    linear-gradient(180deg, rgba(245, 246, 248, 0) 0%, rgba(245, 246, 248, 1) 100%);
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .container {
    padding: 0 20px;
  }

  .nav-inner {
    padding: 0 20px;
  }
}
