/* =========================================================
   Double Commander CN — Official Site
   Author: Double Commander 中文社区
   Design tokens, layout, components
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --brand-50:  #FEF2F2;
  --brand-100: #FDE2E0;
  --brand-200: #FBC9C3;
  --brand-300: #F8A89E;
  --brand-400: #F26C5B;
  --brand-500: #E74C3C;  /* primary */
  --brand-600: #D03B2B;
  --brand-700: #B8301F;
  --brand-800: #8E2417;
  --brand-900: #5E180E;

  --ink-50:    #F8FAFC;
  --ink-100:   #F1F5F9;
  --ink-200:   #E2E8F0;
  --ink-300:   #CBD5E1;
  --ink-400:   #94A3B8;
  --ink-500:   #64748B;
  --ink-600:   #475569;
  --ink-700:   #334155;
  --ink-800:   #1F2937;
  --ink-900:   #0B1220;

  --success:   #16A34A;
  --warning:   #F59E0B;
  --info:      #2563EB;
  --danger:    #DC2626;

  --bg:        #ffffff;
  --bg-soft:   #F8FAFC;
  --bg-mute:   #F1F5F9;
  --border:    #E5E7EB;
  --text:      #0F172A;
  --text-soft: #475569;
  --text-mute: #94A3B8;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --shadow:    0 4px 14px rgba(15,23,42,.08);
  --shadow-lg: 0 20px 40px -16px rgba(15,23,42,.18);
  --shadow-brand: 0 12px 32px -8px rgba(231,76,60,.45);

  --container: 1200px;
  --header-h:  68px;
  --ease:      cubic-bezier(.2,.7,.2,1);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Hiragino Sans GB",
               "Helvetica Neue", Arial, "Noto Sans CJK SC", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--brand-700); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Hiragino Sans GB", sans-serif;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; color: var(--text-soft); }

::selection { background: var(--brand-200); color: var(--ink-900); }

/* ---------- Layout helpers ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section   { padding: 88px 0; position: relative; }
.section--alt { background: var(--bg-soft); }
.section--ink { background: linear-gradient(180deg, #0B1220 0%, #111827 100%); color: #E5E7EB; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #ffffff; }
.section--ink p { color: #cbd5e1; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-600);
  background: var(--brand-50);
  border: 1px solid var(--brand-200);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.section--ink .eyebrow {
  color: #FBC9C3;
  background: rgba(231,76,60,.12);
  border-color: rgba(231,76,60,.35);
}

.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head p { font-size: 17px; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px; color: var(--ink-900);
}
.brand img { width: 70px; height: 50px; }
.brand span { letter-spacing: -0.01em; }
.brand small { color: var(--text-mute); font-weight: 500; font-size: 12px; margin-left: 4px; }

.nav-links {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink-700);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: var(--bg-mute); color: var(--brand-600); }
.nav-links a.active { color: var(--brand-600); background: var(--brand-50); }

.nav-cta { display: flex; gap: 10px; align-items: center; }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 920px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
    box-shadow: var(--shadow);
    padding: 8px 16px 16px;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform .12s var(--ease), background .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #ffffff;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover { background: linear-gradient(180deg, var(--brand-600), var(--brand-700)); color: #fff; }
.btn--ghost {
  background: #ffffff;
  color: var(--ink-800);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--brand-500); color: var(--brand-600); }
.btn--ink {
  background: #0B1220; color: #ffffff;
}
.btn--ink:hover { background: #1F2937; color: #fff; }
.btn--sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn--lg { padding: 16px 28px; font-size: 16px; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1000px 600px at 80% -20%, rgba(231,76,60,.18), transparent 60%),
    radial-gradient(800px 500px at -10% 30%, rgba(231,76,60,.12), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #F8FAFC 100%);
  padding: 80px 0 96px;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.hero h1 .accent { color: var(--brand-600); }
.hero p.lead {
  font-size: 18px;
  color: var(--ink-700);
  max-width: 560px;
}
.hero .meta {
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  margin: 18px 0 28px;
  font-size: 14px;
  color: var(--ink-600);
}
.hero .meta b { color: var(--ink-900); font-weight: 700; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-trust {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  margin-top: 28px; color: var(--ink-500); font-size: 13px;
}
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }

.hero-visual {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(180deg, #0B1220, #1F2937);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}
.hero-visual img { border-radius: 12px; }

.qr-card {
  position: absolute; right: -10px; bottom: -22px;
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  width: 168px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid var(--border);
}
.qr-card img { width: 140px; height: 140px; border-radius: 8px; }
.qr-card .qr-title { font-size: 13px; font-weight: 700; color: var(--ink-900); }
.qr-card .qr-sub   { font-size: 11px; color: var(--ink-500); }
@media (max-width: 540px) {
  .qr-card { position: static; width: 100%; margin-top: 18px; }
}

/* ---------- Feature cards ---------- */
.feature {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  height: 100%;
}
.feature:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--shadow);
}
.feature .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature .icon svg { width: 22px; height: 22px; }
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; font-size: 15px; }

