@charset "utf-8";

:root {
  --bg-deep: #f0f4fa;
  --bg-base: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-hover: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.12);
  --text: #1c2433;
  --text-muted: #5c6578;
  --text-dim: #8b95a8;
  --accent: #6366f1;
  --accent-2: #0891b2;
  --gradient-main: linear-gradient(135deg, #6366f1 0%, #22d3ee 50%, #a855f7 100%);
  --gradient-text: linear-gradient(135deg, #4f46e5, #0891b2, #9333ea);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow: 0 12px 40px rgba(99, 102, 241, 0.12);
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 16px 48px rgba(15, 23, 42, 0.1);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Fira Code", Consolas, monospace;
  --nav-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f8 45%, #f0f4fa 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ── Background effects ── */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 70%);
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
  width: 520px; height: 520px;
  background: rgba(129, 140, 248, 0.35);
  top: -12%; left: -6%;
}
.orb-2 {
  width: 420px; height: 420px;
  background: rgba(34, 211, 238, 0.28);
  top: 28%; right: -10%;
  animation-delay: -7s;
}
.orb-3 {
  width: 360px; height: 360px;
  background: rgba(192, 132, 252, 0.22);
  bottom: 8%; left: 28%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* ── Layout ── */
.page-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

/* ── Nav ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, 92vw);
}

.nav-brand {
  display: flex;
  align-items: center;
  color: var(--text);
  padding: 2px 0;
}

.nav-brand-wordmark {
  display: flex;
  align-items: baseline;
  gap: 7px;
  line-height: 1;
}

.nav-brand-main {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #1e293b;
  transition: color 0.2s;
}

.nav-brand-aside {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

.nav-brand:hover .nav-brand-main {
  color: #0f172a;
}

.nav-brand:hover .nav-brand-aside {
  color: #64748b;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}

.nav-link-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 5px;
}

.nav-link-icon--grid {
  color: var(--text-dim);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: rgba(99, 102, 241, 0.08);
}

.nav-links a:hover .nav-link-icon--grid,
.nav-links a.is-active .nav-link-icon--grid {
  color: var(--accent);
}

.theme-link .nav-links a[href*="z-link"].is-active {
  background: rgba(56, 189, 248, 0.12);
  color: #0369a1;
}

.theme-img .nav-links a[href*="z-img-tools"].is-active {
  background: rgba(34, 197, 94, 0.12);
  color: #15803d;
}

.theme-git .nav-links a[href*="z-git-tools"].is-active {
  background: rgba(249, 115, 22, 0.12);
  color: #c2410c;
}

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  animation: fadeUp 0.8s var(--ease) both;
  box-shadow: var(--shadow-card);
}

.hero-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--ease) 0.1s both;
  color: var(--text);
}

.hero h1 .gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  animation: fadeUp 0.8s var(--ease) 0.3s both;
}

.hero-stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 2px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Product cards (home) ── */
.products-section {
  padding: 40px 0 100px;
}

.section-head {
  text-align: center;
  margin-bottom: 48px;
}

.section-head h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  color: var(--text);
}

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

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

.product-card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  padding: 32px;
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
  cursor: pointer;
  display: block;
  box-shadow: var(--shadow-card);
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s;
  border-radius: inherit;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99, 102, 241, 0.18);
  box-shadow: var(--shadow-card-hover);
  background: var(--bg-card-hover);
}

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

.product-card--img::before {
  background: radial-gradient(circle at 30% 20%, rgba(251,146,60,0.14), transparent 60%);
}
.product-card--git::before {
  background: radial-gradient(circle at 30% 20%, rgba(34,197,94,0.12), transparent 60%);
}
.product-card--link::before {
  background: radial-gradient(circle at 30% 20%, rgba(56,189,248,0.14), transparent 60%);
}

.product-card:hover.product-card--img { box-shadow: 0 16px 48px rgba(249, 115, 22, 0.12); }
.product-card:hover.product-card--git { box-shadow: 0 16px 48px rgba(34, 197, 94, 0.12); }
.product-card:hover.product-card--link { box-shadow: 0 16px 48px rgba(56, 189, 248, 0.14); }

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  background: #fff;
}

.product-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  color: var(--text);
}

.product-card .product-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-2);
  transition: gap 0.3s var(--ease);
}

.product-card:hover .product-link { gap: 10px; }

.product-platform {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ── Detail page ── */
.detail-hero {
  padding: 60px 0 48px;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.detail-hero-content { animation: fadeUp 0.8s var(--ease) both; }

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color 0.2s;
}

.detail-back:hover { color: var(--text); }

.detail-icon-lg {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: block;
  margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  background: #fff;
}

.detail-icon-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--text);
}

