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

:root {
  --page-bg: #0f0f10;
  --card-bg: #18181b;
  --accent: #ff6b35;
  --accent-light: #ffab85;
  --text: #e4e4e7;
  --muted: #71717a;
  --border: #27272a;
}

html { scroll-behavior: smooth; }

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

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0f0f10 0%, #1a0a05 50%, #0f0f10 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 24px 40px;
}

.hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e4e4e7 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.tagline {
  font-size: 15px;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.7;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tech-stack span {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.22);
  color: var(--accent-light);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

/* ── Demo section ─────────────────────────────────────── */
.demo-section {
  padding: 64px 24px;
  border-bottom: 1px solid var(--border);
}

.demo-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Step nav ─────────────────────────────────────────── */
.step-nav {
  display: flex;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 4px;
}

.step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.step-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.step-btn.active {
  background: rgba(255, 107, 53, 0.12);
  border-color: var(--accent);
  color: var(--accent-light);
}

.step-num {
  width: 20px;
  height: 20px;
  background: var(--border);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-btn.active .step-num {
  background: var(--accent);
  color: white;
}

.step-connector {
  height: 1px;
  width: 16px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Demo step transitions ──────────────────────────── */
.demo-step { display: block; }
.demo-step.hidden { display: none; }

/* ── App frame ────────────────────────────────────────── */
.app-frame {
  background: #111113;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 700px;
  min-height: 480px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.app-topbar {
  background: #18181b;
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-topbar-logo {
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.app-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.app-topbar-spacer { flex: 1; }

.app-topbar-user {
  font-size: 12px;
  color: var(--muted);
}

.app-body {
  padding: 28px 24px;
}

/* ── Step 1: Request form ─────────────────────────────── */
.request-form {
  max-width: 480px;
  margin: 0 auto;
}

.form-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.form-subheading {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.app-field {
  margin-bottom: 18px;
}

.app-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.app-input {
  width: 100%;
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s;
  outline: none;
}

.app-input:focus {
  border-color: var(--accent);
  background: #1c1c1f;
}

.app-select {
  width: 100%;
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.app-select:focus {
  border-color: var(--accent);
}

.app-sf-hint {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.app-sf-dot {
  width: 6px;
  height: 6px;
  background: #ffab85;
  border-radius: 50%;
  flex-shrink: 0;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.find-availability-btn {
  width: 100%;
  padding: 13px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 8px;
  transition: background 0.15s, transform 0.1s;
}

.find-availability-btn:hover {
  background: #e85520;
  transform: translateY(-1px);
}

.find-availability-btn:active {
  transform: translateY(0);
}

/* ── Step 2: Availability header ─────────────────────── */
.availability-header {
  margin-bottom: 20px;
}

.availability-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.availability-subtitle {
  font-size: 13px;
  color: var(--muted);
}

/* ── Time picker grid ─────────────────────────────────── */
.avail-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.avail-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.avail-col-header {
  text-align: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.avail-dow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 2px;
}

.avail-date {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.avail-col-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.avail-col-empty {
  align-items: center;
  padding-top: 12px;
}

.avail-none {
  font-size: 14px;
  color: var(--border);
}

.avail-slot {
  width: 100%;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 7px;
  background: #1c1c1f;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.avail-slot:hover {
  border-color: var(--accent);
  color: var(--text);
}

.avail-slot-chosen {
  background: rgba(255, 107, 53, 0.15);
  border-color: var(--accent);
  color: var(--accent-light);
  font-weight: 600;
}

.slot-check {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

/* ── Assigned SE row ──────────────────────────────────── */
.assigned-se {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assigned-se-avatar {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.assigned-se-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.assigned-se-tag {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 1px 7px;
}

/* ── Step 3: Config panel ─────────────────────────────── */
.config-panel {
  max-width: 520px;
  margin: 0 auto;
}

.config-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.config-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}

.config-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.config-row:last-child {
  border-bottom: none;
}

.config-row-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 90px;
  padding-top: 1px;
  flex-shrink: 0;
}

.config-row-value {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

.config-editable-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  padding: 0 0 3px;
  outline: none;
  transition: border-color 0.15s;
}

.config-editable-input:focus {
  border-bottom-color: var(--accent);
}

.datetime-display {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.attendee-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.attendee-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 3px 10px 3px 5px;
  font-size: 12px;
  color: var(--text);
}

.attendee-pill-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.attendee-sf-tag {
  font-size: 9px;
  color: var(--muted);
  margin-left: 1px;
}

.integration-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.zoom-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(45, 172, 106, 0.12);
  border: 1px solid rgba(45, 172, 106, 0.3);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  color: #4ade80;
}

.zoom-icon {
  font-size: 14px;
}

.zoom-link {
  font-size: 12px;
  font-weight: 400;
  color: rgba(74, 222, 128, 0.7);
  font-family: 'SF Mono', Monaco, monospace;
}

.sf-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: 7px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
}

.sf-opp-name {
  font-size: 12px;
  font-weight: 400;
  color: rgba(125, 211, 252, 0.7);
}

/* Toggle switch */
.sync-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.sync-info {
  flex: 1;
}

.sync-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.sync-sublabel {
  font-size: 12px;
  color: var(--muted);
}

.toggle-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--accent);
}

.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(18px);
}

.book-btn {
  width: 100%;
  padding: 14px 20px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  margin-top: 6px;
  transition: background 0.15s, transform 0.1s;
}

.book-btn:hover {
  background: #e85520;
  transform: translateY(-1px);
}

.book-btn:active {
  transform: translateY(0);
}

/* ── Step 4: Confirmation ─────────────────────────────── */
.confirm-body {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  background: rgba(45, 172, 106, 0.15);
  border: 2px solid rgba(74, 222, 128, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
  animation: confirmPop 0.4s ease forwards;
}

@keyframes confirmPop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-headline {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.confirm-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
}

.receipt-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 540px;
  text-align: left;
}

.receipt-card {
  background: #1c1c1f;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}

.receipt-card.receipt-full {
  grid-column: 1 / -1;
}

.receipt-icon {
  font-size: 18px;
  margin-bottom: 7px;
  display: block;
}

.receipt-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.receipt-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.receipt-detail {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.receipt-link {
  font-size: 12px;
  color: rgba(74, 222, 128, 0.8);
  font-family: 'SF Mono', Monaco, monospace;
}

/* ── Walkthrough highlight blocks ───────────────────── */
.hl-block {
  transition: opacity 0.3s;
  margin-bottom: 4px;
}

.hl-block.hl-hidden { display: none; }

.hl-block.dimmed { opacity: 0.3; pointer-events: none; }

@keyframes hlReveal {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hl-block.revealed {
  animation: hlReveal 0.3s ease forwards;
}

.hl-content {
  border-radius: 6px;
  border: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.hl-block.revealed .hl-content {
  border-color: rgba(255, 107, 53, 0.35);
  background: rgba(255, 107, 53, 0.04);
}

.hl-block.dimmed .hl-content {
  border-color: transparent;
  background: transparent;
}

/* ── Spotlight tip card ──────────────────────────────── */
.spotlight-tip {
  display: none;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 107, 53, 0.08);
  border: 1px solid rgba(255, 107, 53, 0.28);
  border-radius: 8px;
  padding: 11px 14px;
  margin-top: 10px;
}

.spotlight-tip.active { display: flex; }

.tip-text {
  font-size: 13px;
  color: var(--accent-light);
  line-height: 1.55;
  flex: 1;
}

.tip-next-btn {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
  font-family: inherit;
  animation: peekGlow 1.6s ease-in-out infinite;
}

.tip-next-btn:hover { background: #e85520; }

.tip-next-btn:disabled {
  background: #4a5568;
  cursor: not-allowed;
  opacity: 0.6;
  animation: none;
}

@keyframes peekGlow {
  0%, 100% { box-shadow: 0 0 8px 2px rgba(255, 107, 53, 0.5), 0 0 20px 4px rgba(255, 107, 53, 0.2); }
  50% { box-shadow: 0 0 16px 4px rgba(255, 171, 133, 0.6), 0 0 32px 8px rgba(255, 107, 53, 0.25); }
}

/* ── Footer ───────────────────────────────────────────── */
.project-footer {
  padding: 40px 24px;
  text-align: center;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent-light); }

/* ── Back button ────────────────────────────────────────── */
.back-btn {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.back-btn:hover {
  background: rgba(14,165,233,0.15);
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Natural-language timing field ──────────────────── */
.app-textarea {
  resize: vertical;
  min-height: 52px;
  line-height: 1.5;
}

.app-field-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
  line-height: 1.4;
}

/* ── Fixed attendee pills ────────────────────────────── */
.attendee-pill.attendee-fixed {
  border-color: rgba(255,255,255,0.15);
}

/* ── Salesforce contact picker ───────────────────────── */
.sf-contact-picker-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.sf-contact-picker-hint {
  font-weight: 400;
  font-size: 11px;
  color: rgba(113, 113, 122, 0.7);
}

.sf-contact-picker {
  background: #1a1a1e;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.sf-contact-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--border);
}

.sf-contact-option:last-child {
  border-bottom: none;
}

.sf-contact-option:hover {
  background: rgba(255, 107, 53, 0.06);
}

.sf-contact-option input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
}

.sf-contact-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  flex: 1;
}

.sf-contact-title {
  font-size: 11px;
  color: var(--muted);
}

.selected-contact-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.25);
  border-radius: 20px;
  padding: 3px 8px 3px 5px;
  font-size: 12px;
  color: var(--accent-light);
}

.contact-pill-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.contact-pill-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0 0 0 2px;
  line-height: 1;
  transition: color 0.12s;
  font-family: inherit;
}

.contact-pill-remove:hover {
  color: var(--text);
}

/* ── Sync options (pre-call + debrief) ───────────────── */
.sync-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Config panel hl-block row dividers ──────────────── */
.config-rows .hl-block.revealed,
.config-rows .hl-block.dimmed {
  border-top: 1px solid var(--border);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .demo-section { padding: 32px 12px; }
  .app-body { padding: 20px 16px; }

  .step-label { display: none; }
  .step-connector { width: 8px; }

  .date-row { grid-template-columns: 1fr; }

  .receipt-grid { grid-template-columns: 1fr; }
  .receipt-card.receipt-full { grid-column: auto; }

  .attendee-pills { gap: 5px; }

  .integration-badges { flex-direction: column; align-items: flex-start; }

  .config-row { flex-direction: column; gap: 6px; }
  .config-row-label { min-width: unset; }
}
