:root {
  --bg: #0b0f14;
  --bg-elev: #0f141b;
  --surface: #121823;
  --text: #e6edf6;
  --text-dim: #a7b3c4;
  --border: #1d2633;
  --accent: #f5a524;
  --accent-2: #9b7bff;
  --success: #22c55e;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --max-w: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
svg { display: block; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--space-5); }
.section { padding: var(--space-7) 0; }
.section__head { margin-bottom: var(--space-6); text-align: center; }
.section__title { font-size: clamp(24px, 4vw, 38px); line-height: 1.2; margin: 0 0 var(--space-3); }
.section__subtitle { color: var(--text-dim); margin: 0; }

.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  box-shadow: inset 0 -1px 0 rgba(255,255,255,.04);
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); border-color: #263246; }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--primary { background: linear-gradient(135deg, rgba(245,165,36,.18), rgba(155,123,255,.18)); border-color: rgba(245,165,36,.35); }
.btn--secondary { background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); }
.btn--ghost { background: transparent; }
.btn--lg { padding: 14px 120px; font-size: 16px; }
.btn--sm { padding: 8px 12px; font-size: 14px; }

.site-header { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid rgba(255,255,255,.04); backdrop-filter: saturate(140%) blur(10px); background: rgba(11,15,20,.6); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand__name { letter-spacing: .2px; font-weight: 600; }
.brand--muted .brand__name { color: var(--text-dim); font-weight: 500; }
.brand__logo { border-radius: 8px; }

.nav { display: flex; align-items: center; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item { }
.nav__item--cta { margin-left: 6px; }
.nav__link { display: inline-flex; padding: 10px 12px; color: var(--text-dim); text-decoration: none; border-radius: 10px; }
.nav__link:hover { color: var(--text); background: rgba(255,255,255,.03); }
.nav__toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.02); color: var(--text); align-items: center; justify-content: center; gap: 3px; }
.nav__toggle-bar { width: 16px; height: 2px; background: var(--text); border-radius: 1px; }

.hero { padding: calc(var(--space-8) + 24px) 0 var(--space-8); }
.hero__inner { display: grid; gap: var(--space-7); grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero__title { font-size: clamp(32px, 6vw, 56px); line-height: 1.08; margin: 0 0 var(--space-4); letter-spacing: -0.02em; }
.hero__subtitle { color: var(--text-dim); margin: 0 0 var(--space-5); font-size: 18px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.hero__meta { color: var(--text-dim); font-size: 14px; }
.hero__visual { position: relative; }
.glow { position: absolute; inset: -10%; background: radial-gradient(600px 300px at 70% 0%, rgba(245,165,36,.18), transparent 60%), radial-gradient(500px 250px at 0% 30%, rgba(155,123,255,.22), transparent 60%); filter: blur(20px); z-index: 0; opacity: .9; }

.code-card { position: relative; z-index: 1; border: 1px solid var(--border); background: linear-gradient(180deg, rgba(18,24,35,.9), rgba(18,24,35,.84)); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.code-card__header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.0)); }
.code-card__title { color: var(--text-dim); font-size: 12px; margin-left: auto; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3a4558; display: inline-block; }
.code-block { margin: 0; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size: 12px; color: #e6edf6; background: transparent; overflow: auto; }
.code-card__copy { position: absolute; right: 10px; bottom: 10px; }

/* macOS-style traffic lights for code header */
.code-card__header .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.code-card__header .dot:first-child { background: #ff5f57; }
.code-card__header .dot:nth-child(2) { background: #febc2e; }
.code-card__header .dot:nth-child(3) { background: #28c840; }

.grid { display: grid; gap: var(--space-5); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card { border: 1px solid rgba(255,255,255,.02); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)); border-radius: var(--radius); padding: var(--space-5); transition: box-shadow .2s ease; }
.card:hover { box-shadow: 0 12px 36px rgba(0,0,0,.22); }
.card--glass { background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)); }

.feature__title { margin: 0 0 6px; font-size: 20px; }
.feature__desc { margin: 0 0 10px; color: var(--text-dim); }

.list { margin: 0; padding-left: 18px; color: var(--text-dim); }

.price { text-align: left; }
.price__title { margin: 0 0 6px; font-size: 20px; }
.price__value { margin: 0 0 12px; font-size: 28px; font-weight: 700; }

.faq__item { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; background: rgba(255,255,255,.02); }
.faq__item + .faq__item { margin-top: 10px; }
.faq__q { cursor: pointer; }
.faq__a { color: var(--text-dim); padding-top: 8px; }

.cta { padding: var(--space-8) 0; }
.cta__inner { text-align: center; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-7) var(--space-6); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02)); box-shadow: var(--shadow); }
.cta__title { margin: 0 0 8px; font-size: clamp(24px, 4vw, 34px); }
.cta__subtitle { margin: 0 0 16px; color: var(--text-dim); }
.cta__actions { display: inline-flex; gap: 10px; flex-wrap: wrap; }

