/* =====================================================================
   聚合库 v7 — Warm Light
   Warm off-white + terracotta accent. DM Sans.
   NO dark hero. NO black blocks. Bright, clean, warm.
   ===================================================================== */

:root {
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
          'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;

  /* Warm palette */
  --bg:       #FAF8F5;
  --bg-card:  #FFFFFF;
  --bg-sunken:#F3F0EB;
  --ink:      #1C1917;
  --ink-2:    #44403C;
  --ink-3:    #78716C;
  --bdr:      #E7E5E4;
  --bdr-hi:   #D6D3D1;

  /* Accent: terracotta */
  --acc:      #C4653A;
  --acc-hov:  #A8542F;
  --acc-soft: #FDF2EC;

  /* Status */
  --ok:       #16A34A;
  --ok-bg:    #DCFCE7;

  /* Radius */
  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.28s;
  --fast: 0.16s;

  /* Layout */
  --max: 1080px;
  --px: clamp(1.25rem, 4vw, 2.5rem);
  --gap: clamp(0.625rem, 1.5vw, 1rem);

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(28,25,23,0.04);
  --sh-md: 0 4px 14px rgba(28,25,23,0.06);
  --sh-lg: 0 12px 32px rgba(28,25,23,0.08);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--acc); color: #fff; }

/* =====================================================================
   NAV: Always light, clean
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100; height: 64px;
  background: rgba(250,248,245,0.95);
  border-bottom: 1px solid var(--bdr);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand { display: flex; align-items: center; gap: 8px; }
.nav-logo {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: var(--r-xs);
  background: var(--acc);
  color: #fff;
  font-size: 13px; font-weight: 800;
}
.nav-name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-link {
  font-size: 13px; font-weight: 500;
  color: var(--ink-3);
  padding: 4px 0;
  transition: color var(--fast);
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active { font-weight: 600; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 28px; height: 28px; align-items: center;
}
.nav-toggle span {
  display: block; width: 16px; height: 1.5px; border-radius: 1px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}
.nav-toggle.open span:first-child { transform: translateY(5px) rotate(45deg); }
.nav-toggle.open span:last-child { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 64px; right: 0; bottom: 0;
    width: 240px; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
    background: var(--bg); border-left: 1px solid var(--bdr);
    transform: translateX(100%); transition: transform 0.3s var(--ease);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 14px; padding: 14px 20px; color: var(--ink) !important; border-bottom: 1px solid var(--bdr); }
}

/* =====================================================================
   HERO: Light, warm, oversized type as visual element
   ===================================================================== */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background: var(--bg);
  position: relative;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  width: 100%;
}

.hero-title {
  font-size: clamp(3.5rem, 11vw, 7.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  color: var(--ink);
  margin-bottom: 20px;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink-3);
  max-width: 38ch;
  margin-bottom: 32px;
  text-wrap: pretty;
}

.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-pills {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--bdr);
}
.hero-pills span {
  font-size: 12px; font-weight: 500;
  color: var(--ink-3);
}
.pill-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--bdr-hi);
}

@media (max-width: 600px) {
  .hero { min-height: 80dvh; }
  .hero-title { font-size: clamp(2.8rem, 16vw, 4.5rem); }
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn-accent, .btn-ghost {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 6px; height: 44px; padding: 0 24px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease),
              border-color var(--fast) var(--ease), transform 0.1s var(--ease);
  white-space: nowrap;
}
.btn-accent {
  background: var(--acc); color: #fff;
}
.btn-accent:hover { background: var(--acc-hov); }
.btn-accent:active { transform: scale(0.97); }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--bdr);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-ghost:active { transform: scale(0.97); }

/* =====================================================================
   SECTIONS
   ===================================================================== */
.sec { padding: clamp(4rem, 8vh, 6.5rem) 0; contain: layout style; }
.sec-title {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 6px;
  text-wrap: balance;
}
.sec-sub {
  font-size: 14px; color: var(--ink-3);
  line-height: 1.55;
  max-width: 42ch;
  text-wrap: pretty;
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

/* =====================================================================
   RESOURCES: Asymmetric two-column
   ===================================================================== */
.resources { background: var(--bg); }
.res-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}
.res-card {
  display: flex; flex-direction: column;
  border-radius: var(--r-lg);
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  text-decoration: none;
  will-change: transform;
  transition: transform var(--dur) var(--ease);
}
.res-primary {
  background: var(--acc);
  color: #fff;
}
.res-primary:hover {
  transform: translateY(-2px);
}
.res-classic {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
}
.res-classic:hover {
  transform: translateY(-2px);
}

.res-badge {
  display: inline-block;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.2);
  color: #fff;
  margin-bottom: 16px; width: fit-content;
}
.res-badge--sub { background: var(--bg-sunken); color: var(--ink-3); }

.res-title {
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 10px;
  text-wrap: balance;
}
.res-classic .res-title { color: var(--ink); }
.res-desc {
  font-size: 13.5px; line-height: 1.6;
  margin-bottom: 20px; max-width: 36ch;
  text-wrap: pretty;
}
.res-primary .res-desc { color: rgba(255,255,255,0.8); }
.res-classic .res-desc { color: var(--ink-2); }

