/* ============================================================
   LingShu · landing page styles
   Brand system
   - jade  #0D9488 / #0F766E / #2DD4BF   (primary, calm)
   - gold  #D97706 / #F59E0B            (accent, action)
   - ink   #1E293B                       (body)
   - paper #FAFAF7                       (background)
   ============================================================ */

:root {
  --jade:        #0D9488;
  --jade-deep:   #0F766E;
  --jade-light:  #2DD4BF;
  --gold:        #D97706;
  --gold-light:  #F59E0B;
  --ink:         #1E293B;
  --ink-soft:    #475569;
  --paper:       #FAFAF7;
  --paper-warm:  #F4F1EA;
  --line:        #E2E8F0;
  --line-soft:   #EEF2F1;

  --font-sans: "Inter", "IBM Plex Sans", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas,
               "Courier New", monospace;

  --radius:      14px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 2px rgba(15, 118, 110, 0.06),
                 0 1px 4px rgba(15, 118, 110, 0.04);
  --shadow-md:   0 4px 12px rgba(15, 118, 110, 0.08),
                 0 2px 4px rgba(15, 118, 110, 0.04);
  --shadow-lg:   0 16px 40px rgba(15, 118, 110, 0.12),
                 0 4px 8px rgba(15, 118, 110, 0.04);
  --container:   1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--jade-deep); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--jade); }

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--line-soft);
  padding: 0.12em 0.42em;
  border-radius: 4px;
  color: var(--ink);
}

strong { color: var(--ink); font-weight: 600; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* =================== HEADER =================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  color: var(--ink);
}
.brand img { display: block; }
.brand-sub {
  font-size: 13px;
  color: var(--jade-deep);
  font-weight: 400;
  margin-left: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover { color: var(--jade); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--paper) !important;
  border-radius: 10px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--jade-deep); }

/* =================== HERO =================== */

