/* ============================================================
   Agent2Pay — Dark Premium Design System
   ============================================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Backgrounds */
  --bg-deep: #060a14;
  --bg-base: #0a0e1a;
  --bg-elevated: #0f1424;
  --bg-surface: #141a2e;
  --bg-surface-hover: #1a2240;

  /* Glass */
  --glass-bg: rgba(16, 22, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

  /* Accent palette */
  --accent-teal: #00e5c3;
  --accent-teal-dim: #00c4a7;
  --accent-teal-glow: rgba(0, 229, 195, 0.25);
  --accent-violet: #7c3aed;
  --accent-violet-dim: #6d28d9;
  --accent-violet-glow: rgba(124, 58, 237, 0.2);
  --accent-gold: #fbbf24;
  --accent-gold-dim: #f59e0b;
  --accent-blue: #38bdf8;

  /* Text */
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: var(--accent-teal);

  /* Semantic */
  --ok: #22c55e;
  --warn: #f59e0b;
  --error: #ef4444;

  /* Strokes & Shadows */
  --stroke: rgba(255, 255, 255, 0.07);
  --stroke-hover: rgba(0, 229, 195, 0.2);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-glow-teal: 0 0 40px rgba(0, 229, 195, 0.15);
  --shadow-glow-violet: 0 0 40px rgba(124, 58, 237, 0.15);

  /* Radius */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.2s;
  --duration-normal: 0.4s;
  --duration-slow: 0.7s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--accent-teal);
  color: var(--bg-deep);
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Gradient Mesh Background --- */
.gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.mesh-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.mesh-orb--teal {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: meshFloat1 14s ease-in-out infinite;
}

.mesh-orb--violet {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
  top: 200px;
  right: -150px;
  animation: meshFloat2 18s ease-in-out infinite;
}

.mesh-orb--gold {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
  bottom: -100px;
  left: 30%;
  opacity: 0.2;
  animation: meshFloat3 20s ease-in-out infinite;
}

/* --- Canvas Particles --- */
#particle-canvas {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease;
}

.navbar.is-scrolled {
  /* Solid fallback for browsers without backdrop-filter support */
  background: rgba(10, 14, 26, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--stroke), var(--shadow-sm);
}

.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.navbar__logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.85rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.navbar__logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255,255,255, 0.2));
}

.navbar__brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Firefox fallback for gradient text */
  color: transparent;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.navbar__link {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--duration-fast) ease,
              background var(--duration-fast) ease;
}

.navbar__link:hover,
.navbar__link:focus-visible {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.navbar__cta {
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-dim));
  color: var(--bg-deep);
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) ease;
  box-shadow: 0 4px 16px var(--accent-teal-glow);
}

.navbar__cta:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 32px var(--accent-teal-glow);
}

/* --- Section Layout --- */
.section {
  position: relative;
  z-index: 1;
  padding: 6rem 1.5rem;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 1rem;
}

.section__eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--accent-teal);
  border-radius: 2px;
}

.section__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section__subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 55ch;
  line-height: 1.7;
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 4rem;
}

.hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem 0.45rem 0.55rem;
  border-radius: var(--radius-full);
  background: rgba(16, 22, 42, 0.92);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInDown 0.8s var(--ease-out) backwards;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-teal);
  box-shadow: 0 0 8px var(--accent-teal-glow);
  animation: pulse 2s ease-in-out infinite;
}

.hero__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.15s backwards;
}

.hero__title-highlight {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Firefox fallback for gradient text */
  color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
}

.hero__subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 52ch;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s backwards;
}

.hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.45s backwards;
}

.hero__trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s backwards;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--stroke);
  background: rgba(16, 22, 42, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.trust-pill__icon {
  font-size: 0.95rem;
}

/* --- Buttons --- */
.btn {
  min-height: 48px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  padding: 0.75rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-spring),
              box-shadow var(--duration-fast) ease,
              background var(--duration-fast) ease;
  touch-action: manipulation;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

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

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-dim));
  color: var(--bg-deep);
  box-shadow: 0 8px 24px var(--accent-teal-glow);
}

.btn-primary:hover {
  box-shadow: 0 12px 40px rgba(0, 229, 195, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--stroke);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--stroke-hover);
}

.btn-lg {
  min-height: 54px;
  padding: 0.9rem 2.2rem;
  font-size: 1.05rem;
}

.btn__arrow {
  transition: transform var(--duration-fast) ease;
}

.btn:hover .btn__arrow {
  transform: translateX(3px);
}

