@import url('https://cdn.jsdelivr.net/npm/chiron-sung-hk-webfont@latest/css/vf.css');
@import url('https://cdn.jsdelivr.net/npm/chiron-hei-hk-webfont@latest/css/vf.css');

:root {
  --bg: #faf9f5; --parchment: #f5f4ed; --card-white: #ffffff; --brand: #1B365D;
  --brand-light: #2a5080; --text: #141413; --text-secondary: #6b6a64;
  --text-muted: #9a9890; --border: #e8e6dc; --sage: #7A8B7A;
  --sage-light: #a3b0a3; --rose: #C4A0A0; --rose-light: #d4b8b8; --combo-bg: #f7f6f0;
  --serif: "Chiron Sung HK WS","Source Han Serif SC","Noto Serif CJK SC","Songti SC",Georgia,serif;
  --sans: "Chiron Hei HK WS",-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04); --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08); --radius: 12px; --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.25,0.1,0.25,1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--serif);
  font-weight: 400; line-height: 1.8; overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--sage) 1px, transparent 1px),
                    linear-gradient(90deg, var(--sage) 1px, transparent 1px);
  background-size: 72px 72px; opacity: 0.03;
}

/* ---- Language Toggle ---- */
.lang-toggle {
  position: fixed; top: 1.25rem; right: 1.5rem; z-index: 100; display: flex; gap: 0;
  background: var(--card-white); border: 1.5px solid var(--border); border-radius: 8px;
  overflow: hidden; box-shadow: var(--shadow-sm); font-family: var(--sans);
}
.lang-toggle button {
  padding: 0.35rem 0.75rem; font-size: 0.76rem; font-weight: 500; background: transparent;
  border: none; cursor: pointer; color: var(--text-muted); transition: all var(--transition);
  letter-spacing: 0.3px;
}
.lang-toggle button.active { background: var(--brand); color: var(--parchment); }
.lang-toggle button:hover:not(.active) { color: var(--brand); }

/* ---- Layout ---- */
.container { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
section { padding: 5rem 0; position: relative; }
.section-divider { max-width: 960px; margin: 0 auto; padding: 0 2rem; }
.section-divider hr { border: none; border-top: 1px solid var(--border); opacity: 0.6; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-label {
  font-family: var(--sans); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 4px; color: var(--brand); margin-bottom: 0.75rem;
}
.section-title { font-size: 2.2rem; font-weight: 600; color: var(--text); margin-bottom: 0.75rem; line-height: 1.3; }
.section-title em { font-style: normal; color: var(--brand); font-variation-settings: "PADG" 2; }
.section-subtitle { font-size: 1.05rem; color: var(--text-secondary); font-weight: 350; max-width: 560px; margin: 0 auto; }

/* ---- Hero ---- */
.hero { padding: 6rem 0 5rem; text-align: center; position: relative; overflow: hidden; }
.hero::after {
  content: ''; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px;
  border: 1px solid var(--sage); border-radius: 50%; opacity: 0.06; pointer-events: none;
}
.hero-badge {
  display: inline-block; font-family: var(--sans); font-size: 0.7rem; letter-spacing: 3px;
  text-transform: uppercase; color: var(--brand); border: 1px solid var(--brand);
  padding: 0.3rem 1rem; border-radius: 20px; margin-bottom: 2rem; opacity: 0.8;
}
.hero-title {
  font-size: 3.4rem; font-weight: 700; font-variation-settings: "PADG" 2;
  line-height: 1.2; margin-bottom: 1rem; color: var(--text);
}
.hero-tagline {
  font-size: 1.2rem; font-weight: 350; color: var(--text-secondary);
  line-height: 1.6; max-width: 600px; margin: 0 auto 0.75rem;
}
.hero-credit {
  font-size: 0.78rem; color: var(--text-muted);
  letter-spacing: 1px; margin-bottom: 2.5rem;
}
.hero-cards { display: flex; justify-content: center; gap: 2rem; margin: 3.5rem 0; }
.hero-card {
  width: 140px; height: 210px; border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow-lg); transition: transform var(--transition), box-shadow var(--transition);
  animation: cardFloat 6s ease-in-out infinite;
}
.hero-card:nth-child(2) { animation-delay: -2s; }
.hero-card:nth-child(3) { animation-delay: -4s; }
.hero-card:hover { transform: translateY(-8px) scale(1.04); box-shadow: 0 16px 40px rgba(0,0,0,0.12); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hero-cta { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--sans);
  font-size: 0.9rem; font-weight: 500; padding: 0.75rem 1.75rem; border-radius: 8px;
  text-decoration: none; transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary { background: var(--brand); color: var(--parchment); }
.btn-primary:hover { background: var(--brand-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(27,54,93,0.25); }
.btn-outline { background: transparent; color: var(--brand); border: 1.5px solid var(--brand); }
.btn-outline:hover { background: var(--brand); color: var(--parchment); transform: translateY(-1px); }

/* ---- Features ---- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature-card {
  background: var(--card-white); border-radius: var(--radius); padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid transparent;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--border); transform: translateY(-2px); }
.feature-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--combo-bg); display: flex; align-items: center; justify-content: center; margin-bottom: 1.25rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text); line-height: 1.4; }
.feature-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; font-weight: 350; }

/* ---- Workflow ---- */
.workflow { display: flex; align-items: flex-start; gap: 0; position: relative; }
.workflow-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%; background: var(--card-white); border: 2px solid var(--brand);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem;
  font-family: var(--sans); font-size: 1.2rem; font-weight: 600; color: var(--brand);
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.workflow-step:hover .step-number { background: var(--brand); color: var(--parchment); transform: scale(1.1); }
.workflow-step h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.workflow-step .step-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 350; margin-bottom: 0.75rem; }
.workflow-step p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.65; font-weight: 350; max-width: 230px; margin: 0 auto; }
.workflow-arrow { display: flex; align-items: center; padding-top: 16px; color: var(--text-muted); font-size: 1.5rem; flex-shrink: 0; }

/* ---- Product Showcase ---- */
.product-tabs { display: flex; justify-content: center; gap: 0.5rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.product-tab {
  font-family: var(--sans); font-size: 0.85rem; font-weight: 500; padding: 0.6rem 1.5rem;
  border: 1.5px solid var(--border); border-radius: 8px; background: var(--card-white);
  color: var(--text-secondary); cursor: pointer; transition: all var(--transition);
}
.product-tab:hover { border-color: var(--brand); color: var(--brand); }
.product-tab.active { background: var(--brand); color: var(--parchment); border-color: var(--brand); }
.product-panel { display: none; }
.product-panel.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.product-showcase-card { background: var(--card-white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-md); }
.preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.preview-img-wrap { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--bg); }
.preview-img-wrap img { width: 100%; display: block; }
.product-desc { text-align: center; margin-top: 1.5rem; font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }
.iframe-showcase { width: 100%; height: 560px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.iframe-showcase iframe { width: 100%; height: 100%; border: none; }

/* ---- Spread Types ---- */
.spreads-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.spread-card {
  background: var(--card-white); border-radius: var(--radius); padding: 1.75rem 1rem;
  text-align: center; box-shadow: var(--shadow-sm); transition: all var(--transition); border: 1px solid transparent;
}
.spread-card:hover { box-shadow: var(--shadow-md); border-color: var(--border); transform: translateY(-2px); }
.spread-visual { width: 64px; height: 64px; margin: 0 auto 1rem; }
.spread-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; width: 100%; height: 100%; }
.spread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sage); opacity: 0.4; }
.spread-dot.accent { background: var(--brand); opacity: 0.7; }
.spread-card h3 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.25rem; }
.spread-card p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.5; margin-top: 0.5rem; }

