/* AI Agent Handoff Protocol - Styles */

/* ========== Variables ========== */
:root {
  --primary: #0891B2;        /* Cyan-600 */
  --primary-dark: #0E7490;  /* Cyan-700 */
  --primary-light: #22D3EE; /* Cyan-400 */

  --bg-dark: #0F172A;       /* Slate-900 */
  --bg-darker: #020617;     /* Slate-950 */
  --bg-card: #1E293B;       /* Slate-800 */
  --bg-card-hover: #334155; /* Slate-700 */

  --text-primary: #F8FAFC;  /* Slate-50 */
  --text-secondary: #94A3B8; /* Slate-400 */
  --text-muted: #64748B;    /* Slate-500 */

  --success: #10B981;       /* Emerald-500 */
  --warning: #F59E0B;       /* Amber-500 */
  --error: #EF4444;         /* Red-500 */

  --border: #334155;        /* Slate-700 */
  --border-light: #475569;  /* Slate-600 */

  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-dark);
  min-height: 100vh;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========== Utilities ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Buttons ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

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

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

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.btn-icon:hover {
  opacity: 1;
}

/* ========== Navigation ========== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ========== Hero Section ========== */
.hero {
  padding: 160px 0 100px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(8, 145, 178, 0.2);
  border: 1px solid var(--primary);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-light);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 60px;
  justify-content: center;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== Sections ========== */
.section {
  padding: 80px 0;
}

.section-dark {
  background: var(--bg-darker);
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 48px;
}

/* ========== Problem Cards ========== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.problem-card {
  padding: 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  text-align: center;
  transition: all 0.3s;
}

.problem-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.problem-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.problem-card p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ========== Feature Cards ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  transition: all 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.feature-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== Schema Section ========== */
.schema-wrapper {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.schema-sidebar {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.schema-sidebar h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.schema-nav {
  list-style: none;
  margin-bottom: 24px;
}

.schema-nav li {
  margin-bottom: 8px;
}

.schema-nav a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: 6px;
  transition: all 0.2s;
}

.schema-nav a:hover,
.schema-nav a.active {
  background: rgba(8, 145, 178, 0.2);
  color: var(--primary-light);
}

.schema-content {
  background: var(--bg-darker);
  border-radius: 12px;
  overflow: hidden;
}

.code-block {
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.code-block code {
  font-family: inherit;
}

/* ========== SDK Section ========== */
.code-examples {
  max-width: 700px;
  margin: 0 auto 24px;
}

.code-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.code-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.code-tab:hover {
  background: var(--bg-card-hover);
}

.code-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.sdk-install {
  max-width: 700px;
  margin: 0 auto;
}

.install-command {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.install-command code {
  flex: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--success);
}

/* ========== Pricing ========== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  padding: 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  position: relative;
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.1) 0%, var(--bg-card) 100%);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  background: var(--primary);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: white;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-header h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 40px;
  font-weight: 700;
}

.pricing-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  margin-bottom: 24px;
}

.pricing-features li {
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
  border-bottom: none;
}

/* ========== CTA Section ========== */
.cta-section {
  text-align: center;
  background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.cta-section h2 {
  font-size: 32px;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* ========== Footer ========== */
.footer {
  padding: 48px 0;
  background: var(--bg-darker);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== Modal ========== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

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

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-header h3 {
  font-size: 24px;
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.2);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* ========== Success State ========== */
.waitlist-success {
  text-align: center;
  padding: 24px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  font-size: 32px;
  color: var(--success);
}

.waitlist-success h4 {
  font-size: 24px;
  margin-bottom: 8px;
}

.position-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.position-text strong {
  color: var(--primary-light);
  font-size: 20px;
}

.share-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.share-btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  transition: all 0.2s;
}

.share-btn.twitter {
  background: #1DA1F2;
}

.share-btn.linkedin {
  background: #0A66C2;
}

.share-btn:hover {
  opacity: 0.9;
  color: white;
}

/* ========== Dashboard ========== */
.dashboard {
  max-width: 1000px;
  margin: 120px auto 60px;
  padding: 0 24px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.dashboard-header h2 {
  font-size: 28px;
}

.handoff-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.handoff-card {
  padding: 24px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.handoff-card:hover {
  border-color: var(--border-light);
}

.handoff-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.handoff-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--primary-light);
}

.handoff-status {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
}

.handoff-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.handoff-status.in_progress {
  background: rgba(8, 145, 178, 0.2);
  color: var(--primary-light);
}

.handoff-status.completed {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.handoff-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.handoff-flow .agent {
  color: var(--text-primary);
  font-weight: 500;
}

.handoff-flow .arrow {
  color: var(--text-muted);
}

.handoff-summary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.handoff-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.empty-state {
  padding: 48px;
  text-align: center;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px dashed var(--border);
}

.empty-state p {
  color: var(--text-muted);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .problem-grid,
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .schema-wrapper {
    grid-template-columns: 1fr;
  }

  .schema-sidebar {
    order: 2;
  }

  .nav-links a:not(.btn) {
    display: none;
  }

  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

/* ========== Animations ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 1.5s infinite;
}

/* ========== Toast Notifications ========== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  z-index: 300;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: var(--success);
}

.toast.error {
  border-color: var(--error);
}