/* ---------- Use cases (scenarios) ---------- */
.usecase {
  display: flex; gap: 20px; align-items: flex-start;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  height: 100%;
}
.usecase .num {
  flex: 0 0 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-600));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow-brand);
}
.usecase h3 { margin: 4px 0 8px; }
.usecase ul { margin: 8px 0 0; padding: 0 0 0 18px; color: var(--ink-600); font-size: 14.5px; }
.usecase ul li { margin: 4px 0; }

/* ---------- Reviews ---------- */
.review {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.review::before {
  content: "\201C";
  position: absolute; top: 10px; right: 22px;
  font-family: Georgia, serif;
  font-size: 64px;
  color: var(--brand-200);
  line-height: 1;
}
.review .stars { color: #F59E0B; letter-spacing: 2px; font-size: 14px; }
.review blockquote {
  margin: 0; color: var(--ink-700); font-size: 15.5px; line-height: 1.75;
}
.review .author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.review .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(180deg, var(--brand-500), var(--brand-700));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
}
.review .author .who { font-weight: 700; color: var(--ink-900); font-size: 14.5px; }
.review .author .role { color: var(--ink-500); font-size: 13px; }

/* ---------- Download cards ---------- */
.dl-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  height: 100%;
  display: flex; flex-direction: column;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dl-card .os { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dl-card .os .badge {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand-600);
  display: inline-flex; align-items: center; justify-content: center;
}
.dl-card .os .badge svg { width: 22px; height: 22px; }
.dl-card h3 { margin: 0; }
.dl-card .ver { color: var(--ink-500); font-size: 13px; }
.dl-card .files { margin: 12px 0 18px; padding: 0; list-style: none; font-size: 14px; }
.dl-card .files li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px dashed var(--border); }
.dl-card .files li:first-child { border-top: 0; }
.dl-card .files .size { color: var(--ink-500); font-variant-numeric: tabular-nums; }

