/* ============================================
   NekoChat — Retro-Modern Design System
   Synthwave meets modern minimalism
   ============================================ */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
  --neon-cyan: #00fff9;
  --neon-pink: #ff00ff;
  --neon-purple: #b400ff;
  --neon-blue: #0088ff;
  --hot-pink: #ff2d95;
  --electric-blue: #00d4ff;
  --deep-purple: #1a0033;
  --dark-bg: #0a0015;
  --card-bg: rgba(16, 0, 32, 0.85);
  --card-bg-hover: rgba(24, 0, 48, 0.92);
  --surface: rgba(26, 0, 51, 0.90);

  --text-primary: #f0e6ff;
  --text-secondary: #b8a0d0;
  --text-muted: #8070a0;
  --border-retro: rgba(0, 255, 249, 0.15);
  --border-glow: rgba(0, 255, 249, 0.35);
  --shadow-retro: rgba(0, 255, 249, 0.12);
  --shadow-deep: rgba(180, 0, 255, 0.20);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 999px;

  --transition-fast: 200ms ease;
  --transition-normal: 350ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 600ms cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--dark-bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============================================
   Custom Retro Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--dark-bg);
  border-left: 1px solid var(--border-retro);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-pink), var(--neon-purple));
  border-radius: var(--radius-full);
  border: 2px solid var(--dark-bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-pink), var(--neon-cyan));
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon-pink) var(--dark-bg);
}

/* ============================================
   Container
   ============================================ */
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.reveal--left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--left.reveal--visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--right.reveal--visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--scale.reveal--visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 0, 21, 0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-retro);
  transition: background var(--transition-normal);
}

.site-header.scrolled {
  background: rgba(10, 0, 21, 0.95);
  box-shadow: 0 4px 30px rgba(0, 255, 249, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
  min-height: 64px;
}

/* Brand */
.brand-link {
  display: inline-flex;
  text-decoration: none;
  color: inherit;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  font-weight: 900;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.3), 0 0 40px rgba(255, 0, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.12));
  pointer-events: none;
}

.brand h1 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--text-primary), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
}

.brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* Desktop Nav */
.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:not(.button):hover {
  color: var(--neon-cyan);
  background: rgba(0, 255, 249, 0.06);
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.3);
}

/* Active nav link */
.nav-links a.active {
  color: var(--neon-cyan);
  background: rgba(0, 255, 249, 0.06);
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.3);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--neon-cyan);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(0, 255, 249, 0.5);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
  box-shadow: 0 0 12px rgba(0, 255, 249, 0.3);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.menu-toggle svg {
  width: 28px;
  height: 28px;
  transition: transform var(--transition-normal);
}

.menu-toggle.open svg {
  transform: rotate(90deg);
}

/* ============================================
   Buttons — Retro Neon
   ============================================ */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.8rem 1.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.button:hover {
  box-shadow: 0 0 20px rgba(0, 255, 249, 0.15);
}

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

/* Primary — Neon Cyan */
.button-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--electric-blue));
  color: #0a0015;
  font-weight: 800;
  box-shadow: 0 0 20px rgba(0, 255, 249, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  border: 1px solid rgba(0, 255, 249, 0.4);
}

.button-primary:hover {
  box-shadow: 0 0 30px rgba(0, 255, 249, 0.4), 0 0 60px rgba(0, 255, 249, 0.1);
}

/* Secondary — Neon Pink outline */
.button-secondary {
  background: transparent;
  color: var(--neon-pink);
  border: 1px solid var(--neon-pink);
  box-shadow: 0 0 8px rgba(255, 0, 255, 0.1);
}

.button-secondary:hover {
  background: rgba(255, 0, 255, 0.08);
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.25);
  color: var(--neon-pink);
}

/* Ripple */
.button .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: rippleAnim 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ============================================
   Section Shared
   ============================================ */
section {
  padding: 4rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 800;
  position: relative;
  text-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.eyebrow::before,
.eyebrow::after {
  content: '◆';
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.5rem;
  opacity: 0.5;
  font-size: 0.5rem;
  color: var(--neon-cyan);
}

.section-header h3 {
  font-size: clamp(1.6rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--neon-cyan) 70%, var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-action {
  display: flex;
  justify-content: center;
  padding-top: 2rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  padding: 5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-pink), transparent);
  opacity: 0.3;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.hero h2 {
  font-size: clamp(2.5rem, 4.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--neon-cyan) 50%, var(--neon-pink) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 30px rgba(0, 255, 249, 0.08));
}