/* ---- Card Gallery ---- */
.gallery-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem; }
.gallery-item {
  border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-sm);
  transition: all var(--transition); aspect-ratio: 2/3; background: var(--bg);
}
.gallery-item:hover { transform: translateY(-4px) scale(1.06); box-shadow: var(--shadow-lg); z-index: 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-rotate { text-align: center; margin-top: 1.5rem; }
.gallery-rotate button {
  font-family: var(--sans); font-size: 0.82rem; color: var(--text-muted);
  border: 1px solid var(--border); border-radius: 6px; background: var(--card-white);
  padding: 0.4rem 1.2rem; cursor: pointer; transition: all var(--transition);
}
.gallery-rotate button:hover { border-color: var(--brand); color: var(--brand); }

/* ---- Install ---- */
.install-block { background: var(--card-white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow-md); max-width: 720px; margin: 0 auto; text-align: center; }
.install-note { font-size: 1rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.code-block {
  background: #1a1d23; color: #e0e0e0; font-family: 'SF Mono','Fira Code','Cascadia Code',monospace;
  font-size: 0.85rem; padding: 1.25rem 1.5rem; border-radius: var(--radius-sm);
  text-align: left; overflow-x: auto; line-height: 1.7; margin: 1.5rem 0;
}
.code-block .comment { color: #6a9955; }
.code-block .cmd { color: #dcdcaa; }
.code-block .path { color: #ce9178; }
.install-badges { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.5rem; }
.badge-link {
  display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--sans);
  font-size: 0.85rem; color: var(--text-secondary); text-decoration: none;
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 6px; transition: all var(--transition);
}
.badge-link:hover { border-color: var(--brand); color: var(--brand); background: var(--combo-bg); }
.badge-link svg { width: 16px; height: 16px; }

/* ---- Footer ---- */
.site-footer { background: var(--parchment); border-top: 1px solid var(--border); padding: 3rem 0; text-align: center; }
.footer-brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--brand); margin-bottom: 0.5rem; }
.footer-tagline { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.5rem; font-weight: 350; }
.footer-credits { font-size: 0.8rem; color: var(--text-muted); line-height: 2; }
.footer-credits a { color: var(--text-secondary); text-decoration: none; transition: color var(--transition); }
.footer-credits a:hover { color: var(--brand); }

/* ---- Animations ---- */
.animate-in { opacity: 0; transform: translateY(24px); animation: slideUp 0.8s ease forwards; }
.animate-in:nth-child(2) { animation-delay: 0.1s; }
.animate-in:nth-child(3) { animation-delay: 0.2s; }
.animate-in:nth-child(4) { animation-delay: 0.3s; }
.animate-in:nth-child(5) { animation-delay: 0.4s; }
.animate-in:nth-child(6) { animation-delay: 0.5s; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .spreads-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(4, 1fr); }
  .workflow { flex-direction: column; gap: 2rem; }
  .hero-title { font-size: 2.4rem; }
  .section-title { font-size: 1.8rem; }
  .lang-toggle { top: 0.75rem; right: 0.75rem; }
  .lang-toggle button { padding: 0.3rem 0.55rem; font-size: 0.7rem; }
}
@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .features-grid { grid-template-columns: 1fr; }
  .spreads-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-title { font-size: 1.8rem; }
  .hero-cards { gap: 1rem; }
  .hero-card { width: 90px; height: 135px; }
  .preview-grid { grid-template-columns: 1fr; }
  .product-tabs { flex-wrap: wrap; }
  section { padding: 3.5rem 0; }
  .section-title { font-size: 1.5rem; }
  .workflow-step p { max-width: 100%; }
  .lang-toggle { top: 0.5rem; right: 0.5rem; }
}