/* --- Stats Band --- */
.stats-band {
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  background: rgba(10, 14, 26, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 3rem 1.5rem;
}

.stats-band__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-item__value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  color: var(--accent-teal);
  margin-bottom: 0.3rem;
}

.stat-item__label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Feature Cards (Scroll Reveal) --- */
.features-grid {
  display: grid;
  gap: 1.5rem;
}

.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  /* Solid fallback so content is legible if backdrop-filter is unsupported */
  background: rgba(14, 19, 36, 0.95);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  transition: border-color var(--duration-normal) ease,
              box-shadow var(--duration-normal) ease;
}

.feature-card:hover {
  border-color: var(--stroke-hover);
  box-shadow: var(--shadow-glow-teal);
}

.feature-card--reverse {
  direction: rtl;
}

.feature-card--reverse > * {
  direction: ltr;
}

.feature-card__content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.feature-card__icon--teal {
  background: rgba(0, 229, 195, 0.1);
  border: 1px solid rgba(0, 229, 195, 0.15);
  color: var(--accent-teal);
}

.feature-card__icon--violet {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.15);
  color: var(--accent-violet);
}

.feature-card__icon--gold {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
}

.feature-card__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

.feature-card__desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

.feature-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.feature-tag {
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--stroke);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Feature Visual Panels --- */
.feature-visual {
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--stroke);
  padding: 1.5rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* P2P Visual */
.p2p-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 1rem;
}

.p2p-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.p2p-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  position: relative;
}

.p2p-avatar--sender {
  background: linear-gradient(135deg, var(--accent-teal), rgba(0, 229, 195, 0.5));
  color: var(--bg-deep);
  box-shadow: 0 0 20px var(--accent-teal-glow);
}

.p2p-avatar--receiver {
  background: linear-gradient(135deg, var(--accent-violet), rgba(124, 58, 237, 0.5));
  color: #fff;
  box-shadow: 0 0 20px var(--accent-violet-glow);
}

.p2p-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.p2p-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.p2p-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-teal);
}

.p2p-arrow {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--text-muted);
}

.p2p-arrow__line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-violet));
  position: relative;
}

.p2p-arrow__line::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid var(--accent-violet);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.p2p-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.p2p-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-teal);
  opacity: 0;
  animation: p2pParticle 3s ease-in-out infinite;
}

.p2p-particle:nth-child(1) { left: 25%; top: 30%; animation-delay: 0s; }
.p2p-particle:nth-child(2) { left: 45%; top: 60%; animation-delay: 0.5s; }
.p2p-particle:nth-child(3) { left: 65%; top: 25%; animation-delay: 1s; background: var(--accent-violet); }
.p2p-particle:nth-child(4) { left: 35%; top: 70%; animation-delay: 1.5s; background: var(--accent-violet); }
.p2p-particle:nth-child(5) { left: 55%; top: 45%; animation-delay: 2s; background: var(--accent-gold); }

/* Voice Command Visual */
.voice-visual {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.voice-waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 40px;
  margin-bottom: 0.5rem;
}

.voice-bar {
  width: 3px;
  background: var(--accent-violet);
  border-radius: 2px;
  /* Firefox needs explicit transform-origin for scaleY in flex containers */
  transform-origin: center bottom;
  will-change: transform;
  animation: voiceWave 1.2s ease-in-out infinite;
}

.voice-bar:nth-child(1) { height: 12px; animation-delay: 0s; }
.voice-bar:nth-child(2) { height: 20px; animation-delay: 0.1s; }
.voice-bar:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.voice-bar:nth-child(4) { height: 24px; animation-delay: 0.3s; }
.voice-bar:nth-child(5) { height: 36px; animation-delay: 0.15s; }
.voice-bar:nth-child(6) { height: 18px; animation-delay: 0.25s; }
.voice-bar:nth-child(7) { height: 28px; animation-delay: 0.35s; }
.voice-bar:nth-child(8) { height: 14px; animation-delay: 0.05s; }
.voice-bar:nth-child(9) { height: 22px; animation-delay: 0.2s; }
.voice-bar:nth-child(10) { height: 30px; animation-delay: 0.1s; }
.voice-bar:nth-child(11) { height: 16px; animation-delay: 0.3s; }
.voice-bar:nth-child(12) { height: 26px; animation-delay: 0.15s; }

.voice-cmd {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--stroke);
  font-family: 'Space Grotesk', monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
  min-height: 2.6rem;
}

.voice-cmd--user {
  border-left: 3px solid var(--accent-violet);
}