.dl-popular {
  position: relative; border-color: var(--brand-300);
  background: linear-gradient(180deg, #fff 0%, var(--brand-50) 100%);
}
.dl-popular::after {
  content: "推荐";
  position: absolute; top: -10px; right: 18px;
  background: var(--brand-500); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px;
  box-shadow: var(--shadow-brand);
}

.qr-row { display: flex; gap: 16px; margin-top: 22px; }
.qr-block { text-align: center; }
.qr-block img { width: 140px; height: 140px; border-radius: 10px; border: 1px solid var(--border); }
.qr-block .qr-title { font-size: 13px; font-weight: 700; color: var(--ink-900); margin-top: 6px; }
.qr-block .qr-sub   { font-size: 11px; color: var(--ink-500); }

/* ---------- Changelog timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl-item {
  display: grid; grid-template-columns: 180px 1fr; gap: 24px;
  padding: 22px 0; border-top: 1px solid var(--border);
}
.tl-item:first-child { border-top: 0; }
.tl-meta .ver { font-weight: 800; color: var(--brand-600); font-size: 18px; }
.tl-meta .date { color: var(--ink-500); font-size: 13px; }
.tl-meta .tag {
  display: inline-block; margin-top: 6px; font-size: 12px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-200);
}
.tl-content h3 { margin: 0 0 8px; }
.tl-content ul { margin: 0; padding-left: 18px; color: var(--ink-700); }
.tl-content li { margin: 4px 0; }
@media (max-width: 720px) { .tl-item { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- FAQ ---------- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  color: var(--ink-900);
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 22px; line-height: 1; color: var(--brand-600);
  transition: transform .2s var(--ease);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item[open] { border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--ink-700); }
.faq-item .faq-body p { margin: 0 0 8px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background:
    radial-gradient(600px 360px at 90% 0%, rgba(255,255,255,.18), transparent 60%),
    linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  border-radius: 22px;
  padding: 48px;
  color: #fff;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: #fff; margin: 0 0 8px; }
.cta-banner p  { color: rgba(255,255,255,.85); margin: 0; }
.cta-banner .qr-row { justify-content: flex-end; }
.cta-banner .qr-block img { background: #fff; }
.cta-banner .qr-block .qr-title { color: #fff; }
.cta-banner .qr-block .qr-sub   { color: rgba(255,255,255,.75); }
@media (max-width: 800px) { .cta-banner { grid-template-columns: 1fr; padding: 32px; } .cta-banner .qr-row { justify-content: flex-start; } }

/* ---------- Footer ---------- */
.site-footer {
  background: #0B1220;
  color: #cbd5e1;
  padding: 64px 0 32px;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #ffffff; }
.footer-grid {
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  margin-bottom: 32px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 8px 0; font-size: 14.5px; }
.footer-brand p { color: #94A3B8; font-size: 14px; max-width: 360px; }
.footer-bottom {
  border-top: 1px solid #1F2937;
  padding-top: 24px;
  display: flex; flex-wrap: wrap; gap: 16px;
  justify-content: space-between;
  font-size: 13px;
  color: #94A3B8;
}

/* ---------- Modal (download popup) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(6px);
  padding: 24px;
}
.modal[aria-hidden="false"] { display: flex;   left: 0;
  right: 0;
  top: 0;
  bottom: 0;}
  button { outline: none } 
.modal-dialog {
  background: #ffffff;
  border-radius: 18px;
  width: 100%; max-width: 520px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: pop .18s var(--ease);
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header {
  padding: 22px 24px;
  background: linear-gradient(180deg, var(--brand-50), #fff);
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; color: var(--ink-900); }
.modal-close {
  width: 36px; height: 36px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--ink-700);
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--brand-600); border-color: var(--brand-200); }
.modal-body { padding: 22px 24px 8px; }
.modal-body p { margin: 0 0 8px; }
.modal-body .hint { color: var(--ink-500); font-size: 13px; }
.modal-body .qr-row { justify-content: space-around; gap: 28px; margin: 16px 0 8px; }
.modal-body .qr-block img { width: 160px; height: 160px; }
.modal-body .qr-block .qr-title { font-size: 14px; }
.modal-body .qr-block .qr-sub   { font-size: 12px; }
.modal-list { list-style: none; padding: 0; margin: 14px 0 0; }
.modal-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px dashed var(--border); }
.modal-list li:first-child { border-top: 0; }
.modal-list .file-name { color: var(--ink-900); font-weight: 500; }
.modal-list .file-meta { color: var(--ink-500); font-size: 13px; }
.modal-list a { color: var(--brand-600); font-weight: 600; }
.modal-footer {
  padding: 16px 24px 22px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg-soft);
  font-size: 13px;
  color: var(--ink-500);
}

/* ---------- Misc utilities ---------- */
.text-mute   { color: var(--text-mute); }
.text-soft   { color: var(--text-soft); }
.center      { text-align: center; }
.mt-0        { margin-top: 0 !important; }
.mt-24       { margin-top: 24px; }
.mt-40       { margin-top: 40px; }
.divider     { height: 1px; background: var(--border); margin: 32px 0; }
.tag-row     { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  background: var(--bg-mute); color: var(--ink-700);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
}
.tag--brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }

.breadcrumb {
  font-size: 13px; color: var(--ink-500);
  padding: 16px 0 0;
}
.breadcrumb a { color: var(--ink-500); }
.breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb .sep { margin: 0 8px; color: var(--ink-300); }

.page-hero {
  background: linear-gradient(180deg, #FEF2F2 0%, #FFFFFF 100%);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 { margin: 0 0 12px; }
.page-hero p  { font-size: 18px; color: var(--ink-700); max-width: 760px; margin: 0; }

/* skip link for a11y */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink-900); color: #fff;
  padding: 8px 14px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
