/* ═══════════════════════════════════════════════════════════════════════════════
 * ProofLedger Landing Page — Light-first Premium Design
 * Uses @agentui/design-system tokens
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Global ──────────────────────────────────────────────────────────────── */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-top: var(--space-3);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-top: var(--space-3);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ─── Nav ─────────────────────────────────────────────────────────────────── */

.nav {
  height: 56px;
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 var(--space-6);
  gap: var(--space-8);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text-primary);
}

.nav-logo-icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent-blue);
}

.nav-logo-text {
  font-weight: var(--weight-semibold);
  font-size: var(--text-base);
}

.nav-links {
  display: flex;
  gap: var(--space-6);
  margin-left: auto;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

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

.nav-links a.nav-link--active {
  color: var(--color-accent-blue);
}

/* ─── Hamburger button (hidden on desktop) ───────────────────────────── */

.nav-hamburger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-text-primary);
  transition: background var(--duration-fast), border-color var(--duration-fast);
  margin-left: auto;
}

.nav-hamburger:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

/* ─── Mobile drawer ──────────────────────────────────────────────────── */

.nav-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--color-surface-overlay);
  z-index: 998;
  opacity: 0;
  transition: opacity 300ms ease;
}

.nav-drawer-backdrop--visible {
  display: block;
  opacity: 1;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  background: var(--color-bg-primary);
  border-left: 1px solid var(--color-border);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-drawer--open {
  transform: translateX(0);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.nav-drawer-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--color-text-primary);
  transition: background var(--duration-fast);
}

.nav-drawer-close:hover {
  background: var(--color-bg-hover);
}

.nav-drawer-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-4) var(--space-6);
  gap: var(--space-1);
}

.nav-drawer-links a {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast);
}

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

.nav-drawer-links a.nav-link--active {
  color: var(--color-accent-blue);
  background: rgba(38, 109, 240, 0.06);
}

.nav-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  margin-top: auto;
  border-top: 1px solid var(--color-border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: var(--space-6);
}

/* Theme toggle button */
.theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-fast), border-color var(--duration-fast);
  padding: 0;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-border-strong);
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: var(--space-16) 0;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(38, 109, 240, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
}

