/* CAI Breakdowns — Dark-mode Terminal Design Tokens */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;900&family=Geist+Mono:wght@400;500;600;700&display=swap');

:root {
  --color-bg: #09090b;
  --color-bg-card: #18181b;
  --color-border: rgba(39,39,42,.5);
  --color-accent: #22d3ee;
  --color-accent-hover: #06b6d4;
  --color-status: #34d399;
  --color-highlight: #fbbf24;
  --color-text: #ffffff;
  --color-text-muted: #a1a1aa;
  --color-text-faint: #52525b;
  --font-body: 'Geist', -apple-system, system-ui, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --max-width: 600px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

/* ── CAI Header ── */
.cai-header {
  border-bottom: 1px solid rgba(39,39,42,.5);
  background: rgba(9,9,11,.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 20px;
}
.cai-header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
/* Logo: diamond icon + text */
.cai-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.cai-logo-icon {
  position: relative;
  width: 36px;
  height: 36px;
  background: #000;
  border: 1px solid #27272a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.cai-logo-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .2;
  background-image: radial-gradient(#22d3ee .5px, transparent .5px);
  background-size: 4px 4px;
}
.cai-logo-diamond {
  position: relative;
  width: 14px;
  height: 14px;
  background: #18181b;
  border: 1px solid #3f3f46;
  transform: rotate(45deg);
}
.cai-logo-diamond::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 6px;
  height: 6px;
  background: #22d3ee;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(34,211,238,.8);
}
.cai-logo-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}
/* Updated badge */
.cai-updated-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 8px;
}
.cai-pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: cai-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(16,185,129,.5);
}
@keyframes cai-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}
.cai-updated-text {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #34d399;
}
/* Stats row below header */
.cai-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(39,39,42,.5);
}
.cai-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(24,24,27,.8);
  border: 1px solid #27272a;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-accent);
  white-space: nowrap;
}
.cai-stat-badge .num {
  color: #fff;
  font-weight: 700;
}
.cai-stat-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cai-stat-badge.amber { color: #fbbf24; }
.cai-stat-badge.amber .badge-dot { background: #fbbf24; }
.cai-stat-badge .badge-dot { background: #22d3ee; }

/* Legacy header-logo (keep for backward compat) */
.header-logo {
  display: block;
  height: 40px;
  width: auto;
  margin: 0 auto 30px auto;
}

@media (max-width: 640px) {
  .cai-logo-text { font-size: 11px; letter-spacing: .06em; }
  .cai-updated-badge { padding: 4px 8px; }
  .cai-updated-text { font-size: 10px; }
  .cai-stat-badge { font-size: 10px; padding: 4px 8px; }
}

/* Cover image */
.cover-image {
  width: 75%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin: 0 auto 24px;
  display: block;
}

/* Typography */
h1 {
  font-size: 32px;
  line-height: 1.3;
  font-weight: bold;
  margin: 0 0 16px 0;
  text-align: center;
  color: var(--color-text);
}

.subheadline {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: 0 0 30px 0;
  line-height: 1.6;
  text-align: center;
}

/* Email form */
.email-form {
  margin: 30px 0;
}

.email-form input[type="email"] {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-size: 17px;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  margin-bottom: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--color-bg-card);
  color: var(--color-text);
}

.email-form input[type="email"]:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}

.email-form input[type="email"]::placeholder {
  color: var(--color-text-faint);
}

.btn-cta {
  display: block;
  width: 100%;
  padding: 16px 32px;
  background-color: var(--color-accent);
  color: #09090b;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  font-weight: bold;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  text-decoration: none;
}

.btn-cta:hover {
  background-color: var(--color-accent-hover);
}

.btn-cta:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form error message */
.form-error {
  color: #f87171;
  font-size: 14px;
  margin-top: 8px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* Privacy note */
.privacy-note {
  font-size: 13px;
  color: var(--color-text-faint);
  margin-top: 12px;
  text-align: center;
}

/* Interstitial page */
.interstitial {
  text-align: center;
}

.interstitial h1 {
  font-size: 28px;
  color: var(--color-accent);
}

.interstitial .check-email {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--color-text-muted);
}

.pitch-box {
  text-align: left;
  background-color: var(--color-bg-card);
  border-left: 4px solid var(--color-accent);
  padding: 25px;
  margin: 30px 0;
  font-size: 17px;
}

.pitch-box p {
  margin: 0 0 15px 0;
}

.pitch-box p:last-child {
  margin-bottom: 0;
}

.countdown {
  font-size: 14px;
  color: var(--color-text-faint);
  margin-top: 20px;
}

/* Pitch layout — GIF left, text right */
.pitch-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
  margin-top: 16px;
}

.pitch-gif {
  flex-shrink: 0;
  width: 200px;
}

.pitch-gif img {
  width: 100%;
  border-radius: 8px;
  display: block;
}

.pitch-content {
  flex: 1;
}

.pitch-content p {
  margin: 0 0 14px 0;
  font-size: 16px;
  line-height: 1.6;
}

.pitch-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

.pitch-content a.btn-cta {
  color: #09090b;
  text-decoration: none;
  margin-top: 8px;
}

/* Honeypot — visually hidden but accessible to bots */
.ohnohoney {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 24px 16px;
  }

  h1 {
    font-size: 26px;
  }

  .subheadline {
    font-size: 16px;
  }

  .pitch-layout {
    flex-direction: column;
  }

  .pitch-gif {
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
  }
}