.res-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 600;
  transition: gap var(--fast) var(--ease);
}
.res-primary .res-link { color: #fff; }
.res-classic .res-link { color: var(--acc); }
.res-card:hover .res-link { gap: 8px; }

@media (max-width: 720px) {
  .res-wrap { grid-template-columns: 1fr; }
}

/* =====================================================================
   BROWSERS: Brand-bordered cards, 2x2
   ===================================================================== */
.browsers { background: var(--bg-sunken); }
.brow-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}
.brow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.brow-card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-top: 3px solid var(--brand, var(--bdr));
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  display: flex; flex-direction: column;
  gap: 14px;
  will-change: transform;
  transition: transform var(--dur) var(--ease);
}
.brow-card:hover {
  transform: translateY(-2px);
}

.brow-head {
  display: flex; align-items: center; gap: 12px;
}
.brow-icon {
  flex-shrink: 0;
  color: var(--brand, var(--ink));
}
.brow-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.005em; line-height: 1.2;
}
.brow-tag {
  font-size: 12px; color: var(--ink-3); line-height: 1.3;
  margin-top: 1px;
}

.brow-links {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.brow-links a {
  font-size: 12px; font-weight: 500;
  padding: 5px 12px;
  border: 1px solid var(--bdr);
  border-radius: var(--r-xs);
  color: var(--ink-2);
  transition: color var(--fast), background var(--fast), border-color var(--fast);
}
.brow-links a:hover {
  border-color: var(--brand, var(--acc));
  color: var(--brand, var(--acc));
  background: var(--acc-soft);
}

@media (max-width: 600px) {
  .brow-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
}

/* =====================================================================
   HELP: FAQ + Support
   ===================================================================== */
.help { background: var(--bg); }
.help-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
.help-faq { min-width: 0; }

.faq-item { border-bottom: 1px solid var(--bdr); }
.faq-item:first-child { border-top: 1px solid var(--bdr); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; width: 100%; padding: 16px 0;
  font-size: 14px; font-weight: 600; color: var(--ink);
  cursor: pointer; text-align: left; letter-spacing: -0.005em;
  list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::marker { content: ''; }
.faq-q:hover { color: var(--acc); }
.faq-ic { flex-shrink: 0; color: var(--ink-3); transition: transform 0.25s var(--ease), color 0.25s var(--ease); }
.faq-item[open] .faq-ic { transform: rotate(180deg); color: var(--acc); }
.faq-a { padding: 0 0 16px; font-size: 13.5px; line-height: 1.7; color: var(--ink-2); max-width: 58ch; text-wrap: pretty; }
.faq-a a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }

.help-side { position: sticky; top: 88px; }
.support-card {
  background: var(--bg-card);
  border: 1px solid var(--bdr);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
}
.support-title {
  font-size: 15px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.01em; margin-bottom: 14px;
}
.support-row {
  display: flex; align-items: baseline;
  justify-content: space-between; gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bdr);
}
.support-row:first-of-type { padding-top: 0; }
.support-row:last-of-type { border-bottom: none; padding-bottom: 0; }
.support-label { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.support-value { font-size: 14px; color: var(--ink); font-weight: 600; }
.support-value--wrap { display: flex; align-items: center; gap: 8px; }
.support-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-pill);
}
.support-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.support-status--on { background: var(--ok-bg); color: var(--ok); }
.support-status--off { background: var(--bg-sunken); color: var(--ink-3); }

.support-actions { display: flex; gap: 8px; margin: 16px 0 10px; }
.support-note { font-size: 11.5px; color: var(--ink-3); text-align: center; }

@media (max-width: 760px) {
  .help-wrap { grid-template-columns: 1fr; }
  .help-side { position: static; }
}
@media (max-width: 480px) { .support-actions { flex-direction: column; } }

/* =====================================================================
   FOOTER
   ===================================================================== */
.foot {
  border-top: 1px solid var(--bdr);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) 0;
}
.foot-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--px);
}
.foot-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px solid var(--bdr);
}
.foot-brand { font-size: 13px; font-weight: 600; color: var(--ink); }
.foot-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-nav a { font-size: 12.5px; color: var(--ink-3); transition: color 0.2s; }
.foot-nav a:hover { color: var(--ink); }
.foot-copy { font-size: 11.5px; color: var(--ink-3); }

/* =====================================================================
   TOAST
   ===================================================================== */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: var(--r-sm);
  font-size: 12.5px; font-weight: 500;
  opacity: 0; pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
  z-index: 200; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =====================================================================
   SCROLL REVEAL
   ===================================================================== */
[data-reveal] { opacity: 0; transform: translateY(10px); will-change: transform, opacity; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
[data-reveal].in { opacity: 1; transform: translateY(0); will-change: auto; }

/* Stagger browser cards */
[data-reveal] .brow-card { opacity: 0; transform: translateY(8px); will-change: transform, opacity; transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
[data-reveal].in .brow-card { opacity: 1; transform: translateY(0); }
[data-reveal].in .brow-card:nth-child(1) { transition-delay: 0.04s; }
[data-reveal].in .brow-card:nth-child(2) { transition-delay: 0.1s; }
[data-reveal].in .brow-card:nth-child(3) { transition-delay: 0.16s; }
[data-reveal].in .brow-card:nth-child(4) { transition-delay: 0.22s; }

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal], [data-reveal] .brow-card { opacity: 1; transform: none; }
}
