/* ==========================================================================
   Keyper Landing Page - Modern Apple Dark Aesthetic & Glassmorphism
   ========================================================================== */

:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12141c;
  --bg-card: rgba(22, 25, 36, 0.7);
  --bg-card-hover: rgba(30, 35, 52, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(99, 102, 241, 0.35);

  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
  --shadow-key: 0 4px 0 rgba(0, 0, 0, 0.5), 0 6px 12px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Background Ambient Glows */
.bg-glow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glow-1 {
  position: absolute;
  top: -15%;
  left: 20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  animation: pulse-glow 10s ease-in-out infinite alternate;
}

.bg-glow-2 {
  position: absolute;
  top: 40%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
  filter: blur(90px);
  animation: pulse-glow 12s ease-in-out infinite alternate-reverse;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.8; }
  100% { transform: scale(1.15) translate(30px, -20px); opacity: 1; }
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 100;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
}

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

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

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

.nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-highlight);
  color: var(--text-primary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding-top: 150px;
  padding-bottom: 70px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-dot 2s infinite;
}

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

.hero-title {
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 70%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
  color: #ffffff;
  padding: 14px 30px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  padding: 14px 26px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-highlight);
  transition: all 0.25s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   Interactive Keyboard Simulator (The Showstopper!)
   ========================================================================== */

.simulator-section {
  padding: 20px 0 80px;
}

.simulator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-subtle), 0 0 60px rgba(99, 102, 241, 0.12);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.simulator-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Sound Schemes Bar */
.scheme-selector-wrapper {
  margin-bottom: 24px;
}

.scheme-selector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.scheme-selector-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.scheme-hint {
  font-size: 13px;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.scheme-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scheme-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  user-select: none;
}

.scheme-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

.scheme-btn.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  border-color: var(--accent-indigo);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.3);
}

/* Typing Sandbox Input */
.sandbox-box {
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sandbox-box:focus-within {
  border-color: var(--accent-indigo);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.25);
}

.sandbox-icon {
  color: var(--accent-blue);
  font-size: 20px;
}

.sandbox-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
  font-family: inherit;
}

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

.sandbox-badge {
  font-size: 12px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-mono);
}

/* Virtual Mechanical Keyboard Visualizer */
.keyboard-deck {
  background: #141620;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6), 0 8px 24px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}

.keyboard-row:last-child {
  margin-bottom: 0;
}

.keycap {
  height: 44px;
  min-width: 44px;
  background: linear-gradient(180deg, #242738 0%, #1a1c28 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid rgba(0, 0, 0, 0.6);
  border-radius: 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 0 #0d0f17, 0 4px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.08s ease;
  position: relative;
  overflow: hidden;
  padding: 0 8px;
}

.keycap:hover {
  background: linear-gradient(180deg, #2e3247 0%, #222536 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
}

.keycap.active, .keycap:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 #0d0f17, 0 1px 2px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #4f46e5 0%, #4338ca 100%) !important;
  color: #ffffff !important;
  border-color: #818cf8 !important;
}

.keycap.active::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  animation: key-ripple 0.4s ease-out;
}

@keyframes key-ripple {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* Keycap special widths */
.key-backspace { min-width: 72px; }
.key-tab { min-width: 60px; }
.key-caps { min-width: 70px; }
.key-enter { min-width: 84px; }
.key-shift-l { min-width: 90px; }
.key-shift-r { min-width: 104px; }
.key-space { min-width: 260px; }
.key-mod { min-width: 52px; font-size: 11px; }

/* Features Grid */
.features-section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px;
}

.section-badge {
  color: var(--accent-indigo);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  display: inline-block;
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  position: relative;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(99, 102, 241, 0.15);
  background: var(--bg-card-hover);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #818cf8;
}

.feature-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ffffff;
}

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

/* Secret Code QAZ123 Interactive Section */
.secret-section {
  padding: 60px 0;
}

.secret-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-lg);
  padding: 44px;
  text-align: center;
  box-shadow: 0 0 50px rgba(99, 102, 241, 0.15);
  position: relative;
}

.secret-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
}

.secret-desc {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 540px;
  margin: 0 auto 28px;
}

.secret-keys-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.secret-keycap {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(180deg, #2a2e45 0%, #1b1d2d 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: 3px solid #0f1019;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: all 0.2s ease;
  cursor: pointer;
}

.secret-keycap.unlocked {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  border-color: #34d399;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.secret-plus {
  color: var(--text-muted);
  font-size: 20px;
  font-weight: 700;
}

.secret-status {
  font-size: 13px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

/* Sound Schemes Gallery */
.schemes-gallery-section {
  padding: 60px 0;
}

.schemes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.scheme-card-item {
  background: rgba(22, 25, 36, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scheme-card-item:hover {
  background: rgba(30, 35, 52, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.scheme-card-icon {
  font-size: 28px;
}

.scheme-card-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

.scheme-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Call to Action Footer */
.cta-section {
  padding: 80px 0;
  text-align: center;
}

.cta-box {
  background: linear-gradient(180deg, rgba(22, 25, 36, 0.8) 0%, rgba(15, 17, 26, 0.95) 100%);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  padding: 60px 30px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
}

.cta-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.cta-desc {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 580px;
  margin: 0 auto 32px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* Settings Modal Mockup (Triggered by QAZ123) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-window {
  width: 520px;
  background: #181922;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(99, 102, 241, 0.3);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-window {
  transform: scale(1);
}

.modal-header {
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.traffic-lights {
  display: flex;
  gap: 8px;
}

.traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
}

.light-red { background: #ff5f56; }
.light-yellow { background: #ffbd2e; }
.light-green { background: #27c93f; }

.modal-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.modal-body {
  padding: 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .keyboard-deck {
    display: none; /* Hide full mechanical deck on small mobile, keep sandbox */
  }
  .nav-links .nav-link {
    display: none;
  }
  .hero {
    padding-top: 110px;
  }
}
