/* ==========================================================================
   Components — Buttons, Cards, Terminal, Badges, etc.
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--duration) var(--ease-out);
  line-height: 1;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-bg);
}

.btn--primary:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: var(--color-bg);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-bright);
}

.btn--secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn--large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-lg);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
}

.btn--ghost:hover {
  background: var(--color-primary-dim);
}

/* ---- Terminal Block ---- */
.terminal {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.terminal__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--color-border);
}

.terminal__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal__dot--red    { background: #ff5f57; }
.terminal__dot--yellow { background: #ffbd2e; }
.terminal__dot--green  { background: #28c840; }

.terminal__title {
  margin-left: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.terminal__body {
  padding: var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  overflow-x: auto;
  white-space: pre;
  min-height: 120px;
}

.terminal__prompt {
  color: var(--color-primary);
}

.terminal__cmd {
  color: var(--color-text);
}

.terminal__comment {
  color: var(--color-text-muted);
}

.terminal .severity-critical { color: var(--color-danger); font-weight: var(--weight-bold); }
.terminal .severity-high     { color: var(--color-warning); }
.terminal .severity-medium   { color: var(--color-medium); }
.terminal .tree-line         { color: var(--color-border-bright); }
.terminal .detail            { color: var(--color-text-muted); }
.terminal .tag               { color: var(--color-accent); }
.terminal .stat              { color: var(--color-text-muted); }
.terminal .clean             { color: var(--color-primary); }

/* ---- Card ---- */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transition: border-color var(--duration) var(--ease-out), box-shadow var(--duration) var(--ease-out);
}

.card:hover {
  border-color: var(--color-border-bright);
  box-shadow: var(--shadow-md);
}

.card__icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text-heading);
}

.card__text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
  margin-bottom: 0;
}

.card--glow:hover {
  border-color: rgba(57,255,20,.3);
  box-shadow: var(--shadow-glow);
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
}

.badge--green {
  background: var(--color-primary-dim);
  color: var(--color-primary);
  border: 1px solid rgba(57,255,20,.2);
}

.badge--red {
  background: var(--color-danger-dim);
  color: var(--color-danger);
  border: 1px solid rgba(255,68,68,.2);
}

.badge--blue {
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border: 1px solid rgba(0,212,255,.2);
}

/* Pulsing badge for live threats */
.pulse-badge {
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(255,68,68,.2); }
  50% { box-shadow: 0 0 20px rgba(255,68,68,.4); }
}

/* ---- Stat Block ---- */
.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: var(--weight-black);
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stats-grid {
  padding: var(--space-4) 0;
}

/* ---- Table ---- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  color: var(--color-text-heading);
  font-weight: var(--weight-semibold);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Comparison table highlight column */
.compare-highlight {
  background: rgba(57,255,20,.04);
  color: var(--color-primary) !important;
  font-weight: var(--weight-medium);
}

th.compare-highlight {
  color: var(--color-primary) !important;
  font-size: var(--text-sm) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-weight: var(--weight-bold) !important;
}

/* ---- Section Title ---- */
.section-title {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-12);
}

.section-title__label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}

.section-title h2 {
  margin-bottom: var(--space-4);
}

.section-title p {
  font-size: var(--text-lg);
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-bg-elevated) 0%, var(--color-bg-card) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-16) var(--space-12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, var(--color-primary-dim) 0%, transparent 50%);
  opacity: 0.3;
  pointer-events: none;
}

.cta-banner h2 {
  position: relative;
  margin-bottom: var(--space-4);
}

.cta-banner p {
  position: relative;
  font-size: var(--text-lg);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

.cta-banner .btn {
  position: relative;
}

/* ---- Install command ---- */
.install-cmd {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

.install-cmd__prompt {
  color: var(--color-primary);
  user-select: none;
}

.install-cmd__text {
  color: var(--color-text);
}

/* ---- Typing cursor animation ---- */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--color-primary);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

/* ---- Glow accent line ---- */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  margin: var(--space-12) auto;
  max-width: 400px;
}

/* ---- Feature row (alternating) ---- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

.feature-row--reverse {
  direction: ltr;
}

.feature-row--reverse > * {
  direction: ltr;
}

@media (min-width: 769px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
  }
  .feature-row--reverse {
    direction: rtl;
  }
}

/* ---- Danger glow text ---- */
.text-danger-glow {
  color: var(--color-danger);
  text-shadow: 0 0 30px rgba(255,68,68,.3), 0 0 60px rgba(255,68,68,.1);
}