.hero p {
  margin: 1.25rem 0 1.5rem;
  max-width: 60ch;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Scroll Down Arrow */
.scroll-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity var(--transition-normal);
  z-index: 2;
  cursor: pointer;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
}

.scroll-indicator .arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--neon-cyan);
  border-bottom: 2px solid var(--neon-cyan);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
  opacity: 0.5;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.3; }
  50% { transform: rotate(45deg) translate(4px, 4px); opacity: 0.7; }
}

/* Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}

.hero-stats div {
  background: var(--surface);
  border: 1px solid var(--border-retro);
  padding: 1.25rem 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.hero-stats div::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(0, 255, 249, 0.03));
  pointer-events: none;
}

.hero-stats div:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(0, 255, 249, 0.06);
}

.hero-stats .stat-icon {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 0.3rem;
}

.hero-stats strong {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.hero-stats .stat-label {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 0.25rem;
  display: block;
}

.counter {
  display: inline-block;
}

.suffix {
  font-size: inherit;
  font-weight: inherit;
  background: inherit;
  -webkit-background-clip: inherit;
  -webkit-text-fill-color: inherit;
  background-clip: inherit;
}

/* ============================================
   Features Section
   ============================================ */
.features,
.why,
.security,
.pricing {
  padding: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.feature-card:hover {
  background: var(--card-bg-hover);
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow-deep), 0 0 20px rgba(0, 255, 249, 0.04);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  opacity: 0.7;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(0, 255, 249, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  color: var(--neon-cyan);
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 0, 255, 0.10), rgba(0, 255, 249, 0.06));
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 255, 249, 0.08);
}

/* ============================================
   Why Section
   ============================================ */
.why-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3rem;
}

.why h3 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  line-height: 1.08;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.why p {
  margin: 1rem 0 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.why-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.why-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.why-list li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--neon-pink);
  font-size: 0.6rem;
}

/* Stats Card */
.stats-card {
  background: var(--surface);
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: grid;
  gap: 1.25rem;
}

.stats-card div {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  background: rgba(0, 255, 249, 0.02);
  border: 1px solid transparent;
  transition: all var(--transition-normal);
}

.stats-card div:hover {
  border-color: var(--border-glow);
  background: rgba(0, 255, 249, 0.03);
}

.stats-card .stats-card-label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.stats-card strong {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Pricing Section
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px var(--shadow-deep), 0 0 20px rgba(0, 255, 249, 0.04);
  border-color: var(--border-glow);
}

.pricing-card.popular {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.08);
}

.pricing-card.popular::before {
  content: 'BEST VALUE';
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  padding: 0.3rem 0.6rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.pricing-card h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--neon-cyan);
}

.pricing-card > p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
}

.pricing-card ul {
  margin: 1.5rem 0;
  display: grid;
  gap: 0.65rem;
  flex: 1;
}

.pricing-card li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-card li::before {
  content: '✦';
  color: var(--neon-cyan);
  font-weight: 400;
  font-size: 0.65rem;
}

.price {
  font-size: 2.2rem;
  font-weight: 800;
  margin-top: auto;
  padding-top: 1.25rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-card .button {
  margin-top: 1.25rem;
  width: 100%;
}

/* Disabled / Coming Soon buttons */
.button[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.button[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: none;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
  padding: 4rem 0;
}

.cta-card {
  background: linear-gradient(135deg, rgba(0, 255, 249, 0.04), rgba(180, 0, 255, 0.04), rgba(10, 0, 21, 0.95));
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-xl);
  padding: 3rem;
  display: grid;
  gap: 1.5rem;
  text-align: center;
  box-shadow: 0 30px 60px var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 255, 249, 0.04), transparent 70%);
  pointer-events: none;
}

.cta-card h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-card > div p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.signup-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
}

.signup-form input {
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  background: rgba(16, 0, 32, 0.90);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.signup-form input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 255, 249, 0.10);
}

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

.form-message {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: center;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-retro);
  padding: 2rem 0;
}

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

.footer-inner p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.3);
}

.footer-links a.active {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px rgba(0, 255, 249, 0.3);
}

/* ============================================
   Sub-pages (Detail Hero, Detail Grid)
   ============================================ */
.detail-hero {
  padding: 5rem 0 2rem;
}

.detail-hero h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.08;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.detail-hero p {
  margin: 1rem 0 1.5rem;
  max-width: 64ch;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.details-grid {
  padding: 2rem 0 4rem;
}

.details-grid .container {
  display: grid;
  gap: 1rem;
}

.detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.detail-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(0, 255, 249, 0.03), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  pointer-events: none;
}

.detail-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--shadow-deep);
}

.detail-card:hover::after {
  opacity: 1;
}

