/* ========================================
   Wisperflow — Dark Theme Landing Page
   ======================================== */

:root {
  --bg: #0F0F0F;
  --bg-secondary: #1A1A1A;
  --card: #252525;
  --card-border: rgba(255, 255, 255, 0.06);
  --accent: #00D9B5;
  --accent-glow: rgba(0, 217, 181, 0.15);
  --accent-hover: #00F0C8;
  --text-primary: rgba(255, 255, 255, 0.92);
  --text-secondary: rgba(255, 255, 255, 0.5);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --radius: 12px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  transition: all 0.3s ease;
}

.nav.scrolled {
  background: rgba(15, 15, 15, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 18px;
}

.nav-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--accent);
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}

.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 40px;
}

.hero-icon-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(30px);
  animation: pulse-glow 3s ease-in-out infinite;
}

.hero-icon {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.accent-text {
  background: linear-gradient(135deg, var(--accent) 0%, #00F5D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  font-size: 16px;
  border-radius: 10px;
  padding: 14px 32px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--card);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  background: #2a2a2a;
}

/* ========================================
   Features
   ======================================== */
.features {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.feature-card:hover {
  border-color: rgba(0, 217, 181, 0.15);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.feature-icon-wrapper {
  width: 48px;
  height: 48px;
  background: rgba(0, 217, 181, 0.1);
  border: 1px solid rgba(0, 217, 181, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-emoji {
  font-size: 22px;
}

.feature-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   How It Works
   ======================================== */
.how-it-works {
  padding: 120px 0;
}

.steps {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.step-visual {
  margin-top: 8px;
}

/* Key caps */
.key-cap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 20px;
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  margin-right: 8px;
  transition: transform 0.15s;
}

.key-cap:last-child {
  animation: key-press 1.5s ease-in-out infinite;
}

/* Waveform */
.waveform-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 48px;
  padding: 12px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.wave-bar {
  width: 3px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite;
}

.wave-bar:nth-child(1)  { animation-delay: 0.00s; }
.wave-bar:nth-child(2)  { animation-delay: 0.06s; }
.wave-bar:nth-child(3)  { animation-delay: 0.12s; }
.wave-bar:nth-child(4)  { animation-delay: 0.18s; }
.wave-bar:nth-child(5)  { animation-delay: 0.24s; }
.wave-bar:nth-child(6)  { animation-delay: 0.30s; }
.wave-bar:nth-child(7)  { animation-delay: 0.36s; }
.wave-bar:nth-child(8)  { animation-delay: 0.42s; }
.wave-bar:nth-child(9)  { animation-delay: 0.48s; }
.wave-bar:nth-child(10) { animation-delay: 0.54s; }
.wave-bar:nth-child(11) { animation-delay: 0.60s; }
.wave-bar:nth-child(12) { animation-delay: 0.66s; }
.wave-bar:nth-child(13) { animation-delay: 0.72s; }
.wave-bar:nth-child(14) { animation-delay: 0.78s; }
.wave-bar:nth-child(15) { animation-delay: 0.84s; }
.wave-bar:nth-child(16) { animation-delay: 0.90s; }
.wave-bar:nth-child(17) { animation-delay: 0.96s; }
.wave-bar:nth-child(18) { animation-delay: 1.02s; }
.wave-bar:nth-child(19) { animation-delay: 1.08s; }
.wave-bar:nth-child(20) { animation-delay: 1.14s; }

@keyframes wave {
  0%, 100% { height: 8px; opacity: 0.4; }
  50%      { height: 32px; opacity: 1; }
}

/* Typing demo */
.typing-demo {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-primary);
  font-family: "SF Mono", "Fira Code", monospace;
}

.typed-text {
  overflow: hidden;
  white-space: nowrap;
  animation: typing 3s steps(40) infinite;
  max-width: 0;
}

.cursor-blink {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}

@keyframes typing {
  0%   { max-width: 0; }
  50%  { max-width: 400px; }
  90%  { max-width: 400px; }
  100% { max-width: 0; }
}

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

@keyframes key-press {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
}

/* ========================================
   Pricing
   ======================================== */
.pricing {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 780px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.pricing-card:hover {
  border-color: rgba(0, 217, 181, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(0, 217, 181, 0.1);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.pricing-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  white-space: nowrap;
}

.pricing-currency {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-secondary);
}

.pricing-value {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.pricing-unit {
  font-size: 16px;
  color: var(--text-secondary);
  font-weight: 500;
}

.pricing-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.pricing-features {
  list-style: none;
  margin-bottom: 32px;
  text-align: left;
}

.pricing-features li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pricing-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.btn-pay {
  width: 100%;
}

.btn-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.context-menu-wrapper {
  position: relative;
  width: 100%;
}

.context-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 4px 0;
  min-width: 120px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  z-index: 50;
}

.context-menu.visible {
  display: block;
}

.context-menu-item {
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--card-border);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
}

.footer-logo {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

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

.footer-disclaimer {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* ========================================
   Thank You Overlay
   ======================================== */
.thankyou-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thankyou-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  max-width: 420px;
}

.thankyou-icon {
  font-size: 48px;
  margin-bottom: 20px;
}

.thankyou-card h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.thankyou-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

/* ========================================
   Fade-in Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.1); }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-icon {
    width: 72px;
    height: 72px;
  }

  .steps {
    gap: 36px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .pricing-card {
    padding: 32px 24px;
  }

  .pricing-value {
    font-size: 44px;
  }

  .typing-demo {
    font-size: 12px;
  }
}
