/* ============================================================
   index.css — Landing page (index.html) specific styles
   ============================================================ */

/* ── Entrance animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-chip {
  animation: fadeUp 0.6s ease both;
  position: relative;
  z-index: 2;
}

.hero h1 {
  animation: fadeUp 0.6s ease 0.1s both;
}

.hero p {
  animation: fadeUp 0.6s ease 0.2s both;
}

.url-bar {
  animation: scaleIn 0.5s ease 0.35s both;
}

.hero::before {
  animation: fadeIn 1.2s ease 0.3s both;
}

/* ── Hero ── */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 55px);
  padding: 40px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/AdobeStock_439702849.jpeg') center 70% / cover no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(18, 21, 31, 0.6) 70%),
    linear-gradient(
      to bottom,
      rgba(18, 21, 31, 0.2) 0%,
      transparent 40%,
      transparent 60%,
      rgba(18, 21, 31, 0.7) 100%
    );
  pointer-events: none;
  z-index: 1;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  background: rgba(219, 39, 119, 0.35);
  border: 1px solid rgba(244, 63, 139, 0.6);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #ec4899;
  margin-bottom: 24px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 3;
  box-shadow: none;
  animation: fadeUp 0.6s ease both;
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  max-width: 750px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero h1 span {
  background: linear-gradient(135deg, #e91e63, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: #fff;
  font-size: 1.05rem;
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 36px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  font-weight: 500;
}

.hero-badges {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 2;
  animation: fadeIn 0.6s ease 0.5s forwards;
  opacity: 0;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #fff;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* ── CTA button ── */
.cta-btn {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, #e91e63, #ec4899);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 36px;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.3);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(233, 30, 99, 0.45);
}

/* ── URL input bar ── */
.url-bar {
  display: flex;
  width: 100%;
  max-width: 620px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.2s;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.url-bar:focus-within {
  border-color: rgba(233, 30, 99, 0.4);
  box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.08);
}

.url-bar input {
  flex: 1;
  padding: 16px 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
}

.url-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.url-bar button {
  padding: 16px 28px;
  background: linear-gradient(135deg, #e91e63, #ec4899);
  color: white;
  border: none;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.url-bar button:hover {
  background: linear-gradient(135deg, #c2185b, #e91e63);
}

.url-error {
  color: var(--field-err);
  font-size: 0.85rem;
  margin-top: 8px;
}

.error-box {
  max-width: 580px;
  width: 100%;
}

/* ── Lead capture modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.modal-subtitle strong {
  color: var(--primary);
}

.modal-submit {
  width: 100%;
  padding: 13px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
  font-family: inherit;
}

.modal-submit:hover {
  background: var(--primary-hover);
}

/* ── Loader screen ── */
.loader-screen {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loader-screen.open {
  display: flex;
}

/* ── Loader card ── */
.loader-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  backdrop-filter: blur(12px);
}

.loader-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.loader-status {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* ── Agent steps ── */
.agent-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.agent-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    opacity 0.3s ease;
  opacity: 0.45;
}

.agent-step[data-status='active'] {
  background: rgba(233, 30, 99, 0.1);
  border: 1px solid rgba(233, 30, 99, 0.3);
  opacity: 1;
}

.agent-step[data-status='done'] {
  opacity: 1;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.agent-step[data-status='pending'] {
  opacity: 0.35;
}

.agent-step-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.agent-step-info {
  flex: 1;
  min-width: 0;
}

.agent-step-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.agent-step-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  display: none;
}

.agent-step[data-status='active'] .agent-step-desc {
  display: block;
}

.agent-step-indicator {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  transition:
    background 0.3s,
    box-shadow 0.3s;
  position: relative;
  box-sizing: border-box;
}

.agent-step[data-status='active'] .agent-step-indicator {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
  box-shadow: none;
}

.agent-step[data-status='done'] .agent-step-indicator {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.agent-step[data-status='done'] .agent-step-indicator::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 3px;
  width: 10px;
  height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

/* ── Progress bar (bottom of card) ── */
.loader-progress-wrap {
  text-align: center;
}

.loader-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #ff6090);
  border-radius: 4px;
  transition: width 0.6s ease;
}

.loader-progress-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.loader-progress-hint {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
}

/* ── Loader error state ── */
.loader-error {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 0;
}

.loader-error-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.loader-error-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f87171;
}

.loader-error-msg {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 380px;
  line-height: 1.5;
}

.loader-error-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* ── Result screen ── */
.result-screen {
  display: none;
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  z-index: 2000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}

.result-screen.open {
  display: flex;
}

.result-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(34, 197, 94, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.result-icon {
  font-size: 3rem;
  animation: scaleIn 0.4s ease both;
  position: relative;
  z-index: 1;
}

.result-title {
  font-size: 1.8rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s ease 0.1s both;
}

.result-desc {
  color: var(--muted);
  max-width: 400px;
  font-size: 0.95rem;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s ease 0.2s both;
}

.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.5s ease 0.3s both;
}

.result-actions .btn-primary {
  padding: 14px 36px;
  background: linear-gradient(135deg, #e91e63, #ec4899);
  border-radius: 10px;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(233, 30, 99, 0.35);
}

.result-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(233, 30, 99, 0.45);
}

.result-actions .btn-outline {
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 1rem;
}

/* ── Report preview ── */
.preview-link {
  display: inline-block;
  position: relative;
  z-index: 2;
  margin-bottom: 28px;
  padding: 10px 24px;
  background: rgba(233, 30, 99, 0.9);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  animation: fadeUp 0.6s ease 0.3s both;
  box-shadow: 0 4px 16px rgba(233, 30, 99, 0.4);
}

.preview-link:hover {
  background: rgba(233, 30, 99, 1);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(233, 30, 99, 0.5);
}

/* ── Preview modal ── */
.preview-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.preview-modal-overlay.open {
  display: flex;
}

.preview-modal {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  animation: scaleIn 0.25s ease;
}

.preview-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 8px;
  z-index: 10;
  transition: background 0.2s;
}

.preview-modal-close:hover {
  background: rgba(233, 30, 99, 0.6);
}

.preview-modal-content {
  overflow-y: auto;
  max-height: 90vh;
}

.preview-modal-img {
  width: 100%;
  display: block;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .preview-modal-overlay {
    padding: 10px;
  }
  .preview-modal {
    max-height: 85vh;
    border-radius: 10px;
  }
  .preview-modal-content {
    max-height: 85vh;
  }
  .preview-modal-close {
    top: 8px;
    right: 10px;
    font-size: 1.3rem;
    padding: 3px 8px;
  }
  .header {
    padding: 10px 16px;
  }
  .header-nav a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }
  .hero {
    height: auto;
    min-height: calc(100vh - 50px);
    padding: 20px 16px 30px;
    justify-content: center;
  }
  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    margin-bottom: 12px;
  }
  .hero p {
    font-size: 0.88rem;
    margin-bottom: 24px;
  }
  .hero-chip {
    font-size: 0.68rem;
    padding: 5px 12px;
    margin-bottom: 14px;
  }
  .url-bar {
    max-width: 100%;
    border-radius: 12px;
  }
  .url-bar input {
    padding: 14px 14px;
    font-size: 0.88rem;
  }
  .url-bar button {
    padding: 14px 18px;
    font-size: 0.84rem;
  }
  .hero-badges {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.4rem;
  }
  .hero-badges {
    gap: 8px;
  }
  .modal {
    padding: 24px 16px;
  }
  .loader-card {
    padding: 20px 14px 16px;
  }
}
