/* =========================================================
   Cognitive Edge — style.css
   Theme: Zinc-950 dark, violet accent, Plus Jakarta Sans
   ========================================================= */

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #09090b;
  --surface:      #111116;
  --surface-2:    #18181d;
  --border:       #27272d;
  --border-hover: #3f3f48;
  --text:         #f0f0f5;
  --text-muted:   #8b8b9a;
  --text-dim:     #52525b;
  --accent:       #9b5de5;
  --accent-light: #b57bff;
  --accent-glow:  rgba(155, 93, 229, 0.15);
  --accent-glow-strong: rgba(155, 93, 229, 0.28);
  --radius:       10px;
  --radius-lg:    16px;
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --nav-h:        60px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.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;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo-mark {
  width: 26px; height: 26px;
  background: var(--accent);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.nav-divider { flex: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links li a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: 0.2s;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse at center, rgba(155, 93, 229, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* dot grid */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  pointer-events: none;
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(155, 93, 229, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.hero-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-highlight {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Compound panel (right side of hero) */
.hero-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hero-panel-title {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.compound-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  transition: background 0.15s;
  cursor: default;
}
.compound-row:hover { background: var(--surface-2); }

.compound-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-violet { background: #9b5de5; }
.dot-blue   { background: #3b82f6; }
.dot-green  { background: #22c55e; }
.dot-amber  { background: #f59e0b; }
.dot-pink   { background: #ec4899; }
.dot-teal   { background: #14b8a6; }

.compound-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.compound-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 100px;
}

.hero-panel-note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Main content ---------- */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ---------- Tool Banner ---------- */
.tool-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 2rem;
  max-width: 900px;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(155,93,229,0.08) 0%, rgba(155,93,229,0.03) 100%);
  border: 1px solid rgba(155,93,229,0.25);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.tool-banner:hover {
  border-color: rgba(155,93,229,0.5);
  background: linear-gradient(135deg, rgba(155,93,229,0.13) 0%, rgba(155,93,229,0.06) 100%);
  text-decoration: none;
}
.tool-banner-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  background: rgba(155,93,229,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}
.tool-banner-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.tool-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.tool-banner-sub {
  font-size: 0.8rem;
  color: var(--text-3);
}
.tool-banner-cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 560px) {
  .tool-banner-cta { display: none; }
}

/* ---------- Tags ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.tag {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.83rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tag:hover { border-color: var(--border-hover); color: var(--text); }
.tag.active {
  background: var(--accent-glow);
  border-color: rgba(155, 93, 229, 0.4);
  color: var(--accent-light);
}

/* ---------- Vendor banner ---------- */
.vendor-banner {
  background: linear-gradient(135deg, rgba(155, 93, 229, 0.12), rgba(155, 93, 229, 0.06));
  border: 1px solid rgba(155, 93, 229, 0.25);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vendor-banner-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  flex-shrink: 0;
}

.vendor-banner-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s;
}
.vendor-banner-link:hover { color: var(--text); }
.vendor-banner-arrow { color: var(--accent); margin-left: 4px; }

/* ---------- Articles grid ---------- */
.articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Featured card spans full width */
.card.featured { grid-column: 1 / -1; flex-direction: row; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  border-color: rgba(155, 93, 229, 0.35);
  box-shadow: 0 0 0 1px rgba(155, 93, 229, 0.12), 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  flex-shrink: 0;
}
.card.featured .card-img {
  width: 380px;
  height: auto;
  min-height: 240px;
}

.card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 10px;
}

.card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin-bottom: 10px;
}
.card.featured h3 { font-size: 1.3rem; }

.card h3 a { color: var(--text); transition: color 0.2s; }
.card h3 a:hover { color: var(--accent-light); }

.card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 16px;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* reveal animation */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Post page layout ---------- */
.post-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px 48px;
}
.post-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent-light); }
.breadcrumb-sep { color: var(--text-dim); }

.post-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(155, 93, 229, 0.25);
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 18px;
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.post-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--text-dim);
}
.post-meta-item svg { opacity: 0.5; }

/* Post body */
.post-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.post-body h2 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 48px 0 16px;
  color: var(--text);
}
.post-body h2:first-child { margin-top: 0; }

.post-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 32px 0 12px;
  color: var(--text);
}

.post-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 18px;
  font-size: 1rem;
}

.post-body ul, .post-body ol {
  margin: 0 0 18px 0;
  padding-left: 20px;
}
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.7;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.post-body ol { list-style: decimal; }
.post-body ol li {
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 1rem;
  line-height: 1.7;
  padding-left: 4px;
}

.post-body a {
  color: var(--accent-light);
  text-decoration: underline;
  text-decoration-color: rgba(155, 93, 229, 0.4);
  transition: color 0.2s;
}
.post-body a:hover { color: #fff; }

.post-body strong { color: var(--text); font-weight: 600; }

.post-body figure {
  margin: 32px 0;
}
.post-body figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.post-body figcaption {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 8px;
  text-align: center;
}

/* Callout boxes */
.callout {
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
  border-left: 3px solid;
}
.callout p { margin: 0; font-size: 0.93rem; }
.callout-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.callout-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
}
.callout-warning .callout-title { color: #f59e0b; }

.callout-info {
  background: rgba(59, 130, 246, 0.08);
  border-color: #3b82f6;
}
.callout-info .callout-title { color: #3b82f6; }

.callout-success {
  background: rgba(34, 197, 94, 0.08);
  border-color: #22c55e;
}
.callout-success .callout-title { color: #22c55e; }

.callout-danger {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
}
.callout-danger .callout-title { color: #ef4444; }

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 24px 0; }
.comp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comp-table th {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.comp-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.5;
}
.comp-table tr:hover td { background: var(--surface-2); }
.td-label { font-weight: 600; color: var(--text); white-space: nowrap; }
.td-good { color: #22c55e; font-weight: 600; }
.td-warn { color: #f59e0b; font-weight: 600; }
.td-bad  { color: #ef4444; font-weight: 600; }

/* Post-end CTA */
.post-cta {
  margin-top: 56px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(155, 93, 229, 0.12), rgba(155, 93, 229, 0.06));
  border: 1px solid rgba(155, 93, 229, 0.25);
  border-radius: var(--radius-lg);
  text-align: center;
}
.post-cta h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.post-cta p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 0.93rem;
}
.post-cta a {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.93rem;
  padding: 11px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
}
.post-cta a:hover { background: var(--accent-light); color: #fff; }

/* ---------- About page ---------- */
.about-hero {
  padding: 80px 24px 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.about-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}
.about-hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.about-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 40px 0 14px;
}
.about-body p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}
.about-body .disclaimer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 36px 24px;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 4px;
}
.footer-links li a {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.footer-links li a:hover { color: var(--text); background: var(--surface); }

.footer p {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .articles { grid-template-columns: 1fr 1fr; }
  .card.featured { grid-column: 1 / -1; flex-direction: column; }
  .card.featured .card-img { width: 100%; min-height: 200px; }
}

@media (max-width: 640px) {
  .hero { padding: 48px 20px 40px; min-height: auto; }
  .hero-title { font-size: 2.1rem; }
  .articles { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px;
    gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 10px 16px; border-radius: 8px; }
  .nav-toggle { display: flex; }
  .nav { position: relative; }
  .vendor-banner { flex-direction: column; align-items: flex-start; gap: 4px; }
}