.voice-cmd--ai {
  border-left: 3px solid var(--accent-teal);
  color: var(--accent-teal);
}

.voice-cmd--status {
  border-left: 3px solid var(--accent-gold);
  color: var(--accent-gold);
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent-violet);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.8s step-end infinite;
}

/* Security Visual */
.security-visual {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.security-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  border: 1px solid var(--stroke);
  transition: border-color var(--duration-normal) ease,
              background var(--duration-normal) ease;
}

.security-step.is-active {
  border-color: rgba(0, 229, 195, 0.3);
  background: rgba(0, 229, 195, 0.05);
}

.security-step__check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
  transition: all var(--duration-normal) ease;
}

.security-step.is-active .security-step__check {
  background: var(--accent-teal);
  border-color: var(--accent-teal);
  color: var(--bg-deep);
}

.security-step__text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.security-step.is-active .security-step__text {
  color: var(--text-primary);
}

/* --- Comparison Section --- */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--stroke);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem 1.3rem;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
}

.comparison-table thead th {
  background: var(--bg-surface);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.comparison-table thead th:first-child {
  color: var(--text-muted);
}

.comparison-table thead th:last-child {
  color: var(--accent-teal);
}

.comparison-table tbody td {
  background: var(--glass-bg);
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table tbody td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table tbody td:last-child {
  color: var(--accent-teal);
  font-weight: 600;
}

.check-icon {
  color: var(--ok);
  font-weight: 700;
}

.cross-icon {
  color: var(--error);
  opacity: 0.6;
}

/* --- How It Works Timeline --- */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  position: relative;
  margin-top: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(12.5% + 4px);
  right: calc(12.5% + 4px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-violet), var(--accent-gold), var(--ok));
  z-index: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.timeline-step__num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  border: 2px solid var(--stroke);
  background: var(--bg-elevated);
  transition: all var(--duration-slow) var(--ease-out);
}

.timeline-step.is-revealed .timeline-step__num {
  border-color: var(--accent-teal);
  box-shadow: 0 0 24px var(--accent-teal-glow);
}

.timeline-step__num--teal { color: var(--accent-teal); }
.timeline-step__num--violet { color: var(--accent-violet); }
.timeline-step__num--gold { color: var(--accent-gold); }
.timeline-step__num--green { color: var(--ok); }