.detail-hero .subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 480px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s, background 0.2s;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--product-gradient, var(--gradient-main));
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.32);
  transform: translateY(-1px);
}

.detail-mockup {
  position: relative;
  animation: fadeUp 0.8s var(--ease) 0.15s both;
}

.app-screenshot-wrap {
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

.app-screenshot-wrap img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

.detail-hero-inner--shot-wide {
  grid-template-columns: 1fr 1.15fr;
}

@media (max-width: 768px) {
  .detail-hero-inner--shot-wide {
    grid-template-columns: 1fr;
  }
}

.mockup-window {
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

.mockup-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup-dot--r { background: #ef4444; }
.mockup-dot--y { background: #eab308; }
.mockup-dot--g { background: #22c55e; }

.mockup-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.mockup-body {
  padding: 24px;
  min-height: 280px;
  background: #fcfdfe;
}

/* ── Features ── */
.features-section {
  padding: 60px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: var(--shadow-card);
}

.feature-card:hover {
  border-color: rgba(99, 102, 241, 0.15);
  background: #ffffff;
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.2rem;
  background: rgba(99, 102, 241, 0.08);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 650;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Project tools showcase (ZLink) ── */
.tools-showcase {
  padding: 80px 0 96px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(56, 189, 248, 0.1), transparent 70%),
    linear-gradient(180deg, #f8fafc 0%, #f0f9ff 100%);
  border-top: 1px solid rgba(14, 165, 233, 0.08);
}

.tools-showcase-head {
  max-width: 680px;
  margin: 0 auto 36px;
  text-align: center;
}

.tools-showcase-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #0369a1;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.08);
}

.tools-showcase-head h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 16px;
}

.tools-showcase-lead {
  font-size: 1rem;
  line-height: 1.8;
  color: #475569;
}

.tools-showcase-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.tools-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
  padding: 14px 24px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.tools-stat strong {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #0284c7;
  letter-spacing: -0.03em;
}

.tools-stat span {
  margin-top: 6px;
  font-size: 0.75rem;
  color: #64748b;
}

.tools-steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  margin: 0 auto 32px;
  padding: 0;
  max-width: 720px;
}

.tools-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #334155;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.tools-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  flex-shrink: 0;
}

.tools-panel {
  padding: 28px 28px 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.08);
}

.tools-panel-group + .tools-panel-group {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.tools-panel-group__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tools-panel-group__head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 650;
  color: #64748b;
}

.tools-panel-group__mark {
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4ade80, #22c55e);
}

.tools-panel-group__count {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

.tools-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tools-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 8px 12px;
  min-height: 108px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.tools-tile:hover {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.04);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.12);
  transform: translateY(-2px);
}

.tools-tile__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1rem;
  line-height: 1;
}

.tools-tile__icon--blue { background: rgba(37, 99, 235, 0.1); }
.tools-tile__icon--green { background: rgba(34, 197, 94, 0.12); }
.tools-tile__icon--orange { background: rgba(249, 115, 22, 0.12); }
.tools-tile__icon--purple { background: rgba(124, 58, 237, 0.1); }
.tools-tile__icon--red { background: rgba(220, 38, 38, 0.1); }

.tools-tile h4 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.3;
}

.tools-tile p {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: #94a3b8;
}

.tools-tile__tag {
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 600;
  color: #0369a1;
  background: rgba(56, 189, 248, 0.12);
}

.tools-showcase-footnote {
  margin-top: 20px;
  padding: 0 4px 16px;
  text-align: center;
  font-size: 0.8125rem;
  color: #94a3b8;
}

@media (max-width: 900px) {
  .tools-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tools-showcase-head { text-align: left; }
  .tools-showcase-meta { justify-content: flex-start; }
  .tools-steps { justify-content: flex-start; }
  .tools-panel { padding: 20px 16px 4px; }
  .tools-tile { min-height: 96px; padding: 12px 6px 10px; }
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

/* ── Product themes ── */
.theme-img {
  --product-accent: #16a34a;
  --product-gradient: linear-gradient(135deg, #16a34a, #4ade80);
}
.theme-git {
  --product-accent: #ea580c;
  --product-gradient: linear-gradient(135deg, #ea580c, #fb923c);
}
.theme-link {
  --product-accent: #0284c7;
  --product-gradient: linear-gradient(135deg, #0284c7, #38bdf8);
}

.theme-img .feature-icon { background: rgba(249, 115, 22, 0.12); }
.theme-git .feature-icon { background: rgba(34, 197, 94, 0.12); }
.theme-link .feature-icon { background: rgba(56, 189, 248, 0.12); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .detail-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .detail-mockup { order: -1; }
  .nav-links { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero-stats { gap: 28px; }
}
