/* CloseIt Demo — Dark Theme with Orange Accents */

:root {
  --bg-primary: #0d0d0f;
  --bg-secondary: #161619;
  --bg-card: #1a1a1e;
  --bg-card-hover: #222228;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a8;
  --text-muted: #6a6a72;
  --accent: #ff6b35;
  --accent-hover: #ff8255;
  --accent-glow: rgba(255, 107, 53, 0.3);
  --border: #2a2a30;
  --border-light: #3a3a42;
  --success: #22c55e;
  --sms-inbound: #2a2a30;
  --sms-outbound: #ff6b35;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.1;
  max-width: 800px;
}

.hero h1 .highlight {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.125rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.hero-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-cta svg {
  transition: transform 0.2s;
}

.hero-cta:hover svg {
  transform: translateY(4px);
}

/* Section Styles */
.section {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* SMS Simulator */
.sms-section {
  background: var(--bg-secondary);
  padding: 100px 24px;
}

.sms-container {
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border-radius: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.sms-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

.sms-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, #ff8f65 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}

.sms-info h3 {
  font-size: 1rem;
  font-weight: 600;
}

.sms-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.sms-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--success);
}

.sms-status::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.sms-body {
  padding: 24px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sms-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.9375rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  animation: bubbleIn 0.4s ease forwards;
}

.sms-bubble.inbound {
  background: var(--sms-inbound);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.sms-bubble.outbound {
  background: var(--sms-outbound);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.sms-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.sms-time.left { align-self: flex-start; }
.sms-time.right { align-self: flex-end; }

/* Missed call notification */
.missed-call {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid var(--accent);
  border-radius: 12px;
  margin-bottom: 8px;
  opacity: 0;
  animation: slideIn 0.4s ease forwards;
}

.missed-call-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.missed-call-text {
  flex: 1;
}

.missed-call-text strong {
  display: block;
  font-size: 0.875rem;
  color: var(--accent);
}

.missed-call-text span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Animation keyframes */
@keyframes bubbleIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes slideIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Staggered animation delays */
.sms-bubble:nth-child(1) { animation-delay: 0.3s; }
.sms-bubble:nth-child(2) { animation-delay: 2.0s; }
.sms-bubble:nth-child(3) { animation-delay: 4.0s; }
.sms-bubble:nth-child(4) { animation-delay: 6.0s; }
.sms-bubble:nth-child(5) { animation-delay: 8.0s; }
.sms-bubble:nth-child(6) { animation-delay: 10.0s; }

.sms-time:nth-child(1) { animation-delay: 0.3s; }
.sms-time:nth-child(2) { animation-delay: 2.0s; }
.sms-time:nth-child(3) { animation-delay: 4.0s; }
.sms-time:nth-child(4) { animation-delay: 6.0s; }
.sms-time:nth-child(5) { animation-delay: 8.0s; }
.sms-time:nth-child(6) { animation-delay: 10.0s; }

.missed-call { animation-delay: 0s; }

/* Play button */
.play-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.play-button:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}

.play-button.restart {
  margin-top: 16px;
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.play-button.restart:hover {
  background: var(--accent);
  color: #fff;
}

/* GHL Guide Section */
.ghl-section {
  padding: 100px 24px;
}

.ghl-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  max-width: 1000px;
  margin: 0 auto;
}

.ghl-nav {
  position: sticky;
  top: 24px;
  height: fit-content;
}

.ghl-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ghl-nav-list a {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.ghl-nav-list a:hover,
.ghl-nav-list a.active {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}

.ghl-nav-list a.active {
  color: var(--accent);
  border-color: var(--accent);
}

.ghl-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ghl-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.ghl-step-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card-hover);
  cursor: pointer;
  transition: background 0.2s;
}

.ghl-step-header:hover {
  background: var(--bg-card);
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.step-title {
  flex: 1;
}

.step-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.step-title span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.step-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  transition: all 0.2s;
}

.ghl-step.expanded .step-toggle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(180deg);
}

.ghl-step-content {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.ghl-step.expanded .ghl-step-content {
  padding: 0 24px 24px;
  max-height: 1000px;
}

.ghl-step-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.ghl-step-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ghl-step-content li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.ghl-step-content li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  overflow-x: auto;
}

.code-block code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  white-space: pre;
}

.code-block .tag { color: var(--accent); }
.code-block .attr { color: #a78bfa; }
.code-block .value { color: #22c55e; }

/* Vertical Tabs */
.vertical-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.vertical-tab {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.vertical-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.vertical-content {
  display: none;
}

.vertical-content.active {
  display: block;
}

/* Contact Form Section */
.form-section {
  padding: 100px 24px;
  background: var(--bg-secondary);
}

.form-container {
  max-width: 500px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 48px;
}

.form-container h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}

.form-container > p {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

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

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

/* Success state */
.form-success {
  display: none;
  text-align: center;
  padding: 32px;
}

.form-success.show {
  display: block;
}

.form-success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.form-success h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--text-secondary);
}

/* Footer */
.demo-footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.demo-footer p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.demo-footer a {
  color: var(--accent);
  text-decoration: none;
}

.demo-footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .ghl-grid {
    grid-template-columns: 1fr;
  }

  .ghl-nav {
    position: static;
    margin-bottom: 32px;
  }

  .ghl-nav-list {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 8px;
  }

  .ghl-nav-list a {
    white-space: nowrap;
    padding: 10px 14px;
  }

  .form-container {
    padding: 32px 24px;
  }

  .sms-container {
    border-radius: 16px;
  }
}