.hero {
  position: relative;
  padding: 80px 0 64px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at top, rgba(45, 212, 191, 0.12), transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(245, 158, 11, 0.08), transparent 60%),
    var(--paper);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-logo {
  display: inline-block;
  margin-bottom: 24px;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.hero-title {
  margin: 0;
  font-size: clamp(48px, 7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.title-main {
  background: linear-gradient(135deg, var(--jade) 0%, var(--jade-deep) 60%, var(--gold) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-sub {
  font-size: clamp(28px, 4vw, 44px);
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0.2em;
}

.hero-tag {
  margin: 24px 0 8px;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-desc {
  margin: 0 auto;
  max-width: 680px;
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-punch {
  margin: 20px auto 0;
  max-width: 620px;
  font-size: 14.5px;
  color: var(--gold);
  font-weight: 500;
  line-height: 1.65;
  font-style: italic;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 36px 0 48px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--jade), var(--jade-deep));
  color: var(--paper);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); color: var(--paper); }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--jade-deep); }

.btn-outline {
  background: transparent;
  color: var(--jade-deep);
  border-color: var(--jade-deep);
}
.btn-outline:hover { background: var(--jade-deep); color: var(--paper); }

/* =================== TERMINAL =================== */

.terminal {
  max-width: 760px;
  margin: 0 auto;
  background: #0F1E1C;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(13, 148, 136, 0.2);
  text-align: left;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #142B28;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.dot-r { background: #FF5F57; }
.dot-y { background: #FEBC2E; }
.dot-g { background: #28C840; }

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(250, 250, 247, 0.55);
}

.terminal-body {
  margin: 0;
  padding: 18px 20px 22px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: rgba(250, 250, 247, 0.92);
  white-space: pre-wrap;
  overflow-x: auto;
}
.t-prompt { color: var(--gold-light); margin-right: 8px; }
.t-meta   { color: rgba(45, 212, 191, 0.85); }
.t-success{ color: #4ADE80; font-weight: 600; }

.hero-badges {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12.5px;
  background: rgba(13, 148, 136, 0.08);
  color: var(--jade-deep);
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 999px;
  font-weight: 500;
}

/* =================== SECTIONS =================== */

.section {
  padding: 96px 0;
}
.section-alt {
  background: var(--paper-warm);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: center;
}

.section-sub {
  margin: 0 auto 56px;
  text-align: center;
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 620px;
}

/* =================== GRID & CARDS =================== */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 880px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(13, 148, 136, 0.25);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.card-icon-jade {
  background: rgba(13, 148, 136, 0.1);
  color: var(--jade-deep);
}
.card-icon-gold {
  background: rgba(217, 119, 6, 0.1);
  color: var(--gold);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
}

.card p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.65;
}

.card-feature code,
.card-repo code {
  font-size: 0.84em;
  background: var(--line-soft);
  color: var(--jade-deep);
}

.card-repo {
  display: block;
  color: var(--ink);
}
.card-repo:hover { color: var(--ink); }

.repo-icon {
  font-size: 32px;
  margin-bottom: 12px;
}
.repo-meta {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}

.card-community { text-align: left; }
.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--jade-deep);
}

/* =================== COMPARISON TABLE =================== */

.comparison { margin-top: 80px; }
.comparison h3 {
  margin: 0 0 12px;
  text-align: center;
  font-size: 24px;
  font-weight: 700;
}
.comparison-sub {
  margin: 0 auto 24px;
  text-align: center;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.comparison-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.comparison-foot strong { color: var(--jade-deep); }
.comparison-foot em { color: var(--gold); font-style: normal; font-weight: 600; }

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
thead th {
  background: var(--paper-warm);
  font-weight: 700;
  color: var(--ink);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(13, 148, 136, 0.03); }

td:first-child { font-weight: 600; color: var(--ink-soft); }
td.ok   { color: var(--jade-deep); font-weight: 600; }
td.warn { color: var(--gold); font-weight: 600; }
td.no   { color: #B91C1C; font-weight: 600; }

/* =================== ARCHITECTURE =================== */

.arch {
  background: #0F1E1C;
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 48px;
  overflow-x: auto;
  box-shadow: var(--shadow-md);
}
.arch-diagram {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: rgba(45, 212, 191, 0.85);
  white-space: pre;
}

.arch-slots {
  margin-top: 24px;
}
.arch-note {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(13, 148, 136, 0.06);
  border-left: 3px solid var(--jade);
  border-radius: var(--radius-sm);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.arch-note strong {
  color: var(--jade-deep);
}
.arch-note code {
  background: rgba(13, 148, 136, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--jade-deep);
}
.slot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14.5px;
}
.slot-num {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.1);
  color: var(--jade-deep);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.slot-hot {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(13, 148, 136, 0.08));
  border-color: rgba(245, 158, 11, 0.3);
}
.slot-hot .slot-num {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
}

/* =================== TABS / CODEBLOCKS =================== */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.tab {
  background: transparent;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  position: relative;
  font-family: var(--font-sans);
  transition: color 0.2s ease;
}
.tab:hover { color: var(--ink); }
.tab-active { color: var(--jade-deep); }
.tab-active::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  border-radius: 2px;
}

.tab-panel { display: none; }
.tab-panel-active { display: block; }

.codeblock {
  background: #0F1E1C;
  color: rgba(250, 250, 247, 0.92);
  padding: 22px 26px;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.65;
  margin: 0;
  overflow-x: auto;
}
.c-tag  { color: var(--jade-light); }
.c-key  { color: #C792EA; }
.c-cls  { color: var(--gold-light); }
.c-str  { color: #C3E88D; }
.c-cmt  { color: rgba(250, 250, 247, 0.4); font-style: italic; }
.c-anno { color: #FFCB6B; }

.cta-row {
  text-align: center;
  margin-top: 36px;
}

/* =================== META PILLS =================== */

.meta-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 48px;
  flex-wrap: wrap;
}
.meta-pill {
  padding: 6px 14px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* =================== FOOTER =================== */

.site-footer {
  background: #0F1E1C;
  color: rgba(250, 250, 247, 0.75);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(45, 212, 191, 0.15);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 56px;
}
@media (max-width: 760px) {
  .footer-inner { grid-template-columns: 1fr; }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-brand strong { color: var(--paper); font-size: 17px; }
.footer-brand p {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(250, 250, 247, 0.55);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 540px) {
  .footer-nav { grid-template-columns: 1fr 1fr; }
}
.footer-nav h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
}
.footer-nav a {
  display: block;
  padding: 4px 0;
  color: rgba(250, 250, 247, 0.7);
  font-size: 14px;
}
.footer-nav a:hover { color: var(--jade-light); }

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(250, 250, 247, 0.08);
  text-align: center;
}
.footer-bottom p {
  margin: 4px 0;
  font-size: 13px;
  color: rgba(250, 250, 247, 0.55);
}
.footer-bottom a { color: var(--jade-light); }
.footer-license { font-size: 12.5px; }

/* =================== RESPONSIVE =================== */

@media (max-width: 768px) {
  .lang-toggle { display: none; }
}
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .container { padding: 0 20px; }
}

/* =================== LANG TOGGLE =================== */

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-warm);
  box-shadow: var(--shadow-sm);
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 4px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--ink-soft);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
  letter-spacing: 0.02em;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
}
.lang-btn.active {
  background: var(--jade-deep);
  color: var(--paper);
  box-shadow: 0 1px 2px rgba(15, 118, 110, 0.15);
}
.lang-btn.active:hover { color: var(--paper); }
/* =================== PLUGIN ARCHITECTURE =================== */
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card-spi,
.card-cl {
  border-left: 4px solid transparent;
  text-align: left;
  padding: 24px;
}
.card-spi {
  border-left-color: var(--jade-deep, #0f766e);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.04) 0%, transparent 100%);
}
.card-cl {
  border-left-color: var(--gold, #b8862f);
  background: linear-gradient(180deg, rgba(184, 134, 47, 0.04) 0%, transparent 100%);
}

.card-heading {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--jade-deep, #0f766e);
  color: var(--paper, #fdfcf7);
}
.badge-alt {
  background: transparent;
  color: var(--gold, #b8862f);
  border: 1px solid var(--gold, #b8862f);
}

.plugin-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.plugin-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
  border-bottom: 1px dashed var(--line);
}
.plugin-list li:last-child { border-bottom: none; }
.plugin-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--jade, #14b8a6);
  font-weight: 700;
}
.card-cl .plugin-list li::before {
  content: "↔";
  color: var(--gold, #b8862f);
}
.plugin-list li code,
.plugin-list li strong { color: var(--ink); }

.plugin-decision {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--paper-warm, #f7f3e9);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
.plugin-decision strong { color: var(--ink); }
.plugin-decision code {
  background: rgba(15, 118, 110, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}
.plugin-decision a {
  color: var(--jade-deep, #0f766e);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.plugin-decision a:hover { color: var(--ink); }