.hero-title-accent {
  display: block;
  color: var(--color-accent-blue);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-top: var(--space-5);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.btn-xl {
  height: 44px;
  padding: 0 var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* ─── Code Window ─────────────────────────────────────────────────────────── */

.code-window {
  background: #1E1F22;
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.code-dots {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}

.code-dots span:nth-child(1) { background: #EF4444; }
.code-dots span:nth-child(2) { background: #F59E0B; }
.code-dots span:nth-child(3) { background: #10B981; }

.hero-code {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: #EAEAEA;
  white-space: pre;
  overflow-x: auto;
  margin: 0;
}

.code-kw { color: #C586C0; }
.code-fn { color: #DCDCAA; }
.code-type { color: #4EC9B0; }
.code-comment { color: #6A9955; }

/* ─── Features ────────────────────────────────────────────────────────────── */

.features {
  padding: var(--space-16) 0;
  background: var(--color-bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-card {
  padding: var(--space-6);
  transition: box-shadow var(--duration-normal) ease,
              transform var(--duration-normal) ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}

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

.feature-icon--blue   { background: rgba(59, 130, 246, 0.1); color: var(--color-viz-blue); }
.feature-icon--green  { background: rgba(16, 185, 129, 0.1); color: var(--color-viz-green); }
.feature-icon--amber  { background: rgba(245, 158, 11, 0.1); color: var(--color-viz-amber); }
.feature-icon--purple { background: rgba(139, 92, 246, 0.1); color: var(--color-viz-purple); }
.feature-icon--red    { background: rgba(239, 68, 68, 0.1);  color: var(--color-viz-red); }
.feature-icon--teal   { background: rgba(20, 184, 166, 0.1); color: var(--color-viz-teal); }

.feature-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-2);
}

.feature-description {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ─── Pipeline Slide Deck ─────────────────────────────────────────────────── */

.how-it-works {
  padding: var(--space-16) 0;
}

.pipeline {
  position: relative;
  max-width: 420px;
  height: 280px;
  margin: 0 auto var(--space-8);
}

/* --- Card base (absolute, centered) --- */
.pipeline-node {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  background: var(--color-bg-primary);
  box-shadow: var(--shadow-sm);
  transition: transform 2000ms cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 800ms ease,
              box-shadow 800ms ease;
  transform: translateX(-50%) scale(0.92);
  opacity: 0.5;
  z-index: 1;
}

/* Active card — front & center */
.pipeline-node--active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
  z-index: 4;
  border-color: var(--color-border-strong);
  box-shadow: 0 8px 32px rgba(38, 109, 240, 0.10), var(--shadow-md);
}

/* Done cards — stacked left */
.pipeline-node--done { opacity: 0.35; }

.pipeline-node--left-1 {
  transform: translateX(calc(-50% - 40px)) scale(0.93);
  z-index: 3;
}
.pipeline-node--left-2 {
  transform: translateX(calc(-50% - 70px)) scale(0.88);
  z-index: 2;
}
.pipeline-node--left-3 {
  transform: translateX(calc(-50% - 90px)) scale(0.84);
  z-index: 1;
}

/* Upcoming cards — stacked right */
.pipeline-node--right-1 {
  transform: translateX(calc(-50% + 40px)) scale(0.93);
  z-index: 3;
  opacity: 0.5;
}
.pipeline-node--right-2 {
  transform: translateX(calc(-50% + 70px)) scale(0.88);
  z-index: 2;
  opacity: 0.35;
}
.pipeline-node--right-3 {
  transform: translateX(calc(-50% + 90px)) scale(0.84);
  z-index: 1;
  opacity: 0.2;
}

/* --- Icon --- */
.pipeline-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
  transition: transform 2000ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pipeline-node--active .pipeline-icon {
  transform: scale(1.15);
}

.pipeline-icon svg {
  width: 22px;
  height: 22px;
}

.pipeline-icon--blue   { background: rgba(59, 130, 246, 0.1);  color: var(--color-viz-blue); }
.pipeline-icon--amber  { background: rgba(245, 158, 11, 0.1);  color: var(--color-viz-amber); }
.pipeline-icon--green  { background: rgba(16, 185, 129, 0.1);  color: var(--color-viz-green); }
.pipeline-icon--purple { background: rgba(139, 92, 246, 0.1);  color: var(--color-viz-purple); }

.pipeline-label {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.pipeline-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

/* Stage content area */
.pipeline-stage {
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* --- Dot indicators --- */
.pipeline-dots {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.pdot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 300ms ease, border-color 300ms ease, transform 300ms ease;
}

.pdot:hover {
  border-color: var(--color-text-muted);
}

.pdot--done {
  background: var(--color-border-strong);
  border-color: var(--color-border-strong);
}

.pdot--active {
  background: var(--color-accent-blue);
  border-color: var(--color-accent-blue);
  transform: scale(1.25);
}

/* --- Step 1: Typing text --- */
.pipeline-stage .typing-text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  min-height: 1.5em;
  text-align: center;
  word-break: break-word;
  max-width: 260px;
}

.typing-cursor {
  font-family: var(--font-mono);
  color: var(--color-accent-blue);
  opacity: 0;
  animation: blink-cursor 0.6s step-start infinite;
}

.typing-active .typing-cursor {
  opacity: 1;
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

/* --- Step 2: Predicate tags --- */
.predicate-tags {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  align-items: center;
}

.ptag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: var(--weight-medium);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-bg-tertiary);
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 400ms ease, transform 400ms ease;
}

.ptag--visible {
  opacity: 1;
  transform: translateY(0);
}

.ptag--1.ptag--visible { color: var(--color-viz-blue); background: rgba(59, 130, 246, 0.1); }
.ptag--2.ptag--visible { color: var(--color-viz-green); background: rgba(16, 185, 129, 0.1); }
.ptag--3.ptag--visible { color: var(--color-viz-amber); background: rgba(245, 158, 11, 0.1); }

/* --- Step 3: Proof progress bar --- */
.proof-bar {
  width: 100%;
  max-width: 200px;
  height: 6px;
  background: var(--color-bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.proof-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-viz-blue), var(--color-viz-green));
  border-radius: var(--radius-full);
  transition: width 60ms linear;
}

.proof-status {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  transition: color 200ms ease;
}

.proof-status--pass {
  color: var(--color-status-green);
  font-weight: var(--weight-semibold);
}

/* --- Step 4: Certificate card + shimmer sweep --- */
.cert-card {
  position: relative;
  background: var(--color-bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 400ms ease, transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

/* Shimmer sweep pseudo-element */
.cert-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.6) 45%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.6) 55%,
    transparent 70%
  );
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 2;
}

.cert-card--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.cert-card--shimmer::after {
  animation: shimmer-sweep 800ms ease forwards;
}

@keyframes shimmer-sweep {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.cert-card-row {
  text-align: center;
}

.cert-card-badge {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-status-green);
  background: rgba(16, 185, 129, 0.1);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  transition: box-shadow 400ms ease, background 400ms ease;
}

.cert-card-badge--glow {
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4), 0 0 24px rgba(16, 185, 129, 0.15);
  background: rgba(16, 185, 129, 0.2);
  animation: badge-pulse 600ms ease;
}

@keyframes badge-pulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.cert-card-sig {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* ─── Pricing ─────────────────────────────────────────────────────────────── */

.pricing {
  padding: var(--space-16) 0;
  background: var(--color-bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  align-items: start;
}

.pricing-card {
  padding: var(--space-8);
  text-align: center;
  position: relative;
  transition: box-shadow var(--duration-normal) ease,
              transform var(--duration-normal) ease;
}

.pricing-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pricing-card--featured {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 1px var(--color-accent-blue), var(--shadow-md);
}

.pricing-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent-blue);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-name {
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.pricing-audience {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.pricing-price {
  margin: var(--space-6) 0;
}

.pricing-amount {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.pricing-period {
  font-size: var(--text-base);
  color: var(--color-text-muted);
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.check-icon {
  width: 16px;
  height: 16px;
  color: var(--color-status-green);
  flex-shrink: 0;
}

.pricing-cta {
  width: 100%;
  margin-top: var(--space-4);
}

/* ─── CTA Section ─────────────────────────────────────────────────────────── */

.cta-section {
  padding: var(--space-16) 0;
}

.cta-card {
  text-align: center;
  padding: var(--space-16) var(--space-8);
  background: linear-gradient(135deg, rgba(38, 109, 240, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}

.cta-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.cta-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin: var(--space-3) auto var(--space-8);
  max-width: 400px;
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.footer {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-border);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-semibold);
  color: var(--color-text-primary);
}

.footer-logo-icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent-blue);
}

.footer-links {
  display: flex;
  gap: var(--space-6);
}

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

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero-split {
    grid-template-columns: 1fr;
  }

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

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

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Tighter card offsets on mobile */
  .pipeline {
    max-width: 100%;
  }

  .pipeline-node {
    max-width: 300px;
  }

  .pipeline-node--left-1 { transform: translateX(calc(-50% - 20px)) scale(0.93); }
  .pipeline-node--left-2 { transform: translateX(calc(-50% - 36px)) scale(0.88); }
  .pipeline-node--left-3 { transform: translateX(calc(-50% - 48px)) scale(0.84); }
  .pipeline-node--right-1 { transform: translateX(calc(-50% + 20px)) scale(0.93); }
  .pipeline-node--right-2 { transform: translateX(calc(-50% + 36px)) scale(0.88); }
  .pipeline-node--right-3 { transform: translateX(calc(-50% + 48px)) scale(0.84); }
}