.site-footer { border-top: 1px solid rgba(255,255,255,.06); padding: var(--space-6) 0; }
.footer__inner { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.footer__links { display: flex; gap: 14px; list-style: none; margin: 0; padding: 0; }
.footer__links a { color: var(--text-dim); text-decoration: none; }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--text-dim); margin: 0; grid-column: 1 / -1; font-size: 14px; }

/* Pricing plans */
.plans .plan { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid rgba(245,165,36,.25); background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)); }
.plan--featured { border-color: rgba(245,165,36,.6); box-shadow: 0 16px 40px rgba(0,0,0,.28); }
.plan__top { position: relative; text-align: center; padding: 18px 16px 6px; }
.plan .tag { display: inline-block; padding: 6px 10px; border-radius: 999px; font-size: 12px; background: rgba(155,123,255,.12); color: #cbb6ff; border: 1px solid rgba(155,123,255,.35); }
.plan--featured .tag { background: rgba(245,165,36,.12); color: #ffd596; border-color: rgba(245,165,36,.45); }
.badge { position: absolute; right: 16px; top: 10px; padding: 4px 8px; border-radius: 999px; font-size: 12px; background: linear-gradient(135deg, rgba(245,165,36,.9), rgba(255,204,120,.9)); color: #0b0f14; font-weight: 700; }
.plan__title { margin: 10px 0 0; font-size: 22px; }
.plan__price { margin: 6px 0 10px; font-weight: 800; font-size: 28px; }
.plan__currency { font-weight: 700; margin-right: 2px; }
.plan__unit { color: var(--text-dim); font-weight: 500; font-size: 14px; margin-left: 4px; }

.plan__specs { list-style: none; margin: 0; padding: 10px 16px 0; }
.plan__spec { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed rgba(255,255,255,.08); color: var(--text-dim); }
.plan__spec:last-child { border-bottom: 0; }
.plan__val { color: #e6edf6; }

.plan__cta { display: block; margin: 14px 16px 16px; text-align: center; }

/* Plan description under price */
.plan__desc { margin: 0 16px 6px; color: var(--text-dim); font-size: 13px; }
.plan--featured .plan__desc { color: #e6edf6; }

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .plans.grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .grid--3 { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .nav__toggle { display: inline-flex; }
  .nav__list { position: absolute; right: 16px; top: 64px; flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; background: rgba(11,15,20,.92); border: 1px solid var(--border); border-radius: 12px; min-width: 220px; visibility: hidden; opacity: 0; transform: translateY(-6px); transition: all .18s ease; }
  .nav__list.is-open { visibility: visible; opacity: 1; transform: translateY(0); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
} 

/* Editor UI */
.editor__tabs { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; background: rgba(255,255,255,.03); border: 1px solid var(--border); padding: 4px; border-radius: 10px; }
.editor__tab { appearance: none; border: 0; background: transparent; color: var(--text-dim); padding: 6px 10px; border-radius: 8px; font: inherit; cursor: pointer; }
.editor__tab:hover { color: var(--text); }
.editor__tab.is-active { background: rgba(255,255,255,.06); color: var(--text); }

.editor__shell { position: relative; }
.editor__code { white-space: pre-wrap; padding-left: 36px; counter-reset: line; line-height: 1.1; height: 350px; overflow: auto; padding-bottom: 44px; scrollbar-width: none; -ms-overflow-style: none; }
.editor__code .line { display: block; position: relative; padding-left: 6px; }
.editor__code .line::before { content: counter(line); counter-increment: line; position: absolute; left: -30px; width: 24px; text-align: right; color: #5b6a81; }

/* Syntax tokens */
.tok-kw { color: #f5a524; }
.tok-fn { color: #7dc4ff; }
.tok-str { color: #86efac; }
.tok-num { color: #fca5a5; }
.tok-com { color: #6b7280; }

/* Caret */
.caret { display: inline-block; width: 8px; height: 1em; background: rgba(230,237,246,.85); margin-left: 1px; vertical-align: -0.15em; animation: blink 1s steps(1,end) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* A11y: visually hidden but accessible */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; } 

/* Dynamic background */
.bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .bg-canvas { display: none; }
} 

/* Hero lightning */
.hero__title-wrap { position: relative; display: inline-block; }
.hero__title { position: relative; z-index: 1; }
.hero-bolt { position: absolute; inset: -6px -8px; width: calc(100% + 16px); height: calc(100% + 12px); z-index: 0; pointer-events: none; mix-blend-mode: screen; }
@media (prefers-reduced-motion: reduce) {
  .hero-bolt { display: none; }
} 

/* Soften footer divider */
.site-footer { border-top-color: rgba(255,255,255,0); } 

/* Unify card shadows */
.card { box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.card:hover { box-shadow: 0 12px 36px rgba(0,0,0,.22); } 

/* Hover animations: cards, code card, buttons, nav links, FAQ */
.card, .code-card { position: relative; transform: perspective(800px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease; will-change: transform, box-shadow; }
.card:hover, .card.is-hover, .code-card:hover, .code-card.is-hover { transform: perspective(800px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) scale(1.01); box-shadow: 0 16px 40px rgba(0,0,0,.28); border-color: #2a364b; }
.card::after, .code-card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(180px 160px at calc(var(--mx, -100px)) calc(var(--my, -100px)), rgba(245,165,36,.10), rgba(155,123,255,.10) 35%, transparent 60%); opacity: 0; transition: opacity .25s ease; }
.card:hover::after, .card.is-hover::after, .code-card:hover::after, .code-card.is-hover::after { opacity: 1; }

.btn { transition: transform .18s ease, box-shadow .25s ease, border-color .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.btn:active { transform: translateY(0); }

.nav__link { transition: color .18s ease, background .18s ease, transform .18s ease; }
.nav__link:hover { transform: translateY(-1px); }

.faq__item { transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.faq__item:hover { border-color: #2a364b; background: rgba(255,255,255,.04); transform: translateY(-1px); }

.brand:hover .brand__logo { filter: drop-shadow(0 0 8px rgba(245,165,36,.35)); }

@media (prefers-reduced-motion: reduce) {
  .card, .code-card, .btn, .nav__link, .faq__item { transition: none !important; transform: none !important; }
  .card::after, .code-card::after { display: none; }
} 

/* ICP & Public Security Beian */
.footer__beian { margin-top: 8px; display: flex; gap: 12px; align-items: center; color: var(--text-dim); font-size: 13px; flex-wrap: wrap; }
.beian__item { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); text-decoration: none; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.02); transition: color .2s ease, border-color .2s ease, background .2s ease, transform .15s ease; }
.beian__item:hover { color: var(--text); border-color: #2a364b; background: rgba(255,255,255,.04); transform: translateY(-1px); }
.beian__icon { width: 16px; height: 16px; opacity: .9; }
.beian__sep { color: #465369; opacity: .7; }

/* Footer layout */
.footer__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.footer__brandcol { display: grid; gap: 12px; align-content: start; }
.footer__desc { color: var(--text-dim); margin: 0; max-width: 520px; }
.social { display: flex; gap: 10px; }
.social__link { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(255,255,255,.02); transition: transform .18s ease, border-color .2s ease, background .2s ease; }
.social__link:hover { transform: translateY(-1px); border-color: #2a364b; background: rgba(255,255,255,.04); }
.social img { width: 16px; height: 16px; }

.footer__nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.footer__col-title { margin: 0 0 8px; color: var(--text); font-size: 14px; opacity: .9; }
.footer__col-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__col-links a { color: var(--text-dim); text-decoration: none; }
.footer__col-links a:hover { color: var(--text); }

.footer__legal { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }

@media (max-width: 980px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer__nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .footer__nav { grid-template-columns: 1fr; }
} 

/* Footer elevation layer */
.site-footer { position: relative; background: linear-gradient(180deg, rgba(18,24,35,.74), rgba(18,24,35,.9)); border-top: 1px solid rgba(255,255,255,.06); backdrop-filter: saturate(140%) blur(8px); -webkit-backdrop-filter: saturate(140%) blur(8px); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.28)); filter: blur(6px); opacity: .7; pointer-events: none; } 

/* Ink drawer */
.ink { position: relative; height: 46vh; min-height: 320px; background: #1be881; overflow: hidden; clip-path: inset(calc(100% - var(--ink-open, 0%)) 0 0 0 round 24px 24px 0 0); transition: clip-path .5s cubic-bezier(.22,.61,.36,1); }
/* stacking order for ink drawer */
.ink__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.ink::before { z-index: 1; }
.ink__badge { z-index: 3; }
.ink__toggle { z-index: 4; }
.ink__toggle:hover { transform: translateX(-50%) translateY(-1px); }
.ink__chev { width: 10px; height: 10px; border-right: 2px solid #cbd5e1; border-bottom: 2px solid #cbd5e1; transform: rotate(-45deg); display: inline-block; }

/* Ink cute badge */
.ink__badge { position: absolute; left: 50%; top: 6px; transform: translateX(-50%) translateY(-10px); padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.96); color: #0b0f14; font-weight: 700; font-size: 14px; letter-spacing: .5px; box-shadow: 0 6px 14px rgba(0,0,0,.16), 0 -2px 0 rgba(255,255,255,.65) inset, 0 0 0 2px #1be881; opacity: 0; transition: opacity .35s ease, transform .35s ease; display: inline-flex; align-items: center; gap: 6px; }
.ink.is-open .ink__badge { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }

@media (max-width: 640px) { .ink { height: 38vh; min-height: 240px; } } 

/* Ink bottom hint */
.ink-hint { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 8px); padding: 10px 14px; border-radius: 14px; background: rgba(18,24,35,.9); color: #e6edf6; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 13px; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 10; }
.ink-hint.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ink-hint::before { content: ""; position: absolute; left: 50%; top: 100%; width: 12px; height: 12px; transform: translateX(-50%) rotate(45deg); background: rgba(18,24,35,.9); border-right: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); } 

/* Hide scrollbar for webkit */
.editor__code::-webkit-scrollbar { width: 0; height: 0; }
.editor__code::-webkit-scrollbar-thumb { background: transparent; } 