.detail-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
  color: var(--neon-cyan);
}

.detail-card p {
  color: var(--text-secondary);
  line-height: 1.65;
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
}

.detail-card .button {
  margin-top: 1.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ============================================
   Typing Effect Cursor
   ============================================ */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--neon-cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
  box-shadow: 0 0 6px rgba(0, 255, 249, 0.6);
}

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

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

.page-enter {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-enter-delay-1 { animation-delay: 0.1s; }
.page-enter-delay-2 { animation-delay: 0.2s; }
.page-enter-delay-3 { animation-delay: 0.3s; }

/* ============================================
   Back to Top — Slide out/in
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  box-shadow: 0 0 20px rgba(255, 0, 255, 0.25);
  opacity: 0;
  transform: translateX(20px);
  transition: all var(--transition-normal);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateX(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.35);
}

/* ============================================
   Responsive — Tablet
   ============================================ */
@media (max-width: 900px) {
  .why-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  section {
    padding: 3.5rem 0;
  }
}

/* ============================================
   Responsive — Mobile
   ============================================ */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    background: rgba(10, 0, 21, 0.96);
    backdrop-filter: blur(24px);
    padding: 5rem 1.5rem 2rem;
    gap: 0.25rem;
    transition: right var(--transition-normal);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    z-index: 105;
    align-items: stretch;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    width: 100%;
  }

  .nav-links .button {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
  }

  .nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 104;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
  }

  .nav-overlay.open {
    opacity: 1;
    pointer-events: all;
  }

  .hero {
    padding: 3.5rem 0 2rem;
  }

  .hero h2 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .scroll-indicator {
    display: none;
  }

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

  .header-inner {
    padding: 0.6rem 0;
    min-height: 56px;
  }

  .cta-card {
    padding: 2rem 1.5rem;
  }

  .signup-form {
    grid-template-columns: 1fr;
  }

  .container {
    width: min(1120px, calc(100% - 1.25rem));
  }

  .section-header h3,
  .why h3 {
    font-size: clamp(1.5rem, 6vw, 1.8rem);
  }

  .feature-card,
  .pricing-card,
  .stats-card,
  .detail-card {
    padding: 1.35rem;
  }

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

  .footer-links {
    justify-content: center;
    gap: 1rem;
  }

  .back-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .detail-hero {
    padding: 3.5rem 0 1.5rem;
  }

  .detail-hero h2 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }
}

@media (max-width: 480px) {
  .brand p { display: none; }

  .hero { padding: 2.5rem 0 1.5rem; }

  .button {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
  }

  .hero-stats .stat-icon { display: none; }
}

/* ============================================
   Skip to Content (Accessibility)
   ============================================ */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--neon-cyan);
  color: var(--dark-bg);
  padding: 0.75rem 1.5rem;
  z-index: 99999;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 var(--radius-md) 0;
  transition: top 0.3s ease;
}

.skip-to-content:focus {
  top: 0;
}

/* ============================================
   Screen Reader Only
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

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

/* ============================================
   High Contrast Mode
   ============================================ */
@media (prefers-contrast: high) {
  :root {
    --border-retro: rgba(0, 255, 249, 0.5);
    --text-secondary: #f0e6ff;
    --text-muted: #b8a0d0;
  }

  .button {
    border: 2px solid currentColor;
  }
}

/* ============================================
   Focus Trap Indicator
   ============================================ */
.nav-links.open a:focus,
.nav-links.open button:focus {
  outline: 3px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* ============================================
   Dark/Light Mode Toggle
   ============================================ */
.theme-toggle {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
  color: var(--neon-cyan);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  z-index: 50;
  transition: all var(--transition-normal);
  backdrop-filter: blur(20px);
}

.theme-toggle:hover {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 255, 249, 0.2);
}

/* Light Mode */
body.light-mode {
  --dark-bg: #f0f0f5;
  --card-bg: rgba(255, 255, 255, 0.9);
  --card-bg-hover: rgba(255, 255, 255, 0.95);
  --surface: rgba(240, 240, 245, 0.95);
  --text-primary: #1a0033;
  --text-secondary: #4a4a5a;
  --text-muted: #6a6a7a;
  --border-retro: rgba(0, 0, 0, 0.1);
  --border-glow: rgba(0, 0, 0, 0.2);
}

body.light-mode .site-header {
  background: rgba(240, 240, 245, 0.90);
  border-bottom: 1px solid var(--border-retro);
}

body.light-mode .feature-card,
body.light-mode .pricing-card,
body.light-mode .detail-card,
body.light-mode .stats-card {
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
}

