:root {
  --bg: #141414;
  --bg-2: #1a1a1a;
  --bg-3: #202020;
  --line: #2b2b2b;
  --line-2: #383838;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --dim: #6b6b6b;
  --gold: #c9a35a;
  --gold-soft: rgba(201, 163, 90, .14);
  --ok: #7fbf7f;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --mono: "JetBrains Mono", Consolas, "Courier New", monospace;
  --wrap: 1160px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* hide text until translations are applied, so raw keys never flash */
html.i18n-pending body { visibility: hidden; }
/* holder of the shared svg symbols */
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(20, 20, 20, .88); backdrop-filter: blur(10px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; height: 64px; gap: 40px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: .02em; }
.brand svg { width: 26px; height: 26px; }
.brand { white-space: nowrap; }
.brand small { color: var(--muted); font-weight: 500; font-size: 13px; }
@media (max-width: 420px) { .nav .brand small { display: none; } }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-cta { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.menu-btn { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .menu-btn { display: block; }
  .nav.open { background: var(--bg); }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.open .nav-links a { padding: 14px 16px; border-top: 1px solid var(--line); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 4px;
  font-size: 14px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--text); color: #111; }
.btn-primary:hover { background: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 168px 0 96px; text-align: center; overflow: hidden;
  background: radial-gradient(ellipse 70% 55% at 50% 30%, #1f1f1f 0%, var(--bg) 70%);
}
/* brick texture: a nod to the original meaning of "firewall" */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 36px, 96px 72px, 96px 72px;
  background-position: 0 0, 0 0, 48px 36px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, #000 0%, transparent 75%);
  opacity: .55;
}
.hero > .wrap { position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); letter-spacing: .12em;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 14px; margin-bottom: 36px;
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.hero h1 {
  font-size: clamp(52px, 10vw, 128px); line-height: 1.05; font-weight: 900; letter-spacing: -.01em;
}
.hero h1 strong { font-weight: inherit; }
.hero h1 span { color: #8c8c8c; font-weight: 700; letter-spacing: 0; white-space: nowrap; }
.hero .slogan {
  margin-top: 22px; font-size: clamp(22px, 3.4vw, 40px); font-weight: 700; letter-spacing: .04em;
}
.hero .slogan-en:empty { display: none; }
.hero .slogan-en {
  margin-top: 10px; font-size: clamp(11px, 1.3vw, 14px); color: var(--muted); letter-spacing: .14em;
}
.hero-actions { margin-top: 44px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--dim); }

/* ---------- terminal ---------- */
.term {
  max-width: 760px; margin: 72px auto 0; text-align: left;
  background: #0e0e0e; border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  overflow: hidden;
}
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #333; }
.term-bar span { margin-left: 10px; font: 12px var(--mono); color: var(--dim); }
.term pre {
  font: 13.5px/1.75 var(--mono); color: #cfcfcf; padding: 20px 22px 24px;
  overflow-x: auto; white-space: pre;
}
.term .ln { display: block; opacity: 0; animation: lineIn .35s ease forwards; }
/* hero terminal: lines appear one after another */
.hero .term .ln:nth-child(1) { animation-delay: .3s; }
.hero .term .ln:nth-child(2) { animation-delay: .7s; }
.hero .term .ln:nth-child(3) { animation-delay: .85s; }
.hero .term .ln:nth-child(4) { animation-delay: 1s; }
.hero .term .ln:nth-child(5) { animation-delay: 1.15s; }
.hero .term .ln:nth-child(6) { animation-delay: 1.3s; }
.hero .term .ln:nth-child(7) { animation-delay: 1.45s; }
.hero .term .ln:nth-child(8) { animation-delay: 1.6s; }
.hero .term .ln:nth-child(9) { animation-delay: 1.75s; }
.hero .term .ln:nth-child(10) { animation-delay: 2.05s; }
.term .p { color: var(--dim); }
.term .c { color: var(--text); }
.term .k { color: var(--muted); }
.term .g { color: var(--ok); }
.term .y { color: var(--gold); }
.term .cursor { display: inline-block; width: 8px; height: 16px; background: var(--text); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes lineIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 640px) { .term pre { font-size: 11.5px; padding: 16px; } .hero { padding-top: 132px; } }

/* ---------- sections ---------- */
section { padding: 120px 0; }
.sec-alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sec-head { max-width: 680px; margin-bottom: 64px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker { font: 600 12px var(--mono); color: var(--gold); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 16px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.25; font-weight: 900; }
.sec-head p { margin-top: 18px; color: var(--muted); font-size: 16px; }
@media (max-width: 640px) { section { padding: 80px 0; } .sec-head { margin-bottom: 44px; } }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feat { background: var(--bg-2); padding: 32px 28px 36px; transition: background .25s;
  display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; align-content: start; align-items: center; }
.feat:hover { background: var(--bg-3); }
.feat svg { width: 28px; height: 28px; stroke: var(--text); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.feat h4 { font-size: 17px; font-weight: 700; }
.feat p { grid-column: 1 / -1; margin-top: 14px; font-size: 14px; color: var(--muted); line-height: 1.75; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ---------- get started ---------- */
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.split .sec-head { margin-bottom: 0; }
.checks { margin-top: 32px; list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; font-size: 15px; color: #d6d6d6; }
.checks li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 5px; border: 1px solid var(--gold); border-radius: 2px;
  background: linear-gradient(var(--gold), var(--gold)) center / 8px 8px no-repeat; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: 0; color: var(--dim); font: 500 13px var(--mono);
  padding: 12px 16px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--text); border-color: var(--gold); }
.code-panel { display: none; }
.code-panel.on { display: block; }
.split .term { margin: 0; max-width: none; }
.split .term pre { min-height: 290px; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- platforms ---------- */
.distros { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.distros span {
  font-size: 14px; color: #cfcfcf; padding: 9px 18px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--bg);
}
.distros + p { text-align: center; margin-top: 24px; color: var(--dim); font-size: 13px; }

/* ---------- editions ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { border: 1px solid var(--line-2); border-radius: 6px; padding: 36px 32px; display: flex; flex-direction: column; background: var(--bg); }
.plan.featured { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), transparent 40%), var(--bg); position: relative; }
.plan-badge {
  position: absolute; top: -11px; left: 32px; font-size: 12px; background: var(--gold); color: #141414;
  padding: 1px 10px; border-radius: 3px; font-weight: 700; line-height: 1.7;
}
.plan h4 { font-size: 18px; font-weight: 700; }
.plan .desc { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plan .price { margin: 28px 0 24px; font: 600 40px/1 var(--mono); }
.plan .price small { font: 400 14px var(--sans); color: var(--muted); margin-left: 6px; }
.plan ul { list-style: none; display: grid; gap: 10px; font-size: 14px; color: #d0d0d0; margin-bottom: 32px; flex: 1; }
.plan li { padding-left: 20px; position: relative; }
.plan li::before { content: "—"; position: absolute; left: 0; color: var(--dim); }
.plan .btn { width: 100%; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; } }

/* ---------- download ---------- */
.final { text-align: center; padding: 140px 0; position: relative; overflow: hidden; }
.final .shield-bg { position: absolute; left: 50%; top: 50%; width: 520px; max-width: 120vw; transform: translate(-50%, -50%); opacity: .05; pointer-events: none; }
.final h2 { position: relative; font-family: var(--serif); font-size: clamp(28px, 4vw, 44px); font-weight: 900; line-height: 1.35; }
.final p { position: relative; margin-top: 18px; color: var(--muted); }
.install {
  position: relative; margin: 40px auto 0; max-width: 560px; display: flex; align-items: center;
  background: #0e0e0e; border: 1px solid var(--line-2); border-radius: 6px; font: 14px var(--mono); text-align: left;
}
.install code { font: inherit; flex: 1; padding: 14px 18px; overflow-x: auto; white-space: nowrap; color: #ddd; }
.install code::before { content: "$ "; color: var(--dim); }
.install button {
  flex: none; background: none; border: 0; border-left: 1px solid var(--line-2); color: var(--muted);
  font: 13px var(--sans); padding: 0 18px; align-self: stretch; cursor: pointer;
}
.install button:hover { color: var(--text); }
.final .hero-actions { position: relative; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 14px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h5 { color: var(--text); font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.foot-grid a { display: block; padding: 3px 0; }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { margin-top: 14px; max-width: 320px; line-height: 1.8; }
.foot-brand .foot-company { margin-top: 10px; font: 12px var(--mono); color: var(--dim); letter-spacing: .08em; }
.foot-entities { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.foot-entities b { font-weight: inherit; }
.foot-entities span { display: inline-block; min-width: 92px; color: var(--dim); }
.foot-bottom a:hover { color: var(--text); }
.foot-bottom { margin-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--dim); font-size: 13px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .term .ln { animation: none; opacity: 1; }
}
