/* ============================================================================
   Apinizer Comparison Pages — Shared Stylesheet (DARK THEME)
   Design tokens mirror the live apinizer.com marketing site.
   Reused by every "Apinizer vs X" page (Kong / IBM DataPower / Layer7 / APISIX).
   ============================================================================ */

:root {
  /* surfaces (apinizer.com :root) */
  --bg-base:      #07090f;
  --bg-surface:   #0e1320;
  --bg-elevated:  #151b2c;
  --bg-subtle:    #1a2138;

  /* borders */
  --border-subtle:  #1f2940;
  --border-default: #2a3554;
  --border-strong:  #3d4a6f;

  /* text */
  --text-primary:   #f4f6fa;
  --text-secondary: #a8b0c2;
  --text-tertiary:  #6b7591;
  --text-muted:     #4a5470;

  /* brand */
  --blue:    #2b6fd9;
  --cyan:    #1fd1f2;
  --cyan-2:  #22d3ee;
  --orange:  #ff8a2b;
  --purple:  #c593ff;
  --green:   #10b981;
  --red:     #f2607d;

  /* status backgrounds (on dark) */
  --good-bg:    rgba(16,185,129,.14);
  --partial-bg: rgba(255,138,43,.15);
  --none-bg:    rgba(242,96,125,.14);

  --shadow-md: 0 8px 28px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
  --glow-blue: 0 0 0 1px rgba(43,111,217,.35), 0 12px 40px rgba(43,111,217,.18);

  --radius:    14px;
  --radius-sm: 9px;
  --maxw: 1180px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --grad: linear-gradient(90deg, var(--blue), var(--cyan));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -.005em;
  font-feature-settings: "cv11","ss01";
  color: var(--text-secondary);
  background: var(--bg-base);
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: #8fe6fb; }
code { font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace; font-size: .92em; color: var(--cyan); background: rgba(31,209,242,.08); padding: 1px 6px; border-radius: 6px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------- Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(700px 360px at 82% -6%, rgba(31,209,242,.20), transparent 62%),
    radial-gradient(760px 420px at 12% 8%, rgba(43,111,217,.26), transparent 60%),
    radial-gradient(520px 320px at 60% 110%, rgba(197,147,255,.14), transparent 60%),
    var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(680px 420px at 22% 24%, #000, transparent 78%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; padding: 60px 24px 70px; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--cyan); background: rgba(31,209,242,.09);
  border: 1px solid rgba(31,209,242,.28);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 24px;
}
.hero__logos { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.hero__logos img { height: 36px; }
.hero__vs {
  font-weight: 800; font-size: 14px; color: var(--text-primary);
  background: rgba(255,255,255,.06); border: 1px solid var(--border-default);
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
}
.hero__rival { font-size: 29px; font-weight: 800; letter-spacing: -.01em; color: var(--text-primary); }
.hero h1 {
  font-size: clamp(30px, 4.6vw, 50px); line-height: 1.06; font-weight: 800;
  letter-spacing: -.025em; margin: 6px 0 18px; max-width: 17ch; color: var(--text-primary);
}
.hero h1 em {
  font-style: normal;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__lede { font-size: 17.5px; line-height: 1.62; color: var(--text-secondary); max-width: 64ch; margin: 0 0 30px; }
.hero__lede strong { color: var(--text-primary); font-weight: 600; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta span {
  font-size: 13px; color: var(--text-secondary);
  background: rgba(255,255,255,.03); border: 1px solid var(--border-subtle);
  padding: 7px 14px; border-radius: 999px;
}
.hero__meta b { color: var(--cyan); font-weight: 700; }

/* --------------------------------------------------------------- Sections */
section { padding: 60px 0; }
section.alt { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--cyan); margin: 0 0 12px;
}
.eyebrow.ink { color: var(--blue); }
h2.sec { font-size: clamp(23px, 3vw, 33px); font-weight: 800; letter-spacing: -.025em; color: var(--text-primary); margin: 0 0 14px; line-height: 1.13; }
.sec-lede { font-size: 16px; color: var(--text-secondary); max-width: 80ch; margin: 0 0 32px; }
.sec-lede.center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head.center { text-align: center; }
.sec-head.center .sec-lede { margin-left: auto; margin-right: auto; }
.sec-lede strong { color: var(--text-primary); font-weight: 600; }

/* ----------------------------------------------------------- Verdict cards */
.verdict { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.vcard {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md); position: relative;
}
.vcard h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.vcard p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.vcard .ico { width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; flex: none; }
.vcard.win { border-color: rgba(43,111,217,.45); background: linear-gradient(180deg, rgba(43,111,217,.10), var(--bg-surface)); box-shadow: var(--glow-blue); }
.vcard.win .ico { background: var(--grad); color: #06121f; }
.vcard.neutral .ico { background: var(--bg-subtle); color: var(--cyan); }
.vcard.rival .ico { background: var(--bg-subtle); color: var(--text-tertiary); }

/* -------------------------------------------------------------- Dimensions */
.dims { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.dim {
  background: var(--bg-base); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-md);
}
section.alt .dim { background: var(--bg-elevated); }
.dim__h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dim__n { width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
  background: var(--grad); color: #06121f; font-weight: 700; }
.dim__h h3 { margin: 0; font-size: 17px; font-weight: 700; color: var(--text-primary); }
.dim .row { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--border-subtle); font-size: 14px; }
.dim .row:first-of-type { border-top: none; }
.dim .who { font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; padding-top: 1px; }
.dim .who.a { color: var(--cyan); }
.dim .who.b { color: var(--text-tertiary); }
.dim .row span:last-child { color: var(--text-secondary); }

/* ------------------------------------------------------------------ Tables */
.tablecard {
  background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
table.cmp thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-elevated); color: var(--text-primary); text-align: left; font-weight: 600;
  padding: 14px 16px; font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--border-default);
}
table.cmp thead th.col-a { background: linear-gradient(180deg, rgba(43,111,217,.30), rgba(31,209,242,.12)); color: #eaf6ff; }
table.cmp thead th.feat { width: 30%; }
table.cmp tbody td { padding: 12px 16px; border-top: 1px solid var(--border-subtle); vertical-align: top; color: var(--text-secondary); }
table.cmp tbody tr:nth-child(even) { background: rgba(255,255,255,.012); }
table.cmp tbody tr:hover { background: rgba(43,111,217,.06); }
table.cmp td.feat { font-weight: 600; color: var(--text-primary); }
table.cmp td.col-a { background: rgba(43,111,217,.07); border-left: 2px solid rgba(43,111,217,.45); }
table.cmp tbody tr:hover td.col-a { background: rgba(43,111,217,.12); }
table.cmp .muted { color: var(--text-tertiary); font-size: 13px; display: block; margin-top: 2px; }
.group-row td {
  background: var(--bg-subtle) !important; font-weight: 800; color: var(--cyan);
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 9px 16px;
}

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 12.5px; line-height: 1.25; white-space: normal; }
.pill::before { content: ""; width: 16px; height: 16px; border-radius: 50%; display: inline-block; flex: none; margin-top: 1px;
  background-position: center; background-repeat: no-repeat; background-size: 11px; }
.pill.yes  { color: #34d39e; }
.pill.yes::before  { background-color: var(--good-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d39e' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); }
.pill.part { color: #ffae5e; }
.pill.part::before { background-color: var(--partial-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a9 9 0 0 0 0 18z' fill='%23ff8a2b'/%3E%3C/svg%3E"); }
.pill.no   { color: #f2607d; }
.pill.no::before   { background-color: var(--none-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2607d' stroke-width='3.5' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E"); }
.pill .lbl { font-weight: 600; }

.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin: 0 0 18px; font-size: 13px; color: var(--text-tertiary); }
.legend .pill { font-size: 12.5px; }

/* tag chips inside cells */
.chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; margin: 2px 4px 0 0; letter-spacing: .02em; }
.chip.diff { background: var(--grad); color: #06121f; }
.chip.soon { background: rgba(197,147,255,.16); color: var(--purple); border: 1px solid rgba(197,147,255,.3); }

/* ------------------------------------------------------------ MOAT callout */
.moat {
  background:
    radial-gradient(420px 220px at 88% 0%, rgba(255,138,43,.22), transparent 60%),
    linear-gradient(135deg, #0b1830, #102a52 50%, #0e2b54);
  color: #eaf2ff; border: 1px solid rgba(31,209,242,.22);
  border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.moat::before { content: ""; position: absolute; left: -40px; bottom: -60px; width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(43,111,217,.35), transparent 65%); pointer-events: none; }
.moat__k { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.moat h3 { margin: 0 0 10px; font-size: 23px; font-weight: 800; letter-spacing: -.015em; color: #fff; position: relative; }
.moat p { margin: 0 0 18px; color: #c8d6ee; font-size: 15px; max-width: 72ch; position: relative; }
.moat__grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; position: relative; }
.moat__item { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 11px; padding: 16px; }
.moat__item b { display: block; font-size: 14.5px; margin-bottom: 5px; color: var(--cyan); }
.moat__item span { font-size: 13px; color: #b9c6e0; }

/* ------------------------------------------------------------ Two columns */
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.adv {
  background: var(--bg-base); border: 1px solid var(--border-subtle); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-md);
}
section.alt .adv { background: var(--bg-elevated); }
.adv.a { border-top: 3px solid var(--blue); }
.adv.b { border-top: 3px solid var(--border-strong); }
.adv h3 { margin: 0 0 16px; font-size: 18px; font-weight: 800; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.adv ul { list-style: none; margin: 0; padding: 0; }
.adv li { position: relative; padding: 9px 0 9px 28px; font-size: 14px; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.adv li:first-child { border-top: none; }
.adv li b { color: var(--text-primary); }
.adv.a li::before { content: ""; position: absolute; left: 0; top: 12px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--good-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334d39e' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/11px no-repeat; }
.adv.b li::before { content: "→"; position: absolute; left: 2px; top: 9px; color: var(--text-tertiary); font-weight: 700; }

/* -------------------------------------------------------- Decision guide */
.choose { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.choose__card { border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-md); }
.choose__card.a { background: radial-gradient(500px 300px at 100% 0%, rgba(31,209,242,.22), transparent 60%), linear-gradient(150deg, #123a7a, #0d2348); border: 1px solid rgba(31,209,242,.28); color: #eaf2ff; }
.choose__card.b { background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.choose__card h3 { margin: 0 0 6px; font-size: 20px; font-weight: 800; }
.choose__card.a h3 { color: #fff; }
.choose__card.b h3 { color: var(--text-primary); }
.choose__card .sub { font-size: 13px; margin: 0 0 18px; }
.choose__card.a .sub { color: #a9c4ee; }
.choose__card.b .sub { color: var(--text-tertiary); }
.choose__card ul { list-style: none; margin: 0; padding: 0; }
.choose__card li { padding: 9px 0 9px 26px; position: relative; font-size: 14px; }
.choose__card.a li { border-top: 1px solid rgba(255,255,255,.12); color: #dce6f7; }
.choose__card.b li { border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.choose__card li:first-child { border-top: none; }
.choose__card.a li::before { content: "✓"; position: absolute; left: 0; top: 9px; color: var(--cyan); font-weight: 800; }
.choose__card.b li::before { content: "✓"; position: absolute; left: 0; top: 9px; color: var(--blue); font-weight: 800; }

/* ------------------------------------------------------------------ Stats */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow-md); }
.stat b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.02em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--text-tertiary); display: block; margin-top: 5px; }

/* --------------------------------------------------------------- Callout */
.note { background: rgba(31,209,242,.05); border: 1px solid var(--border-subtle); border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm); padding: 16px 20px; font-size: 14px; color: var(--text-secondary); margin-top: 22px; }
.note b { color: var(--text-primary); }
.note em { color: var(--text-tertiary); font-style: italic; }

/* ------------------------------------------------------------------ Footer */
.foot { background: var(--bg-base); color: var(--text-tertiary); padding: 44px 0; border-top: 1px solid var(--border-subtle); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; justify-content: space-between; }
.foot img { height: 26px; margin-bottom: 12px; }
.foot p { margin: 0; font-size: 13px; max-width: 58ch; line-height: 1.6; color: var(--text-secondary); }
.foot a { color: var(--cyan); }
.foot__disc { font-size: 12px; color: var(--text-muted); max-width: 46ch; }

/* ----------------------------------------------- Comparison index hub */
.idx-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.idx-card {
  display: flex; flex-direction: column; gap: 15px;
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-md);
  text-decoration: none; transition: border-color .15s, background .15s, transform .15s, box-shadow .15s;
}
.idx-card:hover { border-color: rgba(43,111,217,.55); background: var(--bg-elevated); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.idx-card.featured { grid-column: 1 / -1; background: linear-gradient(180deg, rgba(43,111,217,.10), var(--bg-surface)); border-color: rgba(43,111,217,.40); box-shadow: var(--glow-blue); }
.idx-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.idx-vs { display: flex; align-items: center; gap: 10px; font-size: 15px; letter-spacing: -.01em; }
.idx-vs .a { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; color: var(--text-primary); }
.idx-vs .a i { font-style: normal; color: var(--cyan); }
.idx-vs .dot { width: 26px; height: 26px; border-radius: 50%; flex: none;
  background: rgba(255,255,255,.06); border: 1px solid var(--border-default);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-secondary); }
.idx-vs .b { font-weight: 700; color: var(--text-secondary); }
.idx-ico { width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  background: linear-gradient(135deg, rgba(43,111,217,.16), rgba(31,209,242,.12));
  border: 1px solid var(--border-subtle); color: var(--cyan); }
.idx-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.idx-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .02em;
  background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border-subtle); }
.idx-badge.lead { background: rgba(43,111,217,.14); color: #7fb2ff; border-color: rgba(43,111,217,.30); }
.idx-badge.ai { background: rgba(197,147,255,.14); color: var(--purple); border-color: rgba(197,147,255,.30); }
.idx-date { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-tertiary); }
.idx-card h3 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--text-primary); line-height: 1.2; }
.idx-card.featured h3 { font-size: 24px; }
.idx-card p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary); flex: 1; }
.idx-cta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: #7fb2ff; }
.idx-cta::after { content: "→"; transition: transform .2s; }
.idx-card:hover .idx-cta::after { transform: translateX(3px); }

/* --------------------------------------------------------------- Responsive */
@media (max-width: 920px) {
  .verdict, .dims, .twocol, .choose, .moat__grid, .idx-grid { grid-template-columns: 1fr; }
  .idx-card.featured { grid-column: auto; }
  .stats { grid-template-columns: repeat(2,1fr); }
  .hero .wrap { padding: 46px 24px 54px; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .hero__logos { gap: 12px; }
}

/* ------------------------------------------------------------------- Print */
@media print {
  :root { --bg-base:#fff; }
  body { background: #fff; color: #222; }
  .hero, .moat, .choose__card.a { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  section { padding: 22px 0; page-break-inside: avoid; }
  .tablecard, .vcard, .dim, .adv, .choose__card, .moat, .stat { box-shadow: none; }
  table.cmp thead th { position: static; }
  a { color: inherit; text-decoration: none; }
}