/* ============================================
   Grain Texture + Vignette Overlay
   ============================================ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.02) 2px,
      rgba(0, 0, 0, 0.02) 4px
    );
}

/* ============================================
   Animated Gradient Border
   ============================================ */
@keyframes gradientBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.feature-card:hover::before,
.pricing-card.popular::before {
  animation: gradientBorder 3s ease infinite;
  background-size: 200% 200%;
}

/* ============================================
   Offline Indicator
   ============================================ */
.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  padding: 0.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 99999;
  transform: translateY(-100%);
  transition: transform var(--transition-normal);
}

.offline-indicator.visible {
  transform: translateY(0);
}

/* ============================================
   System Status Page
   ============================================ */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.3);
  border-radius: var(--radius-full);
  color: #86efac;
  font-weight: 700;
  font-size: 0.9rem;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #86efac;
  border-radius: 50%;
  animation: statusPulse 2s ease-in-out infinite;
}

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

.status-card {
  background: var(--card-bg);
  border: 1px solid var(--border-retro);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.status-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.status-card-uptime {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-bar {
  height: 8px;
  background: var(--surface);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.75rem;
}

.status-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-pink));
  border-radius: var(--radius-full);
  transition: width 1s ease;
}

/* ============================================
   Changelog Page
   ============================================ */
.changelog-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-retro);
}

.changelog-date {
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--neon-cyan);
}

.changelog-content h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.changelog-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.changelog-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* ============================================
   Mobile Bottom Navigation
   ============================================ */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border-retro);
  display: none;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  padding: 0.5rem;
  transition: color var(--transition-fast);
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--neon-cyan);
}

.mobile-nav-icon {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: flex;
  }

  body {
    padding-bottom: 70px;
  }

  .theme-toggle {
    bottom: 5rem;
    left: 1rem;
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   Custom Text Selection
   ============================================ */
::selection {
  background: var(--neon-cyan);
  color: var(--dark-bg);
}

::-moz-selection {
  background: var(--neon-cyan);
  color: var(--dark-bg);
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .toast-container,
  .back-to-top,
  .theme-toggle,
  .mobile-nav,
  .offline-indicator,
  .site-header,
  .site-footer,
  .scroll-indicator {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .container {
    width: 100%;
    max-width: none;
  }

  a {
    text-decoration: underline;
    color: black;
  }

  .feature-card,
  .pricing-card,
  .detail-card,
  .cta-card {
    border: 1px solid #ccc;
    background: white;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ============================================
   Form Validation Styles
   ============================================ */
.signup-form input.error {
  border-color: #f87171;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.signup-form input.success {
  border-color: #86efac;
  box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.1);
}

/* ============================================
   Error Page (404)
   ============================================ */
.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

.error-code {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--neon-pink), var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 1rem;
}

.error-message {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.error-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 320px;
}

.toast {
  background: var(--card-bg);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 24px var(--shadow-deep);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(20px);
}

.toast.toast-exit {
  animation: toastSlideOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.toast-success {
  border-color: rgba(134, 239, 172, 0.3);
}

.toast-success .toast-icon {
  color: #86efac;
}

.toast-error {
  border-color: rgba(248, 113, 113, 0.3);
}

.toast-error .toast-icon {
  color: #f87171;
}

.toast-info {
  border-color: rgba(0, 255, 249, 0.3);
}

.toast-info .toast-icon {
  color: var(--neon-cyan);
}

/* ============================================
   Tooltip
   ============================================ */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: var(--card-bg);
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  pointer-events: none;
  z-index: 100;
  box-shadow: 0 4px 12px var(--shadow-deep);
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Smooth Transitions for Interactive Elements
   ============================================ */
a, button, .button {
  transition: all var(--transition-fast);
}

/* Ensure color transitions */
.hero-stats strong,
.pricing-card h4,
.detail-card h3 {
  transition: all var(--transition-fast);
}

/* ============================================
   Touch Feedback for Mobile
   ============================================ */
@media (hover: none) {
  .button:active {
    transform: scale(0.98);
  }

  .feature-card:active,
  .pricing-card:active,
  .detail-card:active {
    transform: scale(0.99);
  }
}

/* ============================================
   Viewport for Notched Devices
   ============================================ */
@supports (padding-top: env(safe-area-inset-top)) {
  .site-header {
    padding-top: env(safe-area-inset-top);
  }

  .back-to-top {
    bottom: calc(2rem + env(safe-area-inset-bottom));
    right: calc(2rem + env(safe-area-inset-right));
  }

  .toast-container {
    top: calc(5rem + env(safe-area-inset-top));
    right: calc(1.5rem + env(safe-area-inset-right));
  }
}