/* ---- Trust bar (hero) ---- */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.trust-bar__icon {
  font-size: var(--text-lg);
}

.trust-bar__divider {
  display: none;
  width: 1px;
  height: 20px;
  background: var(--color-border-bright);
}

@media (min-width: 641px) {
  .trust-bar { gap: var(--space-6); }
  .trust-bar__divider { display: block; }
}

/* ---- Steps (How It Works) ---- */
.steps {
  max-width: 640px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-6);
  align-items: flex-start;
}

.step__number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-primary-dim);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
}

.step__content h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-xl);
}

.step__content p {
  font-size: var(--text-base);
  margin-bottom: 0;
}

.step__connector {
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-primary), transparent);
  margin-left: 23px;
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
}

/* ---- Testimonials ---- */
.testimonial {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color var(--duration) var(--ease-out);
}

.testimonial:hover {
  border-color: var(--color-border-bright);
}

.testimonial__text {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-6);
  font-style: italic;
}

.testimonial__text code {
  font-style: normal;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-dim);
  border: 1px solid rgba(57,255,20,.2);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.testimonial__name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-heading);
}

.testimonial__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- Waitlist form ---- */
.waitlist-form__row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 480px;
  margin: 0 auto;
}

@media (min-width: 481px) {
  .waitlist-form__row {
    flex-direction: row;
  }
}

.waitlist-form__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-input);
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--duration) var(--ease-out);
}

.waitlist-form__input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-dim);
}

.waitlist-form__input::placeholder {
  color: var(--color-text-muted);
}

.waitlist-form__note {
  margin-top: var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ---- Trust badges ---- */
.trust-badges {
  display: flex;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.trust-badge {
  text-align: center;
}

.trust-badge__icon {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.trust-badge__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text-heading);
}

.trust-badge__sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-body   { color: var(--color-text); }

/* ---- Section background modifiers ---- */
.section--elevated {
  background: var(--color-bg-elevated);
}

/* Stats bar: elevated + full top/bottom border */
.section--banded {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* Trust-badges section: elevated + top border only */
.section--elevated-top {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
}

/* ---- Container width modifiers ---- */
/* layout.css already defines .container--narrow = 720px (--max-width-prose) */
.container--xs { max-width: 640px; }   /* waitlist / narrow centred copy */
.container--md { max-width: 880px; }   /* demo terminal, sweep demo */
.container--lg { max-width: 960px; }   /* comparison table */

/* ---- Hero section ---- */
.hero__badge-wrap {
  margin-bottom: var(--space-6);
}

.hero__title {
  margin-bottom: var(--space-6);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.hero__lead {
  font-size: var(--text-xl);
  max-width: 640px;
  margin: 0 auto var(--space-8);
  color: var(--color-text-muted);
}

.hero__cta-group {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}

/* ---- Terminal caption (below demo) ---- */
.terminal__caption {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---- Feature comparison (before / after) ---- */
.feature-row--comparison {
  margin-bottom: var(--space-16);
}

.feature-heading {
  margin-bottom: var(--space-4);
}

.feature-heading--danger  { color: var(--color-danger); }
.feature-heading--primary { color: var(--color-primary); }

.list-plain {
  list-style: none;
  padding: 0;
}

.list-plain__item {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.list-plain__item:last-child {
  border-bottom: none;
}

/* Colour the items by column context rather than per-element inline styles */
.feature-col--before .list-plain__item { color: var(--color-text-muted); }
.feature-col--after  .list-plain__item { color: var(--color-text); }

/* ---- Card badge group ---- */
.card__badges {
  margin-top: var(--space-4);
}

/* ---- Generic button/CTA group ---- */
.btn-group {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Waitlist section copy ---- */
.waitlist__heading {
  margin-bottom: var(--space-4);
}

.waitlist__intro {
  font-size: var(--text-lg);
  margin-bottom: var(--space-8);
}

/* ---- Author section ---- */
.author__heading {
  margin-bottom: var(--space-6);
}

.author__bio {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.author__cred {
  font-size: var(--text-base);
}

.author__links {
  margin-top: var(--space-6);
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}
