/* Aegiscan funnel shared styles — matches existing landing visual language */

:root {
  --bg: #040406;
  --bg-elevated: #121317;
  --bg-input: #0d0e12;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --text-muted: #abaebb;
  --text-dim: rgba(255, 255, 255, 0.5);
  --accent: #b4462d;
  --accent-light: #d65a3e;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  --font-ui: "Geist", "Geist Placeholder", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", "Inter Placeholder", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max-width: 1200px;
  --radius: 0px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Calm dark background for internal funnel pages (landing uses its own video) */
.funnel-video-section {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 22% 12%, rgba(180, 70, 45, 0.06), transparent 45%),
    radial-gradient(ellipse at 78% 82%, rgba(255, 140, 66, 0.04), transparent 50%),
    var(--bg);
}

.funnel-video-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}

/* Internal pages do not play the heavy orange landing video — keep a stable dark surface. */
.funnel-video-section video {
  display: none;
}

/* Layout */
.funnel-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 100vw;
  overflow-x: hidden;
}

.funnel-container {
  width: 100%;
  max-width: min(var(--max-width), 100vw);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 768px) {
  .funnel-container {
    padding: 0 20px;
  }
}

/* Nav */
.funnel-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(4, 4, 6, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.funnel-logo {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.funnel-nav-links a {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.funnel-nav-links a:hover,
.funnel-nav-links a.active {
  color: var(--text);
}

.funnel-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 18px;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.funnel-nav-cta:hover {
  opacity: 0.9;
}

.funnel-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 768px) {
  .funnel-nav-links {
    display: none;
  }
  .funnel-nav-toggle {
    display: block;
  }
}

/* Main content */
.funnel-main {
  flex: 1;
  padding: 80px 0 120px;
}

@media (max-width: 768px) {
  .funnel-main {
    padding: 48px 0 80px;
  }
}

/* Typography */
.funnel-h1 {
  font-family: var(--font-ui);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
}

.funnel-h2 {
  font-family: var(--font-ui);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.funnel-h3 {
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 12px;
}

.funnel-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 40px;
  max-width: 640px;
}

.funnel-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.85px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.funnel-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.funnel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 54px;
  padding: 0 28px;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.funnel-btn-primary {
  background: var(--text);
  color: var(--bg);
}

.funnel-btn-primary:hover {
  background: #e8e8e8;
}

.funnel-btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.funnel-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.funnel-btn-accent {
  background: var(--accent);
  color: #fff;
}

.funnel-btn-accent:hover {
  background: var(--accent-light);
}

.funnel-btn-block {
  width: 100%;
}

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

/* Cards */
.funnel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

@media (max-width: 768px) {
  .funnel-card {
    padding: 24px;
  }
}

/* Forms */
.funnel-input,
.funnel-textarea,
.funnel-select {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.funnel-textarea {
  height: auto;
  padding: 14px 18px;
  min-height: 120px;
  resize: vertical;
}

.funnel-input:focus,
.funnel-textarea:focus,
.funnel-select:focus {
  border-color: rgba(255, 255, 255, 0.3);
}

.funnel-input::placeholder,
.funnel-textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.funnel-field {
  margin-bottom: 20px;
}

.funnel-field-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.funnel-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.funnel-checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.funnel-checkbox span {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Progress bar */
.funnel-progress {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 40px;
}

.funnel-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Steps / checklist */
.funnel-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 560px;
  margin: 0 auto;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.funnel-step.active {
  border-color: var(--accent);
  color: var(--text);
}

.funnel-step.done {
  color: var(--text-muted);
  border-color: rgba(34, 197, 94, 0.3);
}

.funnel-step-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.funnel-step-icon svg {
  width: 20px;
  height: 20px;
}

/* Domain display */
.funnel-domain {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text);
  margin-bottom: 32px;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.funnel-domain-label {
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-ui);
}

/* Findings / severity */
.funnel-severity {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.funnel-severity-critical {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

.funnel-severity-high {
  background: rgba(180, 70, 45, 0.14);
  color: var(--accent-light);
}

.funnel-severity-medium {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

.funnel-severity-low {
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
}

.funnel-finding {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.funnel-finding-main {
  flex: 1;
}

.funnel-finding-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
}

.funnel-finding-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Pricing */
.funnel-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 968px) {
  .funnel-plans {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }
}

.funnel-plan {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.funnel-plan.featured {
  border-color: var(--accent);
  position: relative;
}

.funnel-plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 10px;
}

.funnel-plan-name {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.funnel-plan-price {
  font-family: var(--font-ui);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.funnel-plan-price span {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-muted);
}

.funnel-plan-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.funnel-plan-features {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  flex: 1;
}

.funnel-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.funnel-plan-features li::before {
  content: "✓";
  color: var(--text);
  font-weight: 700;
  flex-shrink: 0;
}

/* Verification methods */
.funnel-methods {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.funnel-method {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.funnel-method-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
}

.funnel-method-title {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
}

.funnel-method-body {
  padding: 0 24px 24px;
}

.funnel-copyblock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.funnel-copyblock code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  word-break: break-all;
}

.funnel-copyblock button {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.funnel-copyblock button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.funnel-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-top: 12px;
}

.funnel-status.success {
  color: var(--success);
}

.funnel-status.error {
  color: var(--error);
}

/* Activity feed */
.funnel-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}

.funnel-feed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
}

.funnel-feed-item strong {
  color: var(--text);
  font-weight: 500;
}

/* Report matrix */
.funnel-matrix {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .funnel-matrix {
    grid-template-columns: repeat(2, 1fr);
  }
}

.funnel-matrix-cell {
  text-align: center;
  padding: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.funnel-matrix-value {
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: 6px;
}

.funnel-matrix-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* Utility */
.funnel-hidden {
  display: none !important;
}

.funnel-flex {
  display: flex;
}

.funnel-flex-col {
  flex-direction: column;
}

.funnel-items-center {
  align-items: center;
}

.funnel-justify-center {
  justify-content: center;

}

.funnel-gap-4 { gap: 4px; }
.funnel-gap-8 { gap: 8px; }
.funnel-gap-12 { gap: 12px; }
.funnel-gap-16 { gap: 16px; }
.funnel-gap-24 { gap: 24px; }
.funnel-gap-32 { gap: 32px; }

.funnel-mt-8 { margin-top: 8px; }
.funnel-mt-16 { margin-top: 16px; }
.funnel-mt-24 { margin-top: 24px; }
.funnel-mt-32 { margin-top: 32px; }
.funnel-mt-48 { margin-top: 48px; }

.funnel-mb-16 { margin-bottom: 16px; }
.funnel-mb-24 { margin-bottom: 24px; }
.funnel-mb-32 { margin-bottom: 32px; }

.funnel-text-center { text-align: center; }
.funnel-text-muted { color: var(--text-muted); }
.funnel-text-dim { color: var(--text-dim); }

.funnel-max-w-md { max-width: 560px; margin-left: auto; margin-right: auto; }
.funnel-max-w-lg { max-width: 720px; margin-left: auto; margin-right: auto; }
.funnel-max-w-xl { max-width: 920px; margin-left: auto; margin-right: auto; }

/* Blurred preview */
.funnel-preview-lock {
  position: relative;
  overflow: hidden;
}

.funnel-preview-lock::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(4, 4, 6, 0.35);
  z-index: 2;
}

.funnel-preview-lock-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 48px 24px;
}

/* Footer */
.funnel-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  background: rgba(4, 4, 6, 0.9);
}

.funnel-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.funnel-footer-copy {
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 768px) {
  .funnel-footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* Spinner */
@keyframes funnel-spin {
  to { transform: rotate(360deg); }
}

.funnel-spinner {
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: funnel-spin 0.8s linear infinite;
}

/* Fade in */
@keyframes funnel-fade-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.funnel-fade-in {
  animation: funnel-fade-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Upsell block with animated shader background */
.funnel-upsell {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  margin-top: 40px;
  padding: 48px 32px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #121317;
}

.funnel-upsell::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(18, 19, 23, 0.35) 0%, rgba(18, 19, 23, 0.6) 100%);
  z-index: 0;
  pointer-events: none;
}

.funnel-upsell-shader {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.funnel-upsell-shader canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.funnel-upsell-content {
  position: relative;
  z-index: 1;
}

.funnel-upsell-content h2 {
  color: #fff;
  margin-bottom: 12px;
}

.funnel-upsell-content p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 560px;
  margin: 0 auto 24px;
}

.funnel-upsell-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
