/* ===========================================
   Pavlok dev landing — postman.pavlok.com
   Brand: purple (#8338ec) + dark/light themes
   =========================================== */

:root {
  --purple: #8338ec;
  --purple-2: #9c5cff;
  --purple-deep: #6b1fc7;

  --bruno-accent: #fa7e1e;
  --hopp-accent: #4cd6a8;
}

[data-theme="dark"] {
  --bg: #0a0c16;
  --bg-2: #131626;
  --bg-3: #1c2138;
  --border: #2a3052;
  --text: #f1f3f8;
  --text-dim: #9aa0b8;
  --code-bg: #06080f;
  --shadow: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --bg: #fafbff;
  --bg-2: #ffffff;
  --bg-3: #f1f2fb;
  --border: #e0e3ee;
  --text: #1b1f33;
  --text-dim: #5b6079;
  --code-bg: #1c2138;
  --shadow: rgba(15, 20, 50, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a {
  color: var(--purple-2);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-size: 0.88em;
}

[data-theme="light"] pre code { color: #f1f3f8; }

/* ============ Top bar ============ */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 6px; }

.brand-name-dim { color: var(--text-dim); font-weight: 400; }

.theme-toggle {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  background: var(--bg);
  transform: scale(1.05);
}
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

/* ============ Main layout ============ */

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 32px 96px;
}

/* ============ Hero ============ */

.hero {
  text-align: center;
  margin-bottom: 56px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text) 0%, var(--purple-2) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lede {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-dim);
  max-width: 720px;
  margin: 0 auto;
}

.hero strong { color: var(--text); }

/* ============ Cards ============ */

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 80px;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--purple);
  opacity: 0.6;
}

.card-bruno::before { background: var(--bruno-accent); }
.card-hopp::before { background: var(--hopp-accent); }

.card:hover {
  transform: translateY(-2px);
  border-color: var(--purple);
  box-shadow: 0 12px 40px var(--shadow);
}

.card-head { display: flex; flex-direction: column; gap: 8px; }
.card-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: white;
  border-radius: 10px;
  padding: 6px;
}
.card-bruno .card-logo { background: #1a1a1a; }

.card h2 {
  margin: 8px 0 0;
  font-size: 1.8rem;
  letter-spacing: -0.01em;
}

.card .tagline {
  margin: 0;
  color: var(--text-dim);
  font-size: 1rem;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-dim);
}
.features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.95rem;
}
.features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--purple-2);
  font-weight: 700;
}

/* ============ Buttons ============ */

.btn {
  display: inline-block;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  font-family: inherit;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-deep) 100%);
  color: white;
  box-shadow: 0 4px 20px rgba(131, 56, 236, 0.35);
  width: 100%;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(131, 56, 236, 0.5);
}

.btn-secondary {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
  text-decoration: none;
}

.card-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.card-links li::before { content: "↗ "; opacity: 0.5; }

/* ============ Recommendation ============ */

.recommendation {
  margin-bottom: 80px;
}

.recommendation h2,
.comparison h2 {
  font-size: 1.8rem;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
  text-align: center;
}

.rec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.rec-block {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.rec-block h3 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  font-weight: 600;
}

.rec-block p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.6;
}

.accent { color: var(--purple-2); font-weight: 700; }

/* ============ Comparison table ============ */

.comparison { margin-bottom: 40px; }

.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th, td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: none; }

thead th {
  background: var(--bg-3);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}

tbody th {
  color: var(--text-dim);
  font-weight: 500;
  width: 28%;
}

td.yes { color: #4cd6a8; }
td.no { color: #ff6b6b; }
td.warn { color: #ffb84c; }

[data-theme="light"] td.yes { color: #1a8c5c; }
[data-theme="light"] td.no { color: #c8333d; }
[data-theme="light"] td.warn { color: #b87100; }

tbody tr:hover { background: var(--bg-3); }

/* ============ Footer ============ */

.foot {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* ============ Modal ============ */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-in 0.18s ease;
}
.modal[hidden] { display: none; }

@keyframes modal-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 15, 0.7);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  animation: panel-in 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes panel-in {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.4rem;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 1.6rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.modal-close:hover {
  background: var(--bg-3);
  color: var(--text);
}

.modal-body {
  padding: 24px 28px 28px;
  overflow-y: auto;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 24px 44px;
  border-left: 2px solid var(--border);
  margin-left: 12px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: -16px;
  top: -2px;
  background: var(--purple);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.steps li:last-child { border-left-color: transparent; padding-bottom: 0; }

.steps h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}
.steps p {
  margin: 8px 0;
  color: var(--text-dim);
  font-size: 0.94rem;
}
.steps p.hint {
  font-size: 0.85rem;
  font-style: italic;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 8px 0;
  overflow-x: auto;
  position: relative;
  color: #f1f3f8;
}
pre code {
  background: transparent;
  border: none;
  padding: 0;
  font-size: 0.88em;
  color: inherit;
}

/* Copy button injected by JS */
.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1f3f8;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background: rgba(255, 255, 255, 0.18); }
.copy-btn.copied {
  background: var(--purple);
  border-color: var(--purple);
  opacity: 1;
}

.modal-cta {
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.modal-cta .btn { flex: 0 1 auto; }

/* ============ Responsive ============ */

@media (max-width: 720px) {
  main { padding: 40px 20px 64px; }
  .topbar { padding: 14px 20px; }
  .cards { grid-template-columns: 1fr; }
  .rec-grid { grid-template-columns: 1fr; }
  .modal { padding: 12px; }
  .modal-panel { max-height: 95vh; }
  .modal-head, .modal-body { padding-left: 20px; padding-right: 20px; }
  th, td { padding: 12px 14px; font-size: 0.88rem; }
  tbody th { width: 38%; }
}