.timeline-step__content {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-step__title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

.timeline-step__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 22ch;
  margin: 0 auto;
  line-height: 1.5;
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-teal-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .section__title {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.cta-section .section__subtitle {
  margin: 0 auto 2.5rem;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--stroke);
  padding: 2.5rem 1.5rem;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
}

.footer__copy {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================================
   Signup Page Styles
   ============================================================ */

.signup-shell {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 2rem;
}

.signup-card {
  background: rgba(14, 19, 36, 0.97);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.signup-head h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.signup-head p {
  color: var(--text-secondary);
  margin: 0;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-top: 1.5rem;
  position: relative;
}

.step {
  min-height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.5rem 0.3rem;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  font-family: 'Inter', sans-serif;
}

.step:hover:not(:disabled) {
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
}

.step.is-active {
  background: linear-gradient(135deg, rgba(0, 229, 195, 0.15), rgba(0, 229, 195, 0.05));
  border-color: rgba(0, 229, 195, 0.3);
  color: var(--accent-teal);
}

.step-panel {
  display: none;
  margin-top: 1.5rem;
}

.step-panel.is-visible {
  display: block;
  animation: fadeInUp 0.4s var(--ease-out);
}

.step-panel h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.step-intro {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- Forms (shared signup + logs) --- */
form {
  display: grid;
  gap: 0.7rem;
}

label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

input,
select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: border-color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus,
select:focus,
input:focus-visible,
select:focus-visible {
  outline: none;
  border-color: rgba(0, 229, 195, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 229, 195, 0.1);
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(0, 229, 195, 0.3);
  outline-offset: 2px;
}

select {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2.2rem;
}

/* --- Feedback Messages --- */
.feedback {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  min-height: 1.3rem;
}

.feedback.ok {
  color: var(--ok);
}

.feedback.warn {
  color: var(--warn);
}

.feedback.error {
  color: var(--error);
}

/* --- Completion Summary --- */
.summary {
  margin-top: 1rem;
  background: var(--bg-base);
  color: var(--accent-teal);
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  padding: 1.2rem;
  min-height: 160px;
  overflow: auto;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* --- Connect Grid (Step 4) --- */
.connect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.field-block {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.action-row {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ============================================================
   Agent Logs Page Styles
   ============================================================ */

.logs-shell {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 2rem;
}

.logs-card {
  background: rgba(14, 19, 36, 0.97);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.logs-card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.logs-controls {
  margin-top: 1rem;
  display: grid;
  gap: 0.7rem;
}

.logs-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.logs-feed {
  margin-top: 1rem;
  display: grid;
  gap: 0.55rem;
}

.logs-feed li {
  border: 1px solid var(--stroke);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 0.8rem;
}

.logs-time {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
}

.logs-status {
  margin-top: 0.8rem;
  min-height: 1.2rem;
}

/* --- Hero Section (for sub-pages) --- */
.hero-copy {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 0.6rem;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
}

.hero-sub {
  color: var(--text-secondary);
  margin: 0.6rem 0 1rem;
  max-width: 55ch;
}

/* --- Topbar (for sub-pages) --- */
.topbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-pill {
  width: 12px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--accent-teal), var(--accent-violet));
}

.brand-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.top-nav {
  display: flex;
  gap: 0.5rem;
}

.top-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  transition: color var(--duration-fast) ease,
              background var(--duration-fast) ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: var(--bg-surface);
  color: var(--text-primary);
  outline: none;
}

/* --- Background Orbs (for sub-pages) --- */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.bg-orb-a {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
  top: -200px;
  left: -100px;
  animation: meshFloat1 14s ease-in-out infinite;
}

.bg-orb-b {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-violet) 0%, transparent 70%);
  right: -100px;
  top: 200px;
  animation: meshFloat2 18s ease-in-out infinite;
}

/* Ensure main content is above bg */
main {
  position: relative;
  z-index: 1;
}

/* hero/reveal for sub-pages */
.hero.reveal,
.logs-shell.reveal,
.signup-shell.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero.reveal.in-view,
.logs-shell.reveal.in-view,
.signup-shell.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Scroll Reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

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

@keyframes voiceWave {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes meshFloat1 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(30px, -20px, 0); }
  66% { transform: translate3d(-15px, 15px, 0); }
}

@keyframes meshFloat2 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  33% { transform: translate3d(-25px, 15px, 0); }
  66% { transform: translate3d(20px, -10px, 0); }
}

@keyframes meshFloat3 {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(15px, -25px, 0); }
}

@keyframes p2pParticle {
  0% { opacity: 0; transform: scale(0) translateY(0); }
  30% { opacity: 0.7; transform: scale(1) translateY(-10px); }
  70% { opacity: 0.4; transform: scale(0.8) translateY(-25px); }
  100% { opacity: 0; transform: scale(0) translateY(-40px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes securityCycle {
  0%, 20% { opacity: 1; }
  25%, 100% { opacity: 0.5; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .feature-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .feature-card--reverse {
    direction: ltr;
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .timeline::before {
    display: none;
  }

  .stats-band__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .section {
    padding: 4rem 1.2rem;
  }

  .navbar__links {
    display: none;
  }

  .hero__title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .stats-band__inner {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .timeline {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .comparison-table {
    font-size: 0.85rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.7rem 0.9rem;
  }

  .stepper {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .p2p-visual {
    flex-direction: column;
    gap: 0.8rem;
  }

  .p2p-arrow {
    transform: rotate(90deg);
  }
}

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

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

/* --- Gradient Text Utility (cross-browser) --- */
.cta-gradient-text {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* Firefox fallback — 'color' is overridden by -webkit-text-fill-color in WebKit/Blink
     but acts as the actual text color in Firefox which supports background-clip:text
     since v122 but still needs this for older versions */
  color: transparent;
}

/* ============================================================
   Reduced Motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   Firefox / No-backdrop-filter Fallbacks
   @supports (not (backdrop-filter: blur(1px))) ensures browsers
   that don't support backdrop-filter still get legible, solid cards.
   ============================================================ */
@supports not (backdrop-filter: blur(1px)) {
  .feature-card,
  .signup-card,
  .logs-card,
  .stats-band,
  .hero__badge,
  .trust-pill {
    background: rgba(12, 16, 30, 1) !important;
  }

  .navbar.is-scrolled {
    background: rgba(8, 11, 22, 1) !important;
  }
}

/* Firefox-specific: remove backdrop-filter from navbar transition
   since Firefox cannot animate backdrop-filter smoothly */
@-moz-document url-prefix() {
  .navbar {
    transition: background 0.4s ease, box-shadow 0.4s ease;
  }